- This project is an example of how to setup and write selenium tests using BDD approach with Serenity framework
- How to create jenkins pipeline
- Project setup with Selenium WebDriver and windows 10
- serenity.version: 1.8.3
- serenity.cucumber.version: 1.6.6
- Makes use of Page Objects.
- Written in Java with Junit, Cucumber & Maven
- Can run test scripts in parallel
- Install Java 8
- Install Maven Maven
- "mvn archetype:generate -Dfilter=net.serenity-bdd:serenity-cucumber-archetype" to setup project from scratch
- Install "natural plugin" using eclipse marketplace
mvn clean verify -P api
ORmvn clean verify -P web
ORmvn clean verify -Dwebdriver.driver=chrome
- Run test scripts using Chrome browser.
- HTML report will be generated once execution finish -bdd-cucumber\target\site\serenity
- Open Index.html in browser to see the reports
- TBD
- This project is example how can setup jenkins pipeline for selenium project step by step
- Download latest jenkins.war Jenkins download link
- Start jenkins.jar on default port using command 'java -jar jenkins.war'
- Start jenkins.jar on specific port using command 'java -jar jenkins.war --httpPort=portnumber'
- Open localhost:portnumber and login using displayed insructions on browser screens
- Now install all default plugin and set user & password
- Navigate to jenkins home and click on "Manage jenkins" tab
- Now click on "Manage plugins"
- In "Available plugins" tab, perform serach for "Pipeline Maven Integration" and install
- Follwing above steps, install "HTML Publisher" plugin
- Navigate to "Manage jenkins->Global Tool configuration"
- Configure java-jdk & maven with java8 & maven_3_5_0 name respectivelly
- Navigate to "Manage jenkins->Configure System" and in Github section configure github credentials
- Navigate to "https://github.com/narottamgla/selenium-bdd-cucumber/blob/master/Jenkinsfile" and have similar file in github root
- Now navigate to click New Item and create pipeline type of job
- Now navigate to pipeline section of job and select "Pipeline script from SCM"
- Enter repositary url and select github credentials and keep other details default
- Save the changes
- Click build now and execution will be started
- Pipeline steps will be displayed on jenkins screen
- Once execution finish, Click on "HTML Report" tab to view serenity HTML Reports