E2e - #7
Open
EHandtkeBasis wants to merge 12 commits into
Open
E2e#7EHandtkeBasis wants to merge 12 commits into
EHandtkeBasis wants to merge 12 commits into
Conversation
hyyan
requested changes
Sep 28, 2026
hyyan
left a comment
Member
There was a problem hiding this comment.
The build setup around the tests is too complicated and has bugs. Replace it with a standard Maven and Failsafe setup.
Remove
- The
docker-e2eandcontainer-e2eprofiles, theexec-maven-pluginconfig, and the second Maven run inside Docker.- Every
verifybuilds the step twice, and the innercleandeletes the host'starget/. - The container writes root-owned files into
target/, somvn cleanon the host fails afterwards. - The Playwright Java image has no Java CA certificates, so the Maven run inside it can't download dependencies on a fresh runner.
docker-e2eis always active, which switches off the defaultdevprofile.
- Every
scripts/run-e2e.shand.gitattributes.- The custom
it.test,skipTests,skipITsandmaven.test.skipproperties. Failsafe already supports-Dit.test,-DskipITs,-DskipTestsand-Dmaven.test.skip. - The
junit-jupiter.versionoverride. It downgrades Spring Boot 4's JUnit 6. TutorialAppand theE2E_IN_DOCKERchecks.<hotswap>onspring-boot-maven-plugin. It isn't a parameter of that plugin. RestoreexcludeDevtools, and remove the secondspring-boot-maven-plugindeclaration in steps 3–6.- The
application.propertieschanges in steps 2–6. They have nothing to do with testing, they duplicate keys, and they remove the app name, the datasource settings and the H2 console. - The
node_modules,playwright-reportandtest-resultsentries in.gitignore. - The copied helper code. Each step has about 510 lines of the same helpers. Once
TutorialAppis replaced, keep only what each step actually needs.
Replace with
- Root aggregator POM. Add a root
pom.xmlwithpackagingset topomthat only lists the six steps as modules. Don't add a shared parent, so each step still builds on its own withcd <step> && mvn verify.- Full suite:
mvn -B -ntp -fae verify - One step:
-pl :customer-app-step-N
- Full suite:
- Failsafe. Go back to the Failsafe setup from
main: theintegration-testandverifygoals withtrimStackTrace=false.- Pass the baseline and artifact folders as
systemPropertyVariables. - Enable
redirectTestOutputToFileso each test's log is kept.
- Pass the baseline and artifact folders as
- App startup. Replace
TutorialAppwith@SpringBootTest(webEnvironment = RANDOM_PORT)and@LocalServerPort, as the webforJ Spring archetype does.- Add
@ActiveProfiles("test")and asrc/test/resources/application-test.propertiesthat turns off devtools browser opening, livereload, craftforj and debug. - Add
@DirtiesContext(AFTER_EACH_TEST_METHOD)if each test needs a fresh app. - Spring then handles startup, readiness, the port and shutdown. That also fixes the overwritten
server.log, readiness accepting a 404, and the port race.
- Add
- Browser in Docker. Run only the browser in Docker.
- Use Testcontainers to start
mcr.microsoft.com/playwright/java:v${playwright.version}-noblerunning Playwright'srun-server. - Connect with
chromium().connect(wsUrl, new BrowserType.ConnectOptions().setExposeNetwork("<loopback>")). - Keep this exact image, because the baselines depend on its fonts. Don't regenerate the baselines.
- Use Testcontainers to start
- Workflow.
- Run the Maven command above instead of the script.
- Add a
pull_requesttrigger andpermissions: contents: read. - Always upload the surefire and failsafe reports,
visual-diffsandplaywright-traces.
- READMEs. Only list the final commands:
mvn verify,-pl,-Dit.test=Class#method,-DupdateScreenshots=trueand the skip flags. Leave out internal details.
Keep
- The
StepNITtests and their assertions VisualAssertions- The existing baselines
- The Playwright traces
- The browser-error checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.