Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions guides/plugins/plugins/testing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,30 @@ nav:

# Testing

When it comes to testing, you might immediately think about unit tests. Of course, we have got you covered then:
Robust testing is crucial for developing reliable and maintainable Shopware plugins and themes. Shopware provides tooling and guidance for several types of tests, ensuring your code is production-ready and meets community standards.

## Unit Testing

Unit testing is the base layer of an effective test strategy. Shopware supports both PHP backend logic and JavaScript components (for Storefront and Administration):

Use PHPUnit to write and run backend unit tests for your PHP code.

<PageRef page="php-unit" />

The following section also covers unit tests in [Storefront](./jest-storefront.md) and [Administration](./jest-admin.md).
Use Jest to test Storefront JS and Vue components following modern best practices.

<PageRef page="jest-storefront" />

Test custom Administration panel modules and components using Jest with the Shopware admin setup.

<PageRef page="jest-admin" />

## End-to-End (E2E) Testing

For simulating real user journeys and integration scenarios, Shopware recommends end-to-end (E2E) testing. Playwright is the officially supported tool for automating entire workflows across the application.

Even though unit tests are definitely great, you might want to do some end-to-end testing, which is covered here:
Automate browser interactions to verify plugins and customizations work as intended in real-world Shopware environments.

<PageRef page="playwright/index" />
<PageRef page="playwright/" />

<PageRef page="cypress/cypress-end-to-end-testing" />
Refer to the individual guides for setup, examples, and best practices for each testing type.