Using generated fake test data

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

Using generated fake test data

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. You are building a class sign-up form and want to test it. What is the safest data to use?
A Your classmates' real names and emails
B Fake data made by a data generator
2. Which statement describes fake test data?
A Real values with the names crossed out
B Invented values that look realistic, like 'Sam Taylor, age 13'
3. A data generator can quickly make 100 rows of names and numbers.
A True: you choose the fields and it fills in invented values
B False: you must type every row yourself
4. You made 50 rows of fake data in a generator. How can you use it in a spreadsheet?
A Export it as a CSV file and import it into the sheet
B Retype each row by hand into every cell
5. Why is fake data good for testing a new app that stores student details?
A If the app leaks or breaks, no real person is harmed
B Fake data makes the app collect more real data

Match the Pairs

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

Left columnRight column
1fake test data AChanging one letter does not make data fake. The rows can still be traced back to real people.
2data generator BThis uses real people's personal data for testing when invented data would work just as well.
3Fake data can be exported from a generator as a file and opened in a spreadsheet to test your solution Cstudents_fake.csv
4A generator can make invented names and numbers so you never need real people's details to test DInvented but realistic values, such as made-up names and numbers, used to build and test a solution
5Test my quiz app by typing in my classmates' real names and marks EA tool that quickly creates many rows of invented names, ages and numbers for you to use in testing
6Fake data = copy 50 real rows from the school list and change one letter FName: Jordan Test, Age: 13, Score: 78

Definitions

fake test data

Fill in the Blanks

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

1.
=___________(12,15)
2.
=______("S",RANDBETWEEN(100,999))
3.
exportFile("fakeStudents.___")
4.
INSERT INTO students (firstName, points) ______ ('Test', 50);
5.
IF testing THEN data ← fakeData ____ data ← realDataWithConsent

Spot the Error

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

Question 1
A import random
B names = ['Ava', 'Liam', 'Mia'
C print(random.choice(names))
Question 2
A id,name,age
B 1,Ava Test,13
C 2;Liam Test;14
Question 3
A FOR i ← 1 TO 50
B name ← studentRecord(i)
C OUTPUT name
D ENDFOR
Question 4
A rows = []
B for i in range(5):
C rows.add(fake_name())
D print(rows)
Question 5
A data = generate(20, 'names')
B export(data, 'test.png')
C open('test.csv')

Answer Key

Using generated fake test data
Section A: Quick Questions
Q1
B — Fake data made by a data generator
Q2
B — Invented values that look realistic, like 'Sam Taylor, age 13'
Q3
A — True: you choose the fields and it fills in invented values
Q4
A — Export it as a CSV file and import it into the sheet
Q5
A — If the app leaks or breaks, no real person is harmed
Section B: Match the Pairs
Q1
fake test data → Invented but realistic values, such as made-up names and numbers, used to build and test a solution
Q2
data generator → A tool that quickly creates many rows of invented names, ages and numbers for you to use in testing
Q3
Fake data can be exported from a generator as a file and opened in a spreadsheet to test your solution → students_fake.csv
Q4
A generator can make invented names and numbers so you never need real people's details to test → Name: Jordan Test, Age: 13, Score: 78
Q5
Test my quiz app by typing in my classmates' real names and marks → This uses real people's personal data for testing when invented data would work just as well.
Q6
Fake data = copy 50 real rows from the school list and change one letter → Changing one letter does not make data fake. The rows can still be traced back to real people.
Section C: Definitions
Q1
fake test data — Invented but realistic values made by a data generator, so you can build and test a solution without collecting any real person's data.
Section D: Fill in the Blanks
Q1
=RANDBETWEEN(12,15)
Q2
=CONCAT("S",RANDBETWEEN(100,999))
Q3
exportFile("fakeStudents.csv")
Q4
INSERT INTO students (firstName, points) VALUES ('Test', 50);
Q5
IF testing THEN data ← fakeData ELSE data ← realDataWithConsent
Section E: Spot the Error
Q1
B — The list of invented names is missing its closing bracket. It should be names = ['Ava', 'Liam', 'Mia'].
Q2
C — A CSV file separates values with commas, not semicolons. The row should be 2,Liam Test,14 so it matches the other rows.
Q3
B — This line pulls a real student's record, which defeats the purpose. The loop should use the generator: name ← randomName().
Q4
C — Python lists use append() to add an item, not add(). It should be rows.append(fake_name()).
Q5
B — Generated data should be exported as a CSV file so a spreadsheet can open it. The file name should be 'test.csv', matching line 3.