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

Add a bit of verbosity to e2e tests #308

Merged
merged 1 commit into from
Apr 5, 2018

Conversation

cdrage
Copy link
Member

@cdrage cdrage commented Apr 4, 2018

Adds verbosity to the tests as well as command-line-outout:

▶ make test-e2e
go test github.com/redhat-developer/ocdev/tests/e2e -ginkgo.v
$ git clone https://github.com/openshift/nodejs-ex /tmp/ocdev807324634/nodejs-ex

Running Suite: ocdev test suite
===============================
Random Seed: 1522871416
Will run 9 of 9 specs

Usecase #5 ocdev project
  should create a new project
  /home/wikus/seafile/files/dev/go/src/github.com/redhat-developer/ocdev/tests/e2e/e2e_test.go:120
$ ocdev project create ocdev-1522871416
New project created and now using project : ocdev-1522871416

$ ocdev project get --short
ocdev-1522871416

•
------------------------------
Usecase #5 creating an application when application by the same name doesn't exist
  should create an application
  /home/wikus/seafile/files/dev/go/src/github.com/redhat-developer/ocdev/tests/e2e/e2e_test.go:129
$ ocdev application create usecase5
Creating application: usecase5
Switched to application: usecase5

$ ocdev application get --short
usecase5

•
------------------------------
Usecase #5 creating an application when application by the same name doesn't exist
  should be created within the project
  /home/wikus/seafile/files/dev/go/src/github.com/redhat-developer/ocdev/tests/e2e/e2e_test.go:134
$ ocdev project get --short
ocdev-1522871416

Adds verbosity to the tests as well as command-line-outout:

```sh
▶ make test-e2e
go test github.com/redhat-developer/ocdev/tests/e2e -ginkgo.v
$ git clone https://github.com/openshift/nodejs-ex /tmp/ocdev807324634/nodejs-ex

Running Suite: ocdev test suite
===============================
Random Seed: 1522871416
Will run 9 of 9 specs

Usecase redhat-developer#5 ocdev project
  should create a new project
  /home/wikus/seafile/files/dev/go/src/github.com/redhat-developer/ocdev/tests/e2e/e2e_test.go:120
$ ocdev project create ocdev-1522871416
New project created and now using project : ocdev-1522871416

$ ocdev project get --short
ocdev-1522871416

•
------------------------------
Usecase redhat-developer#5 creating an application when application by the same name doesn't exist
  should create an application
  /home/wikus/seafile/files/dev/go/src/github.com/redhat-developer/ocdev/tests/e2e/e2e_test.go:129
$ ocdev application create usecase5
Creating application: usecase5
Switched to application: usecase5

$ ocdev application get --short
usecase5

•
------------------------------
Usecase redhat-developer#5 creating an application when application by the same name doesn't exist
  should be created within the project
  /home/wikus/seafile/files/dev/go/src/github.com/redhat-developer/ocdev/tests/e2e/e2e_test.go:134
$ ocdev project get --short
ocdev-1522871416

```
@kadel
Copy link
Member

kadel commented Apr 5, 2018

To be honest I don't like when tests are showing verbose output for everything.
We should show only verbose output for failed tests. There is no point of showing detailed output for a test that passed, it just makes it hard to find failures.

@cdrage
Copy link
Member Author

cdrage commented Apr 5, 2018

@kadel The problem is that with Ginko it won't even show a description of the failed test 👎

@kadel
Copy link
Member

kadel commented Apr 5, 2018

oh :-( I'm starting to feel like ginko is giving us just problems, instead of making things easier :-(

@cdrage
Copy link
Member Author

cdrage commented Apr 5, 2018

@kadel We can put a bit of verbosity (but not too much) within: https://github.com/redhat-developer/ocdev/blob/master/tests/e2e/e2e_test.go#L28 which may help with regards to descriptions, etc.

@cdrage
Copy link
Member Author

cdrage commented Apr 5, 2018

The problem too is that we're using generic names such as "Usecase #5"... which makes no sense, we should use the Describe() function more: http://onsi.github.io/ginkgo/#organizing-specs-with-containers-describe-and-context

@kadel
Copy link
Member

kadel commented Apr 5, 2018

OK, merging this, so at least we get a little bit of context when something fails.

But lets remove verbose flag when #316 is fixed

@kadel kadel merged commit 4b6defc into redhat-developer:master Apr 5, 2018
@cdrage cdrage deleted the verbose-output branch April 19, 2018 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants