Skip to content

Commit abcea34

Browse files
alan-agius4angular-robot[bot]
authored andcommitted
docs: update developer guide to include new Bazel setup
This commit updates the developer guide to include tips on how to run and debug tests when using the new Bazel E2E setup.
1 parent babaa36 commit abcea34

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/DEVELOPER.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,22 @@ There are two different test suites which can be run locally:
7878
- Run a subset of the tests, use the full Bazel target example: `yarn bazel test //packages/schematics/angular:angular_test`
7979
- For a complete list of test targets use the following Bazel query: `yarn bazel query "tests(//packages/...)"`
8080

81+
When debugging a specific test, change `describe()` or `it()` to `fdescribe()`
82+
and `fit()` to focus execution to just that one test. This will keep the output clean and speed up execution by not running irrelevant tests.
83+
8184
You can find more info about debugging [tests with Bazel in the docs.](https://github.com/angular/angular-cli/blob/main/docs/process/bazel.md#debugging-jasmine_node_test)
8285

8386
### End to end tests
8487

85-
- Compile the packages being tested: `yarn build`
86-
- Run all tests: `node tests/legacy-cli/run_e2e.js`
87-
- Run a subset of the tests: `node tests/legacy-cli/run_e2e.js tests/legacy-cli/e2e/tests/i18n/ivy-localize-*`
88-
- Run on a custom set of npm packages (tar files): `node tests/legacy-cli/run_e2e.js --package _angular_cli.tgz _angular_create.tgz dist/*.tgz tests/legacy-cli/e2e/tests/i18n/ivy-localize-*`
88+
- For a complete list of test targets use the following Bazel query: `yarn bazel query "tests(//tests/...)"`
89+
- Run a subset of the tests: `yarn bazel test //tests/legacy-cli:e2e --test_filter="tests/i18n/ivy-localize-*"`
90+
- Use `bazel run` to debug failing tests debugging: `yarn bazel run //tests/legacy-cli:e2e --test_arg="--glob=tests/basic/aot.ts"`
91+
- Provide additional `e2e_runner` using `--test_arg`: `--test_arg="--yarn"`
8992

9093
When running the debug commands, Node will stop and wait for a debugger to attach.
9194
You can attach your IDE to the debugger to stop on breakpoints and step through the code. Also, see [IDE Specific Usage](#ide-specific-usage) for a
9295
simpler debug story.
9396

94-
When debugging a specific test, change `describe()` or `it()` to `fdescribe()`
95-
and `fit()` to focus execution to just that one test. This will keep the output clean and speed up execution by not running irrelevant tests.
96-
9797
## IDE Specific Usage
9898

9999
Some additional tips for developing in specific IDEs.

0 commit comments

Comments
 (0)