What is a test case?

What is a test case?

There are several different ways to define a test case or scenario:

  • Atomic test scenario – This is how we automate and what we mean when we say ‘test case’€. It’s a self contained, atomic set of steps that produce a specific and measurable expected result. We generally try to have no more than 1-3 assertions per scenario.
  • End to end test scenario – A linked set of atomic scenarios that run in a specified and controlled sequence. Typically one large end-to-end scenario may become 2-3 atomic scenarios.

This is important to differentiate, because an atomic test scenario will take us X lines of code and an end-to-end test scenario (which some may just call a test) could be X + 100’s of lines of code and consist of asserting 20-50 conditions.