Test case


Test case

A test case in software engineering is a set of conditions or variables under which a tester will determine if a requirement or use case upon an application is partially or fully satisfied. It may take many "test cases" to determine that a requirement is fully satisfied.

"Test cases" are often incorrectly referred to as test scripts. "Test scripts" are lines of code used mainly in automation tools.

Written test cases are usually collected into test suites.

Formal requirement-based test cases

In order to fully test that all the requirements of an application are met, there must be "at least one test case for each requirement" unless a requirement has sub-requirements. In that situation, each sub-requirement must have at least one test case. This is frequently done using a traceability matrix. Some methodologies, like RUP, recommend creating at least two test cases for each requirement. One of them should perform "positive" testing of requirement and other should perform "negative" testing. Written test cases should include a description of the functionality to be tested, and the preparation required to ensure that the test can be conducted.

What characterizes a formal, written test case is that there is a "known input" and 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 postcondition.

Informal requirement-based test cases

For application without formal requirements, "test cases" can be written based on the accepted normal operation of programs of a similar "class". In some schools of testing, "test cases" are not written at all but the activities and results are reported after the tests have been run.

Typical Test Cases format

Test Cases usually have the following components.
* Test Case Summary
* Configuration
* Initial Condition
* Steps to run the test case
* Expected behavior/outcome

Further reading

Under special circumstances, there could be a need to run the test, produce results, and then a team of experts would evaluate if the results can be considered as a pass. This happens often on new products' performance number determination. The first test is taken as the base line for subsequent test / product release cycles.

A variation of test cases are most commonly used in acceptance testing. Acceptance testing is done by a group of end-users or clients of the system to ensure the developed system meets the requirements specified. User acceptance testing is usually differentiated by the inclusion of happy path or positive test case.

References


* [http://www.qasec.com/cycle/securitytestcases.shtml Writing Software Security Test Cases - Putting security test cases into your test plan] by Robert Auger


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • test case — see case 1a Merriam Webster’s Dictionary of Law. Merriam Webster. 1996. test case …   Law dictionary

  • test case — ➔ case * * * test case UK US noun [C] LAW ► a case in a court of law or another situation that will be used as an example when other similar cases are considered in the future: be/serve as a test case (to do sth) »The trial is a test case to… …   Financial and business terms

  • test case — test cases N COUNT A test case is a legal case which becomes an example for deciding other similar cases …   English dictionary

  • test case — test′ case n. 1) law a case that serves afterward as a precedent for similar cases 2) law a suit used to test a legal principle, the constitutionality of a statute, etc • Etymology: 1890–95 …   From formal English to slang

  • test case — n. Law 1. a case that, after its determination, is likely to be used as a precedent ☆ 2. a case entered into with the intention of testing the constitutionality of a particular law …   English World dictionary

  • test case — n a legal case that establishes a particular principle, that is then used as a standard which other similar cases can be judged against …   Dictionary of contemporary English

  • test case — test ,case noun count a legal case whose result will be used as a model for similar cases in the future …   Usage of the words and phrases in modern English

  • test case — ► NOUN Law ▪ a case setting a precedent for other cases …   English terms dictionary

  • test case — noun a representative legal action whose outcome is likely to become a precedent • Syn: ↑test suit • Topics: ↑law, ↑jurisprudence • Hypernyms: ↑legal action, ↑action, ↑action at law …   Useful english dictionary

  • test case — UK / US noun [countable] Word forms test case : singular test case plural test cases a legal case whose result will be used as a model for similar cases in the future …   English dictionary


We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.