Tag: testing
All the articles with the tag "testing".
-
Introducing Integration Tests and Improving Action and Transition Coverage
Scaffolding a Java integration test structure that makes real HTTP requests against the controller, adding the first Transition tests, and using try-with-resources for clean MockedStatic teardown between tests.
-
Expanding Test Coverage to Multiple Actions and the Spring Controller
Using ChatGPT to scaffold unit tests for multiple Action classes and the CatanController, and investigating unexpected Spring request body serialization behavior with @RequestBody and custom DTOs.
-
Writing Unit Tests for PlaceSettlementAction
Writing unit tests for PlaceSettlementAction by thinking through meaningful test cases, setting up game state fixtures, and using ChatGPT to scaffold new test files based on existing IAction test patterns.
-
Improving CatanGraph Test Coverage and Catching a HashMap Overwrite Bug
Expanding CatanGraph unit tests to cover all branches, overriding equals and hashCode on ResourceBundle for readable assertions, and discovering a real bug where Road adjacency entries were silently overwritten by Hexagon entries in a HashMap.
-
Introducing ResourceBundle for Player Resources and Expanding Unit Test Coverage
Creating a ResourceBundle class to encapsulate each player's resource cards, using Jackson's @JsonUnwrapped for clean JSON serialization, and mocking random roll results in unit tests with Mockito's MockedStatic.
-
Configuring Java Test Tooling and Reaching 44% Code Coverage
Adding Maven surefire and Jacoco plugins for test reports and coverage metrics, then writing the first unit tests for IAction and CatanGraph to bring code coverage from 0% to 44%.
-
Building a Python CLI Tool and Automated Game Scenario Runner
Creating a two-part Python testing setup: a CLI wrapper around the REST API and a script runner that replays sequences of game commands from text files, enabling fast manual regression testing and informal game move notation.