Starting with Servoy 7.2 (in developer) and Servoy 7.3 (for automated testing) you have the ability to run jsunit tests for mobile solutions. The test will run browser-side in an mobile 'test' client (which is actually a normal mobile client with small changes to allow unit tests - for automatic authentication, test-suite reporting, ...).
Mobile jsunit tests can be run - similar to Smart Client jsunit tests - both from Servoy Developer (using a browser installed in your OS) or as automated tests that can run as part of an automated build system (Jenkins, Cruise-Control, ...).
In order to write tests for your mobile solution - let's name it 'x' - you can create a new solution 'test_x' solution that has 'x' as a module.
Then you write the unit tests in the usual way. Methods prefixed with 'test' in global/form scopes will be considered to be test-cases and will run wrapped between 'setUp' and 'tearDown' methods of the same scope. Use 'jsunit.assert...' methods to check that everything happens as expected.
Create a 'test_x_service' solution that will feed data and table information as needed to your mobile client test solution - just like you would do with a normal mobile test solution.
A very basic sample mobile test solution setup is available for download at building a software factory tutorial.
In order to run mobile jsunit tests in Servoy Developer you can use:
Click on Organize and you will get a launch configuration window where you can see/modify the details used for running mobile client tests (a new tab besides the settings used by the usual mobile client launchers):
There you can for example change the username / password to match those that should be recieved in the mobile test service solution and alter the test client connect timeout (if developer doesn't receive a connection from the browser mobile test client in that interval it declares the tests as failed).
These two launchers mentioned above Run mobile JS Unit Tests and Run mobile JS Unit Tests and activate service solution (for debug) - even when modified - will be used by the context menu actions below. If you want to configure multiple launchers you can create new ones or duplicate an existing one. For example you might want to run tests when authenticated with one user or another - and you can define one launch configuration for each.
For those interested in what's going on behind the scenes during a test-run:
You can automate this testing process by using the command-line/ant mobile .war workspace exporter, the .servoy solution workspace exporter and the mobile import test client as detailed here.
These, in conjunction with a Selenium based (local or cloud) setup allow you to run tests automated in all popular browsers/platforms/devices. For example a nice integration can be achieved with Servoy - Jenkins (build automation software) - Sauce Labs (cloud based selenium test automation provider).