Magento 2.1.18 is the final 2.1.x release. After June 2019, Magento 2.1.x will no longer receive security patches, quality fixes, or documentation updates.
To maintain your site's performance, security, and PCI compliance, upgrade to the latest version of Magento.

Test your component

Unit and Integration Tests

Run the PHPUnit based Magento unit and integration tests. See the Magento Testing Overview.

Functional testing

For further testing with the Magento 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.

1
2
3
4
"require": {
    "magento/magento-composer-installer": "*",
    "yourvendorname/module-one": "0.1.1"
},

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

Test installing your component

Before you publish your component, test installing it using the Magento Component Manager. Access this feature through Web Setup Wizard in the Magento Admin.

  1. Package your component in a GitHub repository that is accessible by the machine on which you run the Magento 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:

    1
    
    <IP or hostname of your GitHub repository> https://repo.magento.com
    
  3. Install your component, like a merchant.
  4. Verify it installed correctly.

More information

See these resources on testing in PHP and validating Magento components:

Updated