Integrate Extent Report and Logs in Framework

  Рет қаралды 61,022

Mukesh otwani

Mukesh otwani

Күн бұрын

Пікірлер: 95
@chetanpaliwal6021
@chetanpaliwal6021 5 жыл бұрын
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 !!
@tejkumarkempaiah4906
@tejkumarkempaiah4906 4 жыл бұрын
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.
@DAK1985
@DAK1985 4 жыл бұрын
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 жыл бұрын
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)");
@sasivinodakula2134
@sasivinodakula2134 5 жыл бұрын
Hello Mukesh, please add extent report for the parallel execution grid execution
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Yes Vinod I will add that as well.
@GhoomoMereSang
@GhoomoMereSang 4 жыл бұрын
Hi Mukesh...What is the advantage of using the "Join" option here to subscribe. I find ur videos so helpful..
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi Rahul, Join member is when you want support this channel and you will become special member of learnautomation.
@abhishekpatel3318
@abhishekpatel3318 4 жыл бұрын
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 жыл бұрын
Hi Abhishek, I have to add more videos on this. Will do soon.
@abhishekpatel3318
@abhishekpatel3318 4 жыл бұрын
@@Mukeshotwani Tq Mukesh you know one thing I got job just bcz of your framework video only.
@ravitummala5829
@ravitummala5829 5 жыл бұрын
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 жыл бұрын
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 !
@kalyanijoshi6884
@kalyanijoshi6884 5 жыл бұрын
Hi Mukesh Thanks for the video. What can be done to email the extent report to the client with screenshot
@gurpreetkaurbhatiagkb
@gurpreetkaurbhatiagkb 4 жыл бұрын
Thanks for the Superb video...
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Glad you liked it Gurpreet
@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?
@rupapatil6682
@rupapatil6682 4 жыл бұрын
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
@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
@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;' ?
@GhoomoMereSang
@GhoomoMereSang 4 жыл бұрын
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 4 жыл бұрын
Hi Rahul, which version you are using for extent report?
@prabodhghosh662
@prabodhghosh662 5 жыл бұрын
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.
@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?
@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.
@SC4K_Online
@SC4K_Online 4 жыл бұрын
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 жыл бұрын
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)
@SC4K_Online
@SC4K_Online 4 жыл бұрын
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?
@pratikkumary2joo7
@pratikkumary2joo7 4 жыл бұрын
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 жыл бұрын
@@Mukeshotwani we can run using package also code copied from testng.org/doc/documentation-main.html#testng-xml
@rajmehra5656
@rajmehra5656 5 жыл бұрын
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
@donatesmile202
@donatesmile202 5 жыл бұрын
Superb.Thanks:)
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
I am glad you like my video Rishu Thank you so much
@shalinirakesh3455
@shalinirakesh3455 4 жыл бұрын
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.
@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
@sivasaimtr5044
@sivasaimtr5044 2 жыл бұрын
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?
@Mukeshotwani
@Mukeshotwani 2 жыл бұрын
Yes why not.
@pavankl2518
@pavankl2518 4 жыл бұрын
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 4 жыл бұрын
And I am not using maven in my automation
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
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 4 жыл бұрын
I am using jars for extentreport but for ExtentHtmlReporter I am not able to find jars, can u please help me
@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
@rajmehra5656
@rajmehra5656 5 жыл бұрын
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?
@pavankl2518
@pavankl2518 4 жыл бұрын
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
@ParagOak
@ParagOak 5 жыл бұрын
Please show us test listners with extent report parent child for more than 1 test class.
@mounikasunkari3940
@mounikasunkari3940 4 жыл бұрын
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 жыл бұрын
@@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.
@yeshwinir630
@yeshwinir630 4 жыл бұрын
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 ?
@gowthamPrakash
@gowthamPrakash 4 жыл бұрын
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.
@soumyamishra3151
@soumyamishra3151 10 ай бұрын
Hi sometimes I don't see logs even if my syntax is right
@pallavijain6526
@pallavijain6526 4 жыл бұрын
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
@Allinoneclick23
@Allinoneclick23 4 жыл бұрын
very nice thank you mukesh brother
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Thank you bro.
@ruksanashaik8455
@ruksanashaik8455 4 жыл бұрын
@@Mukeshotwani uh
@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.
@ImSK2109
@ImSK2109 4 жыл бұрын
can you update it for extent version 4
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi Sweta, code is same for extent report version 4 as well.
@GhoomoMereSang
@GhoomoMereSang 4 жыл бұрын
@@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.
How To Integrate Framework With Git and Github
35:56
Mukesh otwani
Рет қаралды 34 М.
P4 - Understand the log levels in extent reports | Extent Reports |
14:07
Dad gives best memory keeper
01:00
Justin Flom
Рет қаралды 24 МЛН
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 49 МЛН
Selenium C# How to Generate Extent Reports by Bakkappa N
36:58
Testers Talk
Рет қаралды 25 М.
How to add Screenshot in Extent Report for Failed Test Cases in Selenium
54:04
Naveen AutomationLabs
Рет қаралды 77 М.
How to execute failed test cases in Selenium webdriver
17:09
Mukesh otwani
Рет қаралды 96 М.