Parallel execution is now made much easier. Looking forward to the cross-browser testing using Junit. I did with Maven sure-fire and fail-safe plugins and both look good. Thanks a ton, Naveen.
Thanks for this great series, Naveen! You are slowly, but surely converting another manual tester to an automation tester. I confronted a few issues getting the parallel execution to work using JUnit and here is how I managed to solve them: 1. One of the problems I confronted was that my failsafe plugin would not execute the tests and instead the surefire plugin would execute them using a single thread. One suggestion from one of your viewers, thanks @Anyik Duku, was to remove the testNG dependency. After doing this my failsafe plugin started executing the tests. 2. Here is when my second problem started. For some reason my surefire plugin was still executing the tests using a single thread and after finishing then the failsafe plugin kicked in and performed the tests again using two threads. The problem this time was that I had named my Runner file as "TestRunner.java" instead of "MyTestRunner.java" and the surefire plugin will execute any java filename that starts with the word Test by default. I solved this problem by excluding my runner file in my surefire plugin configuration.
@naveen Thanks for creating this series. I am getting error 'mvn command is not recognized as an internal or external command' while running test suite through command prompt. Could you please share any solution to fix this?
@Naveen- Appreciated your video on parallel execution... Couple of things observed. 1. driver.quit is called without Null check. 2. Need to implement Exception mechanisms These should be part of framework designs at the initial stages.
@ In TestNG the scenarios and rows in a scenario outline are executed in multiple threads.... Not sure if this option is given using Junit... cucumber.io/docs/guides/parallel-execution/
As always thanks for video Naveen ☺️ n it's been really helpful that you had covered the limitation for parallel testing while working with Cucumber - JUnit 👍👍
Hello Naveen, Great video. I have set up cucumber + junit + selenium and i enable parallel using maven-surefire-plugin. the problem is that i do not have real time console log. I run the command , mvn clean test and the test are running, but in console i do not see any logs.All the test bumped at once at the end of the test or if the test duration is big, then after some time ,Do you have any idea how could i have real time consoloe log in paralell mode?
we have specified Parallel = methods maven fail safe plugin right. We can set it to classes also. But what ever we set it junit runs tests only at feature level right. Then what's the use to specify parallel tag explicitly?
Hi Naveen, I am following the same way. My build is a success but test cases are not even running. Could you please tell me what could have gone wrong?
Hi Naveen, i am getting build failure while using the cucumber extent report adaptor and webdriver manager in pom.xml.. could you please provide me the solution for this
hi @naveen I saw your video just today. Really helpful. One thing wanted to understand about the plugins used here. Can you please share the benefits of using these plugins as well. I tried searching but could not get much clarity in this context.
This runs the feature files sequentially and not parallely. I have removed the testng dependencies . have tried using surefire and failsafe plugins together and individually . Have tried via IntelliJ console and cmd. Can you please help.
Hi Naveen, Thanks a lot for your knowledge sharing, in cucumber 6 can you please advice how to execute feature files in sequence? I am implementing this framework in my real time project please do need fully
Hi Naveen,I added Testtime:test-output-thread in Test Runner,To see report in terms of Threads,All the execution is fine, But when i copy the index.html path and paste in browser,The report is not getting loaded,It shows blank with reset Button,Can you let me know why,Thanks
Hi Naveen, I am getting BROKEN_IMAGE snapshot in my extent report apart from that issue everything working as expected. however, for below scenario I am able to achieved. 1. For Fail step-definition Screenshot created in respective directory. 2. In cucumber report fail step-definition Screenshot was attached.
Hye Naveen, I saw your video 5 and 6 regarding parallel execution and its awesome. Can you post video for cross browser testing in parallel mode of feature files. Thank you
Hello Naveen, Thanks a ton for making our life easy with such nice videos. I couldn't find your GIT hub url to clone the project. Could you please provide it?
Awesome explanation . #NaveenAutomationLabs @NaveenAutomationLabs I have doubt about how we create plugins in pom.xml. I know about dependency which we copy from mvnrepository pasteit under dependencies. But what about Plugins. I am creating a project then how can I required plugins.
Hi Naveen , I have a question regarding parallel execution in cucumber in a specific order. I am using Selenium, Java, Cucumber, Junit in my automation framework. I have 20 features in my regression suite which uses 2 set of login credentials to execute the testcase ( 10 features use USER1, remaining 10 features use USER2 credentials to login and proceed with the test ) The limitation in the application under test is it will not allow the same user to login in separate browsers at the same time. I wanted to achieve parallel execution in 2 threads specifying all the features which uses USER1 credentials to run in one thread and the remaining 10 features which uses USER2 credentials in another thread Could any one please let me know how to achieve this?
@Naveen Thanks for such a nice video. But while using mvn verify from cmd, First the scenarios are running one-by-one, after completion then parallel execution is starting. Could you help to resolve this. Thanks.
hi Naveen, I try to run on Terminal using mvn verify and and also with mvn clean test. but tests wont get executed i.e. browser does not start at all. and I dont get | TESTS | but I get Build Success. Please give your insight.
Hi @Naveen Sir, thanks a lot for sharing this information. I tried executing the Test Runner file from both Eclipse IDE and the Command Prompt. But in my case, in both these cases, my feature files are not executing in parallel. Can you please let me know...where the error could be...?. I wrote the scripts the same way as mentioned in the video. Thanks, in advance.
Testng parallel mode: if i run the parallel Test runner, i am able to run all the tests parallely at scenario level, but if i run the tests in parallel from command prompt as : mvn verify they are not working
Hi Naveen, Thank you so much for the videos. I wanted to ask you few cross browser questions. How can I execute the feature file on different browsers in Parallel.? Also, how can I run the entire suite on Chromebrowser and after the test is done, How can I immediately start the test execution to happen on IE. I want the Test to be triggered just once and it should automatically start the test on IE after it has finished the testing on Chrome.
Hey Navee, did exactly the same whatever you have done but I am not able to achieve parallel execution. What might be the issue? It is opening one browser only.
Hello Naveen, First of all.. thanks a lot for sharing your knowledge. You are a genius. I have one small query. I noticed that on running test runner file from eclipse features are not executed in parallel whereas if we execute from the command prompt using maven verify command then features are executed in parallel. Just wanted to know that using these maven surefire and failsafe plugins is it not possible to achieve parallel execution when we run from IDE like an eclipse or Intellij? Also, it would be great if could you please make a video on how to pass test cases from Jira using the XRay plugin to feature file. I believe this will be beneficial for a lot of people like me who are learning automation. Thanks in Advance!!
Hi @Naveen Sir and Vijay, I tried executing the Test Runner file from both Eclipse IDE and the Command Prompt. But in my case, in both these cases, my feature files are not executing in parallel. Can you please let me know...where the error could be...?. I wrote the scripts the same way as mentioned in the video. Thanks, in advance.
I followed all the steps shown in video but For me feature files are not executing in parallel. Please help me out in configuring feature file parallel execution
Thanks for the video but i dont think its idol. We will have 40 features with more than 5 scenario each, if we use this then 40 chrome instances will be created at once but i think idol would be keep thread count 4 then first 4 feature file execution and any thread is free next feature file would be picked. Thoughts …????
Has anybody faced this? mvn verify executes duplicate tests. when executed "mvn verify" then it will execute each tests with a single browser at a time, and once that completed it will continue the test and will run all of them again where as a part of parallel testing and multiple tests will be executed together.
Hi @Naveen Sir, I tried to execute parallelly using maven but was unable to execute While I added the POM.XML file according to you and I have maven already installed in my system. org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M4
hi Naveen, I followed the same steps for parallel execution when i run through cmd it is running in sequential instead of parallel. I also tried removing the testng dependncy(org.testng/testng). after removing the dependency am getting error "org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V" Please can you guide me
Hi @shruthim984, Try to update your surefire plugin version. I have changed it from 3.0.0-M5 to 3.0.0-M6 and it's working for me. org.apache.maven.plugins maven-surefire-plugin 3.0.0-M6
Thank you so much Naveen...this series helps me a lot.... because of your videos and am confident enough to crack interviews
Parallel execution is now made much easier. Looking forward to the cross-browser testing using Junit.
I did with Maven sure-fire and fail-safe plugins and both look good.
Thanks a ton, Naveen.
Hi Shashibhusan, i tried with the above plugins but its running sequentially. Can you please share the plugins you have used. Thanks
Tons of thanks. I sorted out parallel testing.
it's really a perfect illustration for understanding.
Just wanted to know any plans ahead to start any batch / classes for TOSCA ?
Thanks for this great series, Naveen! You are slowly, but surely converting another manual tester to an automation tester.
I confronted a few issues getting the parallel execution to work using JUnit and here is how I managed to solve them:
1. One of the problems I confronted was that my failsafe plugin would not execute the tests and instead the surefire plugin would execute them using a single thread. One suggestion from one of your viewers, thanks @Anyik Duku, was to remove the testNG dependency. After doing this my failsafe plugin started executing the tests.
2. Here is when my second problem started. For some reason my surefire plugin was still executing the tests using a single thread and after finishing then the failsafe plugin kicked in and performed the tests again using two threads. The problem this time was that I had named my Runner file as "TestRunner.java" instead of "MyTestRunner.java" and the surefire plugin will execute any java filename that starts with the word Test by default. I solved this problem by excluding my runner file in my surefire plugin configuration.
I have implemented the same but parallel execution is not happening. only one thread is opening at a time.
@@nityaranjan6714 same for me
@@nityaranjan6714 same for mee ro bro. Did you manage to resolve?
I have implemented the code but single thread is opening at a time.
@@sathiyamoorthip9739 how and where can we get help on this bro?
Much needed tutorial..kindly cover the execution on different environments..
Thanks a ton for this Cucumber series. Many things to learn.
Awesome ..Thanks for the video
Thanks Naveen for great video waiting for next
Thank you so much Naveen.. 🙏🙏
It has been a great video series.Thank you
@naveen Thanks for creating this series. I am getting error 'mvn command is not recognized as an internal or external command' while running test suite through command prompt. Could you please share any solution to fix this?
Hi Naveen, Did you write code for element util class ?
Any plans on resuming Protractor Series with Jasmine framework @Naveen.
@Naveen- Appreciated your video on parallel execution... Couple of things observed.
1. driver.quit is called without Null check.
2. Need to implement Exception mechanisms
These should be part of framework designs at the initial stages.
Hi Tulsi ram, how to implement driver.quit with null check. Can u share the code here
@@socialmedia434 if(driver!=null){ driver.quit();}
Hi Naveen,
How we can do parallel testing by scenario level, In my company we have single feature file in which we write all the scenarios
@ In TestNG the scenarios and rows in a scenario outline are executed in multiple threads.... Not sure if this option is given using Junit...
cucumber.io/docs/guides/parallel-execution/
As always thanks for video Naveen ☺️ n it's been really helpful that you had covered the limitation for parallel testing while working with Cucumber - JUnit 👍👍
Hello Naveen, Great video. I have set up cucumber + junit + selenium and i enable parallel using maven-surefire-plugin. the problem is that i do not have real time console log. I run the command , mvn clean test and the test are running, but in console i do not see any logs.All the test bumped at once at the end of the test or if the test duration is big, then after some time ,Do you have any idea how could i have real time consoloe log in paralell mode?
Can we use testng listeners,testng assertion in this framework or it should be completely depends on junit????
One question so if we run directly from runner file it parallel execution can be achiveied once i make the changes as u shown in the video
we have specified Parallel = methods maven fail safe plugin right. We can set it to classes also. But what ever we set it junit runs tests only at feature level right. Then what's the use to specify parallel tag explicitly?
Hi Naveen,
I am following the same way. My build is a success but test cases are not even running. Could you please tell me what could have gone wrong?
@Sravan Kumar Kolla remove testng dependencies then should work... I had the same issue but now ok
Thanks Naveen this helped a lot
Can we use dataprovider in cucumber ?
Can we run the same testrunner class using junit and testng
Thanks Naveen.. it really helps! Can you please post a video for parallel testing - cucumber with testng. Looking forward your upcoming videos!!
Hi Naveen, i am getting build failure while using the cucumber extent report adaptor and webdriver manager in pom.xml.. could you please provide me the solution for this
On Cucumber WebUI report, how do your variables appear in a table?
Hi Naveen, Awesome as always. Thanks for video. Is this available in GITHUB account of yours ?
hi @naveen I saw your video just today. Really helpful.
One thing wanted to understand about the plugins used here.
Can you please share the benefits of using these plugins as well.
I tried searching but could not get much clarity in this context.
This runs the feature files sequentially and not parallely. I have removed the testng dependencies . have tried using surefire and failsafe plugins together and individually . Have tried via IntelliJ console and cmd. Can you please help.
Hi Naveen, Can u please share the failsafe dependency plugin added in POM
Hello Naveen I am trying to automation testing for a chatbot any idea how to achieve it..chatbot using websocket api
Hi Naveen, Thanks a lot for your knowledge sharing, in cucumber 6 can you please advice how to execute feature files in sequence? I am implementing this framework in my real time project please do need fully
Hi Naveen, I followed the same pattern of yours but feature files are running sequential it is not running in Parallel. Kindly help me on this issue
Hi Naveen,I added Testtime:test-output-thread in Test Runner,To see report in terms of Threads,All the execution is fine, But when i copy the index.html path and paste in browser,The report is not getting loaded,It shows blank with reset Button,Can you let me know why,Thanks
Everything was done in command prompt it says build sucessful ,but the browser is not opening... please someone help me
Same issue my getting ...build successful but tests are not executing...did ur issue got fixed?
Hi Naveen,
I am getting BROKEN_IMAGE snapshot in my extent report apart from that issue everything working as expected.
however, for below scenario I am able to achieved.
1. For Fail step-definition Screenshot created in respective directory.
2. In cucumber report fail step-definition Screenshot was attached.
Hye Naveen,
I saw your video 5 and 6 regarding parallel execution and its awesome.
Can you post video for cross browser testing in parallel mode of feature files.
Thank you
Hello Naveen,
Thanks a ton for making our life easy with such nice videos.
I couldn't find your GIT hub url to clone the project. Could you please provide it?
Hi Naveen,
The telegram link in description is not working.
Could u tell the group name?
thanks naveen
Awesome explanation .
#NaveenAutomationLabs @NaveenAutomationLabs
I have doubt about how we create plugins in pom.xml.
I know about dependency which we copy from mvnrepository pasteit under dependencies. But what about Plugins. I am creating a project then how can I required plugins.
Can we run feature level parallel execution in testng ? And how
Hi Naveen , I have a question regarding parallel execution in cucumber in a specific order.
I am using Selenium, Java, Cucumber, Junit in my automation framework. I have 20 features in my regression suite which uses 2 set of login credentials to execute the testcase ( 10 features use USER1, remaining 10 features use USER2 credentials to login and proceed with the test ) The limitation in the application under test is it will not allow the same user to login in separate browsers at the same time. I wanted to achieve parallel execution in 2 threads specifying all the features which uses USER1 credentials to run in one thread and the remaining 10 features which uses USER2 credentials in another thread
Could any one please let me know how to achieve this?
Can you please let me know how we can achieve the same using Gradle?
Hi Naveen, I am unable to cucmber test through maven command in mac os. Getting as "mvn command not found " in cmd prompt.
Install Maven in your local. Add it to environment variables as "Path".
what is the need of fail-safe plugin in parallel execution
Hi Sir, Could you please make a video on mobile automation for parallel execution using Appium with cucumber? It will be beneficial.
@Naveen Thanks for such a nice video.
But while using mvn verify from cmd, First the scenarios are running one-by-one, after completion then parallel execution is starting.
Could you help to resolve this.
Thanks.
Can you please share your code base or github link
Hi Naveen,
Awesome ..Thanks for the videos.
Could you please make a video on cucumber Junit with Cross-browser testing
I believe parallel execution at scenario level is resolved with Junit5.
hi Naveen, I try to run on Terminal using mvn verify and and also with mvn clean test. but tests wont get executed i.e. browser does not start at all. and I dont get | TESTS | but I get Build Success.
Please give your insight.
remove testng dependencies then should work... I had the same issue but now ok
Hi ,
I could not excute mvn verify command in terminal.please some one help me.
Please share the github link for this code, as this is not working for me in parallel.
Hi @Naveen Sir, thanks a lot for sharing this information. I tried executing the Test Runner file from both Eclipse IDE and the Command Prompt. But in my case, in both these cases, my feature files are not executing in parallel. Can you please let me know...where the error could be...?. I wrote the scripts the same way as mentioned in the video. Thanks, in advance.
Even i am not getting parallel execution
@@swethaputti Any luck? as its happening sequential rather than parallel. Hello @Naveen can u please advise.
Hi @Madiraju K Chaitanya any luck?
Please make sure you are not mixing testng and junit together. Better remove testng dependencies and try
@@automationneemo Yes, the problem was sorted when testng dependencies were removed.Thanks!
Testng parallel mode: if i run the parallel Test runner, i am able to run all the tests parallely at scenario level, but if i run the tests in parallel from command prompt as : mvn verify they are not working
Could you please make a video on cucumber Junit with Cross-browser parallel testing
Hi Naveen, Thank you so much for the videos. I wanted to ask you few cross browser questions. How can I execute the feature file on different browsers in Parallel.?
Also, how can I run the entire suite on Chromebrowser and after the test is done, How can I immediately start the test execution to happen on IE. I want the Test to be triggered just once and it should automatically start the test on IE after it has finished the testing on Chrome.
good one Priten, did you find any solution for this?
If we have 40 feature files and desired to run only 8 out of them...How can we do this?
tag them
Hey Navee, did exactly the same whatever you have done but I am not able to achieve parallel execution.
What might be the issue? It is opening one browser only.
same case with me
@@waahresindhiyon4689 remove testng dependencies from POM then should work... I had the same issue but now ok
same with me
@@Nykster I did it. But still no parallel execution is happening
Double check there are no testng dependencies at all. Like all should be removed
It's not working for me in maven cmnd promt please guid me
Hello Naveen, First of all.. thanks a lot for sharing your knowledge. You are a genius.
I have one small query. I noticed that on running test runner file from eclipse features are not executed in parallel whereas if we execute from the command prompt using maven verify command then features are executed in parallel. Just wanted to know that using these maven surefire and failsafe plugins is it not possible to achieve parallel execution when we run from IDE like an eclipse or Intellij?
Also, it would be great if could you please make a video on how to pass test cases from Jira using the XRay plugin to feature file. I believe this will be beneficial for a lot of people like me who are learning automation.
Thanks in Advance!!
Hi @Naveen Sir and Vijay, I tried executing the Test Runner file from both Eclipse IDE and the Command Prompt. But in my case, in both these cases, my feature files are not executing in parallel. Can you please let me know...where the error could be...?. I wrote the scripts the same way as mentioned in the video. Thanks, in advance.
Hi @Vijay Kaushal can u please advise as u were able to execute in parallel ... many are facing issue as it is not executing in parallel.
Hi Naveen from where can i get code,please share me git details
Not able to run features file in parallel. they are running sequentially. please help.
remove testng dependencies from POM then should work... I had the same issue but now ok
Hi can anyone say how to run particular feature file using maven surefire plugin.
I followed all the steps shown in video but For me feature files are not executing in parallel. Please help me out in configuring feature file parallel execution
Hi Rajeev. I'm having the same issue, I have 3 feature files but they are not executing in 3 browsers. are you able to resolve your problem?
@@paulnapadao4093 did you manage to fix the usage?
Hi Naveen, could you please provide me git url for this code
Hi Naveen ,
Could you please make a video on cucumber with Excel sheet..like data provider we have in testng
Yes
Can I get git repository link
Thanks for the video but i dont think its idol. We will have 40 features with more than 5 scenario each, if we use this then 40 chrome instances will be created at once but i think idol would be keep thread count 4 then first 4 feature file execution and any thread is free next feature file would be picked. Thoughts …????
@Jay Radadiya Did you sort out the issue? I am getting the same issue
Hi bro can you please provide the git hub code for this please?
How to run 100 feature files sequence order not parallel
parallel execution is not working all the tests are executing in one single thread
Has anybody faced this?
mvn verify executes duplicate tests.
when executed "mvn verify" then it will execute each tests with a single browser at a time, and once that completed it will continue the test and will run all of them again where as a part of parallel testing and multiple tests will be executed together.
I have the same issue. is this resolve or not?
Thanks
Please use gradle, maven is too lengthy and complex
Anyone facing the issue that parallel execution is not happening
remove testng dependencies from POM then should work... I had the same issue but now ok
Hi @@Nykster didn't work for me. would you able to give me some advice on what could be the cause please?
@@paulnapadao4093 There are 3 test-ng dependencies, did you remove all?
Hi@@NyksterYes I'd removed it all. but I was able to make it work by adding this dependency..
org.projectlombok
lombok
1.18.20
@@paulnapadao4093 OK fantastic ☺
Hi @Naveen Sir, I tried to execute parallelly using maven but was unable to execute While I added the POM.XML file according to you and I have maven already installed in my system.
org.apache.maven.plugins
maven-failsafe-plugin
3.0.0-M4
integration-test
**/MyTestRunner.java
methods
6
true
hi Naveen, I followed the same steps for parallel execution when i run through cmd it is running in sequential instead of parallel. I also tried removing the testng dependncy(org.testng/testng). after removing the dependency am getting error "org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V"
Please can you guide me
I am also facing the same issue . It run sequentail instead of parallel
Hi @shruthim984, Try to update your surefire plugin version. I have changed it from 3.0.0-M5 to 3.0.0-M6 and it's working for me.
org.apache.maven.plugins
maven-surefire-plugin
3.0.0-M6