- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 Cucumber 和 Java 设置一个自动化框架。我使用 Itellij IDEA 作为我的 IDE。到目前为止,我能够自动化测试用例。我阅读了 Xray 文档并意识到我应该使用 REST API 来更新 Xray 上的功能文件。
我使用过 Cucumber 和 C#,在 Visual Studio 上自动化了我的测试用例,并使用 Hooks 更新了 TFS 上的功能和执行状态。截至目前,我希望通过 Xray 使用 Java 实现相同的功能。
我做了一些研究,意识到我应该在用 Cucumber 编写的 Xray 上创建一个测试用例,然后将其导出以在 Intellij 上自动化,或者自动化测试用例并使用 Jenkins 在 Xray 上更新它们。
是否有解决方法或教程可供我遵循,以在 Intellij 上使用 Java 和 Cucumber 更新 Xray 上的功能?
最佳答案
对于那些遇到与我相同问题的人,这是我能够将 cucumber 特征导出到 Xray 的方法。您只需发送 Cucumber 功能文件的路径和 url,如下所示 - https://jira.yourdomain.com/rest/raven/1.0/import/feature其他参数都很好理解。
public static void importFeatureFilesToJira(String filePath, String resultTypeUrlValue){
String jiraUrl = config.getJiraLoginValue();
log.info(String.format("Starting upload of Cucumber features to XRAY on Jira project: %s\n Using Jira user: %s ", config.getJiraProjectValue(), config.getJiraLoginValue()));
log.info(String.format("Path to Report: %s", filePath));
String authentication = config.getJiraLoginValue() + ':' + config.getJiraPassword();
BASE64Encoder encoder = new BASE64Encoder();
String encoded = null;
try {
encoded = encoder.encode((authentication).getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
Client client = ClientBuilder.newBuilder()
.register(MultiPartFeature.class).property(HttpHeaders.AUTHORIZATION, encoded).build();
//Import type is dynamic below
StringBuffer url = new StringBuffer(resultTypeUrlValue);
url.append("?projectKey=").append(config.getJiraProjectValue());
WebTarget webTarget = client.target(url.toString());
log.info(String.format("URL of the XRAY API: %s", url.toString()));
MultiPart multiPart = new MultiPart();
multiPart.setMediaType(MediaType.MULTIPART_FORM_DATA_TYPE);
FileDataBodyPart fileDataBodyPart = new FileDataBodyPart("file",
new File(filePath),
MediaType.APPLICATION_OCTET_STREAM_TYPE);
multiPart.bodyPart(fileDataBodyPart);
Response response = webTarget.request(
MediaType.MULTIPART_FORM_DATA)
.accept(MediaType.APPLICATION_JSON).
header(HttpHeaders.AUTHORIZATION, "Basic " + encoded).post(
Entity.entity(multiPart, multiPart.getMediaType()));
log.info(response.getStatus() + " "
+ response.getStatusInfo() + " " + response);
int responseBody = response.getStatus();
String responseBodySting = response.toString();
try{
if(responseBody==200 && responseBodySting.contains("200")){
log.info("Cucumber features were uploaded successfully");
}
}catch (Exception e){
log.info("There was an error uploading the Cucumber feature file");
}
log.info("End of XRAY file upload publication");
}
关于java - 更新 Cucumber 功能并在 Jira 中的 Xray 上测试执行结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57711034/
如何在 jira 中查看用户每周完成/正在进行的任务? 提前致谢。 最佳答案 您的问题不是很清楚,完成/进行中 是什么意思?问题的状态?并说我如何查看您到底是什么意思?从吉拉看到他们?发送每周邮件?
我正在使用树莓派墙板在壁挂式屏幕上显示项目 jira 状态。为了使树莓派作为墙板工作,我遵循了 http://blogs.wcode.org/2013/09/howto-boot-your-raspb
当我将 jira 问题的状态更改为其他人应该处理它时,我是否应该更改 jira 问题中的受让人? 什么是常用方法? (请提供您想法的可靠来源) 最佳答案 这取决于您想要实现的目标。如果您使用 JIRA
我想知道我对用户故事的估计有多准确。 我在 Jira + Greenhopper 中记录了我的时间,并查看了时间 tracking reports但我不确定如何按个人用户过滤故事 最佳答案 我通过创建
很抱歉,如果SO不是最好的地方,但是我在JIRA中启用了时间跟踪功能,并且希望能够为给定日期范围内的每个用户生成时间报告。我唯一的时间跟踪报告选项非常有限,并且没有执行我想要的操作,是否可以通过标准功
我需要过滤在特定日期之后进入RTT状态的票证。这些票证将立即解决,但是我需要查看所有在日期后进入该票证的票证,无论其当前状态如何。 最佳答案 例如,查找在Open之后其状态从Closed变为2012/
在JIRA中,如何在所有项目中查找与用户相关的所有问题。 简单的查询搜索仅产生全文结果。即,仅在提及该名称的问题上,而不是在名称已分配,已报告,已抄送等情况下出现的问题。 我的目的是在这里查找与我相关
安装 Sonar JIRA plugin 后并重新启动 Sonar 服务器,我使用 Sonar Ant 任务中配置的以下属性运行分析: sonar.jira.url(未使用 HTTPS) sonar.
我错误地将问题从“未开始”移至“已完成”。有办法把问题移回来吗? 我宁愿让它“进行中”。 最佳答案 答案是肯定的,但您可能需要自定义工作流程以添加从“完成”状态到其他状态的转换。确保使用发布功能清除解
JIRA 在哪里保存与票证相关的附件?我只想备份 JIRA 站点上的屏幕截图图像和文档。它是否将其保存在 MySQL BLOB 列类型中? 最佳答案 根据JRA-23758 (现在是 JRA-1987
鉴于 JIRA 中的一个问题有多个评论,是否有一种简单的方法可以从一个评论链接到另一个评论? 我可以使用永久链接,但这是一个又长又难看的 URL。我还可以链接到例如http://jira.exampl
安装 Sonar JIRA plugin 后并重新启动 Sonar 服务器,我使用 Sonar Ant 任务中配置的以下属性运行分析: sonar.jira.url(未使用 HTTPS) sonar.
我有一个独立的 JIRA 实例在我的服务器上运行。我使用 atlas-mvn 命令构建了一个 jira 插件,这创建了一个 jar 文件。 通常的过程是登录到独立的 JIRA UI 并从 UPM 进行
有没有办法使用 python JIRA 库在 JIRA 中获取冲刺的开始和结束日期?我可以得到 jira.client.ResultList使用 jira.sprints(jira.boards()[
我们有一些学员,我们想给他们一些 JIRA 的介绍性任务。 我们使用的是 JIRA 4.4 版。 在 JIRA 中实现以下目标的最少侵入方式(如果可能,避免创建全局组或权限)是什么: 限制学员用户帐户
我是 JIRA 插件开发的新手,所以我的问题可能听起来太简单了,但请耐心等待并仔细阅读,因为我已经尝试了很多东西,在互联网上找到,但都没有奏效。这就是为什么我在这里问它,作为我最后的希望。 我想用 J
我已经为 Jira 7 开发了 Jira Server 附加组件/插件,现在需要将其安装到 Jira 的云实例中。但是在我的插件的市场页面上它说: This hosting is not availa
我使用这个请求创建了一个 Jira 搜索过滤器: POST /rest/api/2/filter 这工作得很好。现在在我创建过滤器后,我想自动订阅它。 有没有办法用 REST API 做到这一点?或者
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 3 年前。
要求人们给我分配 jira 任务以实现一些问题或修复错误,当我完成任务后,我将任务分配给一些测试人员。 现在我想知道在当前项目/版本中分配给我的任务是检查文档。任何想法如何做到这一点? jira 中的
我是一名优秀的程序员,十分优秀!