Contents
    Application Development

    Integration vs End-to-End Testing

    Integration Testing

    Integration tests sit between unit tests (testing a particular class or set of classes without dependencies) and end-to-end tests. They execute code in an environment close to the normal application runtime but not in a real browser, so they provide less visual feedback than end-to-end tests.

    Integration tests typically:

    • Run during the integration stage.
    • Start the complete Spring context and interact with a database.
    • Interact with a subset of the UI and its immediate integrations.
    • Mock or use fake services for remote integrations.
    • Verify the resulting state of the UI and its data bindings.

    Use UI integration tests to quickly verify UI and immediate backend interactions and catch bugs early. For integration testing in Jmix, use standard Spring Boot tests and let Studio help you create the test classes.

    See the documentation to learn more.

    End-to-End (E2E) Testing

    E2E tests simulate real user workflows automating a browser to interact with the application in a production-like environment with real services or realistic stubs. They are ideal for validating critical end-user flows but are generally slower and harder to maintain than unit or integration tests.

    E2E tests typically:

    • Run before release or nightly builds for critical flows
    • Run in a browser or a headless browser simulation.
    • Simulate real user scenarios with real services or realistic stubs.
    • Verify application behavior from the user’s perspective.
    • Capture screenshots for visual evidence and error analysis.

    Use E2E tests sparingly for critical user journeys to ensure the whole system works in production‑like conditions. Jmix includes Masquerade – a dedicated testing library. Built on Selenium WebDriver and Selenide, it simplifies creating E2E tests for your applications.