启用并行执行并通过maven命令完成执行时获取总执行时间 [英] Fetching Total Execution time when parallel execution enabled and execution done through maven command

查看:62
本文介绍了启用并行执行并通过maven命令完成执行时获取总执行时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题与这篇文章有点类似-参考.我的管理层还担心总执行时间,因为在接下来的几天中,方案的数量将会更多,所以如果我能在黄瓜报告中展示总执行时间,那将是很棒的.请在下面找到我的统计信息

My problem is kind of same as in this post - Reference. My management is also concerned about the total execution time as number of scenarios going to be more in coming days, so it would be great if I can showcase Total execution time on cucumber report. Please find my stats below

使用结果"中的getElapsedTime(),我得到的时间是17.39秒

By using getElapsedTime() from Results, I am getting is 17.39 seconds

使用结果"中的getTimeTakenMillis(),我得到的是240.39秒

By using getTimeTakenMillis() from Results, I am getting is 240.39 seconds

我的问题是,为什么经过时间(17.39秒)和总时间(1:03分钟,在BUILD SUCCESS下)有如此大的差异?

My question is, why elapsed time(17.39 seconds) and total time(1:03 min- Under BUILD SUCCESS) is having so much difference?

我正在寻找的实际执行时间是1:03分钟,该时间显示为建造成功"下的总时间.如何获取此值以显示在黄瓜报告上?

And Actual time of execution I am looking for is 1:03 min which is being displayed as Total time under "BUILD SUCCESS". How can I fetch this value to display on cucumber report?

推荐答案

仅当测试套件启动时才计算经过的时间.如果您的Maven版本在下载依赖项时遇到问题,那么这将解释两者之间的区别.

The elapsed time is counted only when the test-suite starts. If your maven build was stuck downloading dependencies, that will explain the difference.

如果您的管理层如此担心,请要求他们考虑贡献代码以解决任何潜在的问题.这是一个开源项目.

If your management is so concerned, please ask them to consider contributing code to fix any potential issues. This is an open-source project.

这篇关于启用并行执行并通过maven命令完成执行时获取总执行时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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