In Post 1 we have learned generating the extent reports using ExtentReportsV4, in this postwe will learn about adding the screenshot to failed test cases. This will be continuation to Post 1, please go through it first then continue this.
Step 1: Update the pom.xml with Apache Commons IO dependency, as shown below. This required to copy the files.
Step 2: Now write a function in base class, that takes the screenshot and returns the path of the screenshot.
Step 3: We will call this function in @AfterMethod, this function will be invoked only when test failed.
Then using "addScreenCaptureFromPath(String path)" method of extent reports, the screenshot will be attached to the test in the extent report.
Check below, the screenshot is attached to failed test case.
#HappyLearning #HappyTesting
Step 1: Update the pom.xml with Apache Commons IO dependency, as shown below. This required to copy the files.
Step 2: Now write a function in base class, that takes the screenshot and returns the path of the screenshot.
Step 3: We will call this function in @AfterMethod, this function will be invoked only when test failed.
Then using "addScreenCaptureFromPath(String path)" method of extent reports, the screenshot will be attached to the test in the extent report.
Check below, the screenshot is attached to failed test case.
#HappyLearning #HappyTesting
Nice,I have already bookmarked your blog.
ReplyDeleteManual Testing Training in Chennai
Manual Testing Training in Velachery
Manual Testing Training in Anna Nagar
Mobile Testing Training
Mobile Appium Training in chennai
Mobile Testing Training in Porur
Manual Testing Training in Tambaram
testing courses in chennai
Really nice blog,i enjoyed your infomations. Thank you and i will expect more in future.
ReplyDeleteJAVA Training in Chennai
Best JAVA Training institute in Chennai
Python Training in Chennai
Selenium Training in Chennai
Android Training in Chennai
Big data training in chennai
JAVA Training in Chennai
Java Training in Tambaram
I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... איך בודקים איי קיו
ReplyDeleteThe article is so informative. This is more helpful for our
ReplyDeletebest software testing training in chennai
best software testing training institute in chennai with placement
software testing training
courses
software testing training and placement
software testing training online
software testing class
software testing classes in chennai
best software testing courses in chennai
automation testing courses in chennai
Thanks for sharing.
Great Article. Thank you for sharing! Really an awesome post for every one.
ReplyDeleteProject Centers in Chennai
JavaScript Training in Chennai
Final Year Project Domains for IT
JavaScript Training in Chennai
So, how do you take a screenshot on a PC? There are several tools out there to accomplish this. One thing to consider is if you want to just take screenshots of web pages or of your desktop. screenshot guide
ReplyDeleteNot often do I encounter a weblog that is both educated and entertaining, and let me tell you, you may have hit the nail on the head. Your concept is excellent; the issue is something that not sufficient individuals are speaking intelligently about. I am very happy that I stumbled across this in my quest for something relating to this. app store mock up
ReplyDeleteHi! Great post! Please do tell us when I will see a follow up! iphone screenshot template
ReplyDeleteHey there! Nice stuff, please keep me posted when you post something like this! free imac mockup
ReplyDeleteI want to start a blog but would like to own the domain. Any ideas how to go about this?. imac template
ReplyDeleteGood write-up, I¡¦m normal visitor of one¡¦s blog, maintain up the nice operate, and It is going to be a regular visitor for a long time. imac mockups
ReplyDeleteHi there, I found your blog via Google while searching for first aid for a heart attack and your post looks very interesting for me. mac desktop mockup
ReplyDeleteI simply couldn’t go away your website before suggesting that I actually enjoyed the standard information an individual provide on your visitors? Is gonna be back frequently in order to inspect new posts. app developer
ReplyDeleteI don’t even know how I ended up here, but I thought this post was great. I do not know who you are but certainly you are going to a famous blogger if you are not already Cheers! top web design companies
ReplyDeleteHello! Good stuff, please keep us posted when you post again something like that! ui design agency
ReplyDeletehello, your website is really good. We do appreciate your give good results top web development companies
ReplyDeletehey, your internet site is excellent. We do appreciate your work logo design for startups
ReplyDeleteIf someone is interested in finding a website to download capture software for their Windows, they must be set with the choices accessible over the Internet. how to screenshot on chromebook The people who are new to this kind of software may feel that the task of choosing the right website to download the software may be a bit scary at first.
ReplyDeleteOh my goodness! an incredible article dude. Thank you However I am experiencing situation with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting an identical rss problem? Anyone who knows kindly respond. Thnkx best branding agencies san francisco
ReplyDelete