我试着在testrail中集成黄瓜场景,但是我找不到一些解决方案,如果有人集成它,可以帮助吗?我有用java黄瓜编写的场景,需要在testrail中集成它。如果可能的话。我尝试使用文档中的api,但是它不是工作,或者我有一些错误。
public static String TEST_RUN_ID = "5400";
public static String TESTRAIL_USERNAME = "username";
public static String TESTRAIL_PASSWORD = "password";
public static String RAILS_URL = "url";
public static final int TEST_CASE_PASSED_STATUS = 1;
public static final int TEST_CASE_FAILED_STATUS = 5;
public static void addResultForTestCase(String testCseId, int status,
String error) throws IOException, APIException {
String testRunId = TEST_RUN_ID;
APIClient client = new APIClient(RAILS_URL);
client.setUser(TESTRAIL_USERNAME);
client.setPassword(TESTRAIL_PASSWORD);
Map data = new HashMap();
data.put("status_id", status);
data.put("comment", "Test Executed - status updates automatically");
client.sendPost("add_result_for_case/" + testRunId+ "/" + testCseId + "", data);
}
}```发布于 2022-07-28 17:59:55
您可能想看看铁道流 --它可以解析Cucumber JSON报告,并在TestRail中创建/更新测试和测试运行。
我是TestRail的开发者
https://stackoverflow.com/questions/73049887
复制相似问题