Parallel Execution of Classes in TestNG

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 10

  • @satheeshsathi8857
    @satheeshsathi8857 4 года назад

    Nice, Thanks for your video. Now, I get more clarification regarding the Parallel execution methods and classes. Thank you so much.

    • @KrishnaSakinala
      @KrishnaSakinala  4 года назад

      You're very welcome!
      Please subscribe to the channel and keep visiting ... :)

  • @santhoshinilakkavathri3199
    @santhoshinilakkavathri3199 3 года назад

    how do we make test Data common to all classes ??

  • @nikhilbhalerao7788
    @nikhilbhalerao7788 7 лет назад

    hi
    thread-count must always be equal to number of classes or what.
    what if we have 2 classes and thread-count = 3 or thread-count = 1
    and same thing for test

    • @bkumarj6450
      @bkumarj6450 5 лет назад

      Nikhil Bhalerao if u set thread count as 1 it will execute one by one instead parallel and if u set TC 3 it will run parallel irrespective of the number ( no< thread count)

  • @bler43
    @bler43 5 лет назад

    hi have the same setup but only difference is i have a data provider for class1 and class2 each have their own data providers that are unique when i tried to run them I'm encountering an error where in it saying data provider mismatch. any ideas on how to resolve it?
    login.java class:
    //TCName url username password
    @DataProvider(name="sampleData")
    public Object getTestData() {
    ExcelDataProvider ExclData= new ExcelDataProvider();
    String ProjPath = System.getProperty("user.dir");
    String excelPath=ProjPath+"/datatable/Login.xlsx";
    String excelSheet="TestData";
    Object data[][]=ExclData.testData(excelPath, excelSheet);
    return data;
    }
    @Test(dataProvider="sampleData")
    public void test(String TCName,
    String url,
    String username,
    String password) throws GeneralLeanFtException {
    ... some test steps..
    createaccount.java
    @DataProvider(name="test1data")
    public Object getTestData() {
    ExcelDataProvider ExclData= new ExcelDataProvider();
    String ProjPath = System.getProperty("user.dir");
    String excelPath=ProjPath+"/datatable/sample1.xlsx";
    String excelSheet="TestData";
    Object data[][]=ExclData.testData(excelPath, excelSheet);
    return data;
    }
    @Test(dataProvider="test1data")
    public void test(String TCName,
    String url,
    String username,
    String password,
    String ID,
    String email,
    String firstname,
    String lastname,
    String state,
    String address,
    String city,
    String zip,
    String country,
    String receiveOffers,
    String privacyNoticeAgree,
    String phoneNumber) throws GeneralLeanFtException {
    CommonPage cmPg = new CommonPage();
    CreateAccountPage crtActPg = new CreateAccountPage();
    try {
    .somecoded test steps....
    xml

  • @arjunms3345
    @arjunms3345 5 лет назад +1

    Instead of printing something on console...explain with browser launching and doing some operation on browser

    • @KrishnaSakinala
      @KrishnaSakinala  5 лет назад

      I made it very generic. Not only for selenium people. Planned for the people who work in Java development also.

    • @shuvendutripathy2912
      @shuvendutripathy2912 5 лет назад

      @@KrishnaSakinala I followed this way. but 2 browser instances are not getting launched at once. It's getting launched after one class execution is finished. Pls help

    • @prajwalkore375
      @prajwalkore375 3 года назад

      @@shuvendutripathy2912 Depends where ur driver is initialized,if it's in beforeauite then it ll be invoked once