I have a listener class which is implementing ITestListener
in which am initializing few variables to get the total test results pass/failed skipped etc. as follows:
int testPassed = context.getPassedTests().getAllResults().size();
int testFailed = context.getFailedTests().getAllResults().size();
int testSkipped = context.getSkippedTests().getAllResults().size();
int totalTests = testPassed + testFailed + testSkipped;
I want to use these variables in my pom.xml
and then use those variables in turn to write a customized text file which we will be sending in the email body.
Is there any way out to do such thing ? Or we have to only write in a file using JAVA itself.