Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get sortkey of testcases in a testplan through XML-RPC API #444

Closed
soul916 opened this issue Jul 23, 2018 · 4 comments
Closed

Can't get sortkey of testcases in a testplan through XML-RPC API #444

soul916 opened this issue Jul 23, 2018 · 4 comments

Comments

@soul916
Copy link

soul916 commented Jul 23, 2018

Description of problem

When use XML-RPC API create testruns, can't get sortkey of testcases from testplan

Component (web, API, etc)

API

Version or commit hash (if applicable)

4.2

How often reproducible

Always

Steps to Reproduce

1.use rpc_client.TestCase.filter({'plan': planid]}) get testcases from a testplan
2.use rpc_client.TestRun.create create a new testrun
3.use rpc_client.TestRun.add_case(testrunid, testcaseid) add testcases to the new testrun

Actual results

The sortkey lost in all testcases of the new testrun, can't find a way to read the sortkey of testcases from a testplan.

Expected results

Need a method read the sortkey of testcases from a testplan.

Additional info

NA

@soul916 soul916 changed the title Can't get testplan testcase sortkey value from XML-RPC API Can't get softkey of testcases in a testplan through XML-RPC API Jul 23, 2018
@soul916 soul916 changed the title Can't get softkey of testcases in a testplan through XML-RPC API Can't get sortkey of testcases in a testplan through XML-RPC API Jul 23, 2018
@atodorov
Copy link
Member

Need a method read the sortkey of testcases from a testplan.

Why do you need this ? What is your use-case ?

@soul916
Copy link
Author

soul916 commented Jul 30, 2018

@atodorov Thanks for the reply.
I use kiwi for full automatic testing. When a new build available, I use XML-RPC API create test run then run test cases. Because some test cases must run in fixed sequence, I set the sort key in test plan. When I create the test run through XML-RPC I found the sort key lost and test cases return by the caseid order. I can’t get the sort key from XML-RPC that cause the auto testing always failed.

@atodorov
Copy link
Member

@soul916 do you have your test cases added to a TestPlan before you start adding them to TestRun via the API ?

I think it will be much more beneficial to have an API method that creates a TestRun from a TestPlan and uses all the test cases from the plan instead of adding them one by one.

@soul916
Copy link
Author

soul916 commented Jul 31, 2018

@atodorov Yes, you are right, an API create TestRun from a TestPlan is more convenient.
I added all testcases to testplan before create testrun.
At present the TestRun.create API only create the testrun without any cases added.
I can only add cases one by one now, and the sortkey lost after cases added.

atodorov added a commit that referenced this issue Oct 8, 2020
Returns information about TestCase position inside TestPlan.

For example `TestCase.sortkeys({'plan': 3})`
atodorov added a commit that referenced this issue Oct 9, 2020
Returns information about TestCase position inside TestPlan.

For example `TestCase.sortkeys({'plan': 3})`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants