Updated for Fall 2026
CoffeeMaker Testing
CoffeeMaker has several layers of tests to consider all parts of the system.
- Unit and integration tests — JUnit tests of the Repository, Service, and Controller layers. Automated.
- System tests — exercising the running application through the browser, checking behavior against the requirements. Manual at first, automated later.
- Acceptance tests — the subset of system tests a customer would run to decide whether to accept the product.
Unit/Integration Test Coverage Expectations
Your CoffeeMaker project must have at least 60% statement coverage and 50% branch coverage of unit and integration tests on src/main/java. Coverage of the tests themselves is not relevant. Measure it with IntelliJ’s coverage runner — right click src/test/java and select Run ‘All Tests’ with Coverage.
Starting in Milestone 1, the team project measures this for you with the JaCoCo plugin. Running ./mvnw verify checks your coverage against the minimums and reports a shortfall in the build output — it does not fail the build. GitHub Actions publishes the numbers to the run summary and uploads a browsable JaCoCo report with each build.
A green build therefore does not mean you have met the coverage expectation. Read the numbers.
Individual milestones state their own coverage expectations in their Done Criteria; those are the ones you are graded against.
System Test Plan Expectations
Your system test plan is a technical deliverable, kept in your GitHub repository alongside the other technical-documents/.
your-repo/
├── coffee_maker/
├── coffee_maker_frontend/
├── technical-documents/ <- requirements, architecture, process, static-analysis, and system-tests (provided)
├── system-tests.md
├── project-management/
├── retros/
Write it in Markdown, the same way the provided documents in technical-documents/ are written. Keeping it in the repository, means it is versioned with the code it tests, reviewable in a pull request, and visible by AI in the repository workspace.
System Tests
A system test plan has four parts.
Testing Overview
How someone else starts the system and runs your tests. Assume the reader has your repository and nothing else. At minimum:
- how to start the backend (
coffee_maker) and confirm it is running - how to start the frontend (
coffee_maker_frontend) and what URL to open - anything that must be true of the database before testing
For CoffeeMaker that is roughly:
Start MySQL. Run `CoffeeMakerApplication` from IntelliJ and confirm the console reports the application started on port 8080. In a terminal in `coffee_maker_frontend`, run `npm run dev`, then browse to [http://localhost:3000](http://localhost:3000). See [CoffeeMaker Setup](../setup) for first-time configuration.
Write your own version. If a teammate cannot follow it without asking you a question, it is not finished.
Requirements Coverage
Every requirement needs at least one test, and you need to be able to show that. Include a coverage table in your plan mapping each use case to the tests that exercise it, and keep it current as you add tests.
| Use Case | Tests | Covered? |
|---|---|---|
| UC1 Display Menu | ||
| UC2 Add Recipe | addRecipeValid1, addRecipeNegativePrice1 |
Partial |
| UC3 Delete Recipe | ||
| UC4 Edit Recipe | ||
| UC5 Update Inventory | ||
| UC6 Order Beverage |
The table above shows the shape, filled in for the two example tests. A gap in this table is either a requirement you have not tested or a requirement you have not implemented — and knowing which is which is the point of keeping it.
When the requirements are revised, add rows for the new use cases rather than starting over.
Test Data Summary
The state the system must be in before a test runs, because a test that only passes on your machine is not a test. Record:
- what data exists in the database at the start (recipes, inventory amounts)
- how to get back to that state — the reset procedure between test runs
- any values a test depends on
Determining CoffeeMaker’s starting state is part of your job. Run the application, look at what is there, and write it down. Determine if there is a common starting state needed to run the tests. If you would repeat the same steps for each test, that information should be included in the test data summary to create a common starting point for each test.
Remember, each test should be able to run independently or atomically. This is the common initialization needed for atomic tests.
Test Plan
The tests themselves, in the standard closed box test plan format: a unique Test ID, the Description (the steps to execute, including preconditions), the Expected Results, and a column for Actual Results recorded when you run it.
Aim for at least 3 system tests per use case, and cover alternative and error flows, not just the main flow. A plan where every test succeeds is an incomplete plan — the interesting cases are the ones where the system should refuse.
Example Tests
Two examples to show the format. Note that the Description is specific enough for someone else to execute without guessing, and the Expected Results are specific enough to be judged pass or fail.
| Test ID | Description | Expected Results | Actual Results |
|---|---|---|---|
addRecipeValid1 |
Preconditions: CoffeeMaker is running and no recipe named “Coffee” exists. 1. Browse to http://localhost:3000. 2. Click Add a Recipe. 3. Enter name Coffee, price 50, coffee 3, milk 1, sugar 1, chocolate 0.4. Click Submit. |
The recipe is created and a success message is displayed. “Coffee” appears in the recipe list on the main menu. | |
addRecipeNegativePrice1 |
Preconditions: CoffeeMaker is running and no recipe named “Mocha” exists. 1. Browse to http://localhost:3000. 2. Click Add a Recipe. 3. Enter name Mocha, price -10, coffee 3, milk 1, sugar 1, chocolate 2.4. Click Submit. |
The recipe is not created. An error message indicates the price must not be negative. “Mocha” does not appear in the recipe list. |
The second test is the more valuable of the two: it checks that the system rejects something it should reject. Most defects live in that territory.
