Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

AC 2.9: Testing methods used while building

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

70 minutes

A survey tool, tested six ways

A team builds a tool that cleans survey answers and gives class summaries. Before anyone uses it, they test it in different ways.

Each way finds a different kind of fault. This lesson covers the first six.

Key words

WordWhat it means
Concept testingchecking an idea with the people it is for, before it is built
Unit testingtesting one small part alone
Boundary testingtesting values at the edges of what is allowed
Integration testingtesting that parts work together once joined
Performance testingchecking how quickly the solution responds
System testingtesting the whole finished solution against what was asked for
Requirementsomething the finished solution must do, as agreed with the customer
Benefitwhat a method is good at
Drawbackwhat a method is poor at, or what it costs

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can define six testing methods, say why each is used, and give a benefit, a drawback and when it fits.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Concept, unit and boundary testing

MethodWhat it isWhy use itBenefitDrawback
ConceptShow the idea or a sketch to the people it is forCheck it solves their real problemFinds a wrong idea before money is spentOpinions only: nothing runs yet
UnitTest one small part aloneFind faults in that partFast, and points to the exact faultMisses faults where parts join
BoundaryTest values at and either side of each limitFaults gather at the edgesFinds many faults for little workSays nothing about the middle

The cells students fill in are left blank in this preview.

Integration, performance and system testing

MethodWhat it isWhy use itBenefitDrawback
IntegrationTest parts once they are joinedCheck the parts agree on data and orderFinds interface faultsHarder to find which part is at fault
PerformanceMeasure how fast it respondsCheck it is quick enough to useShows slow steps earlyNeeds tools and results vary
SystemTest the whole solution against the requirementsCheck it does everything askedShows how the user will meet itLate, so faults cost more to fix

The cells students fill in are left blank in this preview.

Try it: a performance measure

Code: python
import time

rows = list(range(200000))
start = time.perf_counter()
total = 0
for r in rows:
    total = total + r
end = time.perf_counter()
print("total", total)
print("seconds taken is above 0:", end - start > 0)

# The exact time changes each run. Compare 200000 with 400000 rows.

Check

Have a go

Check

4 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

The lesson goes on

3 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.