Back in February, Palm CTO Mitch Allen hosted the first webOS developer webcast, titled "Developing Applications for webOS: A Preview" (see a summary and video of the event). During the webcast, he went over the material in the first chapter of the upcoming Palm webOS book, including Stages, Scenes, UI Widgets, and more, and answered questions from developers during the Q&A period.
Screenshots from various stages of the testing process are below:
Full summary of the webcast Q&A after the break!
Where do we find Pockets?
Pocket is only available to members of the Early Access SDK in the Forums, and is to be launched "maybe in a month or so"; as we are waiting to iron out issues with the the latest version of the Mojo SDK.
Does Pockets require Eclipse?
No, it does not require Eclipse, it can be used with any text editor, such as TextMate on Mac OS X.
Were you testing just an API or an actual application (in the webcast)?
First the Twitter API was tested, and in the last part, A Mojo scene was used to call up the actual Twitter API.
When will a proper release of Pockets be released?
Jasmine is already stable, available on Github: http://github.com/pivotal/jasmine/tree/master
Pockets is only available on the Palm Mojo SDK forums, in 2-3 pieces: Libraries to do a testrunner, or test support, and runtime libraries that are independent of testing, but generally useful in webOS (i.e. reduce memory leaks using event manager). Both are stable, although they may add to them later. You should feel confident using them. The third part are tools, which they may rework. These include rate test, sources, deploy to emulator. Tools can only be installed on Mac OS X currently, and the new SDK 0.3.5 is causing some issues. The testrunner is also still being reworked.
Is Jasmine webOS-specific?
What about CI, TcRB?
Getting better test results out of the Emulator (with later SDKs) is planned to make continuous integration / environments work better. You can run things on the command line, but only with PalmHost right now.
Test code bundled into an appointment?
No, we build up packages both for test and production. Test code is stripped out before an app goes live; no reason for code to be lying around.
Test functions for automentation, screen taps, higher-level integration e-tests?
Hard in the webOS environment, but you can do a little bit; you can verify that correct handlers get called on taps, buttons, from testing assistants. Lacking support at high-level though, and clicking outside of a single app, switching between apps, dashboard taps etc. are not supported as yet.
Running test code on device rather than emulator?
Very little discrepancy between emulator and device. Differences, during their development, have been mostly transparent. A future solution would be for the emulator to also allow you to run a test on the device.
To get test up and running, what do you need to set up?
For full testing, you need Jasmine and Pockets. Easiest in Mac OS X [describes full setup in webcast around 48:00]
Is running isolated tests supported yet?
Jasmine can create an isolated environment, and is very important element in unit testing. You should have all the isolation you need.
Will leaving test code of Pockets add much overhead to an app if left in?
Probably not, but it will add size to your app, and overwriting classes and tests could cause issues. It is not recommended.
Are there instructions packaged in Jasmine for Windows users?
There is a readme file available for Windows and Mac users in Pockets. Linux is not yet supported. [See the readme at 51:20]
Will it remain free?
Yes, it will always be free and open-source. Free open-source libraries will also be distributed, such as tools for app integration with Tweed, their twitter app, as well as other plugins for webOS apps.
Sepulveda and Pivotal Labs will be at in the InsideMobile conference happening later this month, in San Jose on July 26-27th.