Thanks for the much awaited series naveen! I tried running the scenarios with TestNG without changing the folder structure (kept as same like we used for junit runner). It runs without any problem... Small update from my side🙂
Thanks @Naveen for your video but I'm having an issue, everytime I run the test I got a sequential execution always. I copied your pom and even with that I've got the same execution... in sequence
hiii naveen as you told in this video run all scenario parallel but is possible to execute parallel scenario and feature file with thread value 2 in this video all test are executed at same time it consume lot of cpu.
@Naveen, what exactly does the 2d Object array return ? super.scenarios must be returning multiple scenarios but what is the other dimension? because it is a 2D array . Thanks :)
Thanks for this video, however I noticed one thing though, tags mentioned in the parallel runner are irrelevant, irrespective of tags are there or not, all features and scenarios still run parallelly, any thoughts?
Able to run scenarios in parallel mode with the testng framework as explained only by invoking using the Runner file but not able to execute with maven commands from command line -- can you tell me know what could be the problem then.
Hello, do you know how to limit threads ? for example I want to launch 2 scenarios parallel ? edit: if someone looking for solution just add this to surefire
@@krishnasep3 The default thread count of the dataprovider in parallel mode is 10. To change this the dataproviderthreadcount property needs to be added to the configuration section of the Surefire or Failsafe plugin in the POM.
@@ashuiet : Can you please let me know what you have done to get the Extent and PDF reports...?. I followed the same steps...but I am not able to see these reports. Thanks, in advance.
Naveen hi. Great video!!!! I'm building a Cucumber + Maven + Selenoid framework, without parallel enabled. I try now to run it in multiple threads and as can you imagine i have problems.But the debugging is hard, because logs are not produced live. Do you have any idea or solution to have live logs while i run test in parallel? Ty
@Naveen - My tests are running in sequence instead of running in parallel. From eclipse its running in parallel mode but from surefire plugin its running in sequence. Can you pls help?
@@PoojaChauhan-ms5ht thanks a I will try this. I faced another issue if I run cucumber tests through Testng in testng extent report the actual feature names are not getting printed. The test names are getting printed as "feature".
don't sure what am i doing wrong. I did eveything same expect the test scenarios. I can't run parallel with junit always run at sequence but ican generate extent pdf report. At testng i can run paralel but can't generate extend pdf report
Not Sure what wrong I am doing but for me it is saying 'The method scenarios() is undefined for the type AbstractTestNGCucumberTests' for the function written under runner class public class TestRun extends AbstractTestNGCucumberTests {
@Override @DataProvider(parallel = true) public Object[][] scenarios() { return super.scenarios(); } } It would very helpful if you can put some light.
@@coolsaty007 here we are not using Quantum framework, in cucumber library we dont have any such features. But you can surely create your own custom annotations which can be used in feature files to provide the reference of Excel sheets.
No it's correct, just that there are some subtle imports that need to be changed which aren't mentioned in the videos so program doesn't run like yours. But everything you did is right. Please keep it up, your videos are very helpful!
Cucumber 6 latest: github.com/naveenanimation20/Cucumber6LatestFeatures Cucumber with POM and Selenium: github.com/naveenanimation20/LatestCucumber6WithPOM
@@naveenautomationlabs I have cloned the below repository and tried parallel run. parallel run is working but always running in 10 browser instances instead of 4 browser instances. Can you please check it? I have used below configuration for surefire plug in in POM.xml methods 4 false github.com/naveenanimation20/LatestCucumber6WithPOM
Hi Naveen Getting below error when I am trying to run cucumber with TestNG (Haven't even tried parallel execution): FAILED CONFIGURATION: @BeforeClass io.cucumber.testng.AbstractTestNGCucumberTests.setUpClass(org.testng.TestRunner@59d4cd39) java.lang.AbstractMethodError: Receiver class io.cucumber.testng.TestNGCucumberOptionsProvider$TestNGCucumberOptions does not define or inherit an implementation of the resolved method 'abstract boolean strict()' of interface io.cucumber.core.options.CucumberOptionsAnnotationParser$CucumberOptions. Have tried many things but none successful
Thanks for the much awaited series naveen! I tried running the scenarios with TestNG without changing the folder structure (kept as same like we used for junit runner). It runs without any problem...
Small update from my side🙂
Any changes that you did? Because mine is not working
Hi Naveen, are you going to post one more video on integrating this Cucumber framework with Jenkins, GIT and docker?
Please answer...
No word to say !! You are the boss !! Take a bow . 🙏
I was thinking about the usage of empty class in runner.java. I got the answer in this video. Thank you
Thanks @Naveen for your video but I'm having an issue, everytime I run the test I got a sequential execution always. I copied your pom and even with that I've got the same execution... in sequence
Thanks Naveen.., can I run API testing features in parallel or restassured does not support parallel run? Please advise
hiii naveen as you told in this video run all scenario parallel but is possible to execute parallel scenario and feature file with thread value 2 in this video all test are executed at same time it consume lot of cpu.
@Naveen, what exactly does the 2d Object array return ? super.scenarios must be returning multiple scenarios but what is the other dimension? because it is a 2D array . Thanks :)
Thanks for this video, however I noticed one thing though, tags mentioned in the parallel runner are irrelevant, irrespective of tags are there or not, all features and scenarios still run parallelly, any thoughts?
Fund out the cause - that is because I used Junit.CucumberOptions instead of testNG.CucumberOptions
This is awesome - thank you so much!!!
Able to run scenarios in parallel mode with the testng framework as explained only by invoking using the Runner file but not able to execute with maven commands from command line -- can you tell me know what could be the problem then.
@Naveen I am getting issue -package cucumber.api does not exist.please help me on this I am having BDD +TestNg+maven project
I tried to use the same POM.xml but my tests are not running parallely . They are running sequentially.. Not sure the reason
Hi. Is there a way to control the number of thread for parallel execution?
expecting reply on this
@@AutomationTestingStudio set unlimited threads to False and ThreadCount to number of thread you want
@@yash4fulthis is not working for me
Great explanation. How to run parallel specific tagged scenarios ( which are located in multiple feature files) using testng
Hi Siva, did you get any solution for that?
I need to run my features in parallel using TestNG. Any idea on that
Hi Naveen how to limit the number of browser instances?
Hello, do you know how to limit threads ? for example I want to launch 2 scenarios parallel ?
edit: if someone looking for solution just add this to surefire
dataproviderthreadcount
2
Thanks for the solution 😊👍
@@bhushandhamangeI'm very glad I could help🙏
how can we give relative path in extent.properties file because i want my report through jar file in outside folder of project????
Thanks Naveen is there any way we can define login as a separate feature file and from hooks we call using @Before("@Login") for all feature?
When I run my code with maven using "mvn verify" command, then it can't find testcases. 0 count is comming as test cases.. why??
Extent Report PDF and Spark HTML report folders are not getting generated . .any solutions for it?
Thanks Naveen.. can we execute same test cases for multiple environments(instances) on pipelines
Hi Sir, Could you please make a video on mobile automation for parallel execution using Appium with cucumber? It will be beneficial.
Hi, I am getting error when i run the file that JNI error as occured, can u help me out on this. I am using java 8
Thanks, Naveen. Do you have any plan to make a video on QMETRY BDD
Thanks @Naveen , how to control number of thread while running all in parallel ?
Did you get answer for your question? How to set thread count in testng
@@krishnasep3 The default thread count of the dataprovider in parallel mode is 10. To change this the dataproviderthreadcount property needs to be added to the configuration section of the Surefire or Failsafe plugin in the POM.
dataproviderthreadcount
20
@@mnsayeed999 Hi, I tried this, But it did not reduce the thread count. Could you please share your POM file for reference?
@@Naveenacheanz1 Use 3.0.0MD9 version of plugin it's working
@@Shiva-sq1jk Hi, I tried this but it did not work. Can anyone handle this problem?
Hi Naveen can you commit this parallel changes in your github.
because mine build is not generating Extent and PDF report.
Done.....
Thank you, Naveen
Thanks Naveen it's working now !!
@@ashuiet : Can you please let me know what you have done to get the Extent and PDF reports...?. I followed the same steps...but I am not able to see these reports. Thanks, in advance.
@@MadirajuKChaitanya
Please go thru my Github github.com/asingh4305/CucumberPOMDec2020
hi naveen, can you update your framework in git, with complete pom.xml some plugins are missing
Hi Naveen ,
can we please get the Full project Repo to download?
Hi Naveen
I have requirement for parallel test to run different features parallely to reduce time. I am using cucumber ruby , can you help me
Naveen, Can you pls tell me how to execute the same test cases in different browse at a time in TestNG
I went through an interview today .the interviewer asked me how can we pass nothing in username in features file
hi sir how to convert this cucumber project to run as TESt NG can you please elaborate more on this do we need to do convert to TESTNG ?
Naveen, Element Actions class was not included in this series :(
Naveen hi. Great video!!!!
I'm building a Cucumber + Maven + Selenoid framework, without parallel enabled. I try now to run it in multiple threads and as can you imagine i have problems.But the debugging is hard, because logs are not produced live. Do you have any idea or solution to have live logs while i run test in parallel? Ty
Hi naveen, this code is not generating any reports or test-output folder
Hi Naveen, In run as testNG option is not showing.Plz Help
how can we run parallel cross browsing Cucumber framework, like 1 feature in iOS and 1 in Android using lamda test
@Naveen - My tests are running in sequence instead of running in parallel. From eclipse its running in parallel mode but from surefire plugin its running in sequence. Can you pls help?
remove the RunWith class and it will run in parallel
@@taetjomampa2000 thanks bro
Hi Sir, can we execute cucumber features parallely using testng?
Yes , you can do that just use classes
@@PoojaChauhan-ms5ht thanks a I will try this. I faced another issue if I run cucumber tests through Testng in testng extent report the actual feature names are not getting printed. The test names are getting printed as "feature".
In cucumber Runner file, tags concept is not allowed to use when using TestNG. Is there any options available like tags? Please add your comment.
mvn test -Dcucumber.options="--tags @tagname"
Thanks alot Naveen.. Could you please create series on serenity bdd framework..
don't sure what am i doing wrong. I did eveything same expect the test scenarios. I can't run parallel with junit always run at sequence but ican generate extent pdf report. At testng i can run paralel but can't generate extend pdf report
change "import io.cucumber.junit.CucumberOptions" to "import io.cucumber.testng.CucumberOptions" in ParallelRun.java
I have implemented everything, I got no error but PDF is not generating (html does)
change "import io.cucumber.junit.CucumberOptions" to "import io.cucumber.testng.CucumberOptions" in ParallelRun.java
@@Nykster Thanks it help me also, you save my time
Not Sure what wrong I am doing but for me it is saying 'The method scenarios() is undefined for the type AbstractTestNGCucumberTests' for the function written under runner class
public class TestRun extends AbstractTestNGCucumberTests
{
@Override
@DataProvider(parallel = true)
public Object[][] scenarios() {
return super.scenarios();
}
}
It would very helpful if you can put some light.
same issue i am able to resolve by changing by adding latest dependency...and latest dependency is dependency>
io.cucumber
cucumber-testng
6.11.0
Can you please do the same stuff with gradle parallel execution of features and scenarios
Hi Balaji, did you get any solution for that?
How to control thread count here?
@Naveen.... I have read somewhere we can give the name of excel file in feature file so that it can work like dataprovider.... Is this correct?
no its not correct as per my understanding. In cucumber we dont have any direct annotations to handle this, but it can be customized.
@@naveenautomationlabs : Thanks for confirmation
It can be done and its done in Quantum Framework.
@@coolsaty007 here we are not using Quantum framework, in cucumber library we dont have any such features. But you can surely create your own custom annotations which can be used in feature files to provide the reference of Excel sheets.
@@coolsaty007 can I get some references about this quantum framework
Hai Naveen, Can you Please explain about the Taking the screenshot for every step in this cucumber framework
Use afterstep hooks
scenario.embed()
Not sure why in spite of following everything as per the video many times we are not able to get the exact output? Anyone else facing the same??
I'm suspecting maybe changes were made offline...
And you are suspecting it wrong.
No it's correct, just that there are some subtle imports that need to be changed which aren't mentioned in the videos so program doesn't run like yours. But everything you did is right. Please keep it up, your videos are very helpful!
running all tags number of tags=number of threads. threadcpunt is not getting acted
Wen i run mvn verify it s running twice
Thanks Naveen, Could you tell how to run parallel scenarios using tags.
Hi Balakrishna, did you get any solution for that?
Thanks Naveen.. Can i get the Github url where i can download this code.
Cucumber 6 latest: github.com/naveenanimation20/Cucumber6LatestFeatures
Cucumber with POM and Selenium: github.com/naveenanimation20/LatestCucumber6WithPOM
@@naveenautomationlabs Thank you
@@naveenautomationlabs I have cloned the below repository and tried parallel run. parallel run is working but always running in 10 browser instances instead of 4 browser instances. Can you please check it?
I have used below configuration for surefire plug in in POM.xml
methods
4
false
github.com/naveenanimation20/LatestCucumber6WithPOM
Awesome brother
Thank you! Cheers!
How to do the same for mobile app?
Hello Naveen, One request.. could you please add the Element Util class with some basic generic functions for web operations .. Thanks in Advance!!
can You share the pom.xml file please
Naveen pls share how to use grid in real life for BDD framework...
Thanks Naveen. Can you please make with testng parameter item in xml file
Hi Naveen where can i implement time stamp so that each time i run the different extent reports get generated
Reports are not working for me
Hi Naveen
Getting below error when I am trying to run cucumber with TestNG (Haven't even tried parallel execution):
FAILED CONFIGURATION: @BeforeClass io.cucumber.testng.AbstractTestNGCucumberTests.setUpClass(org.testng.TestRunner@59d4cd39)
java.lang.AbstractMethodError: Receiver class io.cucumber.testng.TestNGCucumberOptionsProvider$TestNGCucumberOptions does not define or inherit an implementation of the resolved method 'abstract boolean strict()' of interface io.cucumber.core.options.CucumberOptionsAnnotationParser$CucumberOptions.
Have tried many things but none successful