@@ -8,27 +8,29 @@ open Fake
8
8
9
9
(*
10
10
.\packages\Pickles.CommandLine\tools\pickles.exe --help
11
- Pickles version 2.3.0.0
12
- -f, --feature-directory=VALUE
13
- directory to start scanning recursively for
14
- features
15
- -o, --output-directory=VALUE
16
- directory where output files will be placed
17
- --trfmt, --test-results-format=VALUE
18
- the format of the linked test results
19
- (nunit|xunit)
20
- --lr, --link-results-file=VALUE
21
- the path to the linked test results file (can be
22
- a semicolon-separated list of files)
23
- --sn, --system-under-test-name=VALUE
24
- the name of the system under test
25
- --sv, --system-under-test-version=VALUE
26
- the version of the system under test
27
- -l, --language=VALUE the language of the feature files
28
- --df, --documentation-format=VALUE
29
- the format of the output documentation
30
- -v, --version
31
- -h, -?, --help
11
+ Pickles version 2.6.1.0
12
+ -f, --feature-directory=VALUE
13
+ directory to start scanning recursively for
14
+ features
15
+ -o, --output-directory=VALUE
16
+ directory where output files will be placed
17
+ --trfmt, --test-results-format=VALUE
18
+ the format of the linked test results
19
+ (nunit|xunit)
20
+ --lr, --link-results-file=VALUE
21
+ the path to the linked test results file (can be
22
+ a semicolon-separated list of files)
23
+ --sn, --system-under-test-name=VALUE
24
+ the name of the system under test
25
+ --sv, --system-under-test-version=VALUE
26
+ the version of the system under test
27
+ -l, --language=VALUE the language of the feature files
28
+ --df, --documentation-format=VALUE
29
+ the format of the output documentation
30
+ -v, --version
31
+ -h, -?, --help
32
+ --exp, --include-experimental-features
33
+ whether to include experimental features
32
34
*)
33
35
34
36
/// Option which allows to specify if failure of pickles should break the build.
@@ -41,7 +43,14 @@ type PicklesErrorLevel =
41
43
/// The format of the test results
42
44
type TestResultsFormat =
43
45
| Nunit
46
+ | NUnit
47
+ | NUnit3
44
48
| XUnit
49
+ | XUnit2
50
+ | MSTest
51
+ | CucumberJSON
52
+ | SpecRun
53
+ | VSTest
45
54
46
55
type DocumentationFormat =
47
56
| DHTML
@@ -74,6 +83,8 @@ type PicklesParams =
74
83
TimeOut : TimeSpan
75
84
/// Option which allows to specify if failure of pickles should break the build.
76
85
ErrorLevel : PicklesErrorLevel
86
+ /// Option which allows to enable some experimental features
87
+ IncludeExperimentalFeatures : bool option
77
88
}
78
89
79
90
/// The Pickles default parameters
@@ -91,19 +102,21 @@ type PicklesParams =
91
102
/// - `SystemUnderTestVersion` - `None`
92
103
/// - `TimeOut` - 5 minutes
93
104
/// - `ErrorLevel` - `Error`
105
+ /// - `IncludeExperimentalFeatures` - `None`
94
106
let PicklesDefaults =
95
107
{
96
108
ToolPath = findToolInSubPath " pickles.exe" currentDirectory
97
109
FeatureDirectory = currentDirectory
98
110
FeatureFileLanguage = None
99
111
OutputDirectory = currentDirectory @@ " Documentation"
100
112
OutputFileFormat = DHTML
101
- TestResultsFormat = Nunit
113
+ TestResultsFormat = NUnit
102
114
LinkedTestResultFiles = []
103
115
SystemUnderTestName = None
104
116
SystemUnderTestVersion = None
105
117
TimeOut = TimeSpan.FromMinutes 5.
106
118
ErrorLevel = Error
119
+ IncludeExperimentalFeatures = None
107
120
}
108
121
109
122
let buildPicklesArgs parameters =
@@ -118,15 +131,25 @@ let buildPicklesArgs parameters =
118
131
| [] -> None
119
132
| _ -> match parameters.TestResultsFormat with
120
133
| Nunit -> Some " nunit"
134
+ | NUnit -> Some " nunit"
135
+ | NUnit3 -> Some " nunit3"
121
136
| XUnit -> Some " xunit"
137
+ | XUnit2 -> Some " xunit2"
138
+ | MSTest -> Some " mstest"
139
+ | CucumberJSON -> Some " cucumberjson"
140
+ | SpecRun -> Some " specrun"
141
+ | VSTest -> Some " vstest"
122
142
123
143
let linkedResultFiles = match parameters.LinkedTestResultFiles with
124
144
| [] -> None
125
145
| _ -> parameters.LinkedTestResultFiles
126
146
|> Seq.map ( fun f -> sprintf " \" %s \" " f)
127
147
|> String.concat " ;"
128
148
|> Some
129
-
149
+ let experimentalFeatures = match parameters.IncludeExperimentalFeatures with
150
+ | Some true -> Some " --exp"
151
+ | _ -> None
152
+
130
153
new StringBuilder()
131
154
|> appendWithoutQuotes ( sprintf " -f \" %s \" " parameters.FeatureDirectory)
132
155
|> appendWithoutQuotes ( sprintf " -o \" %s \" " parameters.OutputDirectory)
@@ -136,6 +159,7 @@ let buildPicklesArgs parameters =
136
159
|> appendWithoutQuotes ( sprintf " --df %s " outputFormat)
137
160
|> appendIfSome testResultFormat ( sprintf " --trfmt %s " )
138
161
|> appendIfSome linkedResultFiles ( sprintf " --lr %s " )
162
+ |> appendIfSome experimentalFeatures ( sprintf " %s " )
139
163
|> toText
140
164
141
165
module internal ResultHandling =
@@ -184,4 +208,4 @@ let Pickles setParams =
184
208
185
209
ResultHandling.failBuildIfPicklesReportedError parameters.ErrorLevel result
186
210
187
- traceEndTask " Pickles" " "
211
+ traceEndTask " Pickles" " "
0 commit comments