As part of testing an application, there is a need to test its behavior on various web browsers and operating systems keep on coming and being available in industry. To perform this testing, using a rich set of browsers and operating systems there are tools available on Web. One among those good tools is Saucelabs. Scenario Tests created in Pega can also be executed using the tool Saucelabs.
One can create an account in Saucelabs by going to the website https://www.saucelabs.com/.Once an account is created, the access key related information can be taken a note. This information is required to run the tests. Below navigation will direct to the screen that shows the info that includes Username and Access key.
Tunnel Setup for Saucelabs local testing:
Below navigation on saucelabs.com takes you to the steps needed to setup saucelabs tunnel. Please make sure not to give the --tunnel-name while setting up the proxy as it needs explicit tunnel-name capability setup from driver.
After successful setup you will see below screen on saucelabs tunnel proxies tab:
Running Scenario tests using Saucelabs
The scenario tests available on a system under test can be run by configuring and running a
Task on a Deployment Manager pipeline.
Event on any third-partypipeline like Jenkins
The functionality can even be quickly verified by invoking underlying activity responsible for running set of tests.
The use case configuration presented below is done by invoking the activity. The similar configuration can be done to run through other means as well.
JobID : It can be any string.
ProviderAuthName: Username provided by Saucelabs website upon account creation.
ProviderAuthKey: Access key provided by Saucelabs website upon account creation.
Browser: Browser of choice.
ScreenResolution: Desired screen resolution. Default provided by Scenario Testing framework is “1920x1080”.
SUTURL: URL of system under test. If it is local machine, Host and Port after port forwarding can be used to form URL. (Ex: http://x.x.x.x:abcd/prweb/)
SUTUserID: User ID to log in to system under test.
SUTPassword: Password to log in to system under test.
There are default values provided for a few parameters mentioned below. Specific values can be passed, if not the values mentioned below will be considered by default for tests invocation.
Platform: Windows 10
Verify Test status on saucelabs:
We can verify if the scenario tests have been successfully executed by navigating to automated-> test results section in sauelabs.
Verification of Test results
The statuses, execution time taken by the test cases and the other details can be found by going to the developer studio and launching Scenario Tests landing page. The page can be launched by clicking on the Scenario Testing icon which is a conical flask on the footer.