1
1
---
2
- title : Configuration
2
+ title : Configuration (Legacy)
3
3
---
4
4
5
+ <Alert type =" warning " >
6
+
7
+ If you are on a newer version of Cypress that uses ` cypress.config.js ` or
8
+ ` cypress.config.ts ` , please see the
9
+ [ v10 configuration] ( https://docs.cypress.io/guides/references/configuration )
10
+ guide.
11
+
12
+ For more info on upgrading configuration to Cypress v10, see the
13
+ [ migration guide] ( https://docs.cypress.io/guides/references/migration-guide ) .
14
+
15
+ </Alert >
16
+
5
17
## cypress.json
6
18
7
- The first time you open Cypress Test Runner, it creates the ` cypress.json `
8
- configuration file. This JSON file is used to store any configuration values you
9
- supply. If you
10
- [ configure your tests to record] ( /guides/dashboard/projects#Setup ) the results
11
- to the [ Cypress Dashboard] ( https://on.cypress.io/dashboard-introduction ) the
12
- ` projectId ` will be written in this file too.
19
+ The first time you open Cypress, it creates the ` cypress.json ` configuration
20
+ file. This JSON file is used to store any configuration values you supply. If
21
+ you [ configure your tests to record] ( /guides/dashboard/projects#Setup ) the
22
+ results to the [ Cypress Dashboard] ( https://on.cypress.io/dashboard-introduction )
23
+ the ` projectId ` will be written in this file too.
13
24
14
25
<Alert type =" warning " >
15
26
16
- <strong class = " alert-header " >Change Configuration File</strong >
27
+ <strong >Change Configuration File</strong >
17
28
18
29
You can change the configuration file or turn off the use of a configuration
19
30
file by using the
@@ -158,7 +169,7 @@ The Node version is used in Cypress to:
158
169
- Execute code in the
159
170
[ pluginsFile] ( /guides/references/configuration#Folders-Files ) .
160
171
161
- <DocsImage src =" /img/guides/test-runner-settings-nodejs-version.jpg " alt =" Node version in Settings in Test Runner " ></DocsImage >
172
+ <DocsImage src =" /img/guides/configuration/ test-runner-settings-nodejs-version.jpg " alt =" Node version in Settings in Cypress " ></DocsImage >
162
173
163
174
### Experiments
164
175
@@ -335,7 +346,6 @@ at run time.
335
346
- ` env ` ** note:** Provided environment variables will be merged with current
336
347
environment variables.
337
348
- ` execTimeout `
338
- - ` experimentalSessionSupport `
339
349
- ` includeShadowDom `
340
350
- ` keystrokeDelay `
341
351
- ` numTestsKeptInMemory `
@@ -448,7 +458,7 @@ value has been set via the following ways:
448
458
- [ Command Line arguments] ( /guides/guides/command-line )
449
459
- [ Plugins file] ( /api/plugins/configuration-api )
450
460
451
- <DocsImage src =" /img/guides/configuration/see-resolved-configuration.jpg " alt =" See resolved configuration " ></DocsImage >
461
+ <DocsImage src =" /img/guides/configuration/see-resolved-configuration.jpg " alt =" See resolved configuration " ></DocsImage >
452
462
453
463
## Notes
454
464
@@ -458,7 +468,7 @@ By passing a string or array of strings you can block requests made to one or
458
468
more hosts.
459
469
460
470
To see a working example of this please check out our
461
- [ Stubbing Google Analytics Recipe] ( /examples/examples/ recipes#Stubbing-and-spying ) .
471
+ [ Stubbing Google Analytics Recipe] ( /examples/recipes#Stubbing-and-spying ) .
462
472
463
473
To block a host:
464
474
@@ -519,7 +529,7 @@ When Cypress blocks a request made to a matching host, it will automatically
519
529
send a ` 503 ` status code. As a convenience it also sets a
520
530
` x-cypress-matched-blocked-host ` header so you can see which rule it matched.
521
531
522
- <DocsImage src =" /img/guides/blocked-host.png " alt =" Network tab of dev tools with analytics.js request selected and the response header highlighted " ></DocsImage >
532
+ <DocsImage src =" /img/guides/references/ blocked-host.png " alt =" Network tab of dev tools with analytics.js request selected and the response header highlighted " ></DocsImage >
523
533
524
534
### modifyObstructiveCode
525
535
@@ -576,7 +586,7 @@ interact with the browser.
576
586
Because GC adds additional time to the overall run, we've added the amount of
577
587
time this routine has taken to the bottom of the Command Log in the Test Runner.
578
588
579
- <DocsImage src =" /img/guides/firefox-gc-interval-in-command-log.jpg " alt =" GC duration shown " ></DocsImage >
589
+ <DocsImage src =" /img/guides/configuration/ firefox-gc-interval-in-command-log.jpg " alt =" GC duration shown " ></DocsImage >
580
590
581
591
#### Configuration
582
592
@@ -711,19 +721,20 @@ DEBUG=cypress:cli,cypress:server:specs
711
721
712
722
## History
713
723
714
- | Version | Changes |
715
- | -------------------------------------------- | ------------------------------------------------------- |
716
- | [ 8.7.0] ( /guides/references/changelog#8-7-0 ) | Added ` slowTestThreshold ` option |
717
- | [ 8.0.0] ( /guides/references/changelog#8-0-0 ) | Added ` clientCertificates ` option |
718
- | [ 7.0.0] ( /guides/references/changelog#7-0-0 ) | Added ` e2e ` and ` component ` options. |
719
- | [ 7.0.0] ( /guides/references/changelog#7-0-0 ) | Added ` redirectionLimit ` option. |
720
- | [ 6.1.0] ( /guides/references/changelog#6-1-0 ) | Added ` scrollBehavior ` option. |
721
- | [ 5.2.0] ( /guides/references/changelog#5-2-0 ) | Added ` includeShadowDom ` option. |
722
- | [ 5.0.0] ( /guides/references/changelog#5-0-0 ) | Added ` retries ` configuration. |
723
- | [ 5.0.0] ( /guides/references/changelog#5-0-0 ) | Renamed ` blacklistHosts ` configuration to ` blockHosts ` . |
724
- | [ 4.1.0] ( /guides/references/changelog#4-12-0 ) | Added ` screenshotOnRunFailure ` configuration. |
725
- | [ 4.0.0] ( /guides/references/changelog#4-0-0 ) | Added ` firefoxGcInterval ` configuration. |
726
- | [ 3.5.0] ( /guides/references/changelog#3-5-0 ) | Added ` nodeVersion ` configuration. |
724
+ | Version | Changes |
725
+ | --------------------------------------------- | ------------------------------------------------------- |
726
+ | [ 10.0.0] ( /guides/references/changelog#10-0-0 ) | Added page due to deprecation of ` cypress.json ` file |
727
+ | [ 8.7.0] ( /guides/references/changelog#8-7-0 ) | Added ` slowTestThreshold ` option |
728
+ | [ 8.0.0] ( /guides/references/changelog#8-0-0 ) | Added ` clientCertificates ` option |
729
+ | [ 7.0.0] ( /guides/references/changelog#7-0-0 ) | Added ` e2e ` and ` component ` options. |
730
+ | [ 7.0.0] ( /guides/references/changelog#7-0-0 ) | Added ` redirectionLimit ` option. |
731
+ | [ 6.1.0] ( /guides/references/changelog#6-1-0 ) | Added ` scrollBehavior ` option. |
732
+ | [ 5.2.0] ( /guides/references/changelog#5-2-0 ) | Added ` includeShadowDom ` option. |
733
+ | [ 5.0.0] ( /guides/references/changelog#5-0-0 ) | Added ` retries ` configuration. |
734
+ | [ 5.0.0] ( /guides/references/changelog#5-0-0 ) | Renamed ` blacklistHosts ` configuration to ` blockHosts ` . |
735
+ | [ 4.1.0] ( /guides/references/changelog#4-12-0 ) | Added ` screenshotOnRunFailure ` configuration. |
736
+ | [ 4.0.0] ( /guides/references/changelog#4-0-0 ) | Added ` firefoxGcInterval ` configuration. |
737
+ | [ 3.5.0] ( /guides/references/changelog#3-5-0 ) | Added ` nodeVersion ` configuration. |
727
738
728
739
## See also
729
740
0 commit comments