Skip to content
Computer Science · Grade 11

Active learning ideas

Capstone Software Development: Testing and Quality Assurance

Active learning works for testing and quality assurance because students must experience firsthand how thorough testing prevents real-world failures. When they role-play as both programmers and testers, they internalize the mindset that code must prove its own correctness under stress and scrutiny. This hands-on approach builds habits that textbooks alone cannot teach.

Ontario Curriculum ExpectationsCS.HS.D.3CS.HS.P.5
30–50 minPairs → Whole Class4 activities

Activity 01

Peer Teaching45 min · Pairs

Pair Testing: Unit Test Challenges

Pairs select functions from their capstone code and write 5-10 unit tests, including edge cases like null inputs. They run tests using frameworks like JUnit or pytest, then swap code with another pair for verification. Discuss failures and refactor as needed.

How do we prove that our code works as intended under edge-case conditions?

Facilitation TipDuring Pair Testing, assign roles explicitly so one student writes tests while the other implements the function, forcing both to think critically about the other’s work.

What to look forProvide students with a small, incomplete code snippet (e.g., a function with a logical error). Ask them to write one unit test case that would fail due to the error and explain why it fails. Collect and review for understanding of test case creation.

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 02

Peer Teaching35 min · Small Groups

Small Group: Edge Case Brainstorm

Groups list 20 potential edge cases for a shared app feature, such as maximum data limits or network failures. They code and run tests for the top 5. Present results to the class, highlighting unexpected bugs.

What is the difference between a bug and a design flaw?

Facilitation TipIn Edge Case Brainstorm, provide a checklist of common failure points (e.g., null inputs, max values) to guide groups without giving away answers.

What to look forPose the question: 'Imagine your capstone project's main feature crashes every time a user enters a specific, valid piece of data. Is this a bug or a design flaw, and how would you approach fixing it?' Facilitate a class discussion to differentiate between the two concepts and problem-solving strategies.

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 03

Peer Teaching50 min · Whole Class

Whole Class: User Acceptance Simulation

Students role-play users with scripted tasks on peers' capstone apps. Log usability issues on shared forms. Debrief as a class to prioritize fixes based on feedback frequency.

How does user feedback change the trajectory of a software project?

Facilitation TipFor User Acceptance Simulation, give students scripted but ambiguous user feedback to practice distinguishing between bugs and design gaps.

What to look forHave students swap their capstone project documentation, specifically the section outlining their testing plan. Ask them to evaluate: 'Does the plan include tests for edge cases? Are the UAT scenarios clear?' Students provide written feedback on one specific aspect of their peer's plan.

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 04

Peer Teaching30 min · Individual

Individual: Bug Hunt Refactor

Each student introduces deliberate bugs into sample code, then writes tests to detect them. Refactor the code to pass all tests. Submit test suites with coverage reports.

How do we prove that our code works as intended under edge-case conditions?

Facilitation TipDuring Bug Hunt Refactor, require students to document each bug they find with a reproducible test case before attempting fixes.

What to look forProvide students with a small, incomplete code snippet (e.g., a function with a logical error). Ask them to write one unit test case that would fail due to the error and explain why it fails. Collect and review for understanding of test case creation.

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit

Experienced teachers approach this topic by treating testing as a design activity, not an afterthought. They avoid lectures on tools by embedding testing into every coding task, so students see it as part of the process, not a separate phase. Research shows that early and frequent testing reduces frustration later, so teachers model iterative cycles where students write tests, run them, and refine both code and tests together. Avoid letting students skip edge cases or treat testing as optional—these habits are hard to unlearn.

Successful learning looks like students confidently designing tests that cover normal cases, edge conditions, and user scenarios before writing final code. They should articulate why certain tests matter and adjust their approach based on peer feedback or simulation results. Ultimately, they move from seeing testing as a chore to viewing it as a critical design tool.


Watch Out for These Misconceptions

  • During Pair Testing, watch for students who only test happy paths or obvious cases.

    Prompt pairs to take turns acting as a skeptical user who tries to break the code, using the provided checklist to generate edge cases like empty strings or extreme values.

  • During Edge Case Brainstorm, watch for students who assume edge cases are rare and therefore unimportant.

    Ask groups to estimate the likelihood of each edge case in real-world use and prioritize tests based on impact, using their brainstormed list as a starting point.

  • During User Acceptance Simulation, watch for students who dismiss user feedback as irrelevant or blame the user.

    Use the simulation debrief to tie feedback directly to requirements, asking students to revise their testing plans to include scenarios where user expectations weren’t met.


Methods used in this brief