Lecture 3 - Test Cases and Test Suites -> Quick Intro -> Test Case Structure -> Results Of The Test Case Execution -> Useful Attributes Of The Test Case -> Data-Driven Test Cases -> Maintainability Of Test Cases -> The Number Of Expected Results Inside One Test Case -> Bad Test Case Practices -> Test Suites -> States Of A Test Case -> The Importance Of Creativity
State: “Created”
This is the very first edition of test case.
Example:
Created (date/name): 11/17/2004/O.Ferguson
State: “Modified”
Modifications are usually triggered
– by a change in the tested functionality (so, we need to modify a test case to reflect those changes) ;
– by an intention to improve a test case (e.g., to make the test case more maintainable).
Example:
Modified (date/name): 02/03/2005/I.Newsome
State: “Retired”
The test case becomes obsolete:
– if the functionality tested by it doesn’t exist anymore (e.g., if we stop accepting MasterCard, the test case CCPG0002 is not needed anymore);
– in other cases when that test case doesn’t make sense (e.g., when a test case is a duplicate).
I don’t recommend simply deleting a retired test case. My rationale:
– There can be an “error in judgment,” and a retired test case can turn out to be valid.
– A retired test case can be of use in the future.
A better strategy is to:
1. Create directory retired_testcases in the same directory where we store files with valid test cases
Directory for valid test cases – C:/testcases
Directory for invalid (retired) test cases – C:/testcases/retired_testcases
2. Create a file with the same name as the file with the test suite where we take the test cases from
File for valid testcases – C:/testcases/ credit_card_payments.doc
File for invalid test cases – C:/testcases/retired_testcases/credit_card_payments.doc
3. Cut-and-Paste no-longer-needed test case to its new retirement home
Move CCPG0002
FROM: C:/testcases/credit_card_payments.doc
TO: C:/testcases/retired_testcases/credit_card_payments.doc
In reality, we often invalidate the whole test suite, so we would just move the whole file with that test suite to the directory retired_testcases.
Sometimes there is a dilemma. Which is better:
– to modify an old test case OR
– to retire the old test case and create a new one?
Each situation is unique, but life teaches us that it’s faster to build a new building rather than to completely restore an old one. So, if a test case requires a lot of changes-e.g., if I have to edit steps in many places-I usually take an empty test case template and start writing a new test case. Next ->
Lecture 3 - Test Cases and Test Suites -> Quick Intro -> Test Case Structure -> Results Of The Test Case Execution -> Useful Attributes Of The Test Case -> Data-Driven Test Cases -> Maintainability Of Test Cases -> The Number Of Expected Results Inside One Test Case -> Bad Test Case Practices -> Test Suites -> States Of A Test Case -> The Importance Of Creativity