This component is responsible for managing configuration for regression testing.
- Use MDOQ's generic suite - If you would like to use MDOQ's default suite, or if you would like to use your own.
- Ghost Inspector Suite ID - The suite ID you would like to run. (See locating suite ID.)
- Ghost Inspector API Key - The API key to use when starting a test suite. (See Generating API Key)
Locating Suite ID
From the Ghost Inspector dashboard, click into the suite you would like the ID for.
The url will then look like: https://app.ghostinspector.com/suites/XXXXXXXXXX
Copy everything after "https://app.ghostinspector.com/suites/", this is your suite ID.
Generating API Key
From the Ghost Inspector dashboard, click your name top right.
If you scroll down you should see "API Access" with a field that contains your API Key.
How Does It Work?
When running regression tests MDOQ will go through each enabled store in the Magento instance and trigger the configured suite for each store with test variables.
For the regression testing to be considered a success all tests must pass for all sites.
MDOQ will add a link to the regression test that was ran, into the action logs, though you will only be able to access the results if you are using your own suite.
When running regression tests using Ghost Inspector MDOQ will pass in the following variables
- startUrl - The URL of the current store being testing
- adminUrl - The admin URL for the instance being tested
- random - A 5 character random string. This can be used to generate a unique value within your test, for example: suffix an email address when testing account creation. (This is mainly left in for legacy support, if you need more specialized functionality tests check out: Specific Variables)
Default Test Suite
The default MDOQ test suite is designed to be as simple as possible, because it's almost impossible to create a detailed suite that works for all sites.
Our suite checks that the <body> tag is present on the following URLS:
This serves to validate that there hasn't been a major issue during development.
N.B the reason we test each URL with and without query string is to make sure we are busting cache when gathering results.
You can download a copy of our generic suite below, which you can use to build your own tests from. (see: Implement regression testing with MDOQ and Ghost Inspector)