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

📖 doc: add local e2e test execution documentation #4626

Conversation

sbueringer
Copy link
Member

What this PR does / why we need it:

This PR adds documentation on how to run e2e tests locally. This will help new contributors to avoid the somewhat cumbersome feedback loop via Prow when debugging broken e2e tests or developing new e2e tests.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #4555

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 17, 2021
@sbueringer sbueringer force-pushed the caas/sbuerin/doc-local-e2e-test-execution branch from cff6324 to f734f53 Compare May 17, 2021 16:09
@sbueringer
Copy link
Member Author

I'm not sure if it's the right place in the book, but I thought I just start somewhere.

/cc @fabriziopandini @stmcginnis

@k8s-ci-robot
Copy link
Contributor

@sbueringer: GitHub didn't allow me to request PR reviews from the following users: stmcginnis.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

I'm not sure if it's the right place in the book, but I thought I just start somewhere.

/cc @fabriziopandini @stmcginnis

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@stmcginnis
Copy link
Contributor

Thanks for getting something written up Stefan!

@sbueringer sbueringer force-pushed the caas/sbuerin/doc-local-e2e-test-execution branch from f734f53 to 6a8d634 Compare May 17, 2021 16:13
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 17, 2021
@fabriziopandini
Copy link
Member

tested locally, this is great!

@sbueringer sbueringer force-pushed the caas/sbuerin/doc-local-e2e-test-execution branch from 6a8d634 to b2fd889 Compare May 24, 2021 14:53
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 24, 2021
@sbueringer
Copy link
Member Author

sbueringer commented May 24, 2021

@stmcginnis @CecileRobertMichon @fabriziopandini I merged the new documentation with the pre-existing in testing.md. PTAL

@fabriziopandini Regarding #4626 (comment): I kept the few sentences about Prow for now. I would replace them by a link to the dedicated Prow page after it has been added.

@sbueringer
Copy link
Member Author

/retest

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 24, 2021
Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

this generally looks good to me, i have a few minor suggestions.

docs/book/src/developer/testing.md Outdated Show resolved Hide resolved
docs/book/src/developer/testing.md Outdated Show resolved Hide resolved
For development and debugging those tests can also be executed locally.

### Prerequisites

Copy link
Contributor

Choose a reason for hiding this comment

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

does the user need anything beyond docker and the make/build commands?

Copy link
Member Author

@sbueringer sbueringer May 25, 2021

Choose a reason for hiding this comment

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

I think it depends on which exact test is executed and in which way it is executed. Afaik:

  • make
    • requires at least kustomize and kind (ci-e2e.sh installs them via hack/ensure-*.sh)
  • additionally via IDE / scripts/ci-e2e.sh

Looking at ci-e2e.sh we make sure to have the following installed: go, kubectl, kustomize, kind. There's also a lot of other stuff installed here: https://github.com/kubernetes/test-infra/blob/master/images/bootstrap/Dockerfile. But I don't think we need anything additionally to run the tests locally.

I can document this on a best effort basis. Maybe @fabriziopandini knows some additional dependencies.

Copy link
Member

Choose a reason for hiding this comment

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

Let's start with what we have now, and then we can eventually iterate adding more context.
However, generally speaking we should document in single place the dependencies for a developer workstation, and reference this list whenever necessary, like in this page.
As of today we already have something similar in two places, which is not ideal

So I think we should defer fixing this to a follow up PR

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it depends on which exact test is executed and in which way it is executed.

@sbueringer, i was just thinking about the bare minimum, not necessarily all the options

As of today we already have something similar in two places, which is not ideal

++, would be nice to have a single place that we could link

docs/book/src/developer/testing.md Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 25, 2021
@sbueringer
Copy link
Member Author

/retest

@fabriziopandini
Copy link
Member

@sbueringer if you can squash commits, I'm +1 to get this merged given that it is a great step forward vs what we have now

@randomvariable
Copy link
Member

This is great. I hate having the hidden variables in the Makefile, but for want of a better solution, this is good.

@sbueringer sbueringer force-pushed the caas/sbuerin/doc-local-e2e-test-execution branch from 36eb666 to ff6a70d Compare May 25, 2021 10:29
@sbueringer
Copy link
Member Author

@fabriziopandini squashed

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

thanks for the udpates @sbueringer
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 25, 2021
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2021
@fabriziopandini
Copy link
Member

/approve
/retest

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, fabriziopandini

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,fabriziopandini]

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

@k8s-ci-robot k8s-ci-robot merged commit 511afc8 into kubernetes-sigs:master May 25, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone May 25, 2021
@sbueringer sbueringer deleted the caas/sbuerin/doc-local-e2e-test-execution branch May 25, 2021 19:08
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs needed for debugging e2e tests in an IDE
8 participants