SE401:Group32:May 23

From Marks Wiki
Jump to navigation Jump to search

May 23/24

◄ Main Page

Java Robot and Testing Automation Investigation

  • The Robot class within AWT is a class which simulates user input on desktop computers.
  • It is contained within java.awt.Robot
  • It cannot be used with J2ME

J2ME investigation

  • Multi-threading. This can be used to attach the testing code module to the application and then send the whole package to the phone. The test application could then be launched from within the phone. There would be an inner class which implement runnable and instantiates the application. This is how two applications can be run at the same time.
    • The first application will be the testing application.
    • The second application will be the actual application to test.

Simple instruction Simulation

  • During the multi-threading investigation a simple exit instruction simulation was conducted
  • The following steps were completed to achieve this:
  1. Create a background thread running the MIDlet application
  2. Create a new Command, in this case EXIT
  3. Get the Displayable element (the form in this case) and invoke the applications commandAction() method parsing in the command and form objects


So far J2ME threads have proven successful for simulating commands such as EXIT and START.

J2ME Polish RMI investigation contd

  • Mobile Life wanted us to use the J2ME Polish RMI for connectivity between the mobile phone and the server.
  • J2ME Polish is a wrapper around HTTP that allows developers to call server-side code more easily. (This is similar to Java RMI).
  • Mobile Life wanted the client module to iteratively poll the server for the next test instruction and then execute this instruction and report the outcome to the server.

Approach not using J2ME Polish RMI

  • Use Bluetooth for Connectivity.
  • Use J2ME's multithreading for running the test application as well as the actual application.

References

J2ME api

J2ME GUI article

Java Robot api

J2ME equivalents of jUnit

J2ME code examples

J2ME background processing

Java Robot source code

◄ Main Page