Selenium Testrail集成
我是TestRail工具的新手,希望将所有Selenium自动化测试用例与TestRail集成。我在excel工作表中有100多个测试用例,使用SeleniumWebDriver+Java+TestNg运行 若我运行Selenium项目中的任何测试用例,那个么结果应该会反映在TestRail报告中。在internet上四处查看,我发现了以下URL: .Selenium Testrail集成,selenium,testrail,Selenium,Testrail,我是TestRail工具的新手,希望将所有Selenium自动化测试用例与TestRail集成。我在excel工作表中有100多个测试用例,使用SeleniumWebDriver+Java+TestNg运行 若我运行Selenium项目中的任何测试用例,那个么结果应该会反映在TestRail报告中。在internet上四处查看,我发现了以下URL: . 但它没有告诉我如何在我的Selenium项目中使用。基本上,我想知道如何使用它以及在哪里保存代码。另外,如果我从TestRail方面以及Sel
但它没有告诉我如何在我的Selenium项目中使用。基本上,我想知道如何使用它以及在哪里保存代码。另外,如果我从TestRail方面以及Selenium Java代码中获得详细的示例,那么理解代码将更有帮助。您可以遵循TestRail的API文档: 并且必须创建自己的RESTful服务,该服务将依赖于Testrail API 我已经用他们的文档创建了到Testrail的连接,并为每个操作添加了JSON(类)模型 例如,获取测试用例 请求:
GET index.php?/api/v2/get_test/:test_id
response:
答复:
{
"assignedto_id": 1,
"case_id": 1,
"custom_expected": "..",
"custom_preconds": "..",
"custom_steps_separated": [
{
"content": "Step 1",
"expected": "Expected Result 1"
},
{
"content": "Step 2",
"expected": "Expected Result 2"
}
],
"estimate": "1m 5s",
"estimate_forecast": null,
"id": 100,
"priority_id": 2,
"run_id": 1,
"status_id": 5,
"title": "Verify line spacing on multi-page document",
"type_id": 4
}
json模型:
public class Test {
private static final String CUSTOM_FIELD_KEY_PREFIX = "custom_";
private int id;
private int caseId;
private Integer assignedtoId;
private String title;
private int statusId;
private int typeId;
private int priorityId;
private Integer milestoneId;
private Integer runId;
private String refs;
private String estimate;
private String estimateForecast;
private Map<String, Object> customFields;
public Map<String, Object> getCustomFields() {
return customFields;
}
公共类测试{
私有静态最终字符串自定义\字段\密钥\前缀=“自定义\字段”;
私有int-id;
私人内部案例ID;
私有整数赋值toid;
私有字符串标题;
私有int statusId;
私有int-typeId;
私人优先权;
私有整数milestoneId;
私有整数runId;
私有字符串引用;
私有字符串估计;
私有字符串估计预测;
私有地图字段;
公共映射getCustomFields(){
返回自定义字段;
}
但最简单的方法可能是直接发送请求和解析响应,并围绕它创建一个小型服务。您可以遵循Testrail的API文档: 并且必须创建自己的RESTful服务,该服务将依赖于Testrail API 我已经用他们的文档创建了到Testrail的连接,并为每个操作添加了JSON(类)模型 例如,获取测试用例 请求:
GET index.php?/api/v2/get_test/:test_id
response:
答复:
{
"assignedto_id": 1,
"case_id": 1,
"custom_expected": "..",
"custom_preconds": "..",
"custom_steps_separated": [
{
"content": "Step 1",
"expected": "Expected Result 1"
},
{
"content": "Step 2",
"expected": "Expected Result 2"
}
],
"estimate": "1m 5s",
"estimate_forecast": null,
"id": 100,
"priority_id": 2,
"run_id": 1,
"status_id": 5,
"title": "Verify line spacing on multi-page document",
"type_id": 4
}
json模型:
public class Test {
private static final String CUSTOM_FIELD_KEY_PREFIX = "custom_";
private int id;
private int caseId;
private Integer assignedtoId;
private String title;
private int statusId;
private int typeId;
private int priorityId;
private Integer milestoneId;
private Integer runId;
private String refs;
private String estimate;
private String estimateForecast;
private Map<String, Object> customFields;
public Map<String, Object> getCustomFields() {
return customFields;
}
公共类测试{
私有静态最终字符串自定义\字段\密钥\前缀=“自定义\字段”;
私有int-id;
私人内部案例ID;
私有整数赋值toid;
私有字符串标题;
私有int statusId;
私有int-typeId;
私人优先权;
私有整数milestoneId;
私有整数runId;
私有字符串引用;
私有字符串估计;
私有字符串估计预测;
私有地图字段;
公共映射getCustomFields(){
返回自定义字段;
}
但最简单的方法可能是直接发送请求和解析响应,并围绕它创建一个小型服务。可能的重复