End-to-end testing checks an application through its frontend, much as a customer would use it. For a microservices application, the test runs against the whole application or a useful cut-down configuration, exercising multiple services behind a visible result. Aim to make that configuration as close to production as practical. section 9.8
These tests sit at the top of the testing pyramid. Starting the application, database, and browser makes them slower than integration or unit tests, but a single test can cover substantial ground. Keep a useful handful alongside larger sets of faster tests; there is no fixed test count for every project. section 9.4 section 9.8.7
A practical Playwright workflow is:
- Prepare a configuration that builds and runs the needed microservices and database. Use `docker compose up --build` to start them; a cut-down configuration can remain testable when the full application is too large for one computer. section 9.8.4
- Install Playwright with `npm init playwright@latest` for generated configuration and starter tests. Set its `baseURL` to the running frontend so tests can visit routes without repeating the host address. section 9.8.2
- Load database fixtures before visiting a page. With Playwright’s `page`, navigate to a route, locate elements in the DOM, and assert their count, text, or links. section 9.8 section 9.8.5
- Run `npx playwright test` while the application is running. Use `npx playwright test --reporter=list` when terminal results are needed, including for a CI or CD pipeline. section 9.8.5
Check a video list
Start the gateway and metadata services with their database. Load a fixture containing two videos, visit `/`, then locate `#video-list>div` and assert that it contains two entries. Check each entry’s displayed name and link. This verifies that fixture data reaches the frontend, rather than checking the metadata service alone. section 9.8.4 section 9.8.5
Run the same UI test against the full application when it is available. Wait until the gateway is online before invoking the project’s test script: a browser test cannot pass against an application that has not started. section 10.6.2











