Task 2 · Test Log
up to +100 XP
Stop 2.2 · Task 2 · 6 min

Test Log

Document your testing process systematically

Learning Objectives:
  • Understand how to complete a test log template
  • Learn to design effective test cases
  • Practice documenting test results
  • Identify and record defects systematically

Test Log Template

In your exam, you will be given a test log template that looks like this:

Description of test Test data to be used (if required) Expected outcome Actual outcome Comments and intended actions
         

Understanding Each Column

1. Description of Test

A clear, concise description of what you are testing. This should relate to a specific requirement.

Examples:

2. Test Data to be Used

The specific input values you will use for this test. Be precise and realistic.

Examples:

3. Expected Outcome

What should happen if the code works correctly. Calculate this manually based on requirements.

Examples:

4. Actual Outcome

What actually happened when you ran the test. Be honest and specific.

Examples:

5. Comments and Intended Actions

If the test passed, simply write "Passed". If it failed, describe the problem and what needs fixing.

Examples:

Example Test Log for T-Learn Automotives

Description of test Test data to be used Expected outcome Actual outcome Comments and intended actions
Test program runs without syntax errors N/A Program starts and prompts for name Error: AttributeError on line 28 Failed - sales_list is tuple, not list. Change () to []
Test valid employee ID (8 digits) ID: "12345678" ID accepted, program continues Error message displayed, ID rejected Failed - validation logic reversed. Change == to !=
Test invalid employee ID (7 digits) ID: "1234567" Error message, prompt again ID accepted (incorrect) Failed - same issue as above
Test total value calculation 3 vehicles: £20,000, £25,000, £30,000 Total: £75,000 Total: £30,000 Failed - only last value stored. Change total = i to total += i
Test commission calculation (5%) Total: £75,000 Commission: £3,750 Commission: £3,750 Passed
Test bonus for exactly 6 vehicles 6 vehicles: £20,000 each Bonus: £500 Bonus: £0 Failed - condition should be >= not >. Change > to >=
Test bonus for 7 vehicles 7 vehicles: £20,000 each Bonus: £500 Bonus: £500 Passed
Test additional bonus for total ≥ £135,000 5 vehicles: £30,000 each (£150,000 total) Bonus: £6,000 (4% of £150,000) Bonus: £60,000 Failed - calculating 40% not 4%. Change 0.4 to 0.04
Test combined bonuses 6 vehicles: £25,000 each (£150,000 total) Bonus: £6,500 (£500 + £6,000) Bonus: £6,500 Passed
Test ID number displays in summary ID: "12345678" ID number: 12345678 ID number: (blank) Failed - missing variable in print. Add {}.format(id)
Test file output Complete test run Data saved to automotive_sales.txt NameError: name 'sales' not defined Failed - variable name mismatch. Change 'saes' to 'sales'

Tips for Creating Effective Tests

Test data the specification asks for

In Task 2 your test log should identify test data across these types. Example for a rule "number of vehicles sold must be 1 to 20":

TypeMeaningExample
ValidNormal data that should be accepted8
Valid extremeAt the edge of the range and still accepted1 or 20
InvalidThe right type but outside the rules, so rejected25
Invalid extremeJust outside the edge of the range, so rejected0 or 21
ErroneousThe wrong type of data, so rejected"eight"

The specification also asks your annotated evidence to: identify the tests, describe each test's purpose, identify the test data, describe the expected results, describe the actual results, compare actual with expected, describe any further actions needed and show the system being refined.

Test Data Selection

Recording Results

Documenting Actions

Unrealistic Test Data

A test might technically pass but use unrealistic data that doesn't reflect real-world scenarios. While the code may work correctly, these tests don't provide meaningful validation.

Examples of Unrealistic Tests:

Test Description Test Data Why It's Unrealistic
Test bonus calculation 50,000,000,000 vehicles sold in one day Physically impossible - no dealership could sell 50 billion vehicles in a day
Test total value calculation Vehicle price: £999,999,999,999 No vehicle costs nearly a trillion pounds
Test commission calculation Vehicle price: £0.01 No vehicle costs 1 penny
Test employee name input Name: "aaaaaaaaaaaaaaaaaaaaaa" (500 characters) No real person has a 500-character name

Why Realistic Test Data Matters:

What Makes Test Data Realistic?

Common Mistakes to Avoid

Best Practices

Exam Tips

Quick check · 12 questions · up to 100 XP

Check what stuck.

+10 XP each
Question 1

Question 1 of 12

What must you include in the "Test Data" column?

Question 2

Question 2 of 12

How do you calculate Expected Outcome?

Question 3

Question 3 of 12

What should you write in Comments if a test passes?

Question 4

Question 4 of 12

What should you write in Comments if a test fails?

Question 5

Question 5 of 12

What is a boundary condition test?

Question 6

Question 6 of 12

Why is "50 billion vehicles sold in one day" unrealistic test data?

Question 7

Question 7 of 12

What is a realistic range for vehicle prices in test data?

Question 8

Question 8 of 12

When should you complete the test log?

Question 9

Question 9 of 12

Which set of test data types does the specification list for ESP Task 2?

Question 10

Question 10 of 12

Why is it important to retest after fixing an error?

Question 11

Question 11 of 12 · Coding

Choosing test data: the number of cars sold must be a whole number from 1 to 10. Write data_type(n) that returns "normal", "boundary" or "erroneous" for a piece of test data. Treat 1 and 10 as the boundaries.

Open the IDE
Hint

Check the boundaries first (n == 1 or n == 10), then whether n is inside the range.

Question 12

Question 12 of 12 · Coding

Filling in the log: write outcome(expected, actual) that returns "Pass" when the actual outcome matches the expected outcome, and "Fail - investigate" when it doesn’t.

Open the IDE
Hint

Compare with ==.