Open gvreddyreddy opened 5 years ago
Do you means report generation process or for automation test scripts. Can you elborate this! FYI we are using listener to get info like test case, status, error message and counts
I think the ask here is to add a log4j report which can be used for logging the information of the execution and other details @adiralashiva8 . I will add it send a PR.
@nainappa Its a good feature to have, but main moto of testng-metrics is #nocodechanges #required, I feel this feature may change our moto. Is it really valuable feature to have!
@adiralashiva8 The testng-metrics report shows metrics, TestNG logs etc. But if the users wants to have comprehensive loggings, they will have to use log4j anyways. Instead testng-metrics can provide log4j report as well. Users don't have to do any code changes. We can just provide methods like logger.info(), logger.debug() etc. They can use these methods to log any information needed. We can generate this log4j file in the same folder where testng-metrics report is generated. We can even add link to the report in the testng-metrics report or even add the entire logs into the report. However call is yours. These are just my views.
@nainappa Is this is similar to index.html we are displaying in testng-metrics? If yes then I'm good to have this feature in metrics report
@adiralashiva8 Yes, this is more like index.html. But it is a .log file which is generated based on the users logs and it is a industry standard practice. In case if you don't want to provide this option, users can still have logs in index.html itself. We have a method from TestNG called Reporter.log(). @gvreddyreddy you can try using this method for logs. Please refer http://seleniumocean.blogspot.com/2014/08/enrich-your-reportng-report-with.html or https://www.toolsqa.com/selenium-webdriver/testng-reporters-asserts/
Thank you @nainappa will look into it
Thank you guys we are all in same page. I will provide example so that understand better way. For example i have raised one that is Dashboard count coming as correct all scenarios not displaying in the report so we assumed count is wrong like ignored test cases. We can't show all the information in the report but we can show them in the log file. For example , we can show all the types of test cases count pass, fail, skip , ignore and etc and all the Test cases names that are coming in Isuite listener. So that if thing happend wrong in that report no need to go project and debug we can get information from loggers this is mainly used for the developers while developing code or debugging issues they will enabled that feature .
Regarding ignored count couple of users reported the same, so I have made changes to display info and changes are in v1.4
It would be better if we show ignored methods in Test Metrics other wise people don't know what method s been ignored.
Please add LOG4J for the application so that any one can easily found where the issue occurred and flow of the application.