Skip to content

Commit 4f9f8bb

Browse files
committed
properly format examples and correct links to third example
1 parent 0cd9834 commit 4f9f8bb

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

docs/guides/modules/test/pages/adaptive-testing.adoc

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ CAUTION: *Adaptive testing* is available in closed preview. When the feature is
99

1010
NOTE: This page is currently in development and will be updated as the feature is developed.
1111

12-
Use adaptive testing to run only tests that are impacted by code changes and evenly distribute tests across parallel execution nodes. Adaptive testing reduces test execution time while maintaining test confidence.
12+
Use adaptive testing to optimize test runs as follows:
13+
14+
* Run only tests that are impacted by code changes.
15+
* Evenly distribute tests across parallel execution nodes.
16+
17+
Adaptive testing reduces test execution time while maintaining test confidence.
1318

1419
== Use cases for adaptive testing
1520

@@ -25,7 +30,7 @@ TIP: In codebases with sparse test coverage, adaptive testing cannot accurately
2530
* Adaptive testing needs to be configured with commands to discover all available tests and run a subset of those tests. If you cannot run commands to discover tests and run a subset of tests on the CLI then adaptive testing may not be a good fit.
2631
* Adaptive testing works best when testing a single deployable unit. A monorepo which performs integration tests across many packages at once may not be a good fit.
2732

28-
== Key benefits:
33+
== Key benefits
2934

3035
* Faster CI/CD pipelines through intelligent test selection.
3136
* Optimized resource usage and cost efficiency.
@@ -342,8 +347,8 @@ options:
342347

343348
*Checklist*
344349

345-
. The `analysis` command defines `<< test.atoms >>` to pass in the test, or passes in stdin.
346-
. The `analysis` command defines `<< outputs.lcov|go-coverage|gcov >>` to write coverage data.
350+
* The `analysis` command defines `<< test.atoms >>` to pass in the test, or passes in stdin.
351+
* The `analysis` command defines `<< outputs.lcov|go-coverage|gcov >>` to write coverage data.
347352

348353
*Examples of `analysis` commands*
349354

@@ -427,8 +432,8 @@ This section will run analysis on a feature branch to seed the initial impact da
427432

428433
*Checklist*
429434

430-
. The step output includes prefix Running impact analysis.
431-
. The step output finds files impacting a test (for example, found 12 files impacting test `src/foo.test.ts`).
435+
* The step output includes prefix Running impact analysis.
436+
* The step output finds files impacting a test (for example, found 12 files impacting test `src/foo.test.ts`).
432437

433438
[source,yaml]
434439
----
@@ -542,18 +547,19 @@ Now the test suite is set up, test selection is working and the test analysis is
542547

543548
*Checklist*
544549

545-
. The `.circleci/config.yml` is set up to run analysis on the default branch.
546-
. The `.circleci/config.yml` is set up to run selection on non-default branch.
547-
. The `.circleci/config.yml` is set up to use high parallelism on the analysis branch.
550+
* The `.circleci/config.yml` is set up to run analysis on the default branch.
551+
* The `.circleci/config.yml` is set up to run selection on non-default branch.
552+
* The `.circleci/config.yml` is set up to use high parallelism on the analysis branch.
548553

549554
=== Examples
550555

551-
*Running analysis on a branch named `main` and selection on all other branches*
556+
==== Run analysis on a branch named `main` and selection on all other branches
552557

553558
No changes required, this is the default setting.
554559

555-
*Running analysis on a branch named `master` and selection on all other branches*
560+
==== Run analysis on a branch named `master` and selection on all other branches
556561

562+
.CircleCI configuration for running analysis on a branch named `master` and selection on all other branches
557563
[source,yaml]
558564
----
559565
# .circleci/config.yml
@@ -569,8 +575,9 @@ jobs:
569575
path: test-reports
570576
----
571577

572-
*Running higher parallelism on the analysis branch*
578+
==== Run higher parallelism on the analysis branch
573579

580+
.CircleCI configuration for running parallelism of 10 on the main branch and 2 on all other branches
574581
[source,yaml]
575582
----
576583
# .circleci/config.yml
@@ -586,8 +593,10 @@ jobs:
586593
path: test-reports
587594
----
588595

589-
*Running analysis on a scheduled pipeline and timeboxing some analysis on main*
596+
[#run-analysis-on-scheduled-pipeline]
597+
==== Run analysis on a scheduled pipeline and timeboxing some analysis on main
590598

599+
.CircleCI configuration for running analysis only on scheduled pipelines
591600
[source,yaml]
592601
----
593602
# .circleci/config.yml
@@ -620,6 +629,7 @@ workflows:
620629
- test
621630
----
622631

632+
.Test suite config. Set time limit of 10 minutes for the analysis on the main branch
623633
[source,yaml]
624634
----
625635
# .circleci/test-suites.yml
@@ -787,7 +797,7 @@ Yes! The branch behavior is fully customizable through your CircleCI configurati
787797
. Feature branches if needed for testing.
788798
. Scheduled pipelines independent of branch.
789799

790-
See Scenario 3 in the "Flag Usage Scenarios" section for examples of customizing branch behavior.
800+
See the <<run-higher-parallelism-on-the-analysis-branch,Run higher parallelism on the analysis branch>> example for an example of customizing branch behavior.
791801

792802
=== Can I run test analysis and selection on any branch?
793803

@@ -797,7 +807,7 @@ Yes! The branch behavior is fully customizable through your CircleCI configurati
797807
. Feature branches if needed for testing.
798808
. Scheduled pipelines.
799809

800-
See Scenario 3 in the "Flag Usage Scenarios" section for examples of customizing branch behavior.
810+
See the <<run-higher-parallelism-on-the-analysis-branch,Run higher parallelism on the analysis branch>> example for an example of customizing branch behavior.
801811

802812
[#baseline-coverage]
803813
=== Why are there so many files impacting a test?

0 commit comments

Comments
 (0)