-
Notifications
You must be signed in to change notification settings - Fork 13
Display a warning if total test duration is 0 #1084
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -641,6 +641,10 @@ def recorded_result() -> Tuple[int, int, int, float]: | |
| rows = [[file_count, test_count, success_count, fail_count, duration]] | ||
| click.echo(tabulate(rows, header, tablefmt="github", floatfmt=".2f")) | ||
|
|
||
| if duration == 0: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please check what the output looks like test case count is 0? I guess that another warning might be displayed. If so, this warning might be not necessary.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If test case count is zero it just prints the following and returns:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks |
||
| click.echo(click.style("\nTotal test duration is 0." | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you decide to output this warning before the URL information, such as
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As it related to total duration shown in the table, I output it just after that. Other than that there's no particular reason. If it's better to output warnings at the end, as a practice, I can update it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I just wanted to know the reason. |
||
| "\nPlease check whether the test duration times in report files are correct.", "yellow")) | ||
|
|
||
| click.echo( | ||
| "\nVisit https://app.launchableinc.com/organizations/{organization}/workspaces/" | ||
| "{workspace}/test-sessions/{test_session_id} to view uploaded test results " | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please write a test for your change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a test case