PART 5 - Run Cucumber Feature Files in Parallel Mode using Maven Fail Safe Plugin & JUNIT

  Рет қаралды 70,393

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

Пікірлер: 129
@bhuvanabaskaran8063
@bhuvanabaskaran8063 3 жыл бұрын
Thank you so much Naveen...this series helps me a lot.... because of your videos and am confident enough to crack interviews
@shashibhushanv6301
@shashibhushanv6301 4 жыл бұрын
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.
@sakthisaravana6663
@sakthisaravana6663 3 жыл бұрын
Hi Shashibhusan, i tried with the above plugins but its running sequentially. Can you please share the plugins you have used. Thanks
@leonardo91681
@leonardo91681 2 жыл бұрын
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.
@nityaranjan6714
@nityaranjan6714 2 жыл бұрын
I have implemented the same but parallel execution is not happening. only one thread is opening at a time.
@patilnilesh9668
@patilnilesh9668 2 жыл бұрын
@@nityaranjan6714 same for me
@Al-oh9yr
@Al-oh9yr 2 жыл бұрын
@@nityaranjan6714 same for mee ro bro. Did you manage to resolve?
@sathiyamoorthip9739
@sathiyamoorthip9739 Жыл бұрын
I have implemented the code but single thread is opening at a time.
@Al-oh9yr
@Al-oh9yr Жыл бұрын
@@sathiyamoorthip9739 how and where can we get help on this bro?
@athiradu1154
@athiradu1154 2 жыл бұрын
Everything was done in command prompt it says build sucessful ,but the browser is not opening... please someone help me
@AnirudhSharmaisme
@AnirudhSharmaisme Жыл бұрын
Same issue my getting ...build successful but tests are not executing...did ur issue got fixed?
@niazmaksud1139
@niazmaksud1139 8 ай бұрын
@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?
@prathibasankar1829
@prathibasankar1829 Жыл бұрын
Hi Naveen, Did you write code for element util class ?
@saikatdhar8689
@saikatdhar8689 3 жыл бұрын
it's really a perfect illustration for understanding.
@saikatdhar8689
@saikatdhar8689 3 жыл бұрын
Just wanted to know any plans ahead to start any batch / classes for TOSCA ?
@gayathrivr
@gayathrivr 3 жыл бұрын
Tons of thanks. I sorted out parallel testing.
@TanzeelKhan-g4n
@TanzeelKhan-g4n Жыл бұрын
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.
@PriyankaReddy-s1t
@PriyankaReddy-s1t Жыл бұрын
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
@swapnilbodade1336
@swapnilbodade1336 4 жыл бұрын
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
@shashibhushanv6301
@shashibhushanv6301 4 жыл бұрын
@ 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/
@vicky1577
@vicky1577 3 жыл бұрын
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?
@Nykster
@Nykster 3 жыл бұрын
@Sravan Kumar Kolla remove testng dependencies then should work... I had the same issue but now ok
@SingaporeChinnodu
@SingaporeChinnodu 3 жыл бұрын
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?
@anusophiakarthikeyan2155
@anusophiakarthikeyan2155 Жыл бұрын
Hi , I could not excute mvn verify command in terminal.please some one help me.
@This_is_Sandeep
@This_is_Sandeep 3 жыл бұрын
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
@nandy1902
@nandy1902 3 жыл бұрын
Can we use testng listeners,testng assertion in this framework or it should be completely depends on junit????
@jainamit2208
@jainamit2208 Жыл бұрын
Can we run feature level parallel execution in testng ? And how
@mpregos
@mpregos 2 жыл бұрын
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?
@anandsinha6407
@anandsinha6407 4 жыл бұрын
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
@saidayapule445
@saidayapule445 3 жыл бұрын
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
@neeraj155
@neeraj155 4 жыл бұрын
Hello Naveen I am trying to automation testing for a chatbot any idea how to achieve it..chatbot using websocket api
@sumeshm23
@sumeshm23 4 жыл бұрын
Can we use dataprovider in cucumber ? Can we run the same testrunner class using junit and testng
@Gurudharshini29
@Gurudharshini29 3 жыл бұрын
Hi Naveen, I am unable to cucmber test through maven command in mac os. Getting as "mvn command not found " in cmd prompt.
@souravpoddar1050
@souravpoddar1050 3 жыл бұрын
Install Maven in your local. Add it to environment variables as "Path".
@Nykster
@Nykster 3 жыл бұрын
On Cucumber WebUI report, how do your variables appear in a table?
@ankur5510
@ankur5510 4 жыл бұрын
Much needed tutorial..kindly cover the execution on different environments..
@sridhar6358
@sridhar6358 3 жыл бұрын
what is the need of fail-safe plugin in parallel execution
@sridhar6358
@sridhar6358 3 жыл бұрын
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
@anushapattan9638
@anushapattan9638 4 жыл бұрын
Any plans on resuming Protractor Series with Jasmine framework @Naveen.
@SingaporeChinnodu
@SingaporeChinnodu 4 жыл бұрын
Hi Naveen, The telegram link in description is not working. Could u tell the group name?
@manjunathrajeev2481
@manjunathrajeev2481 3 жыл бұрын
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
@paulnapadao4093
@paulnapadao4093 3 жыл бұрын
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?
@Al-oh9yr
@Al-oh9yr 2 жыл бұрын
@@paulnapadao4093 did you manage to fix the usage?
@AtheistMrSingh
@AtheistMrSingh 3 жыл бұрын
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.
@Nykster
@Nykster 3 жыл бұрын
remove testng dependencies then should work... I had the same issue but now ok
@ashuiet
@ashuiet 4 жыл бұрын
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.
@brajeshsahu3323
@brajeshsahu3323 3 жыл бұрын
Can you please let me know how we can achieve the same using Gradle?
@tulasiramsunkara
@tulasiramsunkara 4 жыл бұрын
@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.
@socialmedia434
@socialmedia434 4 жыл бұрын
Hi Tulsi ram, how to implement driver.quit with null check. Can u share the code here
@tulasiramsunkara
@tulasiramsunkara 4 жыл бұрын
@@socialmedia434 if(driver!=null){ driver.quit();}
@Arshadarsh
@Arshadarsh Жыл бұрын
It's not working for me in maven cmnd promt please guid me
@bhupendrasharma7826
@bhupendrasharma7826 2 жыл бұрын
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.
@abhishekcardigan3770
@abhishekcardigan3770 3 жыл бұрын
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.
@waahresindhiyon4689
@waahresindhiyon4689 3 жыл бұрын
same case with me
@Nykster
@Nykster 3 жыл бұрын
@@waahresindhiyon4689 remove testng dependencies from POM then should work... I had the same issue but now ok
@nityaranjan6714
@nityaranjan6714 2 жыл бұрын
same with me
@nityaranjan6714
@nityaranjan6714 2 жыл бұрын
@@Nykster I did it. But still no parallel execution is happening
@Nykster
@Nykster 2 жыл бұрын
Double check there are no testng dependencies at all. Like all should be removed
@akshatvohra6
@akshatvohra6 3 жыл бұрын
Not able to run features file in parallel. they are running sequentially. please help.
@Nykster
@Nykster 3 жыл бұрын
remove testng dependencies from POM then should work... I had the same issue but now ok
@siteshvishwakarma7211
@siteshvishwakarma7211 4 ай бұрын
Hi Sir, Could you please make a video on mobile automation for parallel execution using Appium with cucumber? It will be beneficial.
@abhilashraj7224
@abhilashraj7224 2 жыл бұрын
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.
@Sumit0408
@Sumit0408 4 жыл бұрын
Hi Naveen, Can u please share the failsafe dependency plugin added in POM
@anshulkapoor9929
@anshulkapoor9929 2 жыл бұрын
I believe parallel execution at scenario level is resolved with Junit5.
@nikhilkanojia1683
@nikhilkanojia1683 3 жыл бұрын
Please share the github link for this code, as this is not working for me in parallel.
@viveksharma-mh7pz
@viveksharma-mh7pz 4 жыл бұрын
If we have 40 feature files and desired to run only 8 out of them...How can we do this?
@waahresindhiyon4689
@waahresindhiyon4689 3 жыл бұрын
tag them
@palashchatterjee1454
@palashchatterjee1454 3 жыл бұрын
@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.
@nityaranjan6714
@nityaranjan6714 2 жыл бұрын
Can you please share your code base or github link
@SOBHITSHARMA
@SOBHITSHARMA 3 жыл бұрын
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 …????
@gayathrivr
@gayathrivr 3 жыл бұрын
@Jay Radadiya Did you sort out the issue? I am getting the same issue
@MadirajuKChaitanya
@MadirajuKChaitanya 4 жыл бұрын
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.
@swethaputti
@swethaputti 3 жыл бұрын
Even i am not getting parallel execution
@vs8738
@vs8738 3 жыл бұрын
@@swethaputti Any luck? as its happening sequential rather than parallel. Hello @Naveen can u please advise.
@vs8738
@vs8738 3 жыл бұрын
Hi @Madiraju K Chaitanya any luck?
@automationneemo
@automationneemo 3 жыл бұрын
Please make sure you are not mixing testng and junit together. Better remove testng dependencies and try
@shadmairam2549
@shadmairam2549 3 жыл бұрын
@@automationneemo Yes, the problem was sorted when testng dependencies were removed.Thanks!
@rajasekharmaddigalla1463
@rajasekharmaddigalla1463 3 жыл бұрын
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
@andhavarapuanusha4571
@andhavarapuanusha4571 3 жыл бұрын
Hi can anyone say how to run particular feature file using maven surefire plugin.
@suneelss2590
@suneelss2590 3 жыл бұрын
Hi Naveen from where can i get code,please share me git details
@sampadachendake6337
@sampadachendake6337 Жыл бұрын
Hi Naveen, Awesome as always. Thanks for video. Is this available in GITHUB account of yours ?
@sowndaryasri4189
@sowndaryasri4189 3 жыл бұрын
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?
@ajitkumarsrivastava3577
@ajitkumarsrivastava3577 2 жыл бұрын
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
@Vinodmhetre007
@Vinodmhetre007 4 жыл бұрын
Thanks a ton for this Cucumber series. Many things to learn.
@anandsinha6407
@anandsinha6407 4 жыл бұрын
Thanks Naveen for great video waiting for next
@samratk4097
@samratk4097 3 жыл бұрын
Hi Naveen, could you please provide me git url for this code
@Al-oh9yr
@Al-oh9yr Жыл бұрын
Hi bro can you please provide the git hub code for this please?
@pritenpatel1438
@pritenpatel1438 3 жыл бұрын
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.
@shadygaming8454
@shadygaming8454 2 жыл бұрын
good one Priten, did you find any solution for this?
@ramachandrabalam6354
@ramachandrabalam6354 2 жыл бұрын
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?
@shashwatkatiyar1377
@shashwatkatiyar1377 4 жыл бұрын
Awesome ..Thanks for the video
@Psai4456
@Psai4456 2 жыл бұрын
How to run 100 feature files sequence order not parallel
@vijaykaushal9311
@vijaykaushal9311 4 жыл бұрын
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!!
@MadirajuKChaitanya
@MadirajuKChaitanya 4 жыл бұрын
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.
@vs8738
@vs8738 3 жыл бұрын
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.
@JitendraAgrawalEngineer
@JitendraAgrawalEngineer 2 жыл бұрын
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
@krsnarayana
@krsnarayana 3 жыл бұрын
Could you please make a video on cucumber Junit with Cross-browser parallel testing
@dhanapalayyanar1394
@dhanapalayyanar1394 4 жыл бұрын
Hi Naveen , Could you please make a video on cucumber with Excel sheet..like data provider we have in testng
@rajashekarp5858
@rajashekarp5858 4 жыл бұрын
Yes
@vikrantshingne8761
@vikrantshingne8761 3 жыл бұрын
Can I get git repository link
@sridhar6358
@sridhar6358 3 жыл бұрын
parallel execution is not working all the tests are executing in one single thread
@supriyassampath1419
@supriyassampath1419 3 жыл бұрын
Thank you so much Naveen.. 🙏🙏
@jparekh59
@jparekh59 3 жыл бұрын
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.
@langtu103
@langtu103 3 жыл бұрын
I have the same issue. is this resolve or not?
@subhuvijay41
@subhuvijay41 4 жыл бұрын
Thanks Naveen.. it really helps! Can you please post a video for parallel testing - cucumber with testng. Looking forward your upcoming videos!!
@SarangHoley
@SarangHoley 4 жыл бұрын
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 👍👍
@shubhamparab5466
@shubhamparab5466 4 жыл бұрын
Thanks Naveen this helped a lot
@krsnarayana
@krsnarayana 3 жыл бұрын
Hi Naveen, Awesome ..Thanks for the videos. Could you please make a video on cucumber Junit with Cross-browser testing
@akashsontake1440
@akashsontake1440 4 ай бұрын
thanks naveen
@busraozdemir2822
@busraozdemir2822 3 жыл бұрын
It has been a great video series.Thank you
@nagamanickam5702
@nagamanickam5702 3 жыл бұрын
Please use gradle, maven is too lengthy and complex
@waahresindhiyon4689
@waahresindhiyon4689 3 жыл бұрын
Anyone facing the issue that parallel execution is not happening
@Nykster
@Nykster 3 жыл бұрын
remove testng dependencies from POM then should work... I had the same issue but now ok
@paulnapadao4093
@paulnapadao4093 3 жыл бұрын
Hi @@Nykster didn't work for me. would you able to give me some advice on what could be the cause please?
@Nykster
@Nykster 3 жыл бұрын
@@paulnapadao4093 There are 3 test-ng dependencies, did you remove all?
@paulnapadao4093
@paulnapadao4093 3 жыл бұрын
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
@Nykster
@Nykster 3 жыл бұрын
@@paulnapadao4093 OK fantastic ☺
@anshuyadav9248
@anshuyadav9248 4 жыл бұрын
Thanks
@shruthim984
@shruthim984 3 жыл бұрын
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
@priyaauti5547
@priyaauti5547 3 жыл бұрын
I am also facing the same issue . It run sequentail instead of parallel
@492832
@492832 3 ай бұрын
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
PART 7 - Cucumber Feature file with Excel Data || Excel Utility || Apache POI API
38:34
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН
10 | Cucumber Tutorial | Parallel Execution Using JUnit and Maven Plugins
15:32
CUCUMBER IS NOT BDD & BDD IS NOT A FRAMEWORK
9:19
Naveen AutomationLabs
Рет қаралды 24 М.
PART 2 - Cucumber Java BDD Hybrid Framework - Page Object Model (POM) - Part 2
1:14:51
How to Execute the Feature File in Parallel Using Cucumber
29:21
Automation Fraternity - "The DevOpsClub" Entity
Рет қаралды 25 М.
What are Hooks in Cucumber? || Implement Hooks in Cucumber Test - Part 7
19:25
Naveen AutomationLabs
Рет қаралды 93 М.