TestNG console output into log4j.log
问题 I need to get output result (FAIL or SUCCESS) into log4j output. Assert.assertTrue(availresponse); Is there any way to add TestNG console output into log4j.log file? 回答1: I found a simple, easy and perfect way to log TestNG output into log4j.log file. But this can't be log Final Report Details into log4j (PASS or FAIL). implements ITestListener Then add unimplemented methods public void onTestSuccess(ITestResult result) { logger.info(result); } public void onTestFailure(ITestResult result) {