1.5.2 Hands-On: Deriving and Implementing Decision Tables for JPacman
Course subject(s)
Module 1: Model-Based Testing and Decision Tables
We will use JPacman (see the “Getting Started” module) to explore the use of decision tables to test collisions between monsters, ghosts, and pellets. Collisions can happen between units: To see which units are implemented inspect the type hierarchy of the board.Unit
class. Try completing the following challenges
- Analyze requirements (Scenarios) and derive a decision table for the JPacman collisions from it. Hint: Easiest with non-Boolean conditions for the type of collider and the collidee.
- Based on the decision table for collisions, derive a JUnit test suite for the
nl.tudelft.jpacman.level.PlayerCollisions
class. Hint: To make this a true unit test class focusing on the decision logic, consider using mocks.
Automated Software Testing: advanced skills for java developers by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://online-learning.tudelft.nl/courses/automated-software-testing-advanced-skills-for-java-developers/.