Skip to content
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

Better make test-e2e output #283

Closed
cdrage opened this issue Mar 28, 2018 · 12 comments
Closed

Better make test-e2e output #283

cdrage opened this issue Mar 28, 2018 · 12 comments
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering

Comments

@cdrage
Copy link
Member

cdrage commented Mar 28, 2018

More information would be helpful determining what exact command didn't work:

 make test-e2e
go test github.com/redhat-developer/ocdev/tests/e2e
Running Suite: ocdev test suite
===============================
Random Seed: 1522247597
Will run 9 of 9 specs

New project created and now using project : ocdev-1522247597
ocdev-1522247597
•Creating application: usecase5
Switched to application: usecase5
usecase5•ocdev-1522247597
•Creating application: usecase5-2
Switched to application: usecase5-2
usecase5-2Switched to application: usecase5
usecase5•2018/03/28 10:33:26 exit status 1
FAIL    github.com/redhat-developer/ocdev/tests/e2e     8.934s
Makefile:72: recipe for target 'test-e2e' failed
make: *** [test-e2e] Error 1

Perhaps outputting what runCmd is into the logs and adding more spacing between the log outputs too?

https://github.com/redhat-developer/ocdev/blob/master/tests/e2e/e2e_test.go#L151

ping @ashetty1

@kadel
Copy link
Member

kadel commented Mar 29, 2018

For this, I would like to output those commands only if there was an error. Please don't make verbose output if tests are passing, It is really hard to find something if logs are polluted with useless lines.

@ashetty1
Copy link
Contributor

@kadel @cdrage sure, will do that.

@ashetty1
Copy link
Contributor

Pushed a minor fix here: #286

@cdrage
Copy link
Member Author

cdrage commented Apr 4, 2018

Hey @ashetty1 what's the status on this? I recently received a failure here: https://travis-ci.org/redhat-developer/ocdev/jobs/362277540#L584 but there was still no error or stdout, I don't see anything unfortunately that could help debug error outputs.

@cdrage
Copy link
Member Author

cdrage commented Apr 4, 2018

Output:

Running Suite: ocdev test suite                                                                                                                                                                                                                                                                                                                                     [12/1980]
===============================
Random Seed: 1522867639
Will run 9 of 9 specs

New project created and now using project : ocdev-1522867639

ocdev-1522867639

•Creating application: usecase5
Switched to application: usecase5

usecase5
•ocdev-1522867639

•Creating application: usecase5-2
Switched to application: usecase5-2

usecase5-2
Switched to application: usecase5

usecase5
•exit status 1:
FAIL    github.com/redhat-developer/ocdev/tests/e2e     8.123s
Makefile:72: recipe for target 'test-e2e' failed
make: *** [test-e2e] Error 1

@cdrage
Copy link
Member Author

cdrage commented Apr 4, 2018

I think we should to two things:

  • Change names "usecase", etc. to something more descriptive
  • Better command-line output / information when running make test-e2e so we may diagnose the error.

@kadel @ashetty1

@cdrage
Copy link
Member Author

cdrage commented Apr 4, 2018

I did a quick look through http://onsi.github.io/ginkgo/#organizing-specs-with-containers-describe-and-context and there's some functions related to logging that may help.

@kadel kadel added the area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering label Apr 5, 2018
@ashetty1
Copy link
Contributor

ashetty1 commented Apr 5, 2018

@cdrage, Taking this up on priority:

  1. Print trace when any operation fails
  2. Organise logging when we have VERBOSE=yes

@cdrage
Copy link
Member Author

cdrage commented Apr 5, 2018

@ashetty1 I tried with the Ginko testing and unfortunatley I can't get any tracing. I used ginko --trace and nothing.. Does the testing but nothing pops up. I've helped a tiny bit in a PR here: #308

@ashetty1
Copy link
Contributor

ashetty1 commented Apr 5, 2018

@cdrage I will try and see if I can improve the output of runCmd. If that fails, we should we do away with runCmd function and handle the errors with assertions (that's too much manual work thought).

@kadel
Copy link
Member

kadel commented Apr 5, 2018

This is something that might be helpful @ashetty1 https://onsi.github.io/ginkgo/#marking-specs-as-failed

@cdrage
Copy link
Member Author

cdrage commented Apr 24, 2018

This has been vastly improved by @ashetty1 's recent contributions. I'm going to close this! 😀 thanks @ashetty1 !

@cdrage cdrage closed this as completed Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering
Projects
None yet
Development

No branches or pull requests

3 participants