You run tests by clicking through the app.
CI servers have no mouse. One command — mvn test — runs your whole suite, which is exactly what Jenkins or GitHub Actions will do.
IntelliJ's green arrow is fine for development, but automation's whole point is running without a human. The terminal command you learn here is literally what CI pipelines execute in Suite 07.
$ mvn test
Maven then: downloads any missing dependencies → compiles your code → runs every test class → prints a summary. (If mvn isn't on your system path, use the wrapper the starter ships with: ./mvnw test on Mac/Linux, mvnw test on Windows — same thing, zero install.)
[INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running HelloTest [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 [INFO] BUILD SUCCESS
Two words matter: BUILD SUCCESS or BUILD FAILURE. On failure, scroll up to the first red block — a Failure means an assertion didn't match (a real test failing its check); an Error means the code broke before asserting (element not found, null pointer). Distinguishing those two is a daily automation skill: failures point at the app, errors point at your test.
$ mvn test -Dtest=HelloTest # run one class only $ mvn clean test # wipe old builds first (fixes weirdness)
mvn test on every commit and email you the result." You now know the exact command the robot runs.Fix: Maven is bundled with IntelliJ but not on your system PATH. Use the wrapper the starter ships with — mvnw test on Windows — or run from IntelliJ's built-in terminal.
Fix: Surefire only picks up classes whose names end in Test, located under src/test/java. Check both, then re-run.
Fix: Maven is running with an older JDK than the project targets. Check JAVA_HOME points at your JDK 21 folder, reopen the terminal, confirm with mvn -version.
mvn test (or ./mvnw test) in your starter project. Find the Tests run / Failures line.HelloTest.java, run again, and identify the failure block in the output. Note it says Failures: 1..length() on a String set to null), run again, and see it report an Error instead. Fix everything and get back to BUILD SUCCESS.