RMP Resource - Test Case
Test case is a sequence of conditions or variables under which a tester will determine
whether an application or software system is working correctly or not. Test cases
are often referred to as test scripts, particularly when written.
“A test case has components that describes an input, action or event and an
expected response, to determine if a feature of an application is working correctly.”
Definition by Glossary
To validate the testing coverage of the application is the basic objective of writing
test cases.
A formal written test-case is characterized by a known input and by an expected
output, which is worked out before the test is executed. The known input should
test a precondition and the expected output should test a post condition.
An expected result or expected outcome is usually given. Additional information
that may be included: test case ID, test case description, test step or order of
execution number, related requirement(s), depth, test category, author, check boxes
for whether the test is automatable and has been, automated.
Some additional field that complete the test execution are pass/fail and remarks.
Larger test cases may also contain prerequisite states or steps, and descriptions.
Each test case must include a verify step at the end so that the expected output
is very clear. A test case can have multiple verify steps in the middle or at the
end.
A Test Case should be documented in a manner that is useful for the current test
cycle and any future test cycles. Each test case should contain:
- Sr No
- Summary or Title
- Description
- Steps to execution
- Expected Results
- Actual Results
- Comments
- Status of the test case or remarks.
In documentation test case used to tell the user how can you use the interfaces
of the different
classes and what kind of errors can you expect. when you are picking
the condition to test, it is also a good idea to focus on the boundaries of your
system. One more important thing to write test case is consistency. Whatever the
structure pick, just keep the consistency so it will be easy to locate and add new
test cases in the future.
Test case should be fast, independent, repeatable, small and transparent. Test case
should be very fast to execute, and able to run test case in any order. The result
of test case should be always the same, no matter how many times have executed it
before. Small test case are easy to understand and change, are also likely to be
faster. It should be clear what the purpose of each test case is.