-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I add SystemInfo to reports? #51
Comments
The I will mark the color issue in the API. Ref: extent-framework/extentreports-java#144 |
Regarding system info, this is currently not possible through configuration files. However, you can use:
|
is there any special place to put this? in some class or annotation? |
I've add this into the Runner class with @afterclass and work as expected
|
Thank you very much! |
@vzenzo The SKIPPED color has been corrected in all charts. You have opened a new issue: https://github.com/extent-framework/extentreports-cucumber5-adapter/issues/1. Is this the same issue for cucumber4-adapter? |
The skip steps are with orange color but on circle they are blue cucumber4 adapter does not show hooks anymore, since 1.0.11 Edit: I have tried now with 1.0.12 and it shows some hooks |
Back to this issue, when I put @afterclass it does nothing, I have also tried with @AfterTest and @AftersSuite, none of them add SystemInfo, only way it works is if I put it into @after tear down method but then it repeats same info each scenario |
I do not see any blue circles in the screenshot. You can use this workaround to ensure the code inside this block executes only once: cucumber/cucumber-jvm#515 (comment) |
Sorry didn't place screenshot for that
What is the workaround here? There is so many things here I don't know where to start |
I've fixed the SystemInfo issue by putting it into @afterclass in a test runner |
@anshooarora @vzenzo I had modified the code to take in system info details from the extent-config.xml. |
this would be great! |
@grasshopper7 but it will also remain the possibility to add it from ExtentService instance? Because I'm adding dynamic data in system info and by adding it from config file only I don't see how can it be done. |
@zuzeac It should not interfere with adding of system info from code. Though I will test it out to make sure. |
@vzenzo @anshooarora How did you resolve this issue. I am facing the same issue. System info are appearing if I put them into @after hook and its repeating after every scenario. but it is not showing in report when I am putting them into @afterclass |
@VishalKTechnocredits make sure @afterclass is in the runner class. |
I created a PR which allows the system info to be picked up from extent.properties and also when passed in the maven command. #57 |
@grasshopper7 Thanks, I will check. |
When using extent reports I would just add extent.setSystemInfo("InfoField", "InfoString")
Can I do this in html-config.xml or sparl-config.xml?
I really need this as adapter simplified my code but the report is full of issues now
(reporting hook tags such as @afterstep, wrong colors in diagrams like skipped test is blue but check is yellow)
The text was updated successfully, but these errors were encountered: