System Modelling 2019: Optional Extra Homework (Cucumber)

The optional extra homework is functional testing of the chess clock that you have modelled for your mandatory home assignment.

You have to write test cases (Scenario), which define sequences of inputs (pushing buttons), or sometimes even time settings, and expected outputs (display contents, peep tons) for your chess clock. At the end of each test case (and whenever meaningful, even within the sequences) the outputs must be checked. The test cases have to run successfully on your chess clock, at the end.

During development of your test cases you should consider the structure of your chess clock model to reach a highest possible coverage. The transition coverage of your test suite should be be proved with a separate tool (EclEmma), which takes the generated code of your chess clock, and shows (not fully accurately) the coverage of the code graphically. For the maximum extra points the transition coverage must be complete. (You can check it in the practice by looking at the coverage of the check_, react_, effect_ functions that implement the transitions, and at the coverage of the enterSequence_, exitSequence_ functions that implement the state entries and exits. The coverage of the other parts of the code are less interesting here.)

Your test cases should be specified in the language Gherkin, they should be placed in the chessclock.feature file, and they should be executed by the tool Cucumber. The language Gherkin provides a human readable format of the test cases. Wie provide a Cucumber-Projekt to download that implements all the necessary parts for the execution. The same project includes a sample chessclock.feature file with some example test cases. (These test cases may be invalid or meaningless for your chess clock, they just illustrate the language and help you start with the tool.)

If you plan to make this extra homework, please read our Guide to Extra Homework about installation and operation of the above mentioned tools and technologies. Complete your test suite in the above mentioned Cucumber project.

Important rules:

  • Submission deadline: end of the semester (19th May 2019 23:59), submission through the homework portal (Extra / IMSc task)
  • Submit in a single ZIP file:
    • the chessclock.feature file with your test suite
    • a short documentation (in PDF format) of your test suite with your design approach and with some screen shots about the coverage reached (Coverage view of the code in the tool EclEmma)
  • You have to defend your work orally.
  • You can get a maximum of 10 extra points for your extra work.