Iam using Selenium Cucumber Maven framework with Junit. How can we run cucumber feature files in parallel from Command line. I am very thankful if you guys help me. Please help me with a solution.
Have a look at this article https://automationrhapsody.com/running-cucumber-tests-in-parallel/
First of all you need to write (or generate) runner classes for each feature file. Next configure the maven-surefire-plugin to run tests in parallel. If you are using maven-failsafe-plugin look at https://maven.apache.org/surefire/maven-failsafe-plugin/examples/fork-options-and-parallel-execution.html for the configuration.
Be careful in which setup you run the tests. I would recommend you to setup a selenium grid with one master and multiple slaves to avoid hardware restrictions and of course concurrency issues.
Related
We use Cucumber with selenium in a maven project to automate our functional tests and Jenkins for the continuous integration,
Now we start to use AngularJS front-end in the project
I'm not sure if it's a good idea to start using Protractor ?
if yes how can we use'it in the same maven project along side with cucumber?
Protractor is not java based. You need to use Javascript/nodejs in order to run Protractor. Normally in nodejs, there are separate task runners or build tools, such as Grunt/Gulp/Webpack. There might be a way you can leverage to run protractor with maven: https://github.com/greengerong/maven-ng-protractor
IMHO if your application is pure angular application, protractor can provide you some level of conveniences, if your application is in the middle of migration, I rather stay with what you have right now, to me, it doesn't provide much business value on migration from selenium to protractor.
We are looking at cucumber for our automation test framework because everyone including business people can understand it.
We use Angualr JS frontend and Java REST backend. Our team that is going to write the step definitions likes Ruby so we want to stick with Ruby for that.
Also we would like to use Maven to tie this process into our build process.
Will cucumber be a good fit given that story above ?
Hui Peztherez, from my prospective cucumber is a great choice, using it with the same architecture expect for Angular.
We are using Maven too, and it's so useful to orchestrate them with Jenkins, using maven to run the tags..
mvn test -Dcucumber.options="--tags #smoke"
ref: https://cucumber.io/docs/reference/jvm
Also Jenkins have several plugin to report the Cucumber Analysis, so useful for testers, and in the end, we are now working about the HPQ server integration with a plugin called Bumblebee (this part is still under development for both sides, our and bumblebee)
Another good choice is Ruby, you can take the step definition so easily defined with Ruby...
We also have a integration with Selenium for the front end side, and it works as well...
So go further!
We are using Cucumber in Java with gradle in past, It was in Maven and It works fine. We have framework for UI and API, In UI we used WebDriver to write step definition and In API, We used RestAssured to write step definition. You can do same thing in Java what you can do in Ruby.
Maven for Java Cucumber :
http://mvnrepository.com/artifact/info.cukes/cucumber-java/1.2.4 - Please add other dependency as per requirement.
Jenkin Plugin : https://wiki.jenkins-ci.org/display/JENKINS/Cucumber+Reports+Plugin
Will cucumber be a good fit given that story above ?
- Yes It is good fit. I will request you to show POC(Proof of concept) to management. I had experience in past that management have no clue about BDD and they have very hard to time to understand coverage. We did very deep dive to provide all information to them. It is very important to answer following question to management
BDD report is providing accurate test converage idea to management ?
Everyone in team is able to write feature file and able to provide same quality of feature file
Feature file and BDD report will be starting tool for check test converage
Thank you.
Please be aware that Cucumber is a BDD framework that can be used on top of a browser automation framework like Selenium WebDriver/Watir/Protractor they are two distinct things. Most of them implements Selenium WebDriver's protocol.
My only concern is for you using Maven in that project setup, I know that you can run ruby code in a JVM by using JRuby. But I'm not sure which plugin you'd use to trigger that from Maven.
We have a node.js project that we are building with Atlassian Bamboo. We are doing CI/CD, or that's the plan. We are using Mocha to do Unit/API testing. But I didn't see anything in the task types to do web UI testing. We have used Selenium in the past, and that was the idea this time as well. But there is no nice, easy to use test runner and parser, as there is with Mocha.
Anyone have any experience with this in Bamboo? Any suggestions on how to do this?
I am using Selenium with Bamboo and I have configured Maven plugin and TestNG Parser . You can pass Selenium Grid URL/Base URL etc in environment variables.
Recently we moved to Contentious Integration for build management using Teamcity and also configured a few automated junit tests as ant tasks. To extend it further I'm looking at running a static code analysis tool like FindBugs as a step whenever a build triggers. I would appreciate any helpful suggestion.
You can run FindBugs or other command line tool from TeamCity easy. Just create a command line task, point to your exe and off you go. Sonar is also another very good tool, here is a sample instance http://nemo.sonarqube.org/
Which tool/server can be used to perform continuous integration that helps running PHP UNIT tests, SELENIUM tests and Custom tests such as bash script ideally. I have got following options:
1. Hudson
2. PHP Under COntrol (plugin of cruise control)
3. jenkins
4. Bamboo (Atlassian)
5. TeamCity (JetBrains)
6. Apache Continuum
I need to know which is the best in my case, with some reasons. I appreciate your valuable thoughts.
Also maybe look at Sismo (from the Symfony folks) ?
Jenkins is best option for your problem. Currently we are also using jenkins as our CI server and we are running unit tests, selenium tests and other tests including load testing etc. with jenkins. Also it has support for multiple plugins.