JuiceGen: The JUnit test generation tool from the UML state machine diagram

C. Doungsa-ard, K. Dahal, Z. Pervez

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

This paper proposes a JUnit test code generation tool from the UML state machine diagram which is referred to here as JuiceGen tool. Genetic algorithm (GA) based approach is used to generate the test data because of its simplicity and effectiveness. The generated test data are sequences of triggers which change the status of the state machine diagram. The GAs can generate sequences of triggers which can cover more than 95% transition coverage. The triggers are mapped as methods called in the test code. Junit test code is generated not only from the sequences of triggers. The mapping information between the state machine diagram and the class under tests are also required. This detail includes: the methods which map to the triggers; the class members which map to the attribute; and the initial value of the attributes of the state machine. The generated JUnit test code has been tested by finding the code coverage of the program under test. The experimental results show that JUnit code generated from JuiceGen can represent all behaviours which the sequence of triggers could cover.
Original languageEnglish
Title of host publication 8th International Conference on Software, Knowledge, Information Management and Applications (SKIMA), 2014
PublisherIEEE
Pages1-8
Number of pages8
ISBN (Print)9781479963997
DOIs
Publication statusPublished - 2014

    Fingerprint

Keywords

  • Unified Modeling Language
  • finite state machines
  • genetic algorithms
  • program compilers
  • program testing
  • GA
  • JUnit test code generation tool
  • JuiceGen tool
  • UML state machine diagram
  • genetic algorithm
  • program under test
  • triggers
  • Biological cells
  • Encoding
  • Sociology
  • Software design
  • Statistics
  • JUnit test generation
  • Test data generation

Cite this

Doungsa-ard, C., Dahal, K., & Pervez, Z. (2014). JuiceGen: The JUnit test generation tool from the UML state machine diagram. In 8th International Conference on Software, Knowledge, Information Management and Applications (SKIMA), 2014 (pp. 1-8). IEEE. https://doi.org/10.1109/SKIMA.2014.7083390