Automated tests on Serenity
Quick start guide to integrate Automated tests in BrowserStack Accessibility Testing with Serenity.
Prerequisites
- You have an account with BrowserStack (even a free trial works) and can get the username and access key from Account & Profile.
- You have a pre-existing Serenity test suite integrated with BrowserStack Automate.
- Maven is installed on your machine, its environment variables are set, and its bin is added to the system path, $PATH.
- Serenity v2+, Java v8+, Selenium v2.5+ (JSON Wire / W3C).
Integrate with Automated tests
Follow these steps to get started with adding Automated tests to your test suite:
The minimum version of browserstack-java-sdk
that supports Automated tests with Serenity is 1.23.4
.
Modify your browserStack.yml config file
Automated tests mandatorily need the following configurations in the browserstack.yml
file. Especially, ensure to set the accessibility
flag as true
at the end of the browserstack.yml
file.
The projectName
and buildName
config must be static and not change across different runs of the same build. This is a deviation in approach as specified by BrowserStack Automate since Automated tests will automatically identify different build runs.
-
Accessibility testing runs only on Desktops (Mac & Windows) with Chrome 100 & above on Automate.
-
Window handle commands might cause instability to Automated Tests. If you face issues, consider removing window handle commands or contact support.
Add serenity-browserstack dependency in pom.xml
Add serenity-browserstack as Maven dependency in your pom.xml
file and save the file.
This dependency adds the Serenity BrowserStack plugin to your project.
Set up serenity.conf file
Since project uses the Serenity BrowserStack plugin, set the remote URL and add your BrowserStack credentials in the serenity.conf
file of your project.
Run your test suite with Automated tests
You can continue running your tests as you have been previously. The command to run your tests using the BrowserStack SDK remains unchanged.
You can check the Accessibility report for your build through the Automated tests page.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!