-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duration in HTML report is wrong #1438
Comments
I've made some tests about that: require 'cucumber/formatter/io'
require 'cucumber/formatter/message_builder'
module Cucumber
module Formatter
# The formatter used for <tt>--format message</tt>
class TestRunDuration < MessageBuilder
include Io
def initialize(config)
@io = ensure_io(config.out_stream)
super(config)
end
def output_envelope(envelope)
if envelope.test_run_started
Kernel.puts "Started at: #{timestamp_to_time(envelope.test_run_started.timestamp)}"
end
if envelope.test_run_finished
Kernel.puts "Finished at: #{timestamp_to_time(envelope.test_run_finished.timestamp)}"
end
end
end
end
end Which outputs:
So that looks good or the Ruby side (at least, Ruby is able to recreate a Date which seems more than plausible from the Timestamps of the TestRunStarted and TestRunFinished messages. Now when feeding that to Javascript (in |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective. |
Describe the bug
When running
cucumber -f html
, the html report has a duration field with incorrect data (sometimes even a negative duration).Not sure if this comes from the
cucumber/react
lib or the values generated in the messages.Expected behavior
Have a valid duration for the run.
Extra would be a readable format too (not like 1234567890ms but 14d 6h 56min 7s 890ms)
Context & Motivation
How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world.
Screenshots
If applicable, add screenshots to help explain your problem.
Your Environment
Additional context
Add any other context about the problem here
The text was updated successfully, but these errors were encountered: