Skip to content
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

Include SourceReferences in message output #2064

Merged
merged 1 commit into from Jul 29, 2020

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jul 23, 2020

Cucumber JVM can not reference files by URI. So it should use either java
methods or stack trace elements as a source reference instead.

For example:

{
  "hook": {
    "id": "a1839ec6-f75d-4029-9b75-4b8203d8b2e8",
    "sourceReference": {
      "javaMethod": {
        "className": "io.cucumber.compatibility.attachments.Attachments",
        "methodName": "before",
        "methodParameterTypes": [
          "io.cucumber.java.Scenario"
        ]
      }
    }
  }
}

See: cucumber/common#1119
Fixes: #2058

@mpkorstanje mpkorstanje force-pushed the 2058-add-source-reference branch 2 times, most recently from 627df73 to 088ae40 Compare July 29, 2020 18:26
@mpkorstanje mpkorstanje marked this pull request as ready for review July 29, 2020 18:30
@coveralls
Copy link

coveralls commented Jul 29, 2020

Coverage Status

Coverage decreased (-0.1%) to 86.2% when pulling c45bd86 on 2058-add-source-reference into 239460b on main.

@mpkorstanje mpkorstanje force-pushed the 2058-add-source-reference branch 2 times, most recently from c564dd1 to 20c09d9 Compare July 29, 2020 19:22
Cucumber JVM can not reference files by URI. So it should use either java
methods or stack trace elements as a source reference instead.

For example:

```
{
  "hook": {
    "id": "a1839ec6-f75d-4029-9b75-4b8203d8b2e8",
    "sourceReference": {
      "javaMethod": {
        "className": "io.cucumber.compatibility.attachments.Attachments",
        "methodName": "before",
        "methodParameterTypes": [
          "io.cucumber.java.Scenario"
        ]
      }
    }
  }
}
```

See: cucumber/common#1119
Fixes: #2058
@mpkorstanje mpkorstanje merged commit 1950f2d into main Jul 29, 2020
@mpkorstanje mpkorstanje deleted the 2058-add-source-reference branch July 29, 2020 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StepDefinition and Hook method names from ndjson report
2 participants