This repository contains teaching examples for unit testing and test quality in Java.
Examples are intended to be run manually during class or local practice. Automatic CI execution, badge generation, and report publishing are disabled by default.
- Java assertions basics.
- JUnit Jupiter fundamentals.
- Maven + JaCoCo basics.
- Mutation testing with PIT (Pitest).
- Separate project to teach mutation testing after JUnit foundations.
- Unit testing with Hamcrest + JUnit.
- BDD with Cucumber + JUnit Platform.
- UI-oriented steps with Selenium/Sikuli.
- Interaction-based testing with EasyMock.
- Basic Maven + JUnit test structure.
- Mocking and behavior verification with Mockito.
- Selenium WebDriver examples (opt-in execution).
- Modern browser automation with Playwright (opt-in execution).
- TDD-oriented incremental example.
Run tests for a project:
cd code/<ProjectName>
mvn testRun mutation testing:
cd code/PITExample
mvn test-compile org.pitest:pitest-maven:mutationCoverageBuild slides:
latexmk -pdf -interaction=nonstopmode slides.texThis repository is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).
See LICENSE for details.
Generated PDFs (for example, slides.pdf) are ignored by default.
Only publish a PDF for major versions by committing it under releases/, for example:
mkdir -p releases
cp slides.pdf releases/slides-v2.0.pdf
git add releases/slides-v2.0.pdf