What are a test case and a test suite?
Options
- A case checks one scenario; a suite groups cases (Correct option)
- A test case is a computer case; a suite is a room
- A suite is one single test; a case is many tests
- Both of them are error messages shown in pytest
Answer
A test case checks one scenario against an expected result; a suite is a group of test cases run together
Why
Test case: 'when I log in with a wrong password, I should see an error message and not enter'. It has steps, input data and an expected result.
Test suite: a collection of test cases, for example 'all login tests' or 'all tests of the project'.
In code, one test method is usually one case, and a test class or folder is a suite.
Remember
Case = one scenario. Suite = a group of cases.