MobilitySVGCompatibilitySuite

SVG Compatibility Suite

NetBeans Mobility CVS repository contains a simple suite of MIDlets which allow testing various features of SVG and JSR 226. This suite was written in order to make sure the components provided by the IDE and the generated code is compatible with real JSR226-enabled devices on the market.

The whole environemnt consists of a simple test harness (TestME) and several MIDlets where each MIDlet is testing a particual features (e.g. BoundingBoxTests). Both, the test harness and the SVG test suite are organized in a separate projects, so in the future more test suites can be added also for other features than SVG.

For documemtation on individual tests please see thoroughly commented sources.

How to Build

Check-out the source code of the test suite and the testing framework from NetBeans CVS repository. The source code is in cvs.netbeans.org, module /mobility/miscme/TestME (the test harness) and module /mobility/miscme/SVGTestSuite (the actual SVG Compatiliblity Suite). Sources can be viewed also from the browser at http://mobility.netbeans.org/source/browse/mobility/miscme/.

For building, open the SVGTestSuite project in NetBeans IDE with NetBeans Mobility Pack installed and hit the build button. Make sure you have an SDK supporting JSR 226 (for example Sun Java Wireless Toolkit 2.5 or higher) and this SDK is used by SVGTestSuite project (TestME project can use any MIDP2.0 compatible SDK, there is no dependency on JSR226 in the harness itself).

How to Run

Simply build SVGTestSuite project and deploy/run the resulting .jar file (found in the 'dist' subdirectory of SVGTestSuite project) on your device. When you start the suite, you can pick a feature which you would like to test by choosing a MIDlet and starting it. When the actual MIDlet is started you still need to launch the actual testing. You should see "Run Tests" action mapped to one of the soft-buttons on the device.

When the suite is finished, you should see summary of the test result and you can view a testing log. Each entry in the log has details (just press a select key in the log component).

The test harness contains support for persistent logging and traces which may be priceless when your test crashes on a device and ODD (On Device Debugging) is not available. The available options are the following:

  • Logging to RMS
  • Logging over Bluetooth

Logging to RMS

Almost all phones now provide a mechanism through which MIDlets can persistently store data and retrieve it later. This feature is called Record Management System (RMS). The TestME harness provides a simple way how to store logs produced by a test application to RMS. The harness also contains the MIDlet PersistentLogReader which can be used to read logs and traces previously created by a test application. The PersistentLogReader also can be used to delete log(s) from device to free some memory.

Logging over Bluetooth (preliminary)

Majority of phones on the market today are equipped with the Bluetooth connection. This connection can be used to link a device with computer and forward all logs and traces directly to it. This way user has realtime information about what is going on the device. Also the browsing and analysis of logs and traces is much more convenient on normal computer than on a device with limited possibilities. The TestME implementation uses RFCOMM transportation protocols and does not require any JSR-82 implementation to be installed on the computer. Since current implementation is in early stage and is not tested on many devices, the bluetooth logging option is not included in the default NetBeans project configuration and you have to explicitly choose the configuration WithBluetoothLogger to use this feature.

To setup logging over Bluetooth the following steps are neccessary:

  1. Download and install Java Communication API for your platform from http://java.sun.com/products/javacomm. Unfortunately SUN no longer provides windows version, but it still can be found on the web.
  2. Checkout and build the BluetoothLogViever project which is a simple Java application that basically listens on all COM ports and writes all incomming data to the screen window.
  3. Create Bluetooth local(or virtual) COM port for a server (i.e. the one that is ready to accept connection from bluetooth device). The details depends on your bluetooth adapter manufacturer.
  4. On device start a MIDlet with test suite.
  5. On computer start the BluetoothLogViever.
  6. Before the tests are run for the first time it is neccessary to configure the bluetooth connection. In case you connect to the same computer again it is enough to do this just once since the connection description is written to RMS and reused later. Select the BT connect command to start connection lookup. First all visible devices are listed. Do not be suprised to see that some devices in the list are represented by a name and others just by a bluetooth address. Select the computer where the BluetoothLogViever is running and in the next step select from the services available. In case there is just one service on the selected machine than no selection is required. A device shall probably ask you to allow connection to the outside world sometimes during the process. If everything went fine you should see the message on the device saying "Connected to XXX[[[YYY | [YYY]]" (where XXX is computer name and YYY is computer bluetooth address) and text "Log attached from XXX[[[YYY | [YYY]]" (where XXX is device name and YYY is device bluetooth address).
  7. Now run a test from suite and you should see the log messages in real time in the BluetoothLogViewer.
  8. In case you run test on the phone again and you plan to use same computer as a log receiver you do not need to configure bluetooth connection again, it should quick-connect using information stored in RMS during previous run. If you want connect to different machine or port you must first use the BT reset to drop the previous connection. The BT status and BT log can be used to determine if connection is already established and get more information about bluetooth connection progress/errors.


How to Contribute

In the case you believe you found a problem in any of the components/code the IDE generates or JSR226 feature on a particular device, don't hesitate to write a test case and contribute it to the suite. For further details you can contact the maintainer of the test suite by sending email to dev@mobility.netbeans.org.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo