-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Skip test case #144
Skip test case #144
Conversation
@SimonBaeumer, I plan on finishing this implementation tomorrow. I'll then send over my ideas for how skipped test should be displayed in the output. We can the hash out our thoughts there. Hope all is well |
@SimonBaeumer the implementation is ready for review. I plan on moving the
Let me know what you think, I can add some integration tests and docs soon there after. |
Displaying a Adding debug log statements in https://github.com/commander-cli/commander/pull/144/files#diff-cdb01b657d4a9de87f1466a8e642945dR34 when |
Do you have any suggestions on the output when we
I elected to put debug logs here. It guarantees the
|
f6eee8d
to
de31ec4
Compare
de31ec4
to
35f26d2
Compare
pkg/output/cli.go
Outdated
@@ -95,7 +106,7 @@ func (w *OutputWriter) printFailures(results []runtime.TestResult) { | |||
w.fprintf(r.Error.Error()) | |||
continue | |||
} | |||
if !r.Success { | |||
if !r.Success && !r.Skipped { |
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 would move the skipped check at the beginning of the for-loop because than you see directly that skipped test cases are ignored.
for _, tr := range results {
r := convertTestResult(tr)
if r.Skipped {
continue
}
if r.Error != nil {
w.fprintf(w.au.Bold(w.au.Red(w.template.errors(r))))
w.fprintf(r.Error.Error())
continue
}
if !r.Success {
w.fprintf(w.au.Bold(w.au.Red(w.template.failures(r))))
w.fprintf(r.Diff)
}
}
pkg/runtime/runtime.go
Outdated
|
||
r.EventHandler.TestFinished(tr) | ||
log.Println("title: '"+tr.TestCase.Title+"'", " Was skipped") |
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.
Little typo Was
-> was
I would like to see the node on which the test was skipped, that we stick to the same output format all the time. The cli output can be seen like an API because the results are processed, i.e. Further it is defined that nodes create a testing matrix, that means every test gets executed on every node and is seen as it's own test case internally. If the skip check is moved inside the
Imho this finde for the moment, I am thinking about how the logs will be printed in the future. It feels not good to add this amount of verbosity inside the source code. |
@SimonBaeumer great idea to skip for all nodes! This should be the final commit. Cheers |
Code Climate has analyzed commit 352ac31 and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 92.4% (0.2% change). View more on Code Climate. |
LGTM |
closes #127
Checklist
Linux
,Windows
andmacOS
?