Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Add automated regression tests #4309

Merged
merged 12 commits into from
Jun 11, 2019
Merged

Add automated regression tests #4309

merged 12 commits into from
Jun 11, 2019

Conversation

beyang
Copy link
Member

@beyang beyang commented Jun 1, 2019

This adds a regression test file regression.test.tsx that defines regression tests. This is separate from the index.e2e.test.tsx file, which defines e2e tests that run in CI. The reason that the two are separate is that we expect there to be a lot of regression tests and it would be prohibitively expensive to run them each time in CI and they might be flakier than our tolerance for the in-CI e2e tests.

Run it with GITHUB_TOKEN=$TOKEN yarn run test-regression in the web directory.

regression.test.tsx currently includes test for one of the search use cases, but will eventually grow to cover most of the Release test grid.

cc @lguychard because you made a suggestion to use Cucumber.io. This PR does not use Cucumber. It may be the right solution for us down the road, but first I wanted to implement the tests directly in JS to see if this adequately addresses our needs.

@beyang beyang requested a review from felixfbecker as a code owner June 1, 2019 23:01
@beyang beyang removed the request for review from felixfbecker June 1, 2019 23:02
@felixfbecker
Copy link
Contributor

Please use draft PRs to avoid sending notifications 🙇

@beyang beyang changed the title WIP: refactor e2e tests Add automated regression tests Jun 3, 2019
@beyang beyang requested a review from chrismwendt June 3, 2019 17:31
Copy link
Contributor

@chrismwendt chrismwendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, the Phabricator e2e tests could also use Driver. https://github.com/sourcegraph/sourcegraph/pull/4226

web/src/e2e/util.ts Show resolved Hide resolved
@felixfbecker felixfbecker self-requested a review June 4, 2019 14:44
web/src/e2e/regression.test.tsx Outdated Show resolved Hide resolved
web/src/e2e/regression.test.tsx Outdated Show resolved Hide resolved
web/src/e2e/util.ts Show resolved Hide resolved
web/src/e2e/util.ts Outdated Show resolved Hide resolved
@sourcegraph sourcegraph deleted a comment from todo bot Jun 4, 2019
@sourcegraph sourcegraph deleted a comment from todo bot Jun 4, 2019
@sourcegraph sourcegraph deleted a comment from todo bot Jun 4, 2019
@sourcegraph sourcegraph deleted a comment from todo bot Jun 4, 2019
@sourcegraph sourcegraph deleted a comment from todo bot Jun 4, 2019
Copy link
Contributor

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a lot of non-e2e-prefixed selectors but I assume those existed before.

}
})
},
5 * 1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we pass the same timeout to every test if we also set the timeout at the top?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That timeout applies generally, but the search test behavior is explicitly to timeout after 5s (as taking longer than 5s to serve the query indicates a broken state).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would have been good to mention in a comment - this timeout seems to have been copy-pasted for e.g. external service tests too

web/src/e2e/util.ts Show resolved Hide resolved
web/src/e2e/util.ts Outdated Show resolved Hide resolved
@beyang beyang requested a review from lguychard as a code owner June 10, 2019 18:42
@beyang beyang merged commit f2365a5 into master Jun 11, 2019
@beyang beyang deleted the bl/regression-test branch June 11, 2019 01:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants