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.
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 !
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
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?
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.
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.
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!!
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;' ?
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.
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.
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
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)");
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?
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
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
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
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 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)
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
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?
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.
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
Hi again could you guide me to solve this exception "Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not interactable"
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
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 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 --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.
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 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.
Hi Mukesh, Great video..! I am following you from Aug 2018 and this is my best leaning time ever. Grateful and Respect Sir.
Thank you so much Chetan :) Your comment made my day.
Had been waiting eagerly for this... Thanks Mukesh for your videos !!
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.
Sure Ravi will do soon
@@Mukeshotwani Thanks a lot for your response. Eagerly waiting for the fix..!
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 !
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
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?
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.
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.
Hi Prabodh, Extent report does not understand any assert so we need to tell the report when to pass and when to fail.
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!!
Hi Rahul, which version you are using for extent report?
Hi Mukesh
Thanks for the video.
What can be done to email the extent report to the client with screenshot
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;' ?
Hello Mukesh, please add extent report for the parallel execution grid execution
Yes Vinod I will add that as well.
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.
Hi Vida, are u calling flush method at last?
@@Mukeshotwani yes in the base class
@AfterClass
public void ReportAdd()
{
System.out.print("Reached report flush");
Reports123.flush();
}
}
same in my case too. Did you solve the issue @Vida
@Vida
Can you please upload your complete Framework on Git ,in order to resolve this issue.
did you try opening report with Chrome browser?
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.
Hi Mukesh...What is the advantage of using the "Join" option here to subscribe. I find ur videos so helpful..
Hi Rahul, Join member is when you want support this channel and you will become special member of learnautomation.
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
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)");
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?
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
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?
Yes why not.
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
Hi Shalini, why you are using old report we have extent report version 3 and version 4 now with new UI.
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
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.
@@Mukeshotwani we can run using package also code copied from testng.org/doc/documentation-main.html#testng-xml
Hi Mukesh, when I create object of ExtentHtmlReporter it's showing error and not even showing any packages to upload, what's the problem?
And I am not using maven in my automation
Hi Pavan It is recommended to use Maven else you can download extent report jar and all other dependent jars to use this.
I am using jars for extentreport but for ExtentHtmlReporter I am not able to find jars, can u please help me
Thanks for the Superb video...
Glad you liked it Gurpreet
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
Hi Vida, in BaseClass can you make extent report object as static and then try again.
@@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)
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
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?
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.
@@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
Also im using java project . i dont have pom.xml file
can u please help me on this ?
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
Hi again
could you guide me to solve this exception
"Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not interactable"
HI Raj for which application.. Can you share step details?
Hi Mukesh,
could you please make a video on disabling "Web push notifications in chrome browser" .
Thankyou
Sure Raj any specific web app which you want me to use for video.
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
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.
Hi Abhishek, I have to add more videos on this. Will do soon.
@@Mukeshotwani Tq Mukesh you know one thing I got job just bcz of your framework video only.
Hello mukesh,how to add screenshot for each and every method present under @test tag. Can you please tell me
Hi Mounika, you can call the screenshot method whenever you need any screenshot.
@@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
you can call createTest method whenever you need to add test in report.
Hi Mukesh can u please post the link to how to add dependency and how to get that XML file and that Testng.xml
I am getting issue when adding logs and running multiple class files
Hi Prakash, are you getting NullPointerException? If yes then please make report variable as static in BaseClass.
Superb.Thanks:)
I am glad you like my video Rishu Thank you so much
Hi sometimes I don't see logs even if my syntax is right
can you update it for extent version 4
Hi Sweta, code is same for extent report version 4 as well.
@@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.
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?
Hi Pallavi, It seems like some version compatibility issue. Can you share your pom.xml content so that I can check?
@@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.
@Mukesh otwani Could you please push this code to github also
Please show us test listners with extent report parent child for more than 1 test class.
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.
very nice thank you mukesh brother
Thank you bro.
@@Mukeshotwani uh