Frontend Test on multiple Apps or Environments
Purpose
This document covers two scenario's:
- Designing a Frontend Test that can run on multiple environments (Application Instances), like a Local environment and a Cloud hosted environment. This is not standard because the URL to navigate to, is not part of the Test Case / Test Setting, but passed as a parameter of the
Start_MxFrontend_Testmicroflow. - Designing a Frontend Test where the Playwright server can be on different locations, like locally hosted or in Azure. This is not standard because the Playwright server is determined by the
Start_Frontend_Testmicroflow that is called instead of being part of the Test Case / Test Setting. These scenario's often go hand-in-hand because hosting Playwright locally is the logical option when also running locally, whereas hosting Playwright in Azure is the logical option when the App under test is hosted in the (Mendix) cloud.
In the future, these two settings will be integrated as part of the Test Case / Test Setting, but currently it is required to implement a workaround for this.
Actions
- For configuring environment specific URLs, credentials etc., a custom "wrapper" microflow must be created. This microflow will call any of the
Start_MxFrontend_Testmicroflows, determined by for example an enumeration parameter. The return value of this wrapper should be identical as the originalStart_MxFrontend_Testmicroflow and used instead, in the subsequent teststeps. - For configuring the playwright server, another "wrapper" must be created. This microflow will have all the parameters of the underlying
Start_Frontend_Testmicroflows, and call any one of these, determined by for example an enumeration parameter. The return value of this wrapper should be identical as the originalStart_Frontend_Testmicroflow and used instead, in the subsequent teststeps.
Feedback?
Missing anything? Let us know!