This directory contains end to end tests of LUCI CV.
These tests are designed to run locally with fakes instead of Gerrit, Datastore, Cloud Task Queue.
The usual Go way, e.g. go test ./...
or go test go.chromium.org/luci/cv/tests/e2e/...
Select failing test, e.g. TestXYZ
. Run just this test in verbose mode, which emits copious amounts of logging, as if you are looking at production CV app, except log lines not attributed nor grouped to individual task queue executions.
go test -v -run TestXYZ
To make sense of logs, it may be easiest to save them to a file:
go test -v -run TestXYZ 2>&1 >out.log
If test seems to hang, save your time:
go test -v -run TestXYZ -test.timeout=1s 2>&1 >out.log
If test is flaky, try:
go test -v -run TestXYZ -test.count=1000 -test.failfast 2>&1 >out.log
..._test.go
files, as usual.TestXYZ
func with t.Parallel()
.e2e
package is intentionally exportable.e2e.go
. They should be public (see above).TestXYZ
function.Use special -cv.dsflakiness
flag, e.g. go test ./... -cv.dsflakiness=0.06
. See flakifyDS
function for explanation of what 0.06
value actually means and the shortcomings of the simulation.