DevOps Continuous Integration -> Selenium -> Cucumber
-
Upload
abhay-kumar-pmp-csm-itil -
Category
Software
-
view
105 -
download
2
Transcript of DevOps Continuous Integration -> Selenium -> Cucumber
DEVOPS – CONTINUOUS INTEGRATIONSelenium & Cucumber
CONTINUOUS INTEGRATION
Source control
Continuous Integration
Build Automation
Build Repository
Automated Testing
Automated Release ManagementDevelopment
Configuring Selenium in Jenkins - Freestyle Project
Create a Java project in Eclipse using option -> New -> Java Project -> Update Project Name -> Click Libraries -> Add External Jars -> Select Selenium-Server-Standalone Jar file -> Add Library –> Select TestNG – >Click Next – >Click Finish –> Click Finish ->
Create a script file (mac)/bat file (window) in the project directory using syntax – “java –cp bin;lib/* org.testng.TestNG testng.xml” and save the file in same directory locally.
Configuring Selenium in Jenkins - Freestyle Project
Create a freestyle project in Jenkins using option –> New Item -> Update project name -> Select Freestyle project -> Press ok -> Click advance under General -> Select custom workspace ->update project home directory in the directory field ->
Next step , under build ->Press Add build step -> Select “Execute shell” -> Update script file name in the command field -> Press apply ->Press save ->
Now, a freestyle selenium project is ready to build in Jenkins.
Configuring Selenium in Jenkins - Maven Project
Verify & insure your Eclipse have Maven and TestNG plugins installed -> Create a Maven project in Eclipse using option New -> Project -> Select Maven Project -> Click next -> Check “Create a simple project” -> Click Next -> Update group ID field –> update artifact ID field -> update name -> update description -> click finish ->
Update the pom.xml file with necessary Selenium & testing dependencies and testng.xml file location update->
Configuring Selenium in Jenkins - Maven Project
Create a test program & generate testing.xml using right click test java class -> Select TestNG -> Convert to TestNG -> save testng.xml file as per pom.xml location specification ->
Next, in Jenkins -> Create New item –> Enter an item name -> Select Maven project -> Press ok -> Update pom.xml location file in build section -> Press apply –> Press save.
Now maven selenium project ready to build in Jenkins.
Configuring Cucumber in Jenkins - Maven Project
Create a project in Eclipse using option -> New -> project -> select Maven project -> press next -> check create a simple project -> Press next -> Update group ID -> Update artefact ID -> Update name -> Update description -> Press finish ->
Open pom.xml file -> Update latest stable selenium, junit, cucumber-java, cucumber-junit dependencies in the pom.xml -> Press control^S ->
Configuring Cucumber in Jenkins - Maven Project
Install cucumber software update for eclipse from http://cucumber.github.com/cucumber-eclipse/update-site using option help -> install new software -> Create a feature file ->
Create a package and java class in src/test/java folder using option new package -> Name the package -> New class -> Name the class -> Add reference of the feature file in the class ->
Configuring Cucumber in Jenkins - Maven Project
Create a test step package and java class in src/test/java folder using option new package -> Name package -> New class -> Name class -> Create test steps as per the feature file and reference as glue in the earlier defined class - >
In Jenkins, create new project using option -> New Item -> Enter an item name -> Select Maven -> Click ok -> Update location of the the pom-xml file in next page under build section-> Press apply -> Press save ->
Now, Maven cucumber project is ready to build in Jenkins.
THANK YOUhttp://solutionframework.blogspot.in