如何使用pythonrestapi在azuredevops中更新测试结果?

2024-09-26 18:12:08 发布

您现在位置:Python中文网/ 问答频道 /正文

如何使用pythonrestapi在azuredevops中更新测试结果? 我已经使用vsts python库连接了azurerestapi,我可以检索测试运行结果或测试运行,但我无法更新测试用例结果。如果有人知道这方面的知识,请帮忙。在

已连接模块用于测试检索测试运行vsts核心.v4_1.core_客户端.TestClient在


Tags: 模块core客户端核心测试用例v4testclientvsts
1条回答
网友
1楼 · 发布于 2024-09-26 18:12:08

连接的模块应vsts.测试.v4_1.测试_客户端.TestClient{/not}

如果我们想更新测试结果,我们可以在test客户机中使用test_client.update_test_results()方法。 有关详细信息,请参阅Azure Devops Python Rest API source code。在

personal_access_token = 'xxx'
organization_url = 'https://dev.azure.com/{organization}'
# Create a connection to the org
credentials = BasicAuthentication('', personal_access_token)
connection = VssConnection(base_url=organization_url, creds=credentials)
test_client = connection.get_client('vsts.test.v4_1.test_client.TestClient')
update_testResults = test_client.update_test_results(testresults,projectName,run.id)

相关问题 更多 >

    热门问题