Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,517
Community Members
 
Community Events
184
Community Groups

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
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 01, 2020

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.

Hi. 

I’m currently working on some integration tool between test automation framework and Zephyr.

I found that official Zephyr public API has limitations which don’t allow me to do whats needed. Still it can be done using undocumented API.

From your reply I can see you have understanding about how internal API works.


I realize it’s called undocumented for a reason but maybe you could give me a hint where I could find some additional information about it other than reverse engineer it using browser tools?

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 23, 2021

Reverse engineering using browser developer tools is exactly how I came to my understanding.

Do an action in the browser with developer tools open, examine the URL and payload in the network request tab. 
Try to make the same or similar call in postman or other similar tool. 
Rinse and repeat

Like John Okoroukwu likes this

OK, I’ve been doing it the same way.

Just thought you might know where to get some docs on the internal API to save the time.


Thank you for a quick feedback.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events