Selenium with Serenity
To run your Selenium tests with Serenity and Cucumber, follow this guide:
Prerequisites
- Java version 8 or above
- IntelliJ IDE
- Gradle latest version
-
Clone a starter project.
- Clone starter project from the GitHub repository.
- Set the project SDK to Java 8 or above.
-
Add Web Driver capabilities and Continuous Testing special capabilities. All the capabilities are added to the serenity.properties file.
infoIn order to run the test, set your access key:
- Get your access key.
- Replace <YOUR_ACCESS_KEY> with it.
infoReplace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
// Web driver capabilities
webdriver.remote.url = <server>/wd/hub
webdriver.browserType = chrome
// Continuous testing capabilities
webdriver.accessKey = <YOUR_ACCESS_KEY>
webdriver.agentName = Agent_1
webdriver.osName = Mac OS Monterey
webdriver.generateReport = true
webdriver.reportType = video -
Run your Test. In the IDE terminal make sure you are in the folder with build.gradle file and run:
gradlew clean test