You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/modules/test/pages/adaptive-testing.adoc
+25-15Lines changed: 25 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,12 @@ CAUTION: *Adaptive testing* is available in closed preview. When the feature is
9
9
10
10
NOTE: This page is currently in development and will be updated as the feature is developed.
11
11
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.
13
18
14
19
== Use cases for adaptive testing
15
20
@@ -25,7 +30,7 @@ TIP: In codebases with sparse test coverage, adaptive testing cannot accurately
25
30
* 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.
26
31
* 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.
27
32
28
-
== Key benefits:
33
+
== Key benefits
29
34
30
35
* Faster CI/CD pipelines through intelligent test selection.
31
36
* Optimized resource usage and cost efficiency.
@@ -342,8 +347,8 @@ options:
342
347
343
348
*Checklist*
344
349
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.
347
352
348
353
*Examples of `analysis` commands*
349
354
@@ -427,8 +432,8 @@ This section will run analysis on a feature branch to seed the initial impact da
427
432
428
433
*Checklist*
429
434
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`).
432
437
433
438
[source,yaml]
434
439
----
@@ -542,18 +547,19 @@ Now the test suite is set up, test selection is working and the test analysis is
542
547
543
548
*Checklist*
544
549
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.
548
553
549
554
=== Examples
550
555
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
552
557
553
558
No changes required, this is the default setting.
554
559
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
556
561
562
+
.CircleCI configuration for running analysis on a branch named `master` and selection on all other branches
557
563
[source,yaml]
558
564
----
559
565
# .circleci/config.yml
@@ -569,8 +575,9 @@ jobs:
569
575
path: test-reports
570
576
----
571
577
572
-
*Running higher parallelism on the analysis branch*
578
+
==== Run higher parallelism on the analysis branch
573
579
580
+
.CircleCI configuration for running parallelism of 10 on the main branch and 2 on all other branches
574
581
[source,yaml]
575
582
----
576
583
# .circleci/config.yml
@@ -586,8 +593,10 @@ jobs:
586
593
path: test-reports
587
594
----
588
595
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
590
598
599
+
.CircleCI configuration for running analysis only on scheduled pipelines
591
600
[source,yaml]
592
601
----
593
602
# .circleci/config.yml
@@ -620,6 +629,7 @@ workflows:
620
629
- test
621
630
----
622
631
632
+
.Test suite config. Set time limit of 10 minutes for the analysis on the main branch
623
633
[source,yaml]
624
634
----
625
635
# .circleci/test-suites.yml
@@ -787,7 +797,7 @@ Yes! The branch behavior is fully customizable through your CircleCI configurati
787
797
. Feature branches if needed for testing.
788
798
. Scheduled pipelines independent of branch.
789
799
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.
791
801
792
802
=== Can I run test analysis and selection on any branch?
793
803
@@ -797,7 +807,7 @@ Yes! The branch behavior is fully customizable through your CircleCI configurati
797
807
. Feature branches if needed for testing.
798
808
. Scheduled pipelines.
799
809
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.
0 commit comments