- public = access modifier
- void= will not return anything
- ITestResult= org.testng.ITestResult and it describes result of test
- getStatus()=to fetch the execution status of test case
- ExtentReport.extentlog.log=Logs events for the test
- ExtentReport.extentreport.endTest= Ends and prepares the test to be added to the report on
flush()
public void getResult(ITestResult result) {
if (result.getStatus() == ITestResult.SUCCESS) {
ExtentReport.extentlog.log(LogStatus.PASS, "Test case is passed "+ "Test" );
} else if (result.getStatus() == ITestResult.FAILURE) {
ExtentReport.extentlog.log(LogStatus.FAIL, "Test case is failed " );
ExtentReport.extentlog.log(LogStatus.FAIL, "Test case is failed " + result.getThrowable());
} else if (result.getStatus() == ITestResult.SKIP) {
ExtentReport.extentlog.log(LogStatus.SKIP, "Test case is Skiped " + result.getName());
}
ExtentReport.extentreport.endTest(ExtentReport.extentlog);
}
***************************CODE END********
Note: If anyone need help in designing framework or virtual support for Automation work then reach out to me @sidharth.shukla19@gmail.com/9619094122
***********************************
For training check the Training link as below:
Training Details
More content for Interview preparation:RestAPI
SQL Query Cucumber-BDD Linux Commands Maven GIT
TestNG@after@before
*************************************************
Learn (API-Microservice)Testing+(CoreJava+UI)-SDET with Self Paced Videos and one LIVE Doubt Session
Entire course content can be found below: COURSE CONTENTCheck below link for question and answers with code:
API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign
Java Related Interview Question Set
https://automationreinvented.blogspot.com/search/label/Java
GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT
Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions
No comments:
Post a Comment