Hi @RD Autmation Learning, in this video , you have not explained about code review process. Please could you please share or explain it. it would be very helpfull if you do that.
Implement ITestlisteners interface in one class and override the onTestFailure method,pass that method name to take screenshot method which can be created in baseclass to take screenshot of failed methods
to take failed screen shot we are using iTestListener interface and in this interface we declare failedTestMethod and place takescreenshots code and this interface implemented to testcase class
code to take screen shot for failed testcases: TakeScreenShot ts = (TakeScreenShot).driver; File srcfile = ts.getScreenShotAs(OutputType.File); File trgtfile = new File("path where faile failes testcases to be stored"); FileUtils.copyFile(srcfile, trgtfile);
Hi @RD Autmation Learning, in this video , you have not explained about code review process. Please could you please share or explain it. it would be very helpfull if you do that.
Implement ITestlisteners interface in one class and override the onTestFailure method,pass that method name to take screenshot method which can be created in baseclass to take screenshot of failed methods
#testinginterviewquestions
to take failed screen shot we are using iTestListener interface and in this interface we declare failedTestMethod and place takescreenshots code and this interface implemented to testcase class
Alternatively, we can add takescreenshot code in @AfterMethod with if condition.
Using listeners interface methods we can take screenshot of failed test cases.
code to take screen shot for failed testcases:
TakeScreenShot ts = (TakeScreenShot).driver;
File srcfile = ts.getScreenShotAs(OutputType.File);
File trgtfile = new File("path where faile failes testcases to be stored");
FileUtils.copyFile(srcfile, trgtfile);
how i can give mock interview to you, im automation tester
We can use the TestNg Listeners interface method to screenshot failed Test Cases.
@RD Automation how can I register myself for a mock interview
Terrible pronunciation of the candidate. Unable to understand
English is bad..