How to create an initial test suite within Ghost Inspector and configure MDOQ to use it.
Ghost Inspector is quite a big subject domain and too big to cover in this guide, however they do have great documentation which can be found here, it's definitely worth checking out once you're up and running.
Prerequisites
- Ghost Inspector account
Walkthrough
- Download the "ghost_inspector.json" from here.
- Log into Ghost Inspector
- Click "+ New"
- Fill in the details
- Select "More" > "Import Test in Ghost Inspector format (.json)"
- Upload the "ghost_inspector.json" you downloaded previously
- Click Save changes.
N.B don't worry about the Start URL being "https://doesntmatter.com", MDOQ passes the correct URLs in when running the test - Now you have a new suite, we can collect the following information
- Suite ID (see "Locating Suite ID" here)
- API Key (see "Generating API Key" here) - Log into MDOQ
- Select your production or live connector instance
- Select Settings > Additional Configuration > Regression Testing
- Change Use MDOQ's generic suite to No
- Fill in your Ghost Inspector Suite ID and Ghost Inspector API Key
- Click Save
That's it MDOQ is now configured to run that suite next time the I'm Done process is followed.
Allowing MDOQ to run regression tests
To allow MDOQ to run the configured regression test, make sure Skip regressing testing is unchecked. (This is the default, but it's easy to have gotten into the habit of checking it).
If you are testing the regression suite, it will be faster to not sync code and db, this means MDOQ can run the regression tests straight away. This is not recommended when work is going to go live, just whilst testing the regression suite.
Test Parameters
When MDOQ triggers the test/suite it will automatically pass in the following test parameters. (These will be available within your tests).
- startUrl - the frontend url of the store
- adminUrl - the admin url of the instance
- random - a random 5 character string containing 0-9 and a-z (lowercase)
- storeCode - the Magento store code being tested.
Checking the results
To check the results, you can check the instance Action Logs. By clicking the appropriate down arrows and "more info" you can get a link to the exact run in Ghost Inspector
N.B by default if all tests pass MDOQ will automatically go on to the next stage "Client Acceptance".