Wikipedia link about what a test case describes a test case as:

a specification of the inputs, execution conditions, testing procedure, and expected results that define a single test to be executed to achieve a particular software testing objective, such as to exercise a particular program path or to verify compliance with a specific requirement.

This definition comes from ISO/IEC/IEEE International Standard - Systems and software engineering -- Vocabulary.

However, my question is how are execution conditions and testing procedures traits of unit tests' test cases?

I was never taught those terms in relation to test cases for unit testing, which makes things confusing. Maybe I am not understanding the text.

1 Answer 1


Execution condition is actually the context of your tests (in common terms and in terms of specific frameworks like Spring, etc.). You can control it using so called Test Doubles (thanks to João Farias since I was not aware of such term) which could be for example Fakes, Stubs or Mocks.

Execution procedure is simply the logic of your test.

  • 2
    I would just change "mock" [1] for "test double" [2] - mock is a more specific term | 1 - xunitpatterns.com/Mock%20Object.html | 2 - xunitpatterns.com/Test%20Double.html Commented Jun 1, 2021 at 7:13
  • Very useful resource! Thanks!
    – Alexey R.
    Commented Jun 1, 2021 at 8:57
  • 1
    Google's Testing On The Toilet had a great article about test doubles and is generally a good source for unit test related wisdoms
    – Rsf
    Commented Jun 1, 2021 at 14:34
  • Is the Execution procedure making sure the inputs meet the preconditions and the outputs meet the postconditions? Is that what you mean by the logic of the test? Can you give a simple example if you do not mind? @AlexeyR. Commented Jun 2, 2021 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.