Selenium Framework for Beginners 22 | Selenium TestNG | How to do Multiple Browser Parallel Testing

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • Today we will learn
    How to run tests in multi browser
    How to run tests in multi browser in parallel
    FREE Courses - automationstep...
    Udemy Discounts - automationstep...
    GitHub - github.com/Rag...
    Udemy - www.udemy.com/...
    Training by Raghav at your venue - raghav.qna@gmail.com
    Training schedule - automationstep...
    ----------- UI TESTING -----------
    Selenium Beginners - bit.ly/2MGRS8K
    Selenium Java Framework from Scratch - bit.ly/2N9xvR6
    Selenium Python - bit.ly/2oyMp5x
    Selenium Tips - bit.ly/2owxc50
    Selenium Builder - bit.ly/2MKNtlq
    Katalon Studio - bit.ly/2wARFdi
    Robot Framework with RIDE- bit.ly/2Px6Ue9
    Robot Framework with Eclipse - bit.ly/2N8DZxb
    Protractor - bit.ly/2KtqVkU
    TestProject - bit.ly/2DRNJYE
    ----------- API TESTING -----------
    Web Services (API) - bit.ly/2MGafL7
    SoapUI - bit.ly/2MGahmd
    Postman - bit.ly/2wz8LrW
    General - bit.ly/2PYdwmV
    Katalon Studio API Testing - bit.ly/2BwuCTN
    ----------- MOBILE TESTING -----------
    Appium - bit.ly/2ZHFSGX
    Mobile Playlist - bit.ly/2PxpeUv
    ----------- CI | CD | DEVOPS -----------
    Jenkins Beginner - bit.ly/2MIn8EC
    Jenkins Tips & Trick - bit.ly/2LRt6xC
    Docker - bit.ly/2MInnzx
    Kubernetes - bit.ly/2MJIlMK
    ----------- VERSION CONTROL SYSTEM -----------
    Git & GitHub - bit.ly/2Q1pagY
    GitLab - bit.ly/2kQPGyQ
    ----------- PERFORMANCE TESTING -----------
    JMeter Beginner - bit.ly/2oBbtIU
    JMeter Intermediate - bit.ly/2oziNVB
    JMeter Advanced - bit.ly/2Q22Y6a
    JMeter Tips & Tricks - bit.ly/2NOfWD2
    Performance Testing - bit.ly/2wEXbLS
    ----------- PROGRAMMING -----------
    Java Beginners - bit.ly/2PVUcXs
    Java Tips & Tricks - bit.ly/2CdcDnJ
    GROOVY - bit.ly/2FvWV5C
    JAVASCRIPT - bit.ly/2KJDZ8o
    PYTHON - bit.ly/2Z4iRye
    ----------- IDE -----------
    Visual Studio Code - bit.ly/2V15yvt
    ----------- MAVEN -----------
    Maven - bit.ly/2NJdDRS
    ----------- OTHERS -----------
    Redis- bit.ly/2N9jyCG
    Misc - bit.ly/2Q2q5xQ
    Tools & Tips - bit.ly/2oBfwoR
    QnA Friday- bit.ly/2NgwGpw
    Sunday Special - bit.ly/2wB23BO
    Ask Raghav - bit.ly/2CoJGWf
    Interviews - bit.ly/2NIPPxk
    All Playlists - bit.ly/2LSiezA
    Keep Learning,
    Raghav
    ---------- Connect with Raghav -----------
    Website - automationstep...
    LifeCharger - lifecharger.org/
    Udemy Courses - www.udemy.com/...
    Facebook - / automationstepbystep
    Twitter - / automationsbs
    UA-cam - / automationstepbystep
    Like, Subscribe & Share
    You can support my mission for education by sharing this knowledge and helping as many people as you can
    Never Stop Learning
    Raghav

КОМЕНТАРІ • 127

  • @sameergupta8705
    @sameergupta8705 3 роки тому +4

    I am here just to mention how beautifully you take one task , one agenda in hand and explain it without deviating from the topic. I always search for your videos if I am not clear about any concept. Thanks for your efforts .

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

      Hi Sameer, most welcome

  • @yogeesh8637
    @yogeesh8637 Місяць тому

    You always explain wat it's required..I could see some channel explained same concepts in 1 hour..but you covered in 13 mints ..so our time also saved 😍

    • @RaghavPal
      @RaghavPal  Місяць тому +1

      Glad to see this Yogeesh.. keep learning

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

    Thank you Sir.. you really explain very nicely..

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

      You are most welcome Debashish

  • @Be_Relax620
    @Be_Relax620 10 місяців тому

    Searched this solution for long finally got the solution from your video. Thanks!!

    • @RaghavPal
      @RaghavPal  10 місяців тому

      Glad it helped Uday

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

    ye itna easy nahi hai jitna apne easy karke bataya..expalain very well Thank You

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

    Yet another great and concise explanation from you, sir. Highly appreciate it !!

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

    Thank you very much for making an excellent tutorial ... the best I found and perfect for understanding. Namaste

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

      So happy to know this Brian

  • @vimalmishra8693
    @vimalmishra8693 6 років тому

    Hi Raghav its my privilege to watch your video ! You really make things easy to learn .

    • @RaghavPal
      @RaghavPal  6 років тому

      Glad to know this Vimal

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

    Excellent video mate. Really great, Just clean and simple

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

    helo raghav, will you please describe how to run test case in safari browser?

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

      You will need to add Safari Driver. Check this www.javatpoint.com/selenium-webdriver-running-test-on-safari-browser

  • @s.k.obidulkadir2382
    @s.k.obidulkadir2382 2 місяці тому

    Sir i have a question. Suppose, in a real life project we have to generate the report as well so when we run the project in parallel, how will it work? They will generate the report for multiple browser separately or how it will works? Thank you sir for your wonderful video that is really helpful for me.

    • @RaghavPal
      @RaghavPal  2 місяці тому

      When running Selenium tests in parallel, generating reports can be a bit tricky, but it's definitely doable
      Let me guide you through the process.
      1. Parallel Execution Basics:
      - When you run tests in parallel, each test runs independently in its own thread or process.
      - For example, if you're testing multiple browsers simultaneously, each browser instance runs as a separate test.
      - The challenge is to collect and organize the test results from all these parallel executions.
      2. Extent Reports:
      - Extent Reports is a popular reporting library for Selenium.
      - It provides detailed HTML reports with rich visuals, including test status, logs, screenshots, and more.
      - To generate separate reports for each browser, follow these steps:
      3. Implementation Steps:
      - Configure Maven Plugins:
      - In your project's `pom.xml`, add the following plugins:
      ```xml

      com.github.temyers
      cucumber-jvm-parallel-plugin
      2.2.0

      generateRunners
      validate
      generateRunners

      src/test/java/stepDefinition/baseDefinition
      src/test/resources
      target/cucumber-parallel
      json,html
      "~@ignored"



      org.apache.maven.plugins
      maven-surefire-plugin
      2.19
      10
      true
      /Parallel*IT.class


      ```
      - Adjust the configuration according to your project structure.
      - Add Extent Reports:
      - In your test code, initialize Extent Reports and create a report for each browser.
      - You can use `@BeforeClass` and `@AfterClass` hooks to set up and finalize the reports.
      - Example:
      ```java
      @BeforeClass
      public void setUp() {
      // Initialize Extent Reports
      ExtentReports extent = new ExtentReports("target/reports/report.html", true);
      ExtentTest test = extent.startTest("Test Name", "Test Description");
      // Set up other configurations (e.g., system info, categories, etc.)
      // ...
      }
      @AfterClass
      public void tearDown() {
      // Finalize the report
      extent.endTest(test);
      extent.flush();
      }
      ```
      4. Result:
      - When you run your tests in parallel, each browser will generate its own Extent Report.
      - The reports won't overwrite each other, and you'll have separate HTML files for each browser's test results.
      Remember to adapt the above steps to your specific project structure and requirements
      --

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

    Excellent efforts Sir...
    Plz share your details to connect

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

      can send me your query here..

  • @3VAudioVideo
    @3VAudioVideo 2 роки тому

    Another great video! I hope you read my previous post on your other video where I requested if you could create a video on thread local/safe. Parallel execution has issues on anything but these super simple test cases. So such a video would help solve lots of these issues. Thanks in advance!

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

    Hi Raghav Sir,
    Thank you so much for your tutorials its very useful.
    Please can you give me sample script how to run same test cases on multiple envi like QA, Prod and demo
    using command promt

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

      Hi Pooja, I do not have anything handy with me right now, In general, you will put your env dependent parameters in variables and get the values of these variables externally, from a config file or properties file and the same can be used from command line

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

    I have one question sir. How can I inject parameter to field using testng.xml.
    I have created dependency injection using google Guice and using annotation @Named("name here") in Webdriver field. Now by changing name I can inject whatever driver I want.
    Question is How can I sent name to @Named("name from properties file here") from properties or testng.xml file? Is it possible? Of course if you never used that approach nevermind me :)

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

      Hi Bartłomiej, I will want to answer this after doing some analysis, So for now pls try online help

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

    Hi sir, how can I apply parallel testing project level

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

      Hi Meherprasad, you can do that if you have required infrastructure. Usually multiple systems will be required for running lots of instances in parallel. You can also take help from cloud services like Saucelabs, Browserstack

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

    Hi,
    How can create common library class to launch multiple browser .I have multiple test class , I am looking common method to call in my each class .can you plz share video on this?

    • @RaghavPal
      @RaghavPal  4 роки тому +2

      I will try to do a session Ravish

  • @AA-zk9zo
    @AA-zk9zo 2 роки тому +1

    Thanks for the video. How can we do this cross browser testing with cucumber framework?

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

      The process remains same for cucumber, the script to use browser based on options can be given in a common class, can also use cloud service providers like SauceLabs, Browserstack etc

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

    Hi Raghav, is there a video that shows how to use selenium webdriver with appium client on virtual device? use case is interaction between mobile device and desktop browser.

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

      Hi Francisco, you can check appium series here - automationstepbystep.com/

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

    Great explanation

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

    Hi Raghav as you have many testng.xml files created on project level but for automating at project level should we maintain a single XML file?

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

      Hi Nayeem, you can have multiple testng.xml files with diff configurations as needed and can run a specific file based on the need

  • @ankitrastogi6113
    @ankitrastogi6113 5 років тому +1

    Hi Raghav,
    You have provided example with one class in each .can you please let me help how we can run multiple class files in each by running parallel in tests as i am running but get nullpointer exception as driver is not found by other class

    • @RaghavPal
      @RaghavPal  5 років тому

      Hi Ankit, you can use testng.xml file and then add all the classes/tests you want to run and can also run in parallel. there are videos in this playlist for that.

    • @ankitrastogi6113
      @ankitrastogi6113 5 років тому

      @@RaghavPal
      Hi Raghav,
      Thanks for reply ..i am already using testng.xml file and added two class in each .But when i am running test in larallel then each threaf assigned to each test but each test have two classes so when second class running then null pointer exceprtion is coming on driver instance.I am initiating driver by @BeforeTest throgh another class that called TestBaseClass..so please help me it is most urgent for my project i am stuck from couple of days

    • @ankitrastogi6113
      @ankitrastogi6113 5 років тому

      Please let me know if i can connect with you personally

    • @RaghavPal
      @RaghavPal  5 років тому

      Hi Ankit, you can also have multiple testng.xml and make them run in parallel from command line. ( in diff cmd windows). It will be difficult for me now to take out extra time. I will try to help you online.

    • @ankitrastogi6113
      @ankitrastogi6113 5 років тому

      @@RaghavPal Thanks a lot Raghav,
      Actually i am confused to use multiple testng.xml file as in my framework there are multiple classes and issue comes from second class file on driver instance.
      Yes Raghav,Please help me online..we can do through webex or as you comfort

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

    Gracias hermano

  • @vamshivishwanath
    @vamshivishwanath 2 місяці тому +1

    Hi Sir
    How many diffrent testcases can we ran at a time?

    • @RaghavPal
      @RaghavPal  2 місяці тому +1

      It will depend on your infrastructure... how many parallel threads can it handle for your tests

    • @vamshivishwanath
      @vamshivishwanath 2 місяці тому

      @@RaghavPal Thanks for replay and also please make vedio on take screen shot of each web element(action) and save it to word document with headings

    • @RaghavPal
      @RaghavPal  2 місяці тому +1

      Sure

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

    how can we run different test methods belonging to same/different class in parallel? i.e. 3 tests in parallel, which opens browser and actually do something

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

      You can use testng.xml for that, Pls check the videos here - ua-cam.com/play/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa.html

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

    Hi Raghav, i need to run cross browser testing using parallel method in cucumber-junit. Can you guide me

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

      Hi Shruthi, I will try and plan a session, try some online examples meanwhile

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

    Hi ,
    Appreciate your effort for the wonderful videos.
    I have implemented the same.
    Can you let me know how can we implement Logging for all the test cases executed here parallely?
    I tried logging but all logs of different test cases mixed into one.
    How can we create seperate logging for all test case that execute in parallel?

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

      Hi Neeraj, I will try to add a session on that. Pls take online help meanwhile

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

    Hi Raghav thanks for the video.I have a question, can we do same thing in pytest?

  • @rebekamontana7656
    @rebekamontana7656 5 років тому +1

    Hello my beloved, can you help me ?. When I put @Parameters ("browserName") I get the following message: The annotation @Parameters is disallowed for this location.

    • @RaghavPal
      @RaghavPal  5 років тому

      Hi Rebeka, Saw your other message, hope this is fine now.

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

    I have my browsers initialised in base class. So can we get browserName from that base class instead of initialising them in @BeforeTest . ?

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

      Hi Rajat, you can do that

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

    Hi Raghav, one doubt..whats the use of using thread count to 5 here in this video..whats the purpose of threads in general?

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

      its like saying run 5 executions in parallel, So its like 5 users running the test at the same time

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

    Hi Raghav,
    Can we use Parallel testing in Page Object Model. As I am getting null pointer exception. As browser is initiated before class method.

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

      Hi Shafiq, we can do, but will need to ensure that we have single browser instance created

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

    Sir do u have birds around you while recording... a beautiful environment around you !

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

      Yes, many, thanks for watching Raj

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

    Hi Raghav,
    Great explanation,. Thanks a lot. I have one doubt, I have browser invoke script base class( initialize function) and test script( here i am also extends the base class) in another class. But while executing testng.xml , its not picking the browsers browser returns null. .Can you advise how to do that. or can you share your mail id so that i can mailed my code.

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

      Hi Ranjit, can you recheck all the steps from the video. I believe something is missing.

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

      @@RaghavPal Hi Raghav, Thanks for your reply. Its working fine when i have Browser Setup and test in single file.
      My issue is Browser setup(BaseCalss.java-initialize(String Browser) function)) in one file and test is in another file. While running Testng.xml file its failing there. I have to call the browser setup(-initialize(String Browser) function) file in testscript file. Browser value have to be passed to the test script file.

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

      Okay, may be I will need to have a session on this. For now you can continue with the concepts and revisit this later

  • @fakkireshvasanad2577
    @fakkireshvasanad2577 11 місяців тому

    how to fix that last configuration failure while i am running please provide the solution for that

    • @RaghavPal
      @RaghavPal  11 місяців тому

      Need more details and examples

  • @AhmedAli-zc3me
    @AhmedAli-zc3me 5 років тому

    Hi Raghav There's problem occurs with me when I put parameter tag inside test tag
    --> Parameter 'browserName' is required by @Configuration on method startDriver but has not been marked @Optional or defined

    • @RaghavPal
      @RaghavPal  5 років тому

      Pls show your code, any detailed error you have ?

    • @AhmedAli-zc3me
      @AhmedAli-zc3me 5 років тому

      ----------------
      @Parameters({ "browserName" })
      @BeforeSuite
      public void startDriver(String browserName) {
      if (browserName.equalsIgnoreCase("chrome")) {
      System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + "/drivers/chromedriver.exe");
      driver = new ChromeDriver(chromeOption());
      }
      else if (browserName.equalsIgnoreCase("firefox")) {
      System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "/drivers/geckodriver.exe");
      driver = new FirefoxDriver(firefoxOption());
      }
      else if (browserName.equalsIgnoreCase("ie")) {
      System.setProperty("webdriver.ie.driver", System.getProperty("user.dir") + "/drivers/IEDriverServer.exe");
      driver = new InternetExplorerDriver();
      }
      else if (browserName.equalsIgnoreCase("safari")) {
      driver = new SafariDriver();
      }
      }
      ---------------
      FAILED CONFIGURATION: @BeforeSuite startDriver
      org.testng.TestNGException:
      Parameter 'browserName' is required by @Configuration on method startDriver but has not been marked @Optional or defined
      in F:\eclipse-workspace\2D-3D-Analysis\testng.xml
      at org.testng.internal.Parameters.createParameters(Parameters.java:159)
      at org.testng.internal.Parameters.createParameters(Parameters.java:372)
      at org.testng.internal.Parameters.createConfigurationParameters(Parameters.java:90)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:199)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:140)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:296)
      at org.testng.SuiteRunner.run(SuiteRunner.java:259)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1200)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1125)
      at org.testng.TestNG.run(TestNG.java:1033)
      at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
      at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
      at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    • @RaghavPal
      @RaghavPal  5 років тому

      Hi Ahmed, are you running the base class file or testng.xml file

  • @vamshivishwanath
    @vamshivishwanath 2 місяці тому

    Hi sir
    @Parameters("browsername") is showing error
    like attribute value is undefined for annotation type paramatarized.Parameters
    if know the solutiion please help

    • @RaghavPal
      @RaghavPal  2 місяці тому +1

      Vamshi
      The error message "The attribute value is undefined for the annotation type Parameters" usually occurs when the import statement is incorrect. Here's how you can fix it:
      1. Check Your Import Statements:
      - Make sure you're importing the correct `@Parameters` annotation from TestNG.
      - Use this import statement:
      ```java
      import org.testng.annotations.Parameters;
      ```
      - Remove any other conflicting import statements related to parameters (e.g., `import com.beust.jcommander.Parameters;`).
      2. Update Your Code:
      - Replace the existing import with the correct one:
      ```java
      import org.testng.annotations.Parameters;
      ```
      3. Example Usage:
      - Here's how you can use `@Parameters` in your TestNG class:
      ```java
      import org.testng.annotations.BeforeTest;
      import org.testng.annotations.Parameters;
      public class MyTestClass {
      @BeforeTest
      @Parameters("browsername")
      public void setUp(String browser) {
      // Your setup logic here based on the browser parameter
      System.out.println("Running test on " + browser);
      }
      }
      ```
      Make sure you've corrected the import statement, and your `@Parameters` annotation should work as expected
      -

    • @vamshivishwanath
      @vamshivishwanath 2 місяці тому +1

      @@RaghavPal thanks very much

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

    Thanks a lot Sir . But in my case near my @Parameters annotation - it just gives me the error " Parameters is disallowed in this location" . After i copied everything as in the video . Anyone ? Any ideas?) Thanks..

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

      Hi Stas, will need to see the details, can check some online examples

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

    Hi Raghav, I used the same to run on chrome and edge, but it is not running in parallel - it is executing one after other. What may be the reason. And how to resolve that.

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

      will need to check your setup Puneet, Try some online examples

  • @ManishYadav-in7ml
    @ManishYadav-in7ml 6 років тому +1

    👍

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

    Thanks for the tutorial. But you did not even bother to solve the IE issue. What was the actual issue? for IE?
    My Chrome and Firefox opened but not IE.
    I will really appreciate if you reply with an answer.

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

      Hi, I covered IE separately in this video - ua-cam.com/video/XrQ4fqg97GI/v-deo.html
      You can also check complete playlist here - automationstepbystep.com/

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

    Hi Raghav,
    I was running my testng.xml file.In that file I have added two tests that is one test on chrome and other on firefox with same class and the class has only one method and I run them in parallel mode, so according to that in testng report it should show one method of one test and one method of other test but for one test it is showing the same method run twice and for other test it is showing only one method which is working fine..The firefox browser is working fine but for the chrome the execution is stopping after sometime without completion .Can you help me with that.

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

      Hi Apeksha, I will need error details and logs to troubleshoot this. You can try some online help as well

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

      @@RaghavPal Hi Raghav, I am having the same issue. After doing some research, I found that it may get solved if we Initialize the WebDriver object as a Thread Local for Parallel Test Execution. ThreadLocal driver = new ThreadLocal(); Can you help us on this?
      And thanks a lot for your videos, it helps me a lot.

  • @iamthekd07
    @iamthekd07 6 років тому

    Hi Raghav, I am getting error when i put @parameters("browserName") i.e the attribute value is undefined for the annotation type parameterized.parameters testng. Please help me out !!

    • @RaghavPal
      @RaghavPal  6 років тому

      Hi Kuldeep, just check you imported Parameters from TestNG lib and not any other lib. Also check this stackoverflow.com/questions/47612476/the-attribute-value-is-undefined-for-the-annotation-type-parameters-error-is-d

    • @iamthekd07
      @iamthekd07 6 років тому +1

      I was not able to import it so alternatively used this @org.testng.annotations.Parameters("browserName") and now its worked. Thank you again

    • @RaghavPal
      @RaghavPal  6 років тому

      Great to know this Kuldeep

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

    @RaghavPal
    How to achieve this using testng with cucumber BDD framework. Kindly through some light.

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

      Hi Satyanarayan
      Here are the steps on how to achieve multiple browser testing in parallel using TestNG with Cucumber BDD framework:
      1. Create a Maven project in your favorite IDE adding Cucumber dependencies to the POM as detailed here and TestNG dependencies here.
      2. Add the two feature files (scenarios.feature and scenario-outlines.feature) and step definition class as described in the JUnit section.
      3. Create a TestNG XML file and add the following configuration:
      ```xml






      ```
      This configuration will create two tests, one for Chrome and one for Firefox. The `browser` parameter will be passed to the CucumberTest class, which will use it to initialize the appropriate browser driver.
      4. Run the TestNG XML file using the following command:
      ```
      mvn test -DsuiteXmlFile=testng.xml
      ```
      This will run the two tests in parallel, one for Chrome and one for Firefox.
      Here are some additional things to keep in mind when achieving multiple browser testing in parallel using TestNG with Cucumber BDD framework:
      * You need to have the correct browser drivers installed on your machine.
      * You need to specify the browser name in the TestNG XML file.
      * You need to create a separate step definition class for each browser.
      * You need to make sure that your code is thread-safe

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

      @@RaghavPal How to make the cucumber test runner class as @Test annotation of TestNG. So that it will execute from TestNG xml suite

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

      @RaghavPal could you please make video on that. It will be really helpful.

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

    I have write same code but getting error in Test Method for void Test1() as invalid type .same error for void Teardown method ().
    Plz help for solving these errors.

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

      Hi Minakshi, will need to check the error and logs, Try to check all required libraries are added

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

      Thank you for reply .plz help me to solve below error
      In testng.xml file I enter @para & press ctrl+spacebar but it shows message like no default proposals .
      On other way I enter the parameter syntax manually but shows error like "parameters" must be declared. I followed same step given by u . Any suggestion how to solve this error plz help.

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

    my tearDown() is not quitting IE browser in either case, parallel or multi :(

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

      Hi Deepak, I will need to see code and logs for troubleshooting

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

    I would like to help you out . Would it be possible for you to answer my questions? How can I help your cause?

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

      Hi Sandeep, how exactly do you wish to help

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

      @@RaghavPal Financially I can spare a bit. not too much though. A little bit.

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

      I want my questions answered too.

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

      @@RaghavPal Raghav?

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

      Hi Sandeep, the best help for now can be to spread this free education to all who may need it, Share in all your groups - automationstepbystep.com/
      Also if people can help in answering comments and helping users, it will be a great help

  • @Deniz-ss1sv
    @Deniz-ss1sv 3 роки тому

    :)

  • @rebekamontana7656
    @rebekamontana7656 5 років тому +1

    Excuse me, I discovered my mistake.

    • @RaghavPal
      @RaghavPal  5 років тому

      Glad to know this Rebeka

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

      facing same whats the solution

  • @boshaaj80
    @boshaaj80 5 років тому

    This is video is really not that helpful as you've already created most crucial aspect of the framework off-camera.

    • @RaghavPal
      @RaghavPal  5 років тому +1

      Hi Joshua, I think you did not see earlier videos. Pls check here - ua-cam.com/play/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa.html
      You can find all playlists here - automationstepbystep.com/online-courses/