Test procedure

In software testing, a test procedure is the ordered sequence in which a set of test cases is run, together with the setup that has to happen first and the clean-up that follows. It turns separate cases into one runnable session with a known starting state, a fixed order and a defined end.

The longer version

The ISTQB glossary defines a test procedure as "a sequence of test cases in execution order and any associated actions that may be required to set up the initial preconditions and any wrap-up activities after execution", and names ISO/IEC/IEEE 29119-1 as the source its wording follows. The phrase has other lives outside software. A statistician's test procedure is a rule for accepting or rejecting a hypothesis, and medicine and aviation each have procedures of their own, which is why search results for the words are mixed. The sense here is the software tester's.

Order matters because test cases share state. Take a seat-booking feature for an event. Reserving a seat has to come before paying for it, and cancelling comes after both, so three cases that look independent only make sense in one sequence. The procedure records that sequence. It opens with setup: create an event with ten seats and a customer account. It lists the cases in running order: reserve a seat, pay, cancel, confirm the seat is free again. It closes with teardown: delete the event and the account, so the next run starts from the same place.

A procedure sits between the single case and the suite. A test case fixes one check, a test procedure puts several cases, or the scripts that carry them out, in running order, and a test suite groups the cases, as procedures or scripts, for one run. A test script is the instruction sequence that carries cases out, so a procedure written out step by step, for a person or for a tool, reads as one long script, and some teams use the two words for the same document. In the ISTQB Foundation syllabus, organising cases into procedures belongs to test implementation, where the procedures are also prioritised and placed in a test execution schedule.

The standard layout comes from IEEE 829-1998, whose test procedure specification has four parts: an identifier that points back to the test design it implements, a purpose that names the test cases it runs, special requirements such as environment, skills or training, and the procedure steps. The steps are where the work is, and IEEE breaks them into log, set up, start, proceed, measure, shut down, restart, stop, wrap up and contingencies, the last covering what to do when something unplanned happens mid-run. IEEE 829 has since been superseded by ISO/IEC/IEEE 29119-3, which keeps a test procedure document for the same job. Filled in for the seat-booking run above, the procedure reads: identifier TP-BOOK-03, implementing the booking test design; purpose, run the reserve, pay and cancel cases in that order; special requirements, the staging environment with the payment provider in sandbox mode; set up, create an event with ten seats and one customer account; proceed, reserve seat 4, pay with the sandbox card, cancel the booking; measure, seat 4 shows as free and the refund appears in the sandbox; wrap up, delete the event and the account; contingencies, if payment times out, stop, record the request ID in the log and restart from set up.

Common questions

What is a test procedure in software testing?

A test procedure in software testing is a set of test cases arranged in the order they will be run, with the actions needed to prepare the starting state beforehand and to tidy up afterwards. The ISTQB glossary defines it in those terms.

What is the difference between a test procedure and a test case?

A test case fixes a single check, with its own preconditions, inputs, any steps and expected result. A test procedure strings several test cases together in running order and adds the setup and wrap-up around them, so the state one case leaves behind can serve as the starting point of the next.

What is the difference between a test procedure and a test script?

A test procedure orders the cases or scripts for a run, with the setup before them and the teardown after. A test script is the instruction sequence, prose or code, that carries one or more cases out. In practice one document often does both jobs, and the two words are then used as synonyms.

What is the difference between a test procedure, a test case and a test script?

They sit at three levels. A test case is one check: preconditions, inputs and an expected result. A test script is the written or coded instructions that carry one or more cases out, step by step. A test procedure puts cases or scripts in running order and wraps them in the setup before and the wrap-up after, so a whole session can be repeated from the same starting state.

What is the IEEE 829 test procedure specification?

It is the document IEEE 829-1998 defined for running a set of test cases. It has an identifier, a purpose, special requirements and the procedure steps, which IEEE divides into log, set up, start, proceed, measure, shut down, restart, stop, wrap up and contingencies. ISO/IEC/IEEE 29119-3 has since replaced IEEE 829 and keeps a test procedure document for the same purpose.

What does a test procedure include?

A test procedure includes the setup actions that create the starting state, the test cases in execution order, any data handed from one case to the next, and the wrap-up actions that restore the environment. Some teams also record the environment and the build the procedure was written for.

Why does the order of test cases matter?

Order matters whenever one test case depends on the state another leaves behind, such as a payment that needs an existing reservation. A procedure makes that dependency explicit. Running the same cases in a different order can produce failures that come from the sequence and not from the product.

Bug reports that arrive ready to triage.

Collect replay, console, network and browser context with the Free plan.

<script src="…/widget.js" data-key="pb_pub_…">