Tuesday, September 23, 2008

Exciting Changes To LWUIT

A super geek like myself is excited about game development as much as he is excited about accounting software (I know I wrote both), in my case the new testing and recording framework I just committed to LWUIT are remarkably exciting and I don't think you need to be a hardcore geek like myself to get excited (am I delusional?).
I will try to write additional posts explaining what is going on and how you can use this in your applications but since this is all under heavy development and WILL CHANGE... SIGNIFICANTLY! I don't want to go into too many details.
Generally what you see here is the LWUIT demo mostly unchanged, you can adapt any application to support this and when you remove those lines of code the application doesn't have a trace of that functionality. Currently long clicks on the numbers 1,2,3 & 4 are assigned to the testing framework:
1: starts recording every operation I perform.
2: opens the assert screen where I can assert various states of the UI such as the label of the focused component or whether an exception was thrown.
3: Stops recording and names a script.
4: Opens the script manager where I can rename, delete & play my scripts (hopefully edit too in the future).

Scripts are stored using a model of their own so they can be stored anywhere the user wants to e.g. RMS, filesystem or even the network (in this example in RMS). Scripts can theoretically run on every device or simulator unchanged but this has some issues such as applications behaving differently in different resolutions might not be a bug...

I will blog more about this in the coming weeks as the code and logic finalizes and becomes more concrete.

4 comments:

  1. Thanks for this teaser, all we need to do now is to make this run headless so we can call it as part of a continuous build ;-)

    A few question, though:

    - where did you commit it to ?
    - are you storing pixel locations or GUI IDs ?
    - are the scripts persisted in human readable format ?

    Looking forward to playing around with it,
    Diego

    ReplyDelete
  2. Calling this as part of build might be tricky since it runs on MIDP. Although I can think of some ideas that might be possible, not ruling out anything.


    - where did you commit it to ?

    LWUIT public SVN. I committed the engine since the modified LWUIT demo is not open source you will have to figure out how to use it yourself or wait for my next post on the subject.

    - are you storing pixel locations or GUI IDs ?

    Neither ;-) We don't have GUI id's and pixel locations won't be very useful.
    I'm recording keystrokes and touch events and playing them back.
    For asserts the list of current assertions is visible in the recording although it is subject for heavy change.

    - are the scripts persisted in human readable format ?

    No, binary. Although I'm considering a script editor for more elaborate manipulations.

    ReplyDelete
  3. - "Calling this as part of build might be tricky since it runs on MIDP. Although I can think of some ideas that might be possible, not ruling out anything."
    Would be great to explore this further. For professional software development, this is simply a must, although automated GUI testing is always a headache ;-)

    - where did you commit it to ?
    Ah found it - com.sun.lwuit.DebugController

    - "I'm recording keystrokes and touch events and playing them back."
    Cool :-)

    - "No, binary. Although I'm considering a script editor for more elaborate manipulations."
    I see...maybe a public API to the underlying persistence would be helpful ?

    Thanks again,
    D.

    ReplyDelete
  4. I am looking for a talented LWUIT developer...can someone help me?

    ReplyDelete