Simulation on Client
This simulation method runs the workflow on your mobile device by using MobileTogether Designer as a server. It reports server messages in the Messages Pane of MobileTogether Designer. Simulation on the client assumes that your mobile device can connect to your PC over wireless LAN. To run a client simulation, carry out the steps listed below. (For client simulations of compiled apps, see the box below.)
1.Start MobileTogether on your client device and click the MobileTogether app's Settings | Server icon. 2.Add a new server and enter the following data: a connection name, the IP address of the machine on which MobileTogether Designer is running, and the port number on which MobileTogether Designer is listening (by default this is 8083). (In MobileTogether Designer, click Run | Trial Run on Client to check at which port MobileTogether Designer will be listening.) 3.Save the server settings.
|
1.If MobileTogether Server is running on your PC and uses the same port as the designer's listening port (see previous point), then stop MobileTogether Server running as a service. 2.In MobileTogether Designer, you can change MobileTogether Designer's listening port. Do this in the Trial Run on Client tab of the Options dialog (Tools | Options). 3.In MobileTogether Designer, select Run | Trial Run on Client. This does two things: (i) opens, in designer, a Trial Run on Client dialog that will show the page sources of the solution, and (ii) opens the designer's connection to the client. Note that communication between designer and client starts only when Trial Run on Client has been started in MobileTogether Designer. In the Trial Run on Client dialog, click Find to search for text within the returned data. 4.On the client device, refresh the view to see a listing of the designs (the design list) that are currently open in MobileTogether Designer.
|
1.On the client, select from the design list the solution that you want to test. 2.This opens a prompt in MobileTogether Designer asking if you want to start the solution. Click Yes. The trial run of the solution starts on the client and the solution's page sources now appear in the dialog box of MobileTogether Designer. 3.Click Back/Return to stop the current solution. A prompt appears asking if you want to stop. Click Yes.
|
Note: | A design file can be used by only one client at a time for client simulation. |
Client simulations of compiled appsThe procedure for simulating a trial run of a compiled app is similar to that for solutions described above. The main difference is that the designer's connection details will have already been specified in the compiled app (see Screen 3 of the Code-Generation wizard). As a result, these details do not need to be set on the client.
Additionally, after you have compiled an app-store app, the design can be changed as often as you like. You will not need to recompile the app to run a client simulation. The app will connect to MobileTogether Designer and use the currently open version of the design.
The steps to set up client simulations of a compiled app are as follows:
1.In MobileTogether Designer, go to the Trial Run on Client tab of the Options dialog and make sure that the listening port specified there is the same as that you specified in the compiled app (in Screen 3 of the Code-Generation wizard). 2.In MobileTogether Designer, open the project file (.mtd) of the compiled app that you want to test, and edit it as required. 3.Start the compiled app on your device. The compiled app will use the project file in MobileTogether Designer (including the last edit even if this was not saved), and the pages sources and simulation messages will be displayed in MobileTogether Designer.
|
Simulation language
The simulation language for designer and server simulations is selected via the Project | Simulation Language command. The language of client simulations is the same as the language of the client mobile device on which the simulation runs.
XML trees of page sources in the Simulator
The XML trees in the simulator display the XML data of the various page sources and how these values change as the simulation progresses. The context menu of XML trees in the simulator offers the following features:
•Copy XPath: Copies to the clipboard an XPath locator expression that locates the selected tree node.
•Save XML: Saves the structure and data of an XML tree to any location you like.
•View in XMLSpy: Opens the XML tree in Altova's XMLSpy program.
•Overwrite $XML structure based on this tree: Overwrites the structure of a page source with the structure of the XML tree in the simulator.
•Send XML to Designer: Sends all client XML data to the designer, enabling you to analyze the solution's XML data.