Details
We are currently working with Wiremock to work out our mocks. At the same time, we want to trigger an automation towards Jenkins via Jira and Xray + Cucumber.
The automation from Jira/Xray towards Jenkins will be realized via the Jenkins Connector.
Question:
Is there a possibility to automatically trigger the wiremock JSON files (i.e. the created mocks) in the direction of Jira/Xray?
How do I automatically link my JSOn file to the Xray test case from Wiremock?
I think WireMock is irrelevant for your goal :) From my understanding, you want to report automation results back to the correct Test entities (i.e. cucumber scenarios) in Xray. If that's the case, then you just need to submit the Cucumber JSON report back to Xray through the REST API or using, for example, the Jenkins connector to assist on that task.
Xray supports two different flows for Gherkin based frameworks, as mentioned here. So, you have to export the tests from Xray in order to generate .feature files that contain the scenarios/scenario outlines properly tagged with the issue keys of the corresponding Test issues. Whenever you run the tests, the cucumber JSON report will contain those tags which later on Xray will use to map the results back to the correct Test entities. Thus, you don't need to explicitly identify the test from the code as the .feature file will have a tag with it.