elastic / apm

Elastic Application Performance Monitoring - resources and general issue tracking for Elastic APM.
https://www.elastic.co/apm
Apache License 2.0
384 stars 114 forks source link

Distinguish outcome step and setup step definition #550

Closed eyalkoren closed 3 years ago

eyalkoren commented 3 years ago

It's problematic that both a scenario condition (Given/And) and the expected result (Then) use the same step definition. Not sure how it is in other languages, but in Java you cannot use the same step definition for different keywords. If the intention is that both steps will check the span/transaction outcome, then this doesn't work as well because, at least in the Java agent, the outcome is only set when the span/transaction is ended (it would return unknown before). Applying this change should resolve this problem.

apmmachine commented 3 years ago

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

#### Build stats * Start Time: 2021-11-19T05:20:00.533+0000 * Duration: 6 min 26 sec * Commit: 13914530d38ea2ac96c8024c892a12b2fa826651

eyalkoren commented 3 years ago

How does the java runner differentiate steps?

Seems like it's based on the step definition itself alone. It would apply a step defined with @Then to a Given step if they use the same wording.