Skip to content

Commit

Permalink
Update e2e-guide.md
Browse files Browse the repository at this point in the history
Signed-off-by: noobwei <[email protected]>
  • Loading branch information
noobwei committed Oct 23, 2024
1 parent 4511f00 commit 395b619
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions content/en/docs/developer/e2e-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,11 @@ When testing locally, you may want to skip some setup steps to save time, especi
- `--skip-build`: Skips building and pushing the Kmesh image to the local image registry.
- `--skip-setup`: Skips deploying the Kubernetes cluster, Istio, and Kmesh.
- `--only-run-tests`: Skips all other steps and focuses only on deploying test applications and running E2E tests.

You might need different kinds of tests.
- `--cluster`: Allows specifying a pre-existing KinD cluster by name.
- `--ipv6`: Enables creating a KinD cluster with IPv6 networking.

In some cases, you might want to clean up some resources after the tests, while in other cases, you might want to skip cleaning up test applications for further usage. The following flags are available to customize cleanup.
- `--ipv6`: Enables creating a KinD cluster with IPv6 networking and run E2E tests on it.
- `--cleanup`: Cleans up the KinD cluster and local registry after tests are completed.
- `--skip-cleanup-apps`: Skips the cleanup of test applications after the tests have been executed.

You can also directly use `go test` command-line arguments when running the tests. Some detailed examples are provided in the next part.
- Directly use `go test` command-line arguments when running the tests

### Example Commands

Expand All @@ -72,27 +67,50 @@ You can also directly use `go test` command-line arguments when running the test
./test/e2e/run_test.sh --only-run-tests
```

You might need different kinds of tests.

- Specifying a Pre-existing KinD Cluster:

```bash
./test/e2e/run_test.sh --cluster <KinD-Cluster-Name>
```
- Cleanup the KinD Cluster or Docker Registry After Tests

- Create a IPv6 KinD cluster and Run Tests:

```bash
./test/e2e/run_test.sh --ipv6
```

In some cases, you might want to clean up some resources after the tests, while in other cases, you might want to skip cleaning up test applications for further usage.

- Cleanup the KinD Cluster and Docker Registry After Tests:

```bash
./test/e2e/run_test.sh --cleanup
```

You can directly use go test command-line arguments when running the tests. For example, you can filter specific tests, or control other aspects of the testing process directly from the command line.
- Skip the Cleanup of Test Applications After Tests:

```bash
./test/e2e/run_test.sh --skip-cleanup-apps
```

You can also directly use go test command-line arguments when running the tests. For example, you can filter specific tests, or control other aspects of the testing process directly from the command line.

- Selecting Specific Test Cases:

```bash
./test/e2e/run_test.sh --select-cases TestSpecificCase
./test/e2e/run_test.sh --only-run-tests -run "TestServices"
```

- Controlling Test Verbosity

```bash
./test/e2e/run_test.sh -v
```

- Repeat Test Cases Multiple Times.

```bash
./test/e2e/run_test.sh -count=3
```

0 comments on commit 395b619

Please sign in to comment.