如何通过编码Web测试获得测试运行ID [英] How get test run id from coded web test

查看:71
本文介绍了如何通过编码Web测试获得测试运行ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个编码网络测试,我通过负载测试运行。我正在将一些自定义诊断文件上传到Azure blob。要获取这些文件的下载详细信息,我首先打电话给


https://testvsonlineaccount.vsclt.visualstudio.com/_apis/clt/TestRuns


返回所有最近测试运行的列表,其中包含运行ID。接下来,我将运行ID复制/粘贴到


https://testvsonlineaccount.vsclt.visualstudio.com/_apis/clt/TestRuns/ < runid> /结果?[pi-version = 4.1-preview


我可以从结果中提取下载网址。


现在为了方便我自己想在运行时获取测试的runid,以便我可以将它添加到测试结果注释中,这样当我打开测试结果时我可以看到runid。有没有办法做到这一点?我们可以通过编码的webtest访问某个对象层次结构,测试运行ID是否可以获得



谢谢。

解决方案

Hi SaadUU,


你使用哪种类型的负载测试,
基于云的内部部署


如果是基于云的负载测试,由于权限的限制,我们无法在运行时获取测试的runid。
我们只能通过
测试结果
rest api。


如果它是内部部署负载测试,您可以从$获取runid b $ b
VS 2010负载测试数据库


感谢您的支持理解。


问候,


Judyzh

Hi, I have a coded web test which I am running via a loadtest. I am uploading some custom diagnostic files to Azure blob. To obtain the download details of these files I firstly call

https://testvsonlineaccount.vsclt.visualstudio.com/_apis/clt/TestRuns

which returns a list of all recent test runs, with details including the run id. Next I copy/paste the run id into

https://testvsonlineaccount.vsclt.visualstudio.com/_apis/clt/TestRuns/<runid>/results?a[pi-version=4.1-preview

and I can extract the download URLs from the results.

Now to make things easier for myself I would like to obtain the runid of the test at runtime, so that I can add it to test results comments, so that when I open the test results I can see the runid. Is there any way to do this? Is the test run id obtainable from some object hierarchy we can access via the coded webtest?

Thanks.

解决方案

Hi SaadUU,

Which type of the load test do you use, Cloud-based or On-premise?

If it’s Cloud-based load test, due to restrictions on permissions, we could not obtain the runid of the test at runtime. We only could obtain the runid via test results rest api.

If it’s On-premise load test, you could obtain the runid from VS 2010 Load Test database.

Thanks for your understanding.

Regards,

Judyzh


这篇关于如何通过编码Web测试获得测试运行ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆