Académique Documents
Professionnel Documents
Culture Documents
2012-2013
Exercise
Exercise 10
S T R U C T U R A L
T E S T I N G :
C O N T R O L
F L O W
A N A L Y S I S
Objectives
using the technique of the analysis of internal flow.
Chapter
This guided exercise has as main objective to enable the learning of the structural testing
S T R U C T U R A L
T E S T I N G :
C O N T R O L
F L O W
A N A L Y S I S
The function provided by this method consists of determining if the hand the player holds a full house. Full House is a popular hand combination of a three of a kind with a pair. The output provided by isFullHouse method is a Boolean value corresponding to the result of the evaluation of the players hand against the full house characteristics. The student has to design and implement the cases to test properly
Step 2: Identify the required test cases for considering statement coverage
It consists of generating the needed test cases to execute, once at least, each sequence of instructions.
Step 3: Identify the required test cases for considering branch coverage
It consists of generating the enough test cases in order to assure that each branch included in the source code has at least one positive evaluation (TRUE) and one negative evaluation (FALSE). Generally, the execution of tests for decisions coverage fulfills the restrictions stated for sequence coverage tests.
Step 4: Identify the required test cases for considering loop coverage
It consists of generating the enough test cases in order to evaluate properly all the loops included in the methods to be tested
2 0 1 2 / 2 0 1 3
S T R U C T U R A L
T E S T I N G :
C O N T R O L
F L O W
A N A L Y S I S
2 0 1 2 / 2 0 1 3
S T R U C T U R A L
T E S T I N G :
C O N T R O L
F L O W
A N A L Y S I S
Chapter
When youve completed the exercise, submit your solution package (a zip file) including: Source code to be tested. Source code for testing automation. The report generated by JUnit notifying the results of the test cases implemented.
Each student must submit the exercise solution to the corresponding folder created at Aula Global 2. The deadline to submit the exercise 10 solution is 08/05/2013 before 16:00. Following the subject evaluation rules, if a student does not send the exercise solution before the fixed deadline, the student will be evaluated with 0 points.
2 0 1 2 / 2 0 1 3
S T R U C T U R A L
T E S T I N G :
C O N T R O L
F L O W
A N A L Y S I S
Evaluation Criteria
There is a class for automating the test cases proposed for the ParsePlayerHand method (testParsePlayerHand) of PlayerHandParser class and for the test cases considered for the isFullHouse method (testIsFullHouse) of Hand class. The testParsePlayerHand class contains all the test cases that can be identified using the Control Flow Analysis technique. The testIsFullHouse class contains all the test cases that can be identified using the Control Flow Analysis technique. The test reports are provided by the student. The execution of the automated tests cases runs appropriately finding the expected errors.
Suggestions
Each student should keep a copy of the solution delivered until the end of the subject.
2 0 1 2 / 2 0 1 3