Introduction
Suppose, if I create a new Test (lets name that TEST-100) in Jira and then I push the same to Gitlab to utilize this in a CI pipeline.
Now, if I have move this TEST-100 to folder "Root/Technical" in Gitlab, the test should also move to the XRAY Test Repository "Root/Technical".
Already Tried
I have tried to follow the steps mentioned in https://docs.getxray.app/display/XRAY/Test+Repository+-+REST but not much success has been achieved.
I have already to send the request as
curl -i -H "Content-Type: application/json" -X PUT -u $jira_user:$jira_password --data '{"tests":[{"rank": 1,"id": 29600,"key": "TEST-120","summary": "Test Summary Headline - TEST 100","priority": "Lowest","assignee": "User123","workflowStatus": "ACTIVE","components": [],"testType":"Cucumber"}]}' "https://jiraserverhost.com/rest/raven/1.0/api/testrepository/FP/folders/5/tests"
but got HTTP 500 error
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>Unrecognized field "tests" (Class com.xpandit.raven.rest.api.beans.CollectionBean), not marked as ignorable
at [Source: org.apache.catalina.connector.CoyoteInputStream@240d5c9d; line: 1, column: 11] (through reference chain: com.xpandit.raven.rest.api.beans.CollectionBean["tests"])</message><stack-trace>org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "tests" (Class com.xpandit.raven.rest.api.beans.CollectionBean), not marked as ignorable
at [Source: org.apache.catalina.connector.CoyoteInputStream@240d5c9d; line: 1, column: 11] (through reference chain: com.xpandit.raven.rest.api.beans.CollectionBean["tests"])
at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
at org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673)
at org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659)
at org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365)
at org.codehaus.jackson.map.deser.BeanDeserializer._handleUnknown(BeanDeserializer.java:725)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:703)
I have already tried to send the data for the request in Base64 encoded as below, but still getting the same error
curl -i -H "Content-Type: application/json" -X PUT -u $jira_user:$jira_password --data 'eyJ0ZXN0cyI6W3sicmFuayI6IDEsImlkIjogMjk2MDAsImtleSI6ICJURVNULTEwMCIsInN1bW1hcnkiOiAiVGVzdCBTdW1tYXJ5IEhlYWRsaW5lIC0gVEVTVCAxMDAiLCJwcmlvcml0eSI6ICJMb3dlc3QiLCJhc3NpZ25lZSI6ICJVc2VyMTIzIiwid29ya2Zsb3dTdGF0dXMiOiAiQUNUSVZFIiwiY29tcG9uZW50cyI6IFtdLCJ0ZXN0VHlwZSI6IkN1Y3VtYmVyIn1dfQ==' "https://jiraserverhost.com/rest/raven/1.0/api/testrepository/FP/folders/5/tests"
How can I alter this? or
What changes do I need to do to make this request successful?