Skip to content
IT glossary
TestingUpdated December 3, 2026

Test case

Тест-кейс

A test case describes one specific check: how to set it up, what input or action to use, and what you should observe if the software works as intended.

What a test case does

Suppose a store offers free shipping on orders of $50 or more. “Check free shipping” tells a tester where to look, but not which order to place or what counts as success. A test case could specify a cart with a $50 subtotal, an eligible delivery address, and an expected shipping charge of $0. That gives a tester enough information to repeat the check and judge the outcome.

What to include

  • Purpose: Name the behavior under test, such as “Free shipping applies at exactly $50.”
  • Preconditions: Describe anything that must already be true, such as the promotion being active and the cart starting empty.
  • Test data and actions: Specify the values that matter and how to use them. A unit test might call a function with a single number; a checkout test might require selecting a shipping method.
  • Expected result: State what someone can observe, such as a charge, a message, or a returned value. Get the expectation from the requirement, not from whatever the current build happens to do.

The case describes the check; a test run records what happened when it was performed. For example, a run may fail because checkout shows a $5 charge instead of $0. If the test environment is down and checkout cannot be reached, the run is blocked rather than evidence that the shipping rule is broken.

Worked example: the free-shipping threshold

Assume the threshold is based on the merchandise subtotal before tax, and the rule applies only to eligible addresses using standard shipping.

  1. Setup: Use an empty cart, an eligible address, and no other promotions.
  2. Action: Add one $50 item, open checkout, and select standard shipping.
  3. Expected result: The standard shipping charge is $0.00.

This checks that the cutoff is inclusive. It does not show that a $49.99 cart is charged for shipping or that expedited shipping follows its own rule. Those are separate checks with different inputs and expectations. Keeping each case focused makes a failure easier to diagnose.

How teams use test cases

A manual test case gives a person the information needed to run the check. In an automated test, setup, actions, and assertions usually live in code. Either form can be used for regression testing after a change. Make the starting state explicit: a checkout test that relies on a cart created by an earlier test can fail for reasons unrelated to shipping.

A checklist item is a prompt and may leave the exact data and expected outcome to the tester. A bug report documents a problem already observed. It may cite the test case, but it also captures what actually happened and the conditions needed to reproduce it.

In an interview

You may be asked to turn a one-line requirement into a handful of cases. Start by clarifying details that change the expected outcome, such as whether the threshold includes tax. Then pick examples that distinguish the rules: just below the cutoff, exactly at it, and just above it. Explain what each case would catch rather than listing inputs alone.