Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/developer-guide/development-cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ The final step is running the End-to-End testsuite, which ensures that your Kube
* First, start the End-to-End server: `make start-e2e` or `make start-e2e-local`. This will spawn a number of processes and services on your system.
* When all components have started, run `make test-e2e` or `make test-e2e-local` to run the end-to-end tests against your local services.

To run a single test with a local toolchain, you can use `TEST_FLAGS="-run TestName" make test-e2e-local`.
Below you can find a few examples of how to run specific tests.
- To run a single test with a local toolchain, you can use `TEST_FLAGS="-run TestName" make test-e2e-local`.
- To run a specific package, you can use `make TEST_MODULE=./test/e2e/<TEST_FILE>.go test-e2e-local`
- Finally, you can also try `make TEST_FLAGS="-run <TEST_METHOD_NAME_REGEXP>" test-e2e-local` if you want a more fine-grained control.

For more information about End-to-End tests, refer to the [End-to-End test documentation](test-e2e.md).

Expand Down
8 changes: 8 additions & 0 deletions docs/developer-guide/test-e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ Some effort has been made to balance test isolation with speed. Tests are isolat
* A namespace `argocd-e2e-ns-${id}`.
* A primary name for the app `argocd-e2e-${id}`.

## Run only a subset of tests

Running all tests locally is a time-consuming process. To run only a subset of tests, you can set the `TEST_MODULE` environment variable.
For example, to run only the OCI tests, you can set the variable as follows: `make TEST_MODULE=./test/e2e/oci_test.go test-e2e-local`

If you want to get a more fine-grained control over which tests to run, you can also try `make TEST_FLAGS="-run <TEST_METHOD_NAME_REGEXP>" test-e2e-local`
For individual tests you can run them using the IDE run test feature

## Troubleshooting

**Tests fails to delete `argocd-e2e-ns-*` namespaces.**
Expand Down
2 changes: 1 addition & 1 deletion hack/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ mkdir -p "$TEST_RESULTS"
# shellcheck disable=SC2086
GODEBUG="tarinsecurepath=0,zipinsecurepath=0" \
gotestsum --rerun-fails-report=rerunreport.txt --junitfile="$TEST_RESULTS/junit.xml" --format=testname \
--rerun-fails="$RERUN_FAILS" --packages="$PACKAGES" -- -cover $TEST_FLAGS "$@"
--rerun-fails="$RERUN_FAILS" --packages="${TEST_MODULE:-$PACKAGES}" -- -cover $TEST_FLAGS "$@"
Loading