assert_
glossary ↓ downloads
cheatsheet · suite 01

Tooling & environment

every pattern from this suite, one pageCtrl+P prints it clean
Install (PowerShell, winget)
winget install EclipseAdoptium.Temurin.21.JDK
winget install JetBrains.IntelliJIDEA.Community
winget install Git.Git
# then CLOSE and REOPEN PowerShell (PATH loads at startup)
Verify
java -version     # any 21.x
git --version
mvn -version      # or: mvnw --version (wrapper)
Git — the daily five
git init                        # once per project
git status                      # constantly
git add .
git commit -m "Fix flaky wait in checkout test"
git push
Git — first push to GitHub
git branch -M main
git remote add origin https://github.com/YOU/repo.git
git push -u origin main
Maven commands
mvn test                   # whole suite
mvn test -Dtest=LoginTest  # one class
mvn clean test             # wipe old builds first
mvnw test                  # wrapper (no install needed)
Reading the output
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0
BUILD SUCCESS / BUILD FAILURE  = the headline
Failure = assertion mismatch  -> suspect the APP
Error   = code broke early    -> suspect the TEST
On red: scroll UP to the first red block.
Git — undo & inspect
git log --oneline           # history, compact
git diff                    # what changed (unstaged)
git restore file.java       # discard local edits
git restore --staged f      # unstage
git checkout <hash> -- f    # file from an old commit
# .gitignore:  target/  screenshots/  .idea/
JAVA_HOME by hand (if the installer skipped it)
Start -> "Edit the system environment variables"
-> Environment Variables -> System variables -> New
   JAVA_HOME = C:\Program Files\Eclipse Adoptium\jdk-21...
-> edit Path -> New -> %JAVA_HOME%\bin
Reopen PowerShell. Verify: java -version
IntelliJ survival shortcuts
Shift Shift      search everything
Alt+Enter        quick-fix / add missing import
Shift+F10        re-run last test
Ctrl+Alt+L       reformat file
Ctrl+/           comment line
Ctrl+Ctrl        run anything
Setup gotchas
  • 'java' not recognized → reopen shell; check JAVA_HOME + Path
  • Keep projects OUT of OneDrive folders (C:\dev\ instead)
  • Maven stuck on first open → wait for bottom-right progress