Це відео не доступне.
Перепрошуємо.

PART 6 - Run All Scenarios in Parallel Mode using Cucumber - TestNG || Generate Extent PDF Report

Поділитися
Вставка
  • Опубліковано 25 гру 2020
  • In this video, I have explained how to run all scenarios in parallel mode using Cucumber and TestNG Data Provides.
    We will be designing different components in this Framework:
    1. Feature Files
    2. Step Definition Classes
    3. Configuration Files
    4. Cucumber Hooks with before and after
    5. Element Utilities/Libraries/Generic Functions
    6. Cucumber 6 Extent Report Adaptor for Spark HTML / PDF Reports
    7. Test Runners in JUnit/TestNG
    8. Page Classes for POM
    9. Maven with pom.xml with different dependencies and plugins
    10. Parallel Execution
    11. Cucumber 6 Web HTML Reports
    12. Screenshot for Failure scenarios
    13. Integration with GIT Repo
    14. Running test cases from Jenkins
    15. Running test cases on Dockerized Selenium GRID
    And much more.....
    Technologies Used:
    1. Selenium WebDriver with Java Language binding
    2. Cucumber 6.x JVM library
    3. WebDriverManager
    4. JDK 1.8
    5. Maven (Build tool)
    6. Maven Plugins
    7. Cucumber extent report 6 adapter
    8. JUnit 4.x library / TestNG Cucumber Lib
    9. Log4j
    10. GIT HUB - Git Repo
    11. Docker
    12. Jenkins
    13. Eclipse (IDE)
    ~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    ua-cam.com/users/Naveen%20Au...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
    t.me/joinchat/COJqZUPB02r5sB7...
    Paid courses (Recorded) videos:
    naveenautomationlabs.com/reco...
    For Java & Selenium - naveenautomationlabs.com/selen...
    For API (Manual + Automation) - naveenautomationlabs.com/manua...

КОМЕНТАРІ • 108

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

    No word to say !! You are the boss !! Take a bow . 🙏

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

    This is awesome - thank you so much!!!

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

    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🙂

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

      Any changes that you did? Because mine is not working

  • @saikiranpalugula802
    @saikiranpalugula802 3 роки тому +8

    Hi Naveen, are you going to post one more video on integrating this Cucumber framework with Jenkins, GIT and docker?
    Please answer...

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

    Thanks Naveen.., can I run API testing features in parallel or restassured does not support parallel run? Please advise

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

    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

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

    I was thinking about the usage of empty class in runner.java. I got the answer in this video. Thank you

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

    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?

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

    Awesome brother

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

    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.

  • @piotrk29
    @piotrk29 Рік тому +3

    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

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

    Thanks Naveen.. can we execute same test cases for multiple environments(instances) on pipelines

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

    how can we give relative path in extent.properties file because i want my report through jar file in outside folder of project????

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

    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

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

    hi naveen, can you update your framework in git, with complete pom.xml some plugins are missing

  • @yuvraj4870
    @yuvraj4870 7 днів тому

    @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 :)

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

    I tried to use the same POM.xml but my tests are not running parallely . They are running sequentially.. Not sure the reason

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

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

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

    Naveen, Can you pls tell me how to execute the same test cases in different browse at a time in TestNG

  • @user-zh9si1zp9l
    @user-zh9si1zp9l 4 місяці тому

    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.

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

    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 ?

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

    @Naveen I am getting issue -package cucumber.api does not exist.please help me on this I am having BDD +TestNg+maven project

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

    Thanks, Naveen. Do you have any plan to make a video on QMETRY BDD

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

    Thanks alot Naveen.. Could you please create series on serenity bdd framework..

  • @ashutoshsingh-uh4io
    @ashutoshsingh-uh4io 3 роки тому

    how can we run parallel cross browsing Cucumber framework, like 1 feature in iOS and 1 in Android using lamda test

  • @Sakthidxm
    @Sakthidxm 5 місяців тому

    I need to run my features in parallel using TestNG. Any idea on that

  • @SivaKumar-rg1kx
    @SivaKumar-rg1kx 2 роки тому +1

    Great explanation. How to run parallel specific tagged scenarios ( which are located in multiple feature files) using testng

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

      Hi Siva, did you get any solution for that?

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

    Hello Naveen, One request.. could you please add the Element Util class with some basic generic functions for web operations .. Thanks in Advance!!

  • @HarishM-fw9nq
    @HarishM-fw9nq Рік тому

    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

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

    Naveen, Element Actions class was not included in this series :(

  • @romilpant5683
    @romilpant5683 2 роки тому +2

    Hi. Is there a way to control the number of thread for parallel execution?

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

      expecting reply on this

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

      @@AutomationTestingStudio set unlimited threads to False and ThreadCount to number of thread you want

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

    Hi naveen, this code is not generating any reports or test-output folder

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

    Extent Report PDF and Spark HTML report folders are not getting generated . .any solutions for it?

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

    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

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

    Hi Naveen, In run as testNG option is not showing.Plz Help

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

    Wen i run mvn verify it s running twice

  • @AmitPal-vu1ft
    @AmitPal-vu1ft Рік тому

    Hi Naveen ,
    can we please get the Full project Repo to download?

  • @deeptibedi6500
    @deeptibedi6500 7 днів тому

    Hi Naveen how to limit the number of browser instances?

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

    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.

    • @Shiva-sq1jk
      @Shiva-sq1jk Рік тому

      mvn test -Dcucumber.options="--tags @tagname"

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

    Thanks @Naveen , how to control number of thread while running all in parallel ?

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

      Did you get answer for your question? How to set thread count in testng

    • @mnsayeed999
      @mnsayeed999 3 роки тому +3

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

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

      @@mnsayeed999 Hi, I tried this, But it did not reduce the thread count. Could you please share your POM file for reference?

    • @Shiva-sq1jk
      @Shiva-sq1jk Рік тому

      @@Naveenacheanz1 Use 3.0.0MD9 version of plugin it's working

    • @tester9586
      @tester9586 9 місяців тому

      @@Shiva-sq1jk Hi, I tried this but it did not work. Can anyone handle this problem?

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

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

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

      remove the RunWith class and it will run in parallel

    • @Shiva-sq1jk
      @Shiva-sq1jk Рік тому

      @@taetjomampa2000 thanks bro

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

    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.

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

      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

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

    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

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

      change "import io.cucumber.junit.CucumberOptions" to "import io.cucumber.testng.CucumberOptions" in ParallelRun.java

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

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

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

      no its not correct as per my understanding. In cucumber we dont have any direct annotations to handle this, but it can be customized.

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

      @@naveenautomationlabs : Thanks for confirmation

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

      It can be done and its done in Quantum Framework.

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

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

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

      @@coolsaty007 can I get some references about this quantum framework

  • @lokeshsharma-gd1xo
    @lokeshsharma-gd1xo 3 роки тому

    How to do the same for mobile app?

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

    Hai Naveen, Can you Please explain about the Taking the screenshot for every step in this cucumber framework

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

      Use afterstep hooks
      scenario.embed()

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

    Hi Sir, can we execute cucumber features parallely using testng?

    • @PoojaChauhan-ms5ht
      @PoojaChauhan-ms5ht 3 роки тому +1

      Yes , you can do that just use classes

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

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

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

    Thanks Naveen. Can you please make with testng parameter item in xml file

  • @priyankab.5548
    @priyankab.5548 3 роки тому

    Naveen pls share how to use grid in real life for BDD framework...

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

    Thanks Naveen, Could you tell how to run parallel scenarios using tags.

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

      Hi Balakrishna, did you get any solution for that?

  • @ManmathDeshmukh-fo3ej
    @ManmathDeshmukh-fo3ej 3 місяці тому

    How to control thread count here?

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

    Hi Naveen where can i implement time stamp so that each time i run the different extent reports get generated

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

    Hi Naveen can you commit this parallel changes in your github.
    because mine build is not generating Extent and PDF report.

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

      Done.....

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

      Thank you, Naveen

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

      Thanks Naveen it's working now !!

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

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

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

      @@MadirajuKChaitanya
      Please go thru my Github github.com/asingh4305/CucumberPOMDec2020

  • @Shiva-sq1jk
    @Shiva-sq1jk Рік тому

    running all tags number of tags=number of threads. threadcpunt is not getting acted

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

    I have implemented everything, I got no error but PDF is not generating (html does)

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

      change "import io.cucumber.junit.CucumberOptions" to "import io.cucumber.testng.CucumberOptions" in ParallelRun.java

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

      @@Nykster Thanks it help me also, you save my time

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

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

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

      I'm suspecting maybe changes were made offline...

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

      And you are suspecting it wrong.

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

      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!

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

    Thanks Naveen.. Can i get the Github url where i can download this code.

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

      Cucumber 6 latest: github.com/naveenanimation20/Cucumber6LatestFeatures
      Cucumber with POM and Selenium: github.com/naveenanimation20/LatestCucumber6WithPOM

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

      @@naveenautomationlabs Thank you

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

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

  • @baluzen
    @baluzen 3 роки тому +3

    Can you please do the same stuff with gradle parallel execution of features and scenarios

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

      Hi Balaji, did you get any solution for that?

  • @PulagorlaSaikumar
    @PulagorlaSaikumar 7 місяців тому

    can You share the pom.xml file please

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

    Reports are not working for me

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

    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