prashant-ramcharan / courgette-jvm

Multiprocess | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level.
MIT License
131 stars 38 forks source link

Query : How to read CougretteOption using java code #306

Closed mtaus06 closed 2 years ago

mtaus06 commented 2 years ago

I am using 'io.github.prashant-ramcharan:courgette-jvm:5.12.0' .

CougretteOption can be set by hard coding in Runner class with using @CourgetteOptions. Also CougretteOption can be overridden from gradle/maven.

1) I want to read CougretteOption which is used at runtime using java code in @CourgetteAfterAll method, so i can add in Allure environment.properties . It will show the ThreadCount, Tags etc in the Allure report.

2) Also the extent report generated by Cougrette using plugin = { "extentreports" }, does include any Cougrette Options parameters in Environment section of the report. Any suggestion on how to add these properties.

Can you please help on these two queries.

Thanks in Advance.

prashant-ramcharan commented 2 years ago

Hi,

  1. If you passing the Courgette options at runtime then you can lookup the threads using System.getProperty("courgette.threads").

    I will consider exposing a Courgette runtime object to return these values to make it easier.

  2. The Courgette Options are not included in the extent report as per the current implementation.

    I will have to update Courgette to include this information in the extent report.

mtaus06 commented 2 years ago

Thanks Prashant. You can close this ticket.

prashant-ramcharan commented 2 years ago

This now released in Courgette 6.3.0

Access to Courgette run info https://github.com/prashant-ramcharan/courgette-jvm#courgette-run-information

System and environment info in Extent Reports

Screenshot 2022-01-20 at 21 01 36
mtaus06 commented 2 years ago

Thanks Ramcharan.