Skip to content

Commit 49fd9a3

Browse files
committed
Add schema and downloads
1 parent b47a207 commit 49fd9a3

15 files changed

+1207
-1
lines changed

site/docfx.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"resource": [
1919
{
2020
"files": [
21-
"images/**"
21+
"downloads/**",
22+
"images/**",
23+
"schema/**/*.json"
2224
]
2325
}
2426
],
3.23 KB
Binary file not shown.
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "https://xunit.net/schema/current/xunit.runner.schema.json",
4+
"title": "xUnit.net Runner Configuration",
5+
"description": "Configuration file for unit test projects using xUnit.net",
6+
"type": "object",
7+
"properties": {
8+
"$schema": {
9+
"description": "The document schema",
10+
"default": "https://xunit.net/schema/current/xunit.runner.schema.json",
11+
"type": "string"
12+
},
13+
"appDomain": {
14+
"description": "Determines whether the runner will use an app domain to discover and run tests. If you choose 'required', app domains will be required (only desktop tests can be run); if you choose 'denied', then tests will not use app domains; if you choose 'ifAvailable', then app domains use is left to the discretion of the runner. Defaults to 'ifAvailable'. Note that not all runners support app domains, so the 'required' value may not always be valid.",
15+
"default": "ifAvailable",
16+
"enum": [
17+
"required",
18+
"ifAvailable",
19+
"denied"
20+
]
21+
},
22+
"assertEquivalentMaxDepth": {
23+
"description": "Determines the maximum recursive depth for object comparisons when using Assert.Equivalent.",
24+
"default": 50,
25+
"type": "integer",
26+
"minimum": 1,
27+
"maximum": 2147483647
28+
},
29+
"culture": {
30+
"description": "Sets the culture used when running tests. It should be one of: a BCP 47-compatible culture name (https://www.rfc-editor.org/info/bcp47); 'invariant' for the system invariant culture; or 'default' for the current system culture.",
31+
"default": "default",
32+
"type": "string"
33+
},
34+
"diagnosticMessages": {
35+
"description": "Enables or disables diagnostic information during test discovery and execution.",
36+
"default": false,
37+
"type": "boolean"
38+
},
39+
"failSkips": {
40+
"description": "Enables or disables converting skipped tests into failed tests.",
41+
"default": false,
42+
"type": "boolean"
43+
},
44+
"failWarns": {
45+
"description": "Enables or disables warned tests being treated as errors. Supported for v3+ test assemblies only.",
46+
"default": false,
47+
"type": "boolean"
48+
},
49+
"internalDiagnosticMessages": {
50+
"description": "Enables or disables internal diagnostic information during test discovery and execution.",
51+
"default": false,
52+
"type": "boolean"
53+
},
54+
"longRunningTestSeconds": {
55+
"description": "Enables reporting of tests which take longer than the configured time to complete (set to 0 to disable).",
56+
"type": "integer",
57+
"minimum": 0,
58+
"maximum": 2147483647
59+
},
60+
"maxParallelThreads": {
61+
"description": "Configures the maximum number of threads to be used when parallelizing tests within this assembly. Use a value of 'default' or 0 to indicate that you would like the default behavior; use a value of 'unlimited' or -1 to indicate that you do not wish to limit the number of threads used for parallelization. Positive integer values indicate an exact number of threads; a string value formatted as a positive integer or decimal followed by 'x' indicates a thread count which is a multiple of the CPU threads available (example: '1x' would give 4 threads on a 4 thread CPU, or '1.5x' would give 6 threads on a 4 thread CPU).",
62+
"type": [
63+
"integer",
64+
"string"
65+
],
66+
"default": "default",
67+
"pattern": "^(\\d+(\\.\\d+)?(x|X)|default|unlimited)$",
68+
"minimum": -1,
69+
"maximum": 2147483647
70+
},
71+
"methodDisplay": {
72+
"description": "Configures the default display name for test cases. If you choose 'method', the display name will be just the method (without the class name); if you choose 'classAndMethod', the default display name will be the fully qualified class name and method name.",
73+
"default": "classAndMethod",
74+
"enum": [
75+
"method",
76+
"classAndMethod"
77+
]
78+
},
79+
"methodDisplayOptions": {
80+
"description": "Configures one or more automatic transformations of test names. Flag names should be combined with a comma (i.e., flag1,flag2). Valid flags are: 'replaceUnderscoreWithSpace', 'useOperatorMonikers', 'useEscapeSequences', 'replacePeriodWithComma'. There are special flags named 'all' and 'none'.",
81+
"default": "none",
82+
"type": "string"
83+
},
84+
"parallelAlgorithm": {
85+
"description": "Configures the algorithm used when parallelizing test collections (and a limited number of threads). Valid values are 'conservative' (default) or 'aggressive'. For more information: https://xunit.net/docs/running-tests-in-parallel#algorithms",
86+
"default": "conservative",
87+
"enum": [
88+
"conservative",
89+
"aggressive"
90+
]
91+
},
92+
"parallelizeAssembly": {
93+
"description": "Instructs the test runner that this assembly is willing to run in parallel with other assemblies.",
94+
"default": false,
95+
"type": "boolean"
96+
},
97+
"parallelizeTestCollections": {
98+
"description": "Enables or disables tests inside this assembly from running in parallel against each other. Tests in the same test collection will be run sequentially against each other, but tests in different test collections will be run in parallel against each other.",
99+
"default": true,
100+
"type": "boolean"
101+
},
102+
"preEnumerateTheories": {
103+
"description": "Enables or disables pre-enumerate of theories so that there is an individual test case for each theory data row. Set this to 'false' to return a single test case for each theory without pre-enumerating the data ahead of time; set this to 'true' to attempt to pre-enumerate each theory row when possible.",
104+
"type": "boolean"
105+
},
106+
"printMaxEnumerableLength": {
107+
"description": "Sets the maximum number of items to print when printing a collection, after which an ellipsis will be shown. Defaults to 5. If set to 0, there is no maximum length when printing collections collection.",
108+
"default": 5,
109+
"type": "integer",
110+
"minimum": 0,
111+
"maximum": 2147483646
112+
},
113+
"printMaxObjectDepth": {
114+
"description": "Sets the maximum number of embedded objects to print, after which an ellipsis will be shown. Defaults to 3. If set to 1, only prints top-level objects; if set to 0, there is no maximum depth for embedded objects.",
115+
"default": 3,
116+
"type": "integer",
117+
"minimum": 0,
118+
"maximum": 2147483646
119+
},
120+
"printMaxObjectMemberCount": {
121+
"description": "Sets the maximum number of members to print when printing an object, after which an ellipsis will be shown. Defaults to 5. If set to 0, all object members will be printed.",
122+
"default": 5,
123+
"type": "integer",
124+
"minimum": 0,
125+
"maximum": 2147483646
126+
},
127+
"printMaxStringLength": {
128+
"description": "Sets the maximum length when printing a string value, after which an ellipsis will be shown. Defaults to 50. If set to 0, strings will not be truncated when printed.",
129+
"default": 50,
130+
"type": "integer",
131+
"minimum": 0,
132+
"maximum": 2147483646
133+
},
134+
"seed": {
135+
"description": "Set this to set the seed used for randomization (affects how the test cases are randomized). This is only valid for v3.0+ test assemblies; it will be ignored for v1 or v2 assemblies. If the seed value isn't set, then the system will determine a reasonable seed.",
136+
"type": "integer"
137+
},
138+
"shadowCopy": {
139+
"description": "Enables or disables use of shadow copying when using app domains. Has no effect if app domains are not used.",
140+
"default": true,
141+
"type": "boolean"
142+
},
143+
"showLiveOutput": {
144+
"description": "Enables or disables showing output from ITestOutputHelper live during the test run (in addition to showing them after the test has completed).",
145+
"default": false,
146+
"type": "boolean"
147+
},
148+
"stopOnFail": {
149+
"description": "Enable or disable stopping running further tests once a failed test has been recorded.",
150+
"default": false,
151+
"type": "boolean"
152+
}
153+
},
154+
"additionalProperties": false
155+
}

site/schema/index.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: JSON Schemas
3+
---
4+
5+
# JSON Schemas
6+
7+
This page includes a complete list of schema versions that have been published.
8+
9+
The [configuration files](/docs/configuration-files) documentation indicates which versions of the Core Framework and associated first party runners support which version of the schema. In general, the schema versions are additive, so passing a newer configuration file to a runner which only understands an older version of the schema _should_ result in the runner simply ignoring any newly added configuration entries. If you are finding that some configuration items aren't being respected by a first or third party runner, once you've verified name and value validity against the schema, you may need to upgrade to a newer runner to take advantage of newer configuration items.
10+
11+
The primary recommended URL is [https://xunit.net/schema/current/xunit.runner.schema.json](current/xunit.runner.schema.json), which always points to the latest RTM version.
12+
13+
> [!IMPORTANT]
14+
> Any prerelease version is subject to change.
15+
16+
## v3
17+
18+
[current](current/xunit.runner.schema.json){: .release }
19+
[3.1](v3.1/xunit.runner.schema.json){: .release }
20+
[3.0](v3.0/xunit.runner.schema.json){: .release }
21+
[3.0-alpha-1](v3.0-alpha-1/xunit.runner.schema.json){: .prerelease }
22+
23+
## v2
24+
25+
[2.8](v2.8/xunit.runner.schema.json){: .release }
26+
[2.5](v2.5/xunit.runner.schema.json){: .release }
27+
[2.4](v2.4/xunit.runner.schema.json){: .release }
28+
[2.3](v2.3/xunit.runner.schema.json){: .release }
29+
[2.2](v2.2/xunit.runner.schema.json){: .release }
30+
[2.1-rc1](v2.1-rc1/xunit.runner.schema.json){: .prerelease }
31+
32+
## v1
33+
34+
[1.9](v1/xunit.runner.schema.json){: .release }
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "https://xunit.net/schema/v1/xunit.runner.schema.json",
4+
"title": "xUnit.net Runner Configuration",
5+
"description": "Configuration file for unit test projects using xUnit.net",
6+
"type": "object",
7+
"properties": {
8+
"$schema": {
9+
"description": "The document schema",
10+
"default": "https://xunit.net/schema/v1/xunit.runner.schema.json",
11+
"type": "string"
12+
},
13+
"diagnosticMessages": {
14+
"description": "Enables or disables diagnostic information during test discovery and execution.",
15+
"default": false,
16+
"type": "boolean"
17+
},
18+
"maxParallelThreads": {
19+
"description": "Configures the maximum number of threads to be used when parallelizing tests within this assembly.",
20+
"type": "integer",
21+
"minimum": 1
22+
},
23+
"methodDisplay": {
24+
"description": "Configures the default display name for test cases. If you choose 'method', the display name will be just the method (without the class name); if you choose 'classAndMethod', the default display name will be the fully qualified class name and method name.",
25+
"default": "classAndMethod",
26+
"enum": [
27+
"method",
28+
"classAndMethod"
29+
]
30+
},
31+
"parallelizeAssembly": {
32+
"description": "Instructs the test runner that this assembly is willing to run in parallel with other assemblies.",
33+
"default": false,
34+
"type": "boolean"
35+
},
36+
"parallelizeTestCollections": {
37+
"description": "Enables or disables tests inside this assembly from running in parallel against each other. Tests in the same test collection will be run sequentially against each other, but tests in different test collections will be run in parallel against each other.",
38+
"default": true,
39+
"type": "boolean"
40+
},
41+
"preEnumerateTheories": {
42+
"description": "Enables or disables pre-enumerate of theories so that there is an individual test case for each theory data row. Set this to 'false' to return a single test case for each theory without pre-enumerating the data ahead of time.",
43+
"default": true,
44+
"type": "boolean"
45+
},
46+
"useAppDomain": {
47+
"description": "Enables or disables the use of an app domain to discover and run tests. Defaults to 'true'. Note that not all runners support app domains, so this flag may be ignored.",
48+
"default": true,
49+
"type": "boolean"
50+
}
51+
},
52+
"additionalProperties": false
53+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "https://xunit.net/schema/v2.1-rc1/xunit.runner.schema.json",
4+
"title": "xUnit.net Runner Configuration",
5+
"description": "Configuration file for unit test projects using xUnit.net",
6+
"type": "object",
7+
"properties": {
8+
"$schema": {
9+
"description": "The document schema",
10+
"default": "https://xunit.net/schema/v2.1-rc1/xunit.runner.schema.json",
11+
"type": "string"
12+
},
13+
"appDomain": {
14+
"description": "Determines whether the runner will use an app domain to discover and run tests. If you choose 'required', app domains will be required (only desktop tests can be run); if you choose 'denied', then tests will not use app domains; if you choose 'ifAvailable', then app domains use is left to the discretion of the runner. Defaults to 'ifAvailable'. Note that not all runners support app domains, so the 'required' value may not always be valid.",
15+
"default": "ifAvailable",
16+
"enum": [
17+
"required",
18+
"ifAvailable",
19+
"denied"
20+
]
21+
},
22+
"diagnosticMessages": {
23+
"description": "Enables or disables diagnostic information during test discovery and execution.",
24+
"default": false,
25+
"type": "boolean"
26+
},
27+
"maxParallelThreads": {
28+
"description": "Configures the maximum number of threads to be used when parallelizing tests within this assembly.",
29+
"type": "integer",
30+
"minimum": 1
31+
},
32+
"methodDisplay": {
33+
"description": "Configures the default display name for test cases. If you choose 'method', the display name will be just the method (without the class name); if you choose 'classAndMethod', the default display name will be the fully qualified class name and method name.",
34+
"default": "classAndMethod",
35+
"enum": [
36+
"method",
37+
"classAndMethod"
38+
]
39+
},
40+
"parallelizeAssembly": {
41+
"description": "Instructs the test runner that this assembly is willing to run in parallel with other assemblies.",
42+
"default": false,
43+
"type": "boolean"
44+
},
45+
"parallelizeTestCollections": {
46+
"description": "Enables or disables tests inside this assembly from running in parallel against each other. Tests in the same test collection will be run sequentially against each other, but tests in different test collections will be run in parallel against each other.",
47+
"default": true,
48+
"type": "boolean"
49+
},
50+
"preEnumerateTheories": {
51+
"description": "Enables or disables pre-enumerate of theories so that there is an individual test case for each theory data row. Set this to 'false' to return a single test case for each theory without pre-enumerating the data ahead of time.",
52+
"default": true,
53+
"type": "boolean"
54+
},
55+
"shadowCopy": {
56+
"description": "Enables or disables use of shadow copying when using app domains. Has no effect if app domains are not used.",
57+
"default": true,
58+
"type": "boolean"
59+
}
60+
},
61+
"additionalProperties": false
62+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "https://xunit.net/schema/v2.2/xunit.runner.schema.json",
4+
"title": "xUnit.net Runner Configuration",
5+
"description": "Configuration file for unit test projects using xUnit.net",
6+
"type": "object",
7+
"properties": {
8+
"$schema": {
9+
"description": "The document schema",
10+
"default": "https://xunit.net/schema/v2.2/xunit.runner.schema.json",
11+
"type": "string"
12+
},
13+
"appDomain": {
14+
"description": "Determines whether the runner will use an app domain to discover and run tests. If you choose 'required', app domains will be required (only desktop tests can be run); if you choose 'denied', then tests will not use app domains; if you choose 'ifAvailable', then app domains use is left to the discretion of the runner. Defaults to 'ifAvailable'. Note that not all runners support app domains, so the 'required' value may not always be valid.",
15+
"default": "ifAvailable",
16+
"enum": [
17+
"required",
18+
"ifAvailable",
19+
"denied"
20+
]
21+
},
22+
"diagnosticMessages": {
23+
"description": "Enables or disables diagnostic information during test discovery and execution.",
24+
"default": false,
25+
"type": "boolean"
26+
},
27+
"longRunningTestSeconds": {
28+
"description": "Enables reporting of tests which take longer than the configured time to complete (set to 0 to disable).",
29+
"type": "integer",
30+
"minimum": 0
31+
},
32+
"maxParallelThreads": {
33+
"description": "Configures the maximum number of threads to be used when parallelizing tests within this assembly.",
34+
"type": "integer",
35+
"minimum": 1
36+
},
37+
"methodDisplay": {
38+
"description": "Configures the default display name for test cases. If you choose 'method', the display name will be just the method (without the class name); if you choose 'classAndMethod', the default display name will be the fully qualified class name and method name.",
39+
"default": "classAndMethod",
40+
"enum": [
41+
"method",
42+
"classAndMethod"
43+
]
44+
},
45+
"parallelizeAssembly": {
46+
"description": "Instructs the test runner that this assembly is willing to run in parallel with other assemblies.",
47+
"default": false,
48+
"type": "boolean"
49+
},
50+
"parallelizeTestCollections": {
51+
"description": "Enables or disables tests inside this assembly from running in parallel against each other. Tests in the same test collection will be run sequentially against each other, but tests in different test collections will be run in parallel against each other.",
52+
"default": true,
53+
"type": "boolean"
54+
},
55+
"preEnumerateTheories": {
56+
"description": "Enables or disables pre-enumerate of theories so that there is an individual test case for each theory data row. Set this to 'false' to return a single test case for each theory without pre-enumerating the data ahead of time.",
57+
"default": true,
58+
"type": "boolean"
59+
},
60+
"shadowCopy": {
61+
"description": "Enables or disables use of shadow copying when using app domains. Has no effect if app domains are not used.",
62+
"default": true,
63+
"type": "boolean"
64+
}
65+
},
66+
"additionalProperties": false
67+
}

0 commit comments

Comments
 (0)