Test  Exercise 2006
 

Deadline: 1/5 2006 12.00

Two standard options are available. If you have different wishes please discuss this with the instructor - it must be approved.

Objective

The objective is to evaluate the usability and effectiveness of two approaches to automated real-time testing: Manually assisted test purpose based test generation and full automatic randomized online testing. Each group is given a UppAal specification of the light controller, and an (assumed!) correct implementation in java, including two example mutants. The experiment proceeds in two phases: Preparation phase and evaluation phase. 

In the preparation phase, each group will independently (manually) generate a set of test cases and a set of mutated implementations based on the given specification and implementation. Each group runs their test suite on their own mutants, and possibly extend it as desired. The mutants must be non-conforming to the specification, ie. killable by some test case.   

In the evaluation phase, each group swaps mutants (java byte-code) and runs 

  1. their own test suite against the groups own and other groups mutants, collecting statistics with the results (which own/other mutants were killed). 

  2. applies  UppAal-TRON (randomized online testing) to the collected mutants (e.g 10 runs per mutant)., again collecting statistics about the percentage of runs killing the mutants, and preferable duration of the test runs.

Expectations. 

Each group is to hand in the following deliverables to be evaluated. 

The deliverables must be signed by each student who, by his signature, declares active and equal participation in preparation of the deliverables

Software

  1. Java sources for Light Controller is distributed with tron, requires > java 1.5:  /pack/j2sdk-1.5.0.01/bin/java)
  2. Java sources for TestLightController for programming hand crafted test cases in Java (simulated time not possible at this time!). However test-cases can be written as uppaal automata as indicated below.
  3. Uppaal deterministic Specification and queries (used for offline generated tests) (available in smart-lamp/Offline)
  4. Compilation and execution of  UppAal-TRON: Copy the following your own home directory (Linux only!):
     
    1. Linux (Marge/Homer): Precompiled binaries for Linux are installed in /user/bnielsen/tron-1.4a.)
      • LD_LIBRARY_PATH must include current dir. eg. (tcsh) "setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:."
      • marge [~/tron-1.4a/smart-lamp]: make clean
      • marge [~/tron-1.4a/smart-lamp]: make test-light-s
        //this should compile the adaptor for your host, and start the lightdemo. 

Instructions (execution of offline generated tests):

Two options. Implement (real-time) test cases in java, or implement them in tron

Instructions (execution of online generated tests):

  1. start the light controller (may be on a different host) a different port requires recompilation of the java-implementation: (port 6521 is used by the clock sync protocol), port 9999 is used to convey tests events)
    java LightController/LightController -C localhost 6521 -M 0
     
  2. Start tron: using  "lightcontroller" adaptor,  using test specification "lightContr4.xml", testing  a java lightcontroller-implementation running on host ip number (can also be either "localhost", a dns-name, or an ipnumber, -P options indicates that uppaal-TRON should select inputs at random times (within environment behavior
    marge [~/tron-1.4a/smart-lamp]:. ./tron -Q log -NP random -F 300 -I lightcontroller -v 8 LightContr4.xml -- localhost 9999 silent
     

 

Instructions (Real-time problems):

Here are some tips that may reduce real-time scheduling problems (alternatively use simulated time)

  1. use lightly loaded machines
  2. use local isolated, single user computers, and and perferable 2 cpu machine (or two machines interconnected via cross cable)
  3. use lightly loaded multi-cpu machine
  4. use Linux Kernel 2.6 (marge, not homer)
  5. Disable "Nagle's" algorithm by setting the socket option: setTcpNoDelay(true); This should already be done in all the applications and adaptors you will work with, including the "TestLightController" application.
  6. Do not X-tunnel the lightcontroller gui. If you cannot run the lightcontroller locally, try to remove GUI from Java Lightcontroller implementation by uncomment the code that create the graphics objects: run the light controller with -N option.
     

Brian