Capsule 13

Test Driven Development

General Information about the Capsule

Name: Test Driven Development
Identifier: ENACTEST_ID_13
Language: English
Category: Lesson, Document, Exercise 
Keywords: Test-Driven Development, TDD, Unit Testing, Refactoring, Agile, Software Engineering 

Description:
“TDDChallenge” is an educational tool designed to provide students with a practical and interactive approach to learning Test-Driven Development (TDD). The challenge emphasizes iterative development, refactoring, and understanding the TDD cycle (Red-Green-Refactor). It offers hands-on experience with writing tests before code, maintaining code quality, and understanding the impact of well-tested software.

Supporting Materials

Cost: Free
Copyright and Other Restrictions: Yes
Description: Licensed for educational and research purposes.

Educational

Interactivity Type: Interactive
Learning Resource Type: Teaching material with accompanying software
Interactivity Level: Medium
Intended End-User Role: Learner (Master’s students , final year Bachelor’s students)

Context: Higher Education
Typical Age Range: Adult learners (18+ years)
Difficulty Level: Intermediate
Description of Learning Objectives:

  • Learning how to generate tests from UML state machines
  • Coverage criteria
  • Mutation testing

Prerequisites

  • Prior knowledge of UML class diagrams and state charts.
  • When using own models: Prior knowledge of testing basics

Classification of the Learning Objectives According to Bloom’s Taxonomy

  • Understand: Comprehend JUnit, Unit Testing, UML state machines, Test generation, and model coverage.
  • Apply: N+ strategy for test generation and use mutation testing for evaluating tests.
  • Analyze: Compare manual unit tests with generated tests.
  • Evaluate: Assess test effectiveness of test cases.

Learning Sequence
Introduction to testing, testing framework and JUnit
Activity 1: Testing a Three Plater Volley Game in JUnit – with submissions
State Model, Coverage, N+ strategy, Code instrumentation, test generation
Activity2: Review generated tests
Evaluate generated tests with Mutation in comparison with manual tests

Expected Consequences
Students will develop skills in model-based testing.

Meta-Metadata

Metadata Schema: IEEE LOM-based ARIADNE
Language: English

More information