Football Play Lab: Test Cases, One Play Against Three Defenses
Level 12 of Football Play Lab runs one play against three defenses: man, Cover 1 and two deep, one round each, and passes only when all three gain 5 yards or more. The starter play, X on an out at 10 yards, passes the first two and is knocked away against two deep. Students fix it two ways: change the route to out(8), or have the quarterback read the defense before the snap and throw to Z's slant when two defenders are deep. Both pass all three. Then they test beyond the level: on the Practice field they run their play against nine cases, three coverages with 0, 1 or 2 rushers, and find what breaks it, such as a quarterback who waits 2 seconds and is sacked.
At a glance
Essential question
How do you know a program works, and not only on the case you tried?
Objectives
Students will be able to:
- run a program against a set of test cases and record which pass
- find the case that fails and explain why from the evidence on the screen
- fix a failing case in two different ways and justify which to keep
- design new test cases the given tests do not cover, and run them
- explain why passing one case is not evidence that a program works
Vocabulary
Test case, Test matrix, Edge case, Two deep, Tradeoff, Regression
Standards
3B-AP-21, 3A-AP-15, 2-AP-17
Time and materials
45 minutes, grades 9-12.
- One computer or Chromebook per student
- A projector
- The worksheet and exit ticket, one copy each per student
- The rubric, one copy per student if you grade the work
Prep
Make copies of the worksheet and exit ticket. Before class, open mytekdev.com/try/footballplaylab?lesson=test-cases-one-play-against-three-defenses&ref=tpt-footballplaylab-4 once on a student computer, which checks that your school's filter allows the app, and follow the short guide yourself: about ten minutes.
Assessment
- Formative: the questions under What to look for, asked while students work, and the exit ticket (answer key included).
- Summative: the worksheet, scored with the rubric.
Technology and privacy
Runs in any browser, Chromebooks included, with nothing to install. Students need no account and no email: the link works signed out, and nothing they do is stored on our server unless they choose to save.
mytekdev.com/try/footballplaylab?lesson=test-cases-one-play-against-three-defenses&ref=tpt-footballplaylab-4mytekdev.com/tools/football-play-lab/lessons/test-cases-one-play-against-three-defenses/startEach student gets their own copy, and the same link reopens it next time. How to set up a classLesson sequence
| Minutes | Stage | What you do | What students do |
|---|---|---|---|
| 0 to 5 | Warm-up Hook | Show the title, essential question and Today I can slides (about 1 minute). Then the warm-up: is a calculator that gets 2 + 2 right tested? | Answer the warm-up on the worksheet. |
| 5 to 13 | Direct instruction (I do) Model it | Project Level 12. The field fills the middle, seen from high behind the offense: the student's five players in team colors with flag belts, the five defenders in gray. Each player has a chip, C, Q, X, Y and Z, and each chip opens that player's own program in the Blocks and Python tabs. The box on the field says the level's goal and, after each play, what happened and why, with the seconds and the yards. The panel at the bottom right says the time since the snap, where the ball is, and how open the target receiver is. Read the three programs aloud: X me.out(10), Z me.slant(3), Q drops back 3, waits 0.6 seconds and throws to X. Ask which defenses it will beat, then press play and let all three rounds run. Man and Cover 1 pass; two deep is knocked away. Read the box: which defender got to the ball. It's working when: A passed round starts the next by itself. A failed round stops there; pressing play starts again from round 1. | Predict, watch, and fill in the vocabulary on the worksheet. |
| 13 to 22 | Guided practice (We do) Find the failing case | Students open the link or scan the QR code. A short guide walks them through the three rounds and the change to out(8). Then, with out(10) back in, they write the second fix: in Q's program, if me.deep() >= 2, throw to Z, else throw to X. Watch for: Students who test the fix only against two deep. A fix that breaks man or Cover 1 is a regression; the level runs all three, which is the point. | Follow the guide, then write the read. Record both fixes against the three cases. |
| 22 to 37 | Independent practice (You do) Nine cases | Students open the Practice field (Levels menu) and, with the read in, run all nine cases from the defense picker in the box. Then they change the quarterback's wait to 1.2, 1.6 and 2.0 and run the cases again. File, Play sheet shows the play from above and runs it against each built-in defense. Each play runs in real time. Slower and Speed up, under the field, change the speed; the play button starts the level again from the beginning, with the programs as they are now. Walk the room with the What to look for questions. If they ask: "out(8) and the read both pass. Which would you keep, and what does each one cost?" Which fix? Watch for: Students who stop at the first pass. Ask for the case that breaks their play. | Fill in the test matrix, then the wait rows, and answer the questions. |
| 37 to 45 | Closure When is a play ready? And exit ticket | Show the closure slide and take answers. Then name the idea: tests show a program works on the cases tried, and the job is to try the cases most likely to break it. Hand out the exit ticket. | Discuss, then answer the exit ticket. |
Before you teach: a ten-minute walkthrough
Open mytekdev.com/try/footballplaylab?lesson=test-cases-one-play-against-three-defenses&ref=tpt-footballplaylab-4. A short guide opens over Level 12, Test cases, in the Python tab on X's program. The field fills the middle, seen from high behind the offense: the student's five players in team colors with flag belts, the five defenders in gray. Each player has a chip, C, Q, X, Y and Z, and each chip opens that player's own program in the Blocks and Python tabs. The box on the field says the level's goal and, after each play, what happened and why, with the seconds and the yards. The panel at the bottom right says the time since the snap, where the ball is, and how open the target receiver is.
- The starter. X: me.out(10). Z: me.slant(3). Q: me.drop(3), me.wait(0.6), me.throw_to("X"). C and Y run 20 yards straight. Round 1 is man, round 2 Cover 1, round 3 two deep; each wants 5 yards or more.
- The two fixes. X's me.out(8): 10.8, 10.8, and a touchdown against two deep. Or Q reads before the throw: if me.deep() >= 2: me.throw_to("Z") else: me.throw_to("X"); 12.4, 12.4, and Z's touchdown. Card twelve in the box is a version of the read with yards after the catch.
- The Practice field. Levels, Practice field. Its box has a picker for the coverage (man, Cover 1, two deep) and the rushers (0, 1, 2). The programs stay as they are.
- Speed. Each play runs in real time. Slower and Speed up, under the field, change the speed; the play button starts the level again from the beginning, with the programs as they are now. The play is the same on every run and every computer, so every student who makes the same change sees the same numbers.
- Numbers to expect. The starter: 12.4, 12.4, knocked away at 3.1 s. With the read, on the Practice field, all nine cases pass at a wait of 0.6. The wait changed: 1.2 still gains about 12.7 against man and Cover 1 and is incomplete against two deep; 1.6 is incomplete against man and Cover 1 and intercepted against two deep; 2.0 is a sack, 8 yards lost, whenever a rusher comes, incomplete against man and Cover 1 with no rusher, and intercepted against two deep with none.
Background for the teacher
A play, like a program, is built against the cases its designer imagined. Coaches test a play against each defense it will see, and a play that beats only one is a guess. Two deep puts a safety over each sideline, so a deep out to the sideline runs toward a defender who is already there. Nobody is ever hit: a defender who reaches the ball carrier pulls a flag from its belt, and the play is over there. The field and rules are modeled on the IFAF flag football rules for 5 on 5; the app is not affiliated with or endorsed by IFAF or any league.
The two fixes trade differently. out(8) is one change and simple, but gains less against man and Cover 1. The read keeps the longer gain where it works and changes receivers where it does not, at the cost of more code and one more thing that can go wrong. Choosing between them, and saying why, is the design decision the lesson asks for.
Teams at every level study plays with video and data, and the people who do it include coaches, video coordinators, data analysts and the software engineers who build their tools. In software, the same habit is called testing: unit tests, test matrices and regression tests.
What to look for
Ask these while students work. A student who has understood the lesson can answer them without help:
- Which case failed, and what in the box tells you why?
- Why does out(8) pass against two deep when out(10) does not?
- What does me.deep() return against each defense, and when is it read?
- Which fix would you keep, and what does it cost?
- What case did the level not test that broke your play?
Cross-curricular extensions
- Math: three coverages, three rusher counts, four waits. How many cases is that, and how long would they take at 10 seconds each?
- Physical education: run one play against two different defenses in the gym. What did the defense change?
- Careers: look up what a software tester or quality engineer does.
- Computer science: write the nine cases as a list of pairs, and a loop that would run each one.
Vocabulary
| Test case | One input and the result it should give: here, one defense and at least 5 yards. |
| Test matrix | Every combination of the inputs being tested: three coverages times three rusher counts is nine cases. |
| Edge case | An input at the limit of what the program handles, where it is most likely to fail. |
| Two deep | A zone defense with two safeties deep, each covering half the field. |
| Tradeoff | What you gain and give up when you choose one design over another. |
| Regression | A case that used to pass and fails after a change. |
Differentiation
English learners
- Keep the vocabulary slide up, and point at the receiver, the cornerback or the box on the field as you say each word: the picture carries the meaning.
- Give a sentence frame on a card: Against ____ with ____ rushers, my play ____ because ____.
- Give the test matrix as a grid with the coverages across and the rushers down, so only results are written.
Students with IEPs or 504 plans
- Pair students, one at the keyboard and one recording results.
- Give the read already written on a card to type in.
- Where the IEP allows a modified assignment, score the first two rubric rows only.
Students who need more support
- Do the first fix and the first three cases together on the projector.
- Use card twelve in the box, which reads deep() the same way, then test it.
- The box on the field says what went wrong after every play.
Students ready for more
- Write a third fix that passes all nine cases with the quarterback waiting 1.2 seconds.
- Go on to Level 13, the drive: four downs to cross midfield and four more to score, against a defense that changes every play.
- Save both fixes in Team, Playbook, and call each one in the drive. Which scores in fewer plays?
Adapting for other grades
Younger students: In middle school, use Blocks and card twelve, run the three rounds together, and fill in the test matrix as a class on the board. Score the first two rubric rows, total 8, and 6 meets the objectives.
Older students: In an AP or college course, ask students to write the test matrix as a list of cases first, predict each result, then run them, and to explain each wrong prediction. Connect it to unit tests and to regression testing.
Football Play Lab: Test Cases, One Play Against Three Defenses
Student worksheet
Name: ______________________________ Date: ______________
Open the app: scan the QR code, or go to mytekdev.com/try/footballplaylab?lesson=test-cases-one-play-against-three-defenses
Essential question: How do you know a program works, and not only on the case you tried?
Warm-up: A calculator gets 2 + 2 right. What would you try before you trusted it? ________________________
- Vocabulary. Test case, test matrix, edge case, two deep, tradeoff, regression: write each in your own words.
- The starter. Man: ______. Cover 1: ______. Two deep: ______.
- Two fixes. out(8): man ______ Cover 1 ______ two deep ______. The read: man ______ Cover 1 ______ two deep ______.
- My test matrix. Pass or fail. Man with 0, 1, 2 rushers: ____ ____ ____. Cover 1: ____ ____ ____. Two deep: ____ ____ ____.
- Slower quarterback. Wait 1.2: ________. Wait 1.6: ________. Wait 2.0: ________.
1. Which fix would you keep, and what does it cost?
2. Name a case the level did not test that broke your play, and say what happened.
Football Play Lab: Test Cases, One Play Against Three Defenses
Exit ticket
Name: ______________________________
1. A play passes against man and Cover 1 and fails against two deep. It is: (A) ready (B) ready for two of three cases (C) broken in every case
2. Three coverages with 0, 1 or 2 rushers make: (A) 3 cases (B) 6 cases (C) 9 cases
3. A friend says their program works because it ran once without an error. Use what you learned today to answer.
Answer key: exit ticket
| Question | Answer | Why |
|---|---|---|
| 1 | B | Tests show it works on the cases tried; one case still fails. |
| 2 | C | 3 x 3 = 9. |
| 3 | Open answer | One run is one case. Choose cases that could break it, edge cases included, run them all, and fix what fails without breaking what passed. |
Worksheet: what students should find
| Blank | What the app shows |
|---|---|
| The starter | Man 12.4 yards. Cover 1 12.4. Two deep knocked away at 3.1 seconds. |
| Two fixes | out(8): 10.8, 10.8, touchdown. The read: 12.4, 12.4, touchdown to Z. |
| My test matrix | With the read at a wait of 0.6: all nine pass. |
| Slower quarterback | 1.2: passes against man and Cover 1, incomplete against two deep. 1.6: incomplete against man and Cover 1, intercepted against two deep. 2.0: a sack whenever a rusher comes; with none, incomplete against man and Cover 1, intercepted against two deep. |
| Question 1 | Either, with a tradeoff: out(8) is simpler and gains less; the read keeps 12.4 yards and adds code. |
Rubric
Score each row from 1 to 4.
Name: ______________________________
| Criteria | 4 Exceeds | 3 Meets | 2 Approaching | 1 Beginning |
|---|---|---|---|---|
| Finding the failing case | Finds two deep as the failing case and explains why with the box's evidence. | Finds the failing case. | Says the play failed, without which case or why. | Does not find it. |
| Two fixes and a choice | Writes both fixes, tests each against all three cases, and justifies which to keep with a tradeoff. | Writes both fixes and tests each. | Writes one fix. | No fix. |
| The test matrix | Runs all nine cases and the wait rows, and names the case that breaks the play. | Runs all nine cases. | Runs some cases. | Does not run them. |
Total: ____ / 12. A score of 9 or more meets the objectives.
Standards
The lesson is built for CSTA 3B-AP-21: students use a set of test cases, the level's three and a nine-case matrix of their own, to check that a play does what it is meant to. Choosing between two fixes and justifying it is 3A-AP-15.
| Framework | Code | Grades | Standard | How the lesson meets it |
|---|---|---|---|---|
| CSTA 2017 | 3B-AP-21 | 11-12 | Develop and use a series of test cases to verify that a program performs according to its design specifications. | Students run one play against the level's three defenses and a nine-case matrix of coverages and rushers, and add cases of their own, such as a slower quarterback. |
| CSTA 2017 | 3A-AP-15 | 9-10 | Justify the selection of specific control structures when tradeoffs involve implementation, readability, and program performance, and explain the benefits and drawbacks of choices made. | Students fix a failing case with a changed route and with a conditional read, and justify which to keep by what each gains and costs. |
| CSTA 2017 | 2-AP-17 | 6-8 | Systematically test and refine programs using a range of test cases. | For middle school classes: students test one play against a range of cases and refine it. |
Checked November 2026 against: CSTA K-12 Computer Science Standards, Revised 2017.
Optional: save student work in a free class
The whole lesson runs at the link on the worksheet, with no accounts and no sign-up.
To keep students' work, and see it all in one place, make a free class. It takes about ten minutes, once, and covers every lesson in this series: mytekdev.com/tools/class-setup
Students in a class open mytekdev.com/tools/football-play-lab/lessons/test-cases-one-play-against-three-defenses/start instead of the worksheet link. Each one gets their own copy of the starter, and the same link reopens it next time.