-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[Core] Add timestamp milis to TestCaseStartedEvent and json reporter #1591
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
Merged
mpkorstanje
merged 5 commits into
cucumber:master
from
zutshiy:feature/json-report-timestamp-master
Mar 28, 2019
Merged
[Core] Add timestamp milis to TestCaseStartedEvent and json reporter #1591
mpkorstanje
merged 5 commits into
cucumber:master
from
zutshiy:feature/json-report-timestamp-master
Mar 28, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New timeStampMillis field added to the eventBus as well as the TimeService (and its stub). This calcualtes the system time elapsed in millis and is later used in the jsonformatter as a time stamp (after conversion). This field can be used in all the events for timestamp usages if required (unlike nanos this is an accurate representation of the current timestamp), right now its only being used in TestCaseStarted. I also updated the JUnits accordinly since the date is calculated dynamically. The JSON formatter takes a DateTimeFormatter input to change how the time will be formatted to string format.
mpkorstanje
reviewed
Mar 24, 2019
core/src/main/java/cucumber/runtime/formatter/JSONFormatter.java
Outdated
Show resolved
Hide resolved
mpkorstanje
reviewed
Mar 24, 2019
mpkorstanje
reviewed
Mar 24, 2019
|
Almost there! |
|
I am seriously excited about this :-) |
Updated some Test classes to also include an eventBus with the stubbed TimeService. Updated new json strings for test cases to reflect the timeStampMillis generated from threadlocal. Removed TimeUtils.java
mpkorstanje
reviewed
Mar 25, 2019
core/src/test/java/cucumber/runtime/formatter/FormatterBuilder.java
Outdated
Show resolved
Hide resolved
mpkorstanje
reviewed
Mar 25, 2019
core/src/main/java/cucumber/runtime/formatter/JSONFormatter.java
Outdated
Show resolved
Hide resolved
|
Cheers! |
6 tasks
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding new PR for the master branch instead of develop-v5.
Refer :
#1588
Updated the changes with new name for the field and code changes compatible with Java 7.
Also updated the
JSONFormatterconstructor to include a TimeUtils object for getting the timestamp in string ISO format. This also helps make the timeStamp field testable using mocks.We can rename the TimeUtils class name to something more generic (as a utility class for the JSONFormatter) for future updates if more util methods are added which need to be mocked for the jsonformatter tests.
Please let me know if any more changes are needed.