Extent: Add Class name to Test Success

Clash Royale CLAN TAG #URR8PPP Extent: Add Class name to Test Success I want to add Test Class Name and Method Name into extent report as highlight in the picture. I want to change the loginInvalid to ClassName::Method name. I tried with following but no success. @Override public synchronized void onTestSuccess(ITestResult result) System.out.println(result.getMethod().getMethodName() + " passed!"); test.get().pass(result.getTestContext().getClass().getName() + " Test passed"); Please help. Thanks in advance. 2 Answers 2 String feature = result.getMethod().getRealClass().getName() + ":" + result.getMethod().getMethodName(); ExtentTest extentTest = extent.createTest(feature, result.getMethod().getDescription()); extentTest = extentReport.createTest(this.getClass().getSimpleName() + "::" + Thread.currentThread().getStackTrace()[1].getMethodName()); By clicking "Post Your Answer", you acknowledge that you have read our update...