Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added extract all parameter to test_plan_client method#515

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
omixximo wants to merge1 commit intomicrosoft:dev
base:dev
Choose a base branch
Loading
fromomixximo:getTestSuitesForPlanExtractAll

Conversation

omixximo
Copy link

As I was using the library I realized that I was not getting all test suites of my project. After a fast search I found that the API only returns stacks of 200 records.

When using the "get_test_suites_for_plan" method I can pass the "continuation_token" but there is not a easy way of obtaining this token unless duplicating the method.

I suggest to add a parameter to automatically call the API multiple times when a continuation token is returned by the API.

This can be applied to other methods like "get_test_plans" and maybe it must be replicated to the other "test_plant_client.py" classes.

@@ -361,6 +361,9 @@ def get_test_suites_for_plan(self, project, plan_id, expand=None, continuation_t
version='7.0',
route_values=route_values,
query_parameters=query_parameters)
if extract_all and 'x-ms-continuationtoken' in response.headers:
continuation_token = response.headers['x-ms-continuationtoken']
return self._deserialize('[TestPlan]', self._unwrap_collection(response)) + self.get_test_plans(project, plan_id, expand=expand, continuation_token=continuation_token, as_tree_view=as_tree_view, extract_all=True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The response is being deserialized usingself._deserialize('[TestPlan]', ...). I believe this should beself._deserialize('[TestSuite]', ...) to match the method's return type and the API response structure.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Also the recursive call is made toself.get_test_plans(...). I believe it should be callingself.get_test_suites_for_plan(...) to fetch the next page of test suites. If i am correct (which i might not be) then due to calling the wrong method (get_test_plans), the arguments are mismatched.plan_id is passed whereowner is expected.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@a-holma-holma-holm left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@omixximo@a-holm

[8]ページ先頭

©2009-2025 Movatter.jp