Edit in GitHubLog an issue

Test your component

Unit and integration tests#

Run the PHPUnit based Adobe Commerce and Magento Open Source unit and integration tests. See the Testing Overview.

Functional testing#

For further testing with the functional testing frameworks, see Functional Testing Framework.

Test using Magento Open Source#

Test your component by deploying Magento Open Source and adding the component to the project's composer.json. To install, see Install using Composer.

Copied to your clipboard
1"require": {
2 "magento/magento-composer-installer": "*",
3 "yourvendorname/module-one": "0.1.1"

Register your component, including the file location. Verify it works as expected, without compromising functionality.

Test installing your component#

Before you publish your component, test installing it.

  1. Package your component in a GitHub repository that is accessible by the machine on which you run the Admin.

  2. On that machine, create a static route from https://repo.magento.com to your GitHub repository.

    To create a static route, add a line similar to the following to your hosts file:

    Copied to your clipboard
    <IP or hostname of your GitHub repository> https://repo.magento.com
  3. Install your component.

  4. Verify it installed correctly.

More information#

See these resources for testing in PHP and validating components:

Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.