You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build an e2e test automation solution using TestNG, extentreports and this adapter. I like using the extentreports test logger in the test methods I am using like so:
However, the problem comes if I want to use the performAction1() as a setup, like when it makes sense that all tests in the suite perform this action before the actual test starts:
This will obviously fail, because ExtentTestManager.getTest() will return null when we are in the @before method.
Is there a graceful way to include the ExtentTest.log() method in @before methods?
Alternatives I have considered:
I have already considered switching to org.testng.Reporter.log() together with the ExtentIReporterSuiteClassListenerAdapter listener. But then, the logs are not shown in the Test view (Spark Reporter), which I find a bit inconvenient when investigating the report.
I have also tried cheating by extending the @before method like so
Hi there,
I am trying to build an e2e test automation solution using TestNG, extentreports and this adapter. I like using the extentreports test logger in the test methods I am using like so:
However, the problem comes if I want to use the performAction1() as a setup, like when it makes sense that all tests in the suite perform this action before the actual test starts:
This will obviously fail, because
ExtentTestManager.getTest()
will returnnull
when we are in the @before method.Is there a graceful way to include the
ExtentTest.log()
method in @before methods?Alternatives I have considered:
I have already considered switching to
org.testng.Reporter.log()
together with theExtentIReporterSuiteClassListenerAdapter
listener. But then, the logs are not shown in the Test view (Spark Reporter), which I find a bit inconvenient when investigating the report.I have also tried cheating by extending the @before method like so
However, then testSomething will appear as two tests in the log
The text was updated successfully, but these errors were encountered: