From magento2-commerce
Writes PHPUnit unit/integration tests, MFTF functional tests, and API tests for Magento 2. Use for module test coverage, debugging, or CI/CD pipelines.
How this skill is triggered — by the user, by Claude, or both
Slash command
/magento2-commerce:magento-testingThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Fetch live docs**:
Fetch live docs:
site:developer.adobe.com commerce testing for testing overviewhttps://developer.adobe.com/commerce/testing/functional-testing-framework/ for MFTF guidesite:developer.adobe.com commerce php development test for unit/integration test patternsPurpose: Test individual classes in isolation.
Test/Unit/ within the moduledev/tests/unit/phpunit.xml.distvendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/VendorName/ModuleName/Test/Unit/createMock()Purpose: Test module interactions with the Magento framework.
Test/Integration/ or dev/tests/integration/dev/tests/integration/phpunit.xml.distvendor/bin/phpunit -c dev/tests/integration/phpunit.xml.dist@magentoDbIsolation enabled — rolls back DB changes after each test@magentoAppArea — sets the application area (frontend, adminhtml)@magentoConfigFixture — sets config values for the test@magentoDataFixture — loads test dataPurpose: End-to-end browser tests.
Test/Mftf/Test/, Test/Mftf/ActionGroup/, Test/Mftf/Page/, Test/Mftf/Section/vendor/bin/mftf run:test <TestName>Purpose: Test REST and SOAP API endpoints.
dev/tests/api-functional/dev/tests/api-functional/phpunit_rest.xml.distPurpose: Code quality and standards.
dev/tests/static/vendor/bin/phpunit -c dev/tests/static/phpunit.xml.dist$this->createMock(ClassName::class) for dependencies$mock->expects($this->once())->method('getById')->willReturn($entity)ObjectManagerHelper from test frameworkIntegration tests use fixtures to set up test state:
@magentoDataFixture annotation points to a fixture file@magentoDbIsolation rolls back after testUnit test plugin classes independently — call the plugin method with a mock subject and verify behavior.
Unit test observer's execute() method with a mocked Observer/Event object.
@magentoDbIsolation to prevent test pollutiontestSaveThrowsExceptionWhenNameIsEmpty()Fetch the testing documentation for exact annotations, fixture patterns, and MFTF XML schema before writing tests.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin magento2-commerceReviews Shopware PHPUnit unit tests for quality and compliance with conventions on structure, naming, attributes, mocking strategy, and behavior-focused testing.
Sets up Jest for Medusa v2 testing: module unit tests, workflow integrations with medusaIntegrationTestRunner, API routes via supertest, and mock patterns.
Writes PHPUnit tests for PHP code: unit tests, mocking, data providers, test doubles, assertions, and TDD practices. Use for testing PHP apps including Magento.