Max Profit Calculator
A small stock-picking calculator (Spring Boot API and React UI) that I use as the system under test for nearly every testing technique I care about. The site walks through the test pyramid, the techniques behind each suite, and how to test an AI agent, with live reports from CI.
The calculator's API runs on a free tier, so the first calculation can take around 30 seconds while it wakes up.
- Each piece of logic is checked on its own, in milliseconds. Property-based tests go further: jqwik generates hundreds of random inputs to prove a rule holds for all of them, not just the examples someone thought of.
- Pitest plants small bugs in the code, like flipping a < to <=, and reruns the tests. A bug that survives means a missing test. The build fails if fewer than 90% are caught.
- The UI records exactly what it expects from the API, and the API proves it delivers that. If either side breaks the agreement, the build fails before anything is deployed.
- Scenarios written in plain Given, When, Then language drive a real browser. The specs read like requirements and double as living documentation.
- The real Docker images start exactly as they would be deployed and are tested over the network. Stress tests then push the load up to find where performance gives way.
- Schemathesis reads the API description and fires hundreds of generated requests, odd and invalid ones included. Every response must match what the API promises.
- The AI advisor's answers are replayed from recordings and scored by a second model acting as judge, so answer quality is measured rather than eyeballed.