Closed MadhuQAAutomation closed 3 months ago
Hello, which data from the Courgette html report do you need to access from the Courgette runner?
You won't be able to access Courgette generated system properties via your Courgette runner because these properties are only generated during the test. However you should be able to access these properties in the tests.
Hello Prashant - I would need to retrieve the fields in the Run Information and Environment Information sections.
The fields in the run information are basically the same information you already have in your Courgette runner.
If you passing system properties or setting environment variables before the tests run then you will already have access to this using System.getProperties()
and System.getenv()
in the Courgette runner.
You should have access to the data using CourgetteRunInfo
class in your runner.
@CourgetteBeforeAll
public static void beforeRun() {
System.out.println("Session: " + CourgetteRunInfo.sessionId());
System.out.println("Environment info: " + CourgetteRunInfo.courgetteOptions().environmentInfo());
System.out.println("Cucumber tags: " + Arrays.toString(CourgetteRunInfo.courgetteOptions().cucumberOptions().tags()));
}
Thanks!. I will try this..
Hi Prashant - Is there a way to access the system and environment variables that are displayed in courgette html report through 'CourgetteTestStatistics' or 'CourgetteRunInfo' from the Courgette runner class.?