Testware, Test Basis and Test Oracles

Testware is what the test process produces for planning, designing, executing, evaluating and reporting on testing: test plans, test conditions, test cases, test scripts, test data, test logs, defect reports and test reports. Most of it is derived from the test basis — the requirements, stories, designs and other knowledge that say what the system should do — and used against the test object, the thing being tested.

Two more terms complete the picture. A test condition is a testable aspect taken from the test basis: what to test. A test oracle is the source of the expected result that a test compares with the actual result. For the story "the invoice shows VAT at 15%", the story is the test basis, the invoice page in build 3.8.0 is the test object, and the rule plus your own calculation is the oracle.

Why it matters

As the lesson on error, defect and failure showed, a failure is the system not doing what it should — and "should" needs a source. Without a named test basis, testers test what they assume; without an oracle, a test passes because the screen shows a plausible number; without the exact build of the test object, nobody can repeat the result.

Testware makes testing repeatable and visible: a written test case can be rerun after a fix and in every regression cycle, test logs and reports are the evidence behind a release decision, and a defect report can name the exact requirement, build and expected value.

Test basis, test object and test oracle

The test basis is the body of knowledge used as the basis for test analysis and design: requirements and user stories with acceptance criteria, business rules, designs, API specifications, risk analyses, regulations and, for white-box tests, the code.

The test object is the work product being tested: a function, an API endpoint, a screen, a whole system or a document. Identify it precisely — component, build and environment — because a result only holds for what was tested. Many teams say system under test (SUT); in the ISTQB glossary that is a test object that is a whole system. One item can play both roles: in a requirements review the requirement is the test object; when you test the built feature, it is the test basis.

A test oracle is a source to determine an expected result to compare with the actual result. Often the test basis is the oracle, but not always:

  • The specification: an acceptance criterion, a business rule or an API contract states the result.
  • An independent calculation by hand or in a spreadsheet — never the system’s own output.
  • A previous version or another system: after a refactoring or a data migration, the old output is the expected result.
  • Standards and consistency rules: WCAG, the date format of a locale, a cart total that must equal the invoice total.
  • A partial oracle when the full result cannot be predicted, such as a search ranking: check what you can (every result contains the search term) and note what remains unjudged. The general difficulty of knowing the correct result is called the test oracle problem.

Try it: Response Contract Comparator Try it: API Response Comparator

Test conditions: deciding what to test

A test condition is a testable aspect of a component or system identified as a basis for testing. It answers "what to test?" and is often narrower than the requirement it comes from. The ISTQB syllabus names acceptance criteria as an example of test conditions; a criterion that covers several behaviours is split into one condition per behaviour.

Test analysis identifies and prioritises conditions; test design turns each into test cases with concrete inputs and expected results. Both get their own lessons later. A good condition:

  • Describes an observable outcome, not a wish such as "VAT works correctly".
  • Covers one aspect and traces to one item of the basis, such as AC2 of story QA-214 in the worked example below.
  • Has a priority, so the riskiest conditions are tested first.

Testware: what each test activity produces

The ISTQB Foundation syllabus v4.0 describes the test process as seven activities: test planning (deciding the test objectives and approach), test monitoring and control (tracking progress against the plan and adjusting), test analysis and test design (what to test and how, as above), test implementation (preparing the scripts, data and environment needed to run the tests), test execution (running the tests and logging the results) and test completion (wrapping up and archiving what is worth keeping). They do not always run in a strict sequence, and the module "The test process (STLC)" covers each one.

The ISTQB syllabus lists testware by the activity that produces it. Not every item is a separate document: in agile teams much of it lives in a test management tool, on the story or in the repository. Some teams say test artefacts; ISO/IEC/IEEE 29119-3 gives templates for many of these documents. Like code, testware is under configuration management, so you know which version of a test ran against which build.

  • Test planning: test plan, schedule, risk register, entry and exit criteria.
  • Test monitoring and control: test progress reports, records of control decisions and risk information.
  • Test analysis: prioritised test conditions, and defect reports on the test basis itself.
  • Test design: prioritised test cases, test charters, coverage items, test data requirements and test environment requirements.
  • Test implementation: test procedures, automated test scripts, test suites, test data, the test execution schedule and test environment elements such as stubs and drivers.
  • Test execution: test logs (what ran, when, on which build, with which result) and defect reports.
  • Test completion: the test completion report, lessons learned, improvement actions and change requests; testware that will be useful later is archived or handed over to the teams that need it.
Each test activity leaves its own testware: a test plan, test conditions from the test basis, test cases with expected results from the oracle, scripts and data, test logs and defect reports, and a completion report.
  1. 1Test planningTest plan, schedule, risk register, entry and exit criteria
  2. 2Test analysisWhat to test? Reads the test basisPrioritised test conditions; defect reports on the test basis
  3. 3Test designHow to test? The oracle gives expected resultsTest cases, test charters, coverage items, test data requirements, test environment requirements
  4. 4Test implementationTest procedures, automated test scripts, test suites, test data, execution schedule, stubs and drivers
  5. 5Test executionRuns on the test object: actual vs expectedTest logs and defect reports
  6. 6Test completionTest completion report, lessons learned, archived testware

Throughout steps 1–6 Test monitoring and test control run throughout: test progress reports, records of control decisions, risk information.

Then:Into the next cycle: archived test cases and scripts are reused, for example as regression tests

Logical order, not a calendar: the activities overlap and repeat, and how formally each item is written down depends on the team and the risk.

Try it: Test Case Generator Try it: Test Data Factory

Worked example: one story from test basis to test log

A web shop adds VAT to its invoices. The story below is the test basis; the test object is the invoice page, build 3.8.0, on the staging environment.

  • Test conditions: VAT is 15% of the subtotal (AC1); a third decimal of 5 rounds up (AC2); the total adds the rounded VAT (AC3).
  • Oracle: AC1 and AC2 plus a hand calculation made before the run. For a subtotal of 10.30: 10.30 × 0.15 = 1.545, so the expected VAT is 1.55 and the total 11.85. For 100.00 the expected VAT is 15.00 and the total 115.00.
  • Testware: a test case per condition with these expected values, test data with subtotals 10.30 and 100.00, and the test log of the run.
  • Result: on build 3.8.0 the rounding case failed, VAT shown 1.54. The defect report cites AC2, the build, and expected against actual; the developer traces it to round-half-to-even ("banker’s rounding"). On screen 1.54 looked plausible; only the oracle exposed the failure.
QA-214  Invoice shows VAT
As a customer, I want my invoice to show the VAT
so that I know how much tax I paid.

AC1  The invoice shows the subtotal, VAT at 15% and the total.
AC2  VAT is rounded to 2 decimal places, half up.
AC3  Total = subtotal + VAT as shown on the invoice.

Try it: Requirements → Test Cases

Common mistakes

  • Copying the expected result from the system’s current output: the software becomes its own oracle and a defect becomes "expected" behaviour.
  • Not recording the build and environment of the test object, so a result can be neither repeated nor tied to a release.
  • Testing from verbal agreements that never reach the test basis, instead of writing the answer into the story or the test case.
  • Leaving test cases and test data unchanged when the test basis changes, so the tests keep checking old behaviour.
  • Testing with no oracle at all when a result cannot be fully predicted, instead of using a partial oracle.

The QA perspective

At the start of every story, ask: what is the test basis (which version of the story, which designs), what exactly is the test object (which build and environment), and what is the oracle for each check? Questions the basis cannot answer go to the product owner, and the answer goes into the basis, not a chat.

Keep testware where the team can find it — in the test management tool, the repository or on the story — and link it: condition to acceptance criterion, test case to condition, result to build, defect to test case. Then "is AC2 tested?" and "what must we rerun after this change?" take minutes to answer.

Practice exercise

Review a test session on a promo-code feature

Your task

Read the story and the notes a tester wrote after a first session. Name the test basis, the test object and the oracle, derive test conditions, list the testware that exists and is missing, and find what went wrong.

Material
Story SHOP-88  Promo codes
AC1  A valid promo code takes 10% off the cart subtotal.
AC2  Each customer can use a code only once.
AC3  An expired code shows "This code has expired."

Tester's notes, Tuesday, staging
1. Code SAVE10 on a 200.00 cart: screen showed 180.00,
   so expected result = 180.00. Order placed. Passed.
2. Used SAVE10 again with the same account: accepted again.
   Not sure if this is a bug.
3. Expired code: no expired code available. Skipped.
Steps
  1. Identify the test basis, test object and oracle. What is missing to identify the test object?
  2. Write at least four test conditions, each linked to an acceptance criterion.
  3. List the testware produced and the testware still needed.
  4. For each numbered note, say what went wrong and what to do instead.
Show the model answer
Model answer

Test basis: story SHOP-88, AC1 to AC3. Test object: the promo-code function on staging; no build is recorded, so the result cannot be tied to a release. Oracle: the criteria plus a calculation (10% of 200.00 is 20.00, so 180.00).

Test conditions: a valid code takes 10% off the subtotal (AC1); the same customer’s second use is rejected (AC2); another customer can still use the code (AC2); an expired code shows the exact message (AC3). Ask the product owner what an unknown code shows and whether the discount applies before VAT.

Produced: the notes, an informal test log. Missing: test cases with expected results written before the run, test data (an expired code, a second account), the build number and a defect report for note 2.

Note 1 copied the expected result from the screen; it matched the oracle only by luck, and the same method would have accepted a wrong value. Note 2 is a failure against AC2, not an open question: report it with the build and the expected and actual results. Note 3 lacks test data: get an expired code and log the test as not run, never as passed.

Frequently asked questions

Is the test basis the same as the test oracle?

Not always. The test basis is what you derive tests from; the oracle is the source of the expected result for a particular check. A requirement often plays both roles. But an oracle can come from outside the basis — a previous version, a comparable product, a calculation or a standard — and some basis items, such as a risk analysis, tell you what to test without giving any expected result.

Do agile teams still produce testware?

Yes, usually in a lighter form: acceptance criteria used as test conditions, test charters and session notes, automated test scripts in the repository, and test logs and reports from the CI pipeline. How much is written down depends on the context, the risk and any regulation; what matters is that the information exists, is versioned and can be found.

Are automated test scripts testware?

Yes. The ISTQB syllabus lists automated test scripts among the work products of test implementation. They need version control, review and maintenance like any other code, and the logs of their runs are test logs.

References

Practise with Mutqan tools

Convert a list of numbered requirements into traceable test cases with a requirement-to-test matrix.

Test Design

Generate structured test cases (id, title, preconditions, steps, expected result, priority) from a feature description and field list.

Test Design

One-stop factory for synthetic test data: users, customers, companies, addresses, numbers, dates and strings in JSON, CSV, SQL or XML.

Test Data

Compare an actual API response against an expected contract (example or schema) and report breaking vs non-breaking differences.

Validation

Compare two API responses (e.g. staging vs production) and list every structural and value difference.

API Testing

Go deeper

Your progress on this topic

Part of the QA Roadmap