我正在尝试使用下面的REST API从ALM获取现有的手动测试步骤
但我得到了以下结果。
{
"creation_time": "2020-01-16T14:36:52Z",
"test_version": "{\"id\":1035,\"type\":\"test_version\"}",
"version_stamp": 5,
"last_modified": "2020-01-17T09:38:20Z",
"script": "- Open Browser\n- Type Username\n- Type PAssword\n- Submit\n- @2012 Call <ReqTest1>\n- Login using <Username> and <Password>\n- ?isLoginSuccesfull"
} 有没有办法通过REST API获取现有手动测试步骤的详细信息(如id、描述等)?
发布于 2020-08-13 22:58:24
我知道这晚了六个月,但您可以尝试调用实体测试
http://URLdirection:PORT/api/shared_spaces//workspaces//tests?fields=id,latest_version&query=%22(id%3D%27yourTestId%27)%22
一旦有了最新版本,就可以使用上次请求中获得的last_version属性调用entity test_versions
http://URLdirection:PORT/api/shared_spaces//workspaces//test_versions?fields=id,script&query=%22(id%3D%27yourVersionID%27)%22
在那里你将得到步骤,而且你必须考虑在做这件事之前,你需要有稳定的连接(请求的cookies,等等)用于避免403错误和正确设置请求的头部和参数。如果你使用的是microfocus库,我没有发现任何对test_versions实体的直接调用
编辑:您也可以请求http://URLdirection:PORT/api/shared_spaces//workspaces//test//script
https://stackoverflow.com/questions/59791333
复制相似问题