You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: map Gherkin scenarios to SVCs from tags in .feature files #486
For Gherkin-based tests (Cucumber, Karate), the link between an SVC and a test result has to be written by hand. There is no annotation processor for .feature files, so annotations.yml must list every SVC with a fullyQualifiedName that matches what the test engine happens to write into the JUnit XML.
That name is not obvious and differs per engine:
Cucumber on the JUnit Platform writes the feature file's classpath path as classname (for example feature_classpath_features/orders.feature) and the scenario title as name. The Feature: title is not used.
Karate writes names like [1.1:23] Scenario title, which reqstool already parses.
To make the default JUnit rule pick up a Cucumber scenario, the SVC id has to be the first word of the scenario title (Scenario: SVC_CORE_0001 orders over the limit are rejected), and the hand-written entry must match the engine's classname exactly. A wrong guess silently shows the SVC as "automated test missing".
Desired solution
Let reqstool read SVC tags from .feature files and build the test annotations itself:
@SVC_CORE_0001Scenario: orders over the limit are rejected
For example, a new resource in reqstool_config.yml:
reqstool would map each tagged scenario to the test name its engine writes (Cucumber and Karate formats), so annotations.yml is no longer needed for these tests and scenario titles stay free text. Scenario Outline rows would count as results of the same SVC.
Alternatives considered
Keep the SVC id as the first word of the scenario title and write annotations.yml by hand: works, but is fragile and easy to get wrong.
Convert Gherkin tests to JUnit and use @SVCs: the best fit where possible, but not always an option.
Activity