2024-09-26 18:12:08 发布
网友
如何使用pythonrestapi在azuredevops中更新测试结果? 我已经使用vsts python库连接了azurerestapi,我可以检索测试运行结果或测试运行,但我无法更新测试用例结果。如果有人知道这方面的知识,请帮忙。在
已连接模块用于测试检索测试运行vsts核心.v4_1.core_客户端.TestClient在
连接的模块应vsts.测试.v4_1.测试_客户端.TestClient{/not}
如果我们想更新测试结果,我们可以在test客户机中使用test_client.update_test_results()方法。 有关详细信息,请参阅Azure Devops Python Rest API source code。在
test_client.update_test_results()
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)
连接的模块应vsts.测试.v4_1.测试_客户端.TestClient{/not}
如果我们想更新测试结果,我们可以在test客户机中使用
test_client.update_test_results()
方法。 有关详细信息,请参阅Azure Devops Python Rest API source code。在相关问题 更多 >
编程相关推荐