-
-
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
Add support for influencing history id based on environment properties #494
Comments
It is actually influenced by environment. It happens when generating the unique id string based on the passed example id: https://github.com/allure-framework/allure-ruby/blob/master/allure-ruby-commons/lib/allure_ruby_commons/model/test_result.rb#L27 So the problem must be something else. |
Thanks for taking a look 👍 With fresh eyes; I believe the current implementation is honoring For context I believe this was the example I originally followed from the docs: allure-ruby/allure-rspec/README.md Lines 21 to 45 in ae01956
Current values:
I would have expected the ![]() Let me know if this is user error, or something that needs to be tweaked 👍 |
cc: @baev I have not been following super closely how other adapters implement similar functionality lately, maybe there is something to improve here? |
That's my exact scenario 👍 I'm testing the same library code by running the same test suite against different operating systems and ruby combinations with Github action's matrix support |
The main problem is that The default before do |example|
example.parameter("ruby", "3.1")
example.parameter("os", "darwin20")
end Full list of parameters is still not taken in to account when generating history_id which actually is a bug now that I think about it. |
Thanks for pointing that API out, my parameters are now correctly tracked in the UI now - but the history id still isn't changed based on those values as you say 👍 |
One more solution that might be useful, is to allow passing a more complex json string in to Or rather it can be hash if it's passed programmatically, or json string if passed via environment variable. It would allow a bit more flexibility. |
Scenario:
When running the same test suite against in parallel against different host operating systems (i.e. mac/linux/windows), I noticed that the some test results were missing from the generated
suites
page after generating the allure report - but the test runs were available in the timeline viewI tracked this down to the results
historyId
being re-used multiple times across my runners:Digging deeper, I noticed that the value being generated is based on the
example.id
, i.e."./spec/acceptance/foo_spec.rb[1:2:1:1:11:1]
- which won't be unique when running the test suite on different github action runners in parallel against windows/linux/macosallure-ruby/allure-rspec/lib/allure_rspec/formatter.rb
Line 109 in ec4f990
It would be great if we could influence the history id in some capacity, so that the environment properties could be considered too
The text was updated successfully, but these errors were encountered: