It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to update testplan with rest api (possibly the docs are incorrect)? Edited

I have tm4j adapatavist plugin on jira - Test Management for Jira v6.7.2.

I am writing rest client for it according documentation https://support.smartbear.com/tm4j-server/api-docs/v1/

I have found that documentation for /testplan/{testPlanKey} completely incorrect.

When I try to send Json object similar the one from documentation,

server answered with:

java.util.concurrent.ExecutionException: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The field projectKey is unrecognized. Allowed fields are: name, objective, folder, customFields, status, testRuns, issueLinks, labels, owner., The field testRunKeys is unrecognized. Allowed fields are: name, objective, folder, customFields, status, testRuns, issueLinks, labels, owner.]}]}

So I made appropriate object with fields mentioned about, then server answered that <status field is required>. I added value for status field (but I need to update only testRuns)

But now I receive 500 without any status text.

Please help me to find correct rest api docs with which I can update testRunKeys (testCycles) in testPlan

1 answer

0 votes

If you can't include the test plan at the time of the testrun creation, there is no public api to update the traceability between the test run and test plan.

You might be able to do it with the internal/undocumented api.

rest/tests/1.0/tracelink/bulk/create

With a payload that looks like this:

{"testPlanId: 123, "testRunId: 456, "type": {"isDefault": "true", "name": "Related", "index": "0", "systemKey":"RELATED"}}

Confirm the payload by using Chrome developer tool while adding the link in the UI and examine the request.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Announcing the winners of Codegeist 2020

Hey team! We brought back Codegeist in a big way this year, and today, we’re thrilled to announce the winners. 🎉 Thank you to everyone who participated in Codegeist 2020. This year, we go...

247 views 5 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you