Integrate Extent Report and Logs in Framework

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

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

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

    Hi Mukesh, Great video..! I am following you from Aug 2018 and this is my best leaning time ever. Grateful and Respect Sir.

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

      Thank you so much Chetan :) Your comment made my day.

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

    Had been waiting eagerly for this... Thanks Mukesh for your videos !!

  • @ravitummala5829
    @ravitummala5829 5 лет назад +2

    HI Mukesh, I am having issues with the report when running tests in parallel. If possible, could you give a demo on running tests in parallel and generating an extent report ? Thanks in Advance.

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

      Sure Ravi will do soon

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

      @@Mukeshotwani Thanks a lot for your response. Eagerly waiting for the fix..!

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

      Hi Mukesh, Ravi,
      I am also facing issue with extent report on executing the tests in parallel, could you please provide the video link or solution .
      Thanks !

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

    Hi Mukesh just a quick question as u discussed about screenshot with Helper Utility it works fine . How to Alert or Dropdown or Action with Page Object Model
    ( POM)?? Thanks

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

    Hello Mukesh, thanks for the excellent videos. I was just checking about the Alerts, Frames, Windows, Sync Issue and Javascript Executor methods you mentioned to write in the Helper class. Could you pls direct me to these if you have a separate videos for these?

  • @tejkumarkempaiah4906
    @tejkumarkempaiah4906 4 года назад +1

    Thanks for the wonderful video, But I'm facing issues while having the Logger declaration in Testbase class which is in another package than that of Testcases which I will post in the next comment.. Please guide.

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

    Hi Mukesh, while using ExtentReport, do we need to use Logger.fail/Logger.pass or we can use Assert statements? I used Assert statements and ExtentReport is not showing desired result.

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

      Hi Prabodh, Extent report does not understand any assert so we need to tell the report when to pass and when to fail.

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

    Hi Mukesh..Could u pls share the maven dependency which u have used while creating the video as I am getting error when I am creating the ExtentReports object. It's asking for the arguments..Please share.
    Thanks in advance!!

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

      Hi Rahul, which version you are using for extent report?

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

    Hi Mukesh
    Thanks for the video.
    What can be done to email the extent report to the client with screenshot

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

    Hey Mukesh, I have a question:
    While running a automation code, chrome browser intially launching with 'data;' URL and then it loads the test application URL.
    Why it's launching with 'data;' ?

  • @sasivinodakula2134
    @sasivinodakula2134 5 лет назад +2

    Hello Mukesh, please add extent report for the parallel execution grid execution

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

      Yes Vinod I will add that as well.

  • @SC4K_Online
    @SC4K_Online 4 года назад +2

    The screenshot doesn't get attached, I used
    String TarketPath = SSOnFail.CaptureScreenShot(driver, DateNTime.GetDateNTime() + result.getName());
    Logger123.fail("Test Failed", MediaEntityBuilder.createScreenCaptureFromPath(TarketPath).build());
    Screen shot is comming and saved in the right location, I get fail report even the message "Test Failed" is comming in the report, but screen shot doesnt get attached.

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

      Hi Vida, are u calling flush method at last?

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

      @@Mukeshotwani yes in the base class
      @AfterClass
      public void ReportAdd()
      {
      System.out.print("Reached report flush");
      Reports123.flush();
      }
      }

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

      same in my case too. Did you solve the issue @Vida

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

      @Vida
      Can you please upload your complete Framework on Git ,in order to resolve this issue.

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

      did you try opening report with Chrome browser?

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

    Hi Mukesh, can I use Extend report for report using Keyword framework ? could you please suggest any type of reports for easy tracing failed cases if uisng Keyword framework ?
    Thank you very much.

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

    Hi Mukesh...What is the advantage of using the "Join" option here to subscribe. I find ur videos so helpful..

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

      Hi Rahul, Join member is when you want support this channel and you will become special member of learnautomation.

  • @Onekrat200
    @Onekrat200 4 года назад +1

    Hi, Mukesh Thanks for the video; it is really helpful; Can you please let me know how to include the all the detail information about the passed test cases for an example include the all the options in the drop-down list or any println information etc

    • @Mukeshotwani
      @Mukeshotwani  4 года назад +1

      Hi Alak, you can use info method to add any details to ur test.
      extentreports.com/docs/versions/3/java/#examples
      test.info("This step shows usage of info(details)");

  • @alanmichaelthayil967
    @alanmichaelthayil967 2 года назад

    Hi Mukesh, I have an issue with logging the error in Extent Report. In Eclipse console I am able to see exceptions like ElementNotVisibleException, NoSuchElementException etc.
    But in the Extent Report, I am not able to see them. Could you kindly suggest me a solution?

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

    sir in the previous video in the last u were telling that u will explain the unit testcase because of the complexity but u didnt make the video.And sir my second question is in testng we use listner class for generate logs in testng framework (ex -TestListnerAdepter class) but we use the extend reports for the same .Sir plz tell me where we use listner class and where we should use extend report or we can use both in framework.And r we using listner class in extend report or not. plz tell me

  • @sivasaimtr5044
    @sivasaimtr5044 2 года назад +1

    Hi Mukesh, I have given all pages in src/main/java and all test clases in src/test/java. Is this correct? Can I still call this as POM?

  • @shalinirakesh3455
    @shalinirakesh3455 4 года назад +1

    Hi Sir,
    I am using Extent report version 2.41.1. Inspite of mentioning "OLDEST_FIRST",the report does not show the test cases in the order it was executed
    extent = new ExtentReports(outputDirectory + File.separator +
    "GovernanceTestResult_ExtendReport"+System.currentTimeMillis() + ".html",
    false,DisplayOrder.OLDEST_FIRST);
    Can you please help

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

      Hi Shalini, why you are using old report we have extent report version 3 and version 4 now with new UI.

  • @pratikkumary2joo7
    @pratikkumary2joo7 4 года назад +1

    Hi Mukesh, The video is very good but when I run testng.xml using package(not using classes) then I am getting NullPointerException in line "logger= reports.createTest("TestMethod1");" inside Test class. Could you please explain why this is happening

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

      Hi Pratik, what do u mean by running packages? In testng we need to specify either class name or method name in order to work.

    • @pratikkumary2joo7
      @pratikkumary2joo7 4 года назад +1

      @@Mukeshotwani we can run using package also code copied from testng.org/doc/documentation-main.html#testng-xml

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

    Hi Mukesh, when I create object of ExtentHtmlReporter it's showing error and not even showing any packages to upload, what's the problem?

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

      And I am not using maven in my automation

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

      Hi Pavan It is recommended to use Maven else you can download extent report jar and all other dependent jars to use this.

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

      I am using jars for extentreport but for ExtentHtmlReporter I am not able to find jars, can u please help me

  • @gurpreetkaurbhatiagkb
    @gurpreetkaurbhatiagkb 4 года назад +1

    Thanks for the Superb video...

  • @SC4K_Online
    @SC4K_Online 4 года назад +1

    Thank you for the video, I get null pointer exception when I use more than one class for this report. Testng.xml, first test case works fine and I get the report as pass, from the second test case all others fail and says null pointer exception

    • @Mukeshotwani
      @Mukeshotwani  4 года назад +1

      Hi Vida, in BaseClass can you make extent report object as static and then try again.

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

      @@Mukeshotwani really appreciate Mukesh, your videos are really helpfull to me, thank you very much, keep up your good work. Inbetween, I saw you strated an online course this month but I m late for that. When you will start next batch, actually Im from Toronto (Canada) hope the time will be fine (EST time)

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

    Hi Mukesh , how r u vgm
    What if we r runninh ur test from main can we apply the same logic in that case as well
    Can we generate the logs like the way u explained in that case as well
    I want to log as paas and fail in my extent report we have a existing framwewok in which it will log pass amd fail and also attach screenshot but for web table each and every step i dont want a screenshot wihout changing that function i cant use that so plz sugg3sg hoew to apply ur concept when i am using main class to run my test

  • @yeshwinir630
    @yeshwinir630 4 года назад +1

    Hi Mukesh , im using intellij , im trying the same steps but i dont see the report generated at all , but my test runs all fine , could you please help me on this?

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

      Hi Yeshwini, does not matter whether you are using Eclipse or intellij. You can refresh the folder if you haven't. If you are still not getting any report then share the code.

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

      @@Mukeshotwani package com.company;
      import com.aventstack.extentreports.ExtentReporter;
      import com.aventstack.extentreports.ExtentReports;
      import com.aventstack.extentreports.ExtentTest;
      import com.aventstack.extentreports.reporter.ExtentHtmlReporter;
      import org.openqa.selenium.WebDriver;
      import org.openqa.selenium.chrome.ChromeDriver;
      import org.openqa.selenium.remote.RemoteWebDriverBuilder;
      import org.testng.annotations.*;
      import java.io.File;
      import java.io.IOException;
      import java.util.concurrent.TimeUnit;
      public class BaseClass {
      public static WebDriver driver = null;
      private static String chromeDriverPath = "C:\\WorkSpace_Y\\chromedriver.exe";
      public ExtentReports reports;
      public ExtentTest logger;
      @BeforeClass
      public void setUpSuite(){
      ExtentHtmlReporter extent = new ExtentHtmlReporter(new File(System.getProperty("C:\\Users\\yr\\IdeaProjects\\TestAPX")+"\\Reports\\Extrepo.html"));
      reports = new ExtentReports();
      reports.attachReporter(extent);
      }
      @BeforeTest
      public void initialize() throws IOException {
      //System.setProperty("webdriver.chrome.driver",
      // System.getProperty("C:\\WorkSpace_Y\\chromedriver.exe"));
      System.setProperty("webdriver.chrome.driver", chromeDriverPath);
      driver = new ChromeDriver();
      // To maximize browser
      driver.manage().window().maximize();
      // Implicit wait
      driver.manage().timeouts().implicitlyWait(
      10, TimeUnit.SECONDS);
      }
      @AfterClass
      // Test cleanup
      public void TeardownTest() {
      BaseClass.driver.quit();
      reports.flush();
      }
      }
      this is my code

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

      Also im using java project . i dont have pom.xml file

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

      can u please help me on this ?

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

    Hi Mukesh,
    I am getting java.lang.unsupportedClassVersionError: com/aventstack/extentreports/reporter/ExtentHtmlReporter: unsupported major.minor version 52.0
    Can you please tell how to overcome this error

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

    Hi again
    could you guide me to solve this exception
    "Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not interactable"

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

      HI Raj for which application.. Can you share step details?

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

    Hi Mukesh,
    could you please make a video on disabling "Web push notifications in chrome browser" .
    Thankyou

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

      Sure Raj any specific web app which you want me to use for video.

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

      Hi Mukesh
      am following your blog "learnautomation" and i was learning how to handle autosuggestions, and you used "naukri.com" in your blog.could you pls make video on it using this same web app bcos there are so many popups,and notifications asking for sharing locations.
      Thankyou

  • @abhishekpatel3318
    @abhishekpatel3318 4 года назад +1

    Hi Mukesh, Your video is to much good. i did learn many things from your video
    Can you create video for alert, frame,syn inputs in frame works.
    It's my request to you.

    • @Mukeshotwani
      @Mukeshotwani  4 года назад +1

      Hi Abhishek, I have to add more videos on this. Will do soon.

    • @abhishekpatel3318
      @abhishekpatel3318 4 года назад +2

      @@Mukeshotwani Tq Mukesh you know one thing I got job just bcz of your framework video only.

  • @mounikasunkari3940
    @mounikasunkari3940 4 года назад +1

    Hello mukesh,how to add screenshot for each and every method present under @test tag. Can you please tell me

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

      Hi Mounika, you can call the screenshot method whenever you need any screenshot.

    • @mounikasunkari3940
      @mounikasunkari3940 4 года назад +1

      @@Mukeshotwani suppose I have 7 scenarios in different classes.i am running each scenario through testng.xml.how to add different scenario name in the report

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

      you can call createTest method whenever you need to add test in report.

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

    Hi Mukesh can u please post the link to how to add dependency and how to get that XML file and that Testng.xml

  • @gowthamPrakash
    @gowthamPrakash 4 года назад +1

    I am getting issue when adding logs and running multiple class files

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

      Hi Prakash, are you getting NullPointerException? If yes then please make report variable as static in BaseClass.

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

    Superb.Thanks:)

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

      I am glad you like my video Rishu Thank you so much

  • @soumyamishra3151
    @soumyamishra3151 Год назад

    Hi sometimes I don't see logs even if my syntax is right

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

    can you update it for extent version 4

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

      Hi Sweta, code is same for extent report version 4 as well.

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

      @@Mukeshotwani --Hi Extent Report shows the test case as pass if it gets failed...Is there any customization which I need to do? This is the case where the test case gets failed before the test.fail or test.pass statement in the test case.

  • @pallavijain6526
    @pallavijain6526 4 года назад +1

    Hi Mukesh, Thanks for the video. Its really helpful. Though i have one question regarding the error i am facing when adding extent report. on adding @AfterMethod in base class to get and add the screenshot in report, facing this error:
    FAILED CONFIGURATION: @AfterMethod getScreenReport([TestResult name=validateLoginUser status=SUCCESS method=LoginTestCase.validateLoginUser()[pri:0, instance:com.wordpressTestcases.LoginTestCase@43814d18] output={null}])
    java.lang.NoClassDefFoundError: org/bson/types/ObjectId
    Can you help me how to resolve this error?

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

      Hi Pallavi, It seems like some version compatibility issue. Can you share your pom.xml content so that I can check?

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

      @@Mukeshotwani Hi Mukesh, Here is my GitHub link where i have added my project with pom.xml in it.
      github.com/jain11-pallavi/NewFramework
      There is a new error coming in pom.xml which was not there earlier but other dependencies added in pom file is also not working as expected.

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

    @Mukesh otwani Could you please push this code to github also

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

    Please show us test listners with extent report parent child for more than 1 test class.

  • @premsinghrathore9691
    @premsinghrathore9691 Год назад

    Why do you need to tell Logger whether the test gonna pass or fail? I mean the logger should have the knowledge based on the assertion.

  • @Allinoneclick23
    @Allinoneclick23 4 года назад +1

    very nice thank you mukesh brother