辅导CSC364/M64程序、讲解Software编程设计、辅导Java语言程序
- 首页 >> Matlab编程 Software Testing: CSC364/M64
Lab Class 1
To be solved in groups of two.
Last day for lab sign-off: Feb 19, 2021
Consider the following state transition graph:
Ü Task 1.1
Download, study, compile, and run the Java program SimpleStateMachine, to be found under
http://cs.swan.ac.uk/~csmarkus/Tools/
SimpleStateMachine is an implementation of the above state transition graph.
Expected Outcome: Screen-shot of the running program.
Ü Task 1.2
1. Describe an interface for testing the SimpleStateMachine program in Java: what is its
input alphabet? what is its output alphabet?
2. Can you see in which state that program is?
3. Design a testing strategy of how to show that the SimpleStateMachine program is a
valid implementation of the above state transition graph. To this end, formulate your
own testing aims (e.g., after inputs hugo and erna it is possible to obtain the output
blink; whenever hugo is the input, we see output on or no output; it is not possible to
obtain output off without seeing output on before.)
4. Realise your testing strategy by
giving a test suite (relating test cases to your testing aims), and
testing SimpleStateMachine with your test suite.
Expected Outcome: A list of about testing aims; a test suite; documentation of your testing
and your test evaluation.
1
Ü Task 1.3
1. Implement the state transition graph for the toaster as given in the lectures. To this end,
create a new Java program Toaster by modifying the Java program SimpleStateMachine.
2. Describe an interface for testing your Toaster program in Java: what inputs can you
enter? what outputs can you observe?
3. Design a testing strategy of how to show that your Toaster program is a valid implementation
of the state transition graph. To this end,
formulate your own testing aims
and realise your testing strategy by
giving a test suite (relating test cases to your testing aims), and
testing Toaster with your test suite.
Expected Outcome: Your toaster program; a list of about testing aims; a test suite; documentation
of your testing and your test evaluation.
2
Lab Class 1
To be solved in groups of two.
Last day for lab sign-off: Feb 19, 2021
Consider the following state transition graph:
Ü Task 1.1
Download, study, compile, and run the Java program SimpleStateMachine, to be found under
http://cs.swan.ac.uk/~csmarkus/Tools/
SimpleStateMachine is an implementation of the above state transition graph.
Expected Outcome: Screen-shot of the running program.
Ü Task 1.2
1. Describe an interface for testing the SimpleStateMachine program in Java: what is its
input alphabet? what is its output alphabet?
2. Can you see in which state that program is?
3. Design a testing strategy of how to show that the SimpleStateMachine program is a
valid implementation of the above state transition graph. To this end, formulate your
own testing aims (e.g., after inputs hugo and erna it is possible to obtain the output
blink; whenever hugo is the input, we see output on or no output; it is not possible to
obtain output off without seeing output on before.)
4. Realise your testing strategy by
giving a test suite (relating test cases to your testing aims), and
testing SimpleStateMachine with your test suite.
Expected Outcome: A list of about testing aims; a test suite; documentation of your testing
and your test evaluation.
1
Ü Task 1.3
1. Implement the state transition graph for the toaster as given in the lectures. To this end,
create a new Java program Toaster by modifying the Java program SimpleStateMachine.
2. Describe an interface for testing your Toaster program in Java: what inputs can you
enter? what outputs can you observe?
3. Design a testing strategy of how to show that your Toaster program is a valid implementation
of the state transition graph. To this end,
formulate your own testing aims
and realise your testing strategy by
giving a test suite (relating test cases to your testing aims), and
testing Toaster with your test suite.
Expected Outcome: Your toaster program; a list of about testing aims; a test suite; documentation
of your testing and your test evaluation.
2