SED Practical Class 5 Week 12 Conformance Testing Laboratory Objectives In this practical you will be implementing and running Chow’s conformance test. Task This practical is to be undertaken by students working in pairs in Lab 2.01. 1. Read the finite state machine lecture notes (see SED Readings) and particularly the ant maze example (10 minutes). 2. Working with your partner develop a set of inputs P, that should lead to every state of the machine, and a set of inputs Z that should distinguish between every pair of states in the machine. (20 minutes) 3. Use the sets P and Z to build a minimal set of test cases to cover all possible transfer and action errors. (10 minutes) 4. Download the files AntGood.class, AntBroken.class and run them (Java AntBroken will give you instructions on how to interact with the programme). (10 minutes) 5. Use your minimal set of tests to analyse AntBroken, using AntGood as a correct oracle. (20 minutes) 6. List the error uncovered in step 5 and classify them as action errors or transfer errors. (10 minutes) Further Reading Chow, Tsun. S.: Testing Software Design Modeled by Finite-State Machines IEEE Trans. on Software Engineering, SE-4 (3) (1978) Bruegge and Dutoit, p459, State-based testing Cardell-Oliver, R: Conformance Tests for Real-Time Systems with Timed Automata Specifications, FACJ 12: 350-371, 2000 Holzmann, G.J.: Design and Validation of Computer Protocols Prentice Hall (1991) An ant is trying to get out of a maze using inputs from its left and right antennae, each of which returns 1 if in contact with a wall and 0 otherwise. The ant is able to go forward, and turn to the left or the right. The ant solves the maze problem by adopting the strategy of keeping its right antenna to the wall. For more details and discussion see Finite State Machines Lecture Notes with Ant Maze example. This system can be modelled by a finite state Mealy machine as follows. Inputs: 00, 01, 10, 11 (representing current readings from the ant’s left and right antennae) Outputs: FWD, TL, TLF, TRF (possible ant movements – go forward, turn left, turn left and go forward in the same move, turn right and go forward) States: Lost (initial state), EorG (wall ahead), BorC (re-finding wall to the right), A (following the wall on the right) FSM Specification Source State Input (from antennae) Output (ant movement) Destination State Lost 00 FWD Lost Lost 01 TL EorG Lost 10 TL EorG Lost 11 TL EorG EorG 00 TRF BorC EorG 01 TL EorG EorG 10 TL EorG EorG 11 TL EorG BorC 00 TRF BorC BorC 01 TLF A BorC 10 TRF BorC BorC 11 TLF A A 00 TRF BorC A 01 TLF A A 10 TL EorG A 11 TL EorG