"I would like to work on test automation, but my business is so busy that I can't find the time."
Do you have such a problem?
In such a case, let's start by setting up a test to periodically check if the production environment is working without problems that can be easily set up in an hour (or in the development environment instead of the production environment).
- Create a project and a test case
- Specify the website to be tested
- Add visual diff assertion
- Set up scheduled run and Slack notifications
1. Create a project and a test case
First, let's create a project and a test case.
Open the organization page and click Add on the right side of the screen.
Enter any project name you like, select Browser for the platform, and click Create.
Click + Add a test case on the right side of the screen.
Enter any test case name you like and click Create.
Click Edit test case.
You will then be taken to the edit test case page.
2. Specify the website to be tested
Next, specify the URL of the website you wish to test (such as the one of the production environment) and launch it in MagicPod cloud browser.
Click Launch at the top right of the screen.
Enter the URL of the website to be tested and click OK.
After the cloud browser in MagicPod is launched, click Select on the right side of the screen to start the element selection mode.
A step will then be added to the test execution steps on the left side that will take you to the URL you specified.
3. Add visual diff assertion
Next, let's add a step to check that the images on the page to which we have moved are as expected.
Click Add new row on the left side of the screen, then on the Assertion tab, click Assert there is no visual diff.
Click Select on the right side of the screen to unlock the element selection mode.
Click Run.
When it turns orange, click Details.
Click the message.
Click Approve to register the expected value image.
Click Edit test case.
Enter any name you like in the Assert there is no visual diff step.
Launch the cloud browser and run a test to make sure the test was created correctly.
Click Launch.
Click Run.
Confirm Success is displayed.
Now you have created a test that will go to the page with the specified URL and check if the image is as expected.
If there are multiple URLs you want to check, click Add new row and add the steps Navigate to URL and Assert there is no visual diff to check for image differences on multiple pages.
4. Set up scheduled run and Slack notifications
Once the test is created, set it up to run automatically every day.
Click the project name.
Select the Batch runs tab and click Details.
Click Schedule batch run.
Select Enable schedule and set the time and day of the week you want.
In addition, let's notify test results by Slack.
Click Common settings and set Notify test result by Slack to Enabled.
Click Add.
Enter any name you like and click Add to Slack.
Select the channels for which you wish to send notifications, and click Allow.
Click Close.
Click ×.
By the way, if you set Notify test result by Slack to Enabled (Detail settings), you can be notified only when a test fails, etc.
The setup is now complete.
MagicPod will now periodically access the production environment to check it and quickly detect any server errors or screen corruption.
If you want to create more complex tests, please refer to Start Guide. You will be able to create a variety of tests!