School preview · Teacher-led courses are in preview · Registration is open · Payments and live video are awaiting connection
← A Level ICT

A Level · English Medium · Cambridge · ICT

Programming and practical projects

Separate requirements, unit tests and integration tests.

Original Kidemy further-topic investigation. This optional lesson is shared by related upper pathways; select suitable depth with a teacher. It does not certify complete grade or board coverage.

Learn the idea

A unit test checks a small component against an independent expected result. An integration test checks communication across components. A test double replaces an external dependency so local tests do not send real messages or charges. Different test levels answer different questions.

Worked example

A fictional booking total is n×40 for integer0≤n≤8. Unit cases include0→0,5→200 and 9→rejected. A sandbox integration test separately checks whether the booking sends the intended amount to a fake gateway.

  1. State expected behaviour first.
  2. Use independent expected answers.
  3. Keep tests separate from live transactions.

Your written practice

Show your working on paper and enter your answer here. If it does not match, compare the model and try again.

Show model answer and explanation

240

6×40.

Show model answer and explanation

0

No units cost zero in this model.

Show model answer and explanation

rejected

The stated maximum is 8.

Write in your own words. A guardian or teacher should review this response.

Show model answer and explanation

Data mapping or communication between components may fail despite correct local arithmetic.

Distinguish component and integration concerns.

Write in your own words. A guardian or teacher should review this response.

Show model answer and explanation

Use a negative or non-integer n and expect a validation error in a local test.

No real payment or private data is needed.

Apply the idea

Create a local test plan with boundary, invalid-input and sandbox-integration cases.

Review with a guardian or teacher

Keep your work on paper or in a local file. This page does not upload it or automatically grade the project.

Teacher-led lessons, schedules and prices for this outline are upcoming. You can use any starter practice above now without booking.

Your next step

Solo practice works without an account. Sign in to save a practice record to your learner profile.

Keep practising

Exact lesson links and related activities are labelled separately. Return-to-course links retain your selected learning path.

Browse all games and books →