A test case for a login form with a maximum password length of 16 characters could look like this: preconditions — the account exists and the browser is on the login page; input values — username jdoe, password of exactly 16 characters; expected result — successful login and redirect to the dashboard; postconditions — the session is created. A second test case with a 17-character password expects an error message. Each test case is written for a specific objective, such as exercising a particular program path or verifying compliance with a requirement.
What is the difference between a test case and a test scenario? A test scenario is a document specifying a sequence of actions for executing a test; a test case is the specific set of input values, preconditions, expected results, and postconditions developed for a particular objective. Several test cases can be derived from one scenario.
Do test cases always need expected results? Yes — an expected result is what makes a test case verifiable. Without it, you cannot distinguish a pass from an inconclusive run.
What is a test set? A test set is a group of test cases where the postcondition of one test often becomes the precondition of the next, creating a chain of executions.
Are test cases only used in manual testing? No. Automated tests are also organized as test cases — the script implements the inputs, preconditions, expected results, and postconditions programmatically.