Skip to content

Always output detailed e2e test results - #1335

Closed
bobcatfish wants to merge 1 commit into
knative:masterfrom
bobcatfish:instrumenting
Closed

bobcatfish wants to merge 1 commit into
knative:masterfrom
bobcatfish:instrumenting

Conversation

@bobcatfish

@bobcatfish bobcatfish commented Jun 24, 2018 •

Copy link
Copy Markdown
Contributor

We want to use our end to end tests to take some latency measurements
over time. In our first pass, we want to do this at the granularity
of a test, by tracking the time taken by each test.

To do this, we want the output from running our e2e tests with prow
to include a line with the time taken by a test and the name of a test.

It turns out that running go test with -v will automatically
include this information, so we basically get it for free, however
we are currently supressing this when the tests succeed and only
displaying it when they fail.

This commit changes it to always output the duration of each
individulal test, even when successful.

One side effect is that the info logged by the tests (i.e. each
"step" of the test) will also be included in successful test runs.
We may want to adjust this in the future as more tests are added
so that we can have verbose output without detailed steps being logged.

Fixes #1008

NONE

@google-prow-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bobcatfish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-prow-robot google-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 24, 2018
@bobcatfish

bobcatfish commented Jun 24, 2018 •

Copy link
Copy Markdown
Contributor Author

This is what the output ends up looking like:

image

So for individual tests we get data like this that we could parse out:

I0624 17:42:49.444] --- PASS: TestAutoscaleUpDownUp (149.38s)
...
I0624 17:42:49.444] --- PASS: TestContainerErrorMsg (1.09s)
...
I0624 17:42:49.445] --- PASS: TestHelloWorldFromShell (25.08s)
...
I0624 17:42:49.446] --- PASS: TestHelloWorld (25.15s)
I0624 17:42:49.446] PASS
I0624 17:42:49.446] ok  	github.com/knative/serving/test/e2e	200.826s
...
I0624 17:39:11.232] --- PASS: TestRouteCreation (114.22s)
I0624 17:39:11.232] PASS
I0624 17:39:11.232] ok  	github.com/knative/serving/test/conformance	114.350s

And I think we can pretty easily correlate that output with the tests in test grid:
image

@bobcatfish
bobcatfish requested review from adrcunha and jessiezcc June 24, 2018 17:58
@adrcunha

Copy link
Copy Markdown
Contributor

The main goal was to track API call latency, not just test runtime. While we can start tracking test runtime as another useful kind of metric, my understanding is that this PR partially addressed #1008.

We want to use our end to end tests to take some latency measurements
over time. In our first pass, we want to do this at the granularity
of a test, by tracking the time taken by each test.

To do this, we want the output from running our e2e tests with prow
to include a line with the time taken by a test and the name of a test.

It turns out that running `go test` with `-v` will automatically
include this information, so we basically get it for free, however
we are currently supressing this when the tests succeed and only
displaying it when they fail.

This commit changes it to always output the duration of each
individulal test, even when successful.

One side effect is that the info logged by the tests (i.e. each
"step" of the test) will also be included in successful test runs.
We may want to adjust this in the future as more tests are added
so that we can have verbose output without detailed steps being logged.

Fixes #1008
@bobcatfish

Copy link
Copy Markdown
Contributor Author

The main goal was to track API call latency, not just test runtime.

I think we have some confusion about the requirements here, I'll start a thread offline.

@bobcatfish

Copy link
Copy Markdown
Contributor Author

I think we have some confusion about the requirements here, I'll start a thread offline.

nvm, after reading the doc more closely I think @adrcunha is right, I'll close this and try to add more detail to #1008.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants