Alpha testing

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Alpha testing

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Who normally runs alpha testing?
A The developer or development team
B Outside users in their own homes
2. When does alpha testing happen?
A After the solution is released to users
B During development, before beta testing
3. What is the main aim of alpha testing?
A Collect users' opinions on the final release
B Find and fix errors, and check the solution meets requirements
4. Which statement is true?
A Alpha testing happens before beta testing
B Alpha testing happens after beta testing
5. A developer runs the program with test data and finds a calculation error. Which type of testing is this?
A Alpha testing
B Beta testing

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1alpha testing Astages = ["alpha", "beta", "release"]
2assert calculate_total(2, 5) == 10 Btester = "developer"
3Alpha testing is developer-run: the person who wrote the code tests it against the requirements CThe order is wrong. Alpha testing comes before beta testing, so errors are found and fixed before users test the solution.
4Alpha testing happens before beta testing, so the next stage only starts once errors are fixed DAlpha testing is run by the developer during development, not by end users. Users take part in beta testing.
5tester = "end user" # alpha testing ETesting run by the developer during development to check the solution meets requirements and works correctly
6stages = ["beta", "alpha", "release"] FAn alpha test the developer runs to check a function gives the expected output so any error can be found and fixed

Definitions

alpha testing

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
______ calc_total(2, 5) == 10
2.
___ test_total(): assert total([2, 3]) == 5
3.
stages = ["alpha", "beta"] print(stages[_])
4.
________ = 10 if run_test(5) != expected: print("Error found - fix it")
5.
tests = [(2, 4), (3, 6), (0, 0)] for inp, expected in _____: assert double(inp) == expected

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A def is_adult(age)
B return age >= 18
C assert is_adult(18) == True
Question 2
A def double(n):
B return n + 2
C assert double(4) == 8
Question 3
A expected = 10
B actual = add(4, 6)
C print(actual = expected)
Question 4
A def test_max():
B result = max(3, 9, 5)
C assert result == 3
Question 5
A def test_discount:
B price = discount(200)
C assert price == 180

Answer Key

Alpha testing
Section A: Quick Questions
Q1
A — The developer or development team
Q2
B — During development, before beta testing
Q3
B — Find and fix errors, and check the solution meets requirements
Q4
A — Alpha testing happens before beta testing
Q5
A — Alpha testing
Section B: Match the Pairs
Q1
alpha testing → Testing run by the developer during development to check the solution meets requirements and works correctly
Q2
assert calculate_total(2, 5) == 10 → An alpha test the developer runs to check a function gives the expected output so any error can be found and fixed
Q3
Alpha testing is developer-run: the person who wrote the code tests it against the requirements → tester = "developer"
Q4
Alpha testing happens before beta testing, so the next stage only starts once errors are fixed → stages = ["alpha", "beta", "release"]
Q5
tester = "end user" # alpha testing → Alpha testing is run by the developer during development, not by end users. Users take part in beta testing.
Q6
stages = ["beta", "alpha", "release"] → The order is wrong. Alpha testing comes before beta testing, so errors are found and fixed before users test the solution.
Section C: Definitions
Q1
alpha testing — Testing run by the developer during development to check the solution meets requirements and works correctly, so errors are found and fixed before beta testing with users.
Section D: Fill in the Blanks
Q1
assert calc_total(2, 5) == 10
Q2
def test_total(): assert total([2, 3]) == 5
Q3
stages = ["alpha", "beta"] print(stages[0])
Q4
expected = 10 if run_test(5) != expected: print("Error found - fix it")
Q5
tests = [(2, 4), (3, 6), (0, 0)] for inp, expected in tests: assert double(inp) == expected
Section E: Spot the Error
Q1
A — A function definition must end with a colon. The developer's alpha test cannot run until line 1 is fixed to def is_adult(age):
Q2
B — The function adds 2 instead of multiplying by 2, so double(4) gives 6 and the alpha test assert fails. It should be return n * 2.
Q3
C — A single = assigns a value and is not allowed inside print() like this. Comparing expected and actual output needs ==, so it should be print(actual == expected).
Q4
C — The expected value is wrong. max(3, 9, 5) is 9, so the test would fail even though the code is correct. It should be assert result == 9.
Q5
A — The brackets are missing from the function definition. A test function needs def test_discount():