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

Поділитися
Вставка
  • Опубліковано 13 гру 2024

КОМЕНТАРІ • 129

  • @bhuvanabaskaran8063
    @bhuvanabaskaran8063 3 роки тому +6

    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 роки тому +3

    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 роки тому +1

      Hi Shashibhusan, i tried with the above plugins but its running sequentially. Can you please share the plugins you have used. Thanks

  • @gayathrivr
    @gayathrivr 3 роки тому +1

    Tons of thanks. I sorted out parallel testing.

  • @saikatdhar8689
    @saikatdhar8689 3 роки тому +2

    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 ?

  • @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?

  • @ankur5510
    @ankur5510 4 роки тому

    Much needed tutorial..kindly cover the execution on different environments..

  • @Vinodmhetre007
    @Vinodmhetre007 4 роки тому

    Thanks a ton for this Cucumber series. Many things to learn.

  • @shashwatkatiyar1377
    @shashwatkatiyar1377 4 роки тому +1

    Awesome ..Thanks for the video

  • @anandsinha6407
    @anandsinha6407 4 роки тому

    Thanks Naveen for great video waiting for next

  • @supriyassampath1419
    @supriyassampath1419 3 роки тому

    Thank you so much Naveen.. 🙏🙏

  • @busraozdemir2822
    @busraozdemir2822 3 роки тому +1

    It has been a great video series.Thank you

  • @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 ?

  • @anushapattan9638
    @anushapattan9638 4 роки тому

    Any plans on resuming Protractor Series with Jasmine framework @Naveen.

  • @tulasiramsunkara
    @tulasiramsunkara 4 роки тому +1

    @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 3 роки тому

      Hi Tulsi ram, how to implement driver.quit with null check. Can u share the code here

    • @tulasiramsunkara
      @tulasiramsunkara 3 роки тому +1

      @@socialmedia434 if(driver!=null){ driver.quit();}

  • @swapnilbodade1336
    @swapnilbodade1336 4 роки тому +1

    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 роки тому +1

      @ 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/

  • @SarangHoley
    @SarangHoley 4 роки тому +1

    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 👍👍

  • @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?

  • @nandy1902
    @nandy1902 3 роки тому

    Can we use testng listeners,testng assertion in this framework or it should be completely depends on junit????

  • @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

  • @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?

  • @vicky1577
    @vicky1577 3 роки тому +1

    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 роки тому +1

      @Sravan Kumar Kolla remove testng dependencies then should work... I had the same issue but now ok

  • @shubhamparab5466
    @shubhamparab5466 4 роки тому

    Thanks Naveen this helped a lot

  • @sumeshm23
    @sumeshm23 4 роки тому

    Can we use dataprovider in cucumber ?
    Can we run the same testrunner class using junit and testng

  • @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!!

  • @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

  • @Nykster
    @Nykster 3 роки тому

    On Cucumber WebUI report, how do your variables appear in a table?

  • @sampadachendake6337
    @sampadachendake6337 Рік тому

    Hi Naveen, Awesome as always. Thanks for video. Is this available in GITHUB account of yours ?

  • @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.

  • @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.

  • @Sumit0408
    @Sumit0408 4 роки тому

    Hi Naveen, Can u please share the failsafe dependency plugin added in POM

  • @neeraj155
    @neeraj155 4 роки тому

    Hello Naveen I am trying to automation testing for a chatbot any idea how to achieve it..chatbot using websocket api

  • @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

  • @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

  • @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

  • @athiradu1154
    @athiradu1154 2 роки тому +1

    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?

  • @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.

  • @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

  • @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?

  • @SingaporeChinnodu
    @SingaporeChinnodu 4 роки тому

    Hi Naveen,
    The telegram link in description is not working.
    Could u tell the group name?

  • @akashsontake1440
    @akashsontake1440 3 місяці тому

    thanks naveen

  • @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.

  • @jainamit2208
    @jainamit2208 Рік тому

    Can we run feature level parallel execution in testng ? And how

  • @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?

  • @brajeshsahu3323
    @brajeshsahu3323 3 роки тому

    Can you please let me know how we can achieve the same using Gradle?

  • @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".

  • @sridhar6358
    @sridhar6358 3 роки тому

    what is the need of fail-safe plugin in parallel execution

  • @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.

  • @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

  • @krsnarayana
    @krsnarayana 3 роки тому

    Hi Naveen,
    Awesome ..Thanks for the videos.
    Could you please make a video on cucumber Junit with Cross-browser testing

  • @anshulkapoor9929
    @anshulkapoor9929 2 роки тому

    I believe parallel execution at scenario level is resolved with Junit5.

  • @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 роки тому +1

      remove testng dependencies then should work... I had the same issue but now ok

  • @anusophiakarthikeyan2155
    @anusophiakarthikeyan2155 Рік тому

    Hi ,
    I could not excute mvn verify command in terminal.please some one help me.

  • @nikhilkanojia1683
    @nikhilkanojia1683 3 роки тому

    Please share the github link for this code, as this is not working for me in parallel.

  • @MadirajuKChaitanya
    @MadirajuKChaitanya 3 роки тому +2

    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 роки тому +3

      Even i am not getting parallel execution

    • @vs8738
      @vs8738 3 роки тому +2

      @@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 роки тому +2

      Please make sure you are not mixing testng and junit together. Better remove testng dependencies and try

    • @shadmairam2549
      @shadmairam2549 3 роки тому +1

      @@automationneemo Yes, the problem was sorted when testng dependencies were removed.Thanks!

  • @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

  • @krsnarayana
    @krsnarayana 3 роки тому

    Could you please make a video on cucumber Junit with Cross-browser parallel testing

  • @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?

  • @viveksharma-mh7pz
    @viveksharma-mh7pz 3 роки тому

    If we have 40 feature files and desired to run only 8 out of them...How can we do this?

  • @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

  • @Arshadarsh
    @Arshadarsh Рік тому

    It's not working for me in maven cmnd promt please guid me

  • @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 3 роки тому

      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.

  • @suneelss2590
    @suneelss2590 3 роки тому

    Hi Naveen from where can i get code,please share me git details

  • @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

  • @andhavarapuanusha4571
    @andhavarapuanusha4571 3 роки тому

    Hi can anyone say how to run particular feature file using maven surefire plugin.

  • @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?

  • @samratk4097
    @samratk4097 3 роки тому

    Hi Naveen, could you please provide me git url for this code

  • @dhanapalayyanar1394
    @dhanapalayyanar1394 4 роки тому

    Hi Naveen ,
    Could you please make a video on cucumber with Excel sheet..like data provider we have in testng

  • @vikrantshingne8761
    @vikrantshingne8761 3 роки тому

    Can I get git repository 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

  • @Al-oh9yr
    @Al-oh9yr Рік тому

    Hi bro can you please provide the git hub code for this please?

  • @Psai4456
    @Psai4456 2 роки тому

    How to run 100 feature files sequence order not parallel

  • @sridhar6358
    @sridhar6358 3 роки тому

    parallel execution is not working all the tests are executing in one single thread

  • @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?

  • @anshuyadav9248
    @anshuyadav9248 4 роки тому

    Thanks

  • @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 роки тому +1

      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 ☺

  • @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

  • @shruthim984
    @shruthim984 3 роки тому +1

    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 2 роки тому

      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