Closed MaaikeFox closed 2 years ago
I've also tried it with a filter that contains the actual test case issues and not just the test set that contains the test cases. Still I get a 400 Bad request.
By the way, the import-features command is succesful:
mvn clean compile xray:import-features -Dxray.updateRepository=true
The export-features
and also the import-results
commands result in a 400 bad request
Hi @MaaikeFox ,
-Dxray.issueKeys= IDCONS-XXX
(please replace IDCONS-XXX by a issue key of some existing cucumber test you may have)We could try using curl
for example.
Can you create a cloud_auth.json with these contents (please replace xxx and yyy)
{ "client_id": "xxx","client_secret": "yyy" }
And then invoke these commands (please adjust the name of the cucumber json report file)
export token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" https://xray.cloud.getxray.app/api/v2/authenticate| tr -d '"')
curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer $token" --data @"cucumber.json" https://xray.cloud.getxray.app/api/v2/import/execution/cucumber
To see if that works or not. I'm not sure if it's viable, but it would help if you could share your cucumber json report here.
Meanwhile, I've created a branch with verbose mode marked for 0.7.0-SNAPSHOT- To run it, (after building & installing this locally)
mvn -X -Dxray.verbose=true ...
I've release a new version 0.7.0 with verbose mode. Have you tried my suggestions above?
Hi Sergio. Thanks a lot! I'm working on it. Since I'm not proficient with Java myself I have to rely a bit on a developer that needs to help me, since on intstalling the plugin I get this error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign (sign-artifacts) on project xray-maven-plugin: Execution sign-artifacts of goal org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign failed: Cannot invoke "org.apache.maven.plugins.gpg.GpgVersion.toString()" because "gpgVersion" is null -> [Help 1]
I've asked a developer on my team, but maybe you can quickly see why I cant install 0.7.0 version of the plugin? Since it is not yet on maven central, I can't yet just add it to the pom as plugin
Hi Maaike, for some reason it didn't get published to Maven Central. Let me check that.
Concerning the error you're having it's related to the local build process.. you should not need that (let me focus on making the plugin avaiable for 0.7.0)
Note: for building and installing a local copy, should be something like this mvn clean compile verify package install
Version 0.7.0 was published to Maven Central. May take a bit to be available.
Have you solved this? Can we close this issue?
It got a bit deprioritized because it took long to get it working. Currently working on it again.
I've had all three request running without errors, so good progress! But not all tests were run. This is probably an issue on our side, but I'm investigating this
Friendly reminder: if this is not a problem anymore and unless there is additional feedback, I'll close this issue for better management of this project
Hello
I hope you can help me out.
I'm using the plugin to get my java cucumber test results from code/pipeline into XRay
import-features now works
now for export-features: The command is:
mvn xray:export-features -Dxray.filterId=10031
Which results in 400 Bad request. With debugger I found out the error body (would be great if the plugin itself would show the error body on an error): {"error":"Error fetching filter information"}
The Jira filterId filters for the test set that contains the test cases that need to be exported after the import. I would expect this to work since it is an indirect reference to the test cases I need to export. Documentation states: "id of the Jira filter containing direct or indirect references to Cucumber/Gherkin tests/scenarios". This filter is created on the same user that is used for the API requests
So something is wrong with the filter, somehow. What should I do differently?
configuration in the pom.xml:
Thanks for helping me out