xcpretty-security-patched 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.hound.yml +2 -0
- data/.kick +17 -0
- data/.rubocop.yml +239 -0
- data/.travis.yml +12 -0
- data/CHANGELOG.md +269 -0
- data/CONTRIBUTING.md +64 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +61 -0
- data/README.md +95 -0
- data/Rakefile +18 -0
- data/assets/report.html.erb +173 -0
- data/bin/xcpretty +90 -0
- data/features/assets/RACCommandSpec_enabled_signal_should_send_YES_while_executing_is_YES.png +0 -0
- data/features/assets/apple_raw.png +0 -0
- data/features/custom_formatter.feature +15 -0
- data/features/custom_reporter.feature +29 -0
- data/features/fixtures/xcodebuild.log +5963 -0
- data/features/html_report.feature +54 -0
- data/features/json_compilation_database_report.feature +33 -0
- data/features/junit_report.feature +49 -0
- data/features/knock_format.feature +11 -0
- data/features/simple_format.feature +238 -0
- data/features/steps/custom_reporter_steps.rb +16 -0
- data/features/steps/formatting_steps.rb +386 -0
- data/features/steps/html_steps.rb +32 -0
- data/features/steps/json_steps.rb +45 -0
- data/features/steps/junit_steps.rb +39 -0
- data/features/steps/report_steps.rb +27 -0
- data/features/steps/xcpretty_steps.rb +31 -0
- data/features/support/env.rb +123 -0
- data/features/tap_format.feature +31 -0
- data/features/test_format.feature +49 -0
- data/features/xcpretty.feature +14 -0
- data/lib/xcpretty/ansi.rb +72 -0
- data/lib/xcpretty/formatters/formatter.rb +200 -0
- data/lib/xcpretty/formatters/knock.rb +35 -0
- data/lib/xcpretty/formatters/rspec.rb +33 -0
- data/lib/xcpretty/formatters/simple.rb +200 -0
- data/lib/xcpretty/formatters/tap.rb +40 -0
- data/lib/xcpretty/parser.rb +596 -0
- data/lib/xcpretty/printer.rb +28 -0
- data/lib/xcpretty/reporters/html.rb +93 -0
- data/lib/xcpretty/reporters/json_compilation_database.rb +51 -0
- data/lib/xcpretty/reporters/junit.rb +102 -0
- data/lib/xcpretty/reporters/reporter.rb +62 -0
- data/lib/xcpretty/snippet.rb +38 -0
- data/lib/xcpretty/syntax.rb +58 -0
- data/lib/xcpretty/term.rb +14 -0
- data/lib/xcpretty/version.rb +4 -0
- data/lib/xcpretty.rb +38 -0
- data/spec/fixtures/NSStringTests.m +64 -0
- data/spec/fixtures/constants.rb +707 -0
- data/spec/fixtures/custom_formatter.rb +18 -0
- data/spec/fixtures/custom_reporter.rb +30 -0
- data/spec/fixtures/oneliner.m +1 -0
- data/spec/fixtures/raw_kiwi_compilation_fail.txt +24 -0
- data/spec/fixtures/raw_kiwi_fail.txt +1896 -0
- data/spec/fixtures/raw_specta_fail.txt +3110 -0
- data/spec/spec_helper.rb +7 -0
- data/spec/support/matchers/colors.rb +21 -0
- data/spec/xcpretty/ansi_spec.rb +47 -0
- data/spec/xcpretty/formatters/formatter_spec.rb +151 -0
- data/spec/xcpretty/formatters/rspec_spec.rb +56 -0
- data/spec/xcpretty/formatters/simple_spec.rb +178 -0
- data/spec/xcpretty/parser_spec.rb +636 -0
- data/spec/xcpretty/printer_spec.rb +55 -0
- data/spec/xcpretty/reporters/junit_spec.rb +20 -0
- data/spec/xcpretty/reporters/reporter_spec.rb +40 -0
- data/spec/xcpretty/snippet_spec.rb +46 -0
- data/spec/xcpretty/syntax_spec.rb +39 -0
- data/spec/xcpretty/term_spec.rb +26 -0
- data/xcpretty.gemspec +37 -0
- metadata +250 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
Feature: Creating a HTML test report
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given the tests have started running
|
5
|
+
|
6
|
+
Scenario: Showing a test suite
|
7
|
+
Given I have a passing test in my suite
|
8
|
+
When I pipe to xcpretty with "--report html"
|
9
|
+
Then I should see a test suite section in HTML
|
10
|
+
|
11
|
+
Scenario: Showing failed tests
|
12
|
+
Given I have a failing test in my suite
|
13
|
+
When I pipe to xcpretty with "--report html"
|
14
|
+
Then I should see a failed test in HTML
|
15
|
+
And the failure counter should show 1 test
|
16
|
+
|
17
|
+
Scenario: Showing passing tests
|
18
|
+
Given I have a passing test in my suite
|
19
|
+
When I pipe to xcpretty with "--report html"
|
20
|
+
Then I should see a passing test in HTML
|
21
|
+
|
22
|
+
Scenario: Counting tests
|
23
|
+
Given I have a passing test in my suite
|
24
|
+
And I have a failing test in my suite
|
25
|
+
And the test suite has finished
|
26
|
+
When I pipe to xcpretty with "--report html"
|
27
|
+
Then I should see 2 tests in HTML
|
28
|
+
|
29
|
+
Scenario: Having many test classes
|
30
|
+
Given I have tests in my suite from 2 classes
|
31
|
+
When I pipe to xcpretty with "--report html"
|
32
|
+
Then I should see 2 test suite sections in HTML
|
33
|
+
|
34
|
+
Scenario: Writing to a custom file path
|
35
|
+
When I pipe to xcpretty with "--report html" and specify a custom path
|
36
|
+
Then I should have a test report in a custom path
|
37
|
+
|
38
|
+
Scenario: Writing to multiple custom file paths
|
39
|
+
When I pipe to xcpretty with two custom "html" report paths
|
40
|
+
Then I should have test reports in two custom paths
|
41
|
+
|
42
|
+
Scenario: Showing screenshots
|
43
|
+
Given I have a passing test in my suite
|
44
|
+
And the test suite has finished
|
45
|
+
And I have a screenshot in the output folder
|
46
|
+
When I pipe to xcpretty with "--report html --screenshots"
|
47
|
+
Then I should see a screenshot in HTML
|
48
|
+
|
49
|
+
Scenario: Preventing unrelated images to be included in final report
|
50
|
+
Given I have a passing test in my suite
|
51
|
+
And the test suite has finished
|
52
|
+
And I have an unrelated image in the output folder
|
53
|
+
When I pipe to xcpretty with "--report html --screenshots"
|
54
|
+
Then I should not see a screenshot in HTML
|
@@ -0,0 +1,33 @@
|
|
1
|
+
Feature: Create a JSON compilation database
|
2
|
+
|
3
|
+
Scenario: Showing file compilation
|
4
|
+
Given I have a file to compile
|
5
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
6
|
+
Then the JSON compilation database should contain an entry with a command
|
7
|
+
Then the JSON compilation database should contain an entry with a directory
|
8
|
+
Then the JSON compilation database should contain an entry with a file
|
9
|
+
|
10
|
+
Scenario: Showing file compilation with CCache
|
11
|
+
Given I have a file to compile with ccache
|
12
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
13
|
+
Then the JSON compilation database should contain an entry with a command
|
14
|
+
Then the JSON compilation database should contain an entry with a directory
|
15
|
+
Then the JSON compilation database should contain an entry with a file
|
16
|
+
|
17
|
+
Scenario: Handling a complete xcodebuild session
|
18
|
+
Given some big input
|
19
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
20
|
+
Then the JSON compilation database should be complete
|
21
|
+
|
22
|
+
Scenario: Writing to a custom file path
|
23
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
24
|
+
Then I should have a JSON compilation database in a custom path
|
25
|
+
|
26
|
+
Scenario: Writing to multiple custom file paths
|
27
|
+
When I pipe to xcpretty with two custom "json-compilation-database" report paths
|
28
|
+
Then I should have JSON compilation databases in two custom paths
|
29
|
+
|
30
|
+
Scenario: A project with dependencies with no .pch file
|
31
|
+
Given some big input
|
32
|
+
When I pipe to xcpretty with "--report json-compilation-database" and specify a custom path
|
33
|
+
Then entries with a command shouldn't have malformed "-include" directives
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Feature: Creating a JUnit test report
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given the tests have started running
|
5
|
+
|
6
|
+
Scenario: Showing a test suite
|
7
|
+
Given I have a passing test in my suite
|
8
|
+
When I pipe to xcpretty with "--report junit"
|
9
|
+
Then I should see a test suite node
|
10
|
+
|
11
|
+
Scenario: Showing pending test output
|
12
|
+
Given I have a pending test in my suite
|
13
|
+
When I pipe to xcpretty with "--report junit"
|
14
|
+
Then I should see a pending test node in my report
|
15
|
+
|
16
|
+
Scenario: Showing failed tests
|
17
|
+
Given I have a failing test in my suite
|
18
|
+
When I pipe to xcpretty with "--report junit"
|
19
|
+
Then I should see a failed test node in my report
|
20
|
+
|
21
|
+
Scenario: Showing passing tests
|
22
|
+
Given I have a passing test in my suite
|
23
|
+
When I pipe to xcpretty with "--report junit"
|
24
|
+
Then I should see a passing test node in my report
|
25
|
+
|
26
|
+
Scenario: Counting tests
|
27
|
+
Given I have a passing test in my suite
|
28
|
+
And I have a failing test in my suite
|
29
|
+
And the test suite has finished
|
30
|
+
When I pipe to xcpretty with "--report junit"
|
31
|
+
Then I should see 2 tests in my report
|
32
|
+
|
33
|
+
Scenario: Having many test classes
|
34
|
+
Given I have tests in my suite from 2 classes
|
35
|
+
When I pipe to xcpretty with "--report junit"
|
36
|
+
Then I should see 2 test suites
|
37
|
+
|
38
|
+
Scenario: Writing to a custom file path
|
39
|
+
When I pipe to xcpretty with "--report junit" and specify a custom path
|
40
|
+
Then I should have a test report in a custom path
|
41
|
+
|
42
|
+
Scenario: Writing to multiple custom file paths
|
43
|
+
When I pipe to xcpretty with two custom "junit" report paths
|
44
|
+
Then I should have test reports in two custom paths
|
45
|
+
|
46
|
+
Scenario: Showing tests with one having a swift fatal error
|
47
|
+
Given I have a swift fatal error in a test in my suite
|
48
|
+
When I pipe to xcpretty with "--report junit"
|
49
|
+
Then I should see a failed test node in my report
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Feature: Showing Knock-style test output
|
2
|
+
|
3
|
+
Scenario: Showing failed tests
|
4
|
+
Given I have a failing test in my suite
|
5
|
+
When I pipe to xcpretty with "--knock"
|
6
|
+
Then I should see text beginning with "not ok"
|
7
|
+
|
8
|
+
Scenario: Showing passing tests
|
9
|
+
Given I have a passing test in my suite
|
10
|
+
When I pipe to xcpretty with "--knock"
|
11
|
+
Then I should see text beginning with "ok"
|
@@ -0,0 +1,238 @@
|
|
1
|
+
Feature: Showing build output in simple format
|
2
|
+
|
3
|
+
Scenario: Showing file compilation
|
4
|
+
Given I have a file to compile
|
5
|
+
When I pipe to xcpretty with "--simple --no-color"
|
6
|
+
Then I should see a successful compilation message
|
7
|
+
|
8
|
+
Scenario: Showing file compilation with CCache
|
9
|
+
Given I have a file to compile with ccache
|
10
|
+
When I pipe to xcpretty with "--simple --no-color"
|
11
|
+
Then I should see a successful compilation message
|
12
|
+
|
13
|
+
Scenario: Showing xib compilation
|
14
|
+
Given I have a xib to compile
|
15
|
+
When I pipe to xcpretty with "--simple --no-color"
|
16
|
+
Then I should see a successful compilation message
|
17
|
+
|
18
|
+
Scenario: Showing storyboard compilation
|
19
|
+
Given I have a storyboard to compile
|
20
|
+
When I pipe to xcpretty with "--simple"
|
21
|
+
Then I should see a successful compilation message
|
22
|
+
|
23
|
+
Scenario: Showing precompilation
|
24
|
+
Given I have a precompiled header
|
25
|
+
When I pipe to xcpretty with "--simple --no-color"
|
26
|
+
Then I should see a successful precompilation message
|
27
|
+
|
28
|
+
Scenario: Showing phase success
|
29
|
+
Given I have completed a build
|
30
|
+
When I pipe to xcpretty with "--simple"
|
31
|
+
Then I should see a "build" completion message
|
32
|
+
|
33
|
+
Scenario: Showing file compilation with color
|
34
|
+
Given I have a file to compile
|
35
|
+
When I pipe to xcpretty with "--simple --color"
|
36
|
+
Then I should see a yellow completion icon
|
37
|
+
|
38
|
+
Scenario: Showing xib compilation with color
|
39
|
+
Given I have a xib to compile
|
40
|
+
When I pipe to xcpretty with "--simple --color"
|
41
|
+
Then I should see a yellow completion icon
|
42
|
+
|
43
|
+
Scenario: Showing storyboard compilation with color
|
44
|
+
Given I have a storyboard to compile
|
45
|
+
When I pipe to xcpretty with "--simple --color"
|
46
|
+
Then I should see a yellow completion icon
|
47
|
+
|
48
|
+
Scenario: Showing precompilation
|
49
|
+
Given I have a precompiled header
|
50
|
+
When I pipe to xcpretty with "--simple --color"
|
51
|
+
Then I should see a yellow completion icon
|
52
|
+
|
53
|
+
Scenario: Showing aggregate target
|
54
|
+
Given I have an aggregate target to build
|
55
|
+
When I pipe to xcpretty with "--simple --no-color"
|
56
|
+
Then I should see an aggregate target message
|
57
|
+
|
58
|
+
Scenario: Showing analyze
|
59
|
+
Given I have a file to analyze
|
60
|
+
When I pipe to xcpretty with "--simple --no-color"
|
61
|
+
Then I should see a successful analyze message
|
62
|
+
|
63
|
+
Scenario: Showing shallow analyze
|
64
|
+
Given I have a file to shallow analyze
|
65
|
+
When I pipe to xcpretty with "--simple --no-color"
|
66
|
+
Then I should see a successful analyze message
|
67
|
+
|
68
|
+
Scenario: Showing tiff file validation
|
69
|
+
Given I have a tiff file to validate
|
70
|
+
When I pipe to xcpretty with "--simple --no-color"
|
71
|
+
Then I should see a successful tiff validation message
|
72
|
+
|
73
|
+
Scenario: Showing touch file
|
74
|
+
Given I have a file to touch
|
75
|
+
When I pipe to xcpretty with "--simple --no-color"
|
76
|
+
Then I should see a successful touch message
|
77
|
+
|
78
|
+
Scenario: Showing analyze with color
|
79
|
+
Given I have a file to analyze
|
80
|
+
When I pipe to xcpretty with "--simple --color"
|
81
|
+
Then I should see a yellow completion icon
|
82
|
+
|
83
|
+
Scenario: Showing shallow analyze with color
|
84
|
+
Given I have a file to shallow analyze
|
85
|
+
When I pipe to xcpretty with "--simple --color"
|
86
|
+
Then I should see a yellow completion icon
|
87
|
+
|
88
|
+
Scenario: Showing tiff file validation with color
|
89
|
+
Given I have a tiff file to validate
|
90
|
+
When I pipe to xcpretty with "--simple --color"
|
91
|
+
Then I should see a yellow completion icon
|
92
|
+
|
93
|
+
Scenario: Showing touch file with color
|
94
|
+
Given I have a file to touch
|
95
|
+
When I pipe to xcpretty with "--simple --color"
|
96
|
+
Then I should see a yellow completion icon
|
97
|
+
|
98
|
+
Scenario: Showing the start of a test run
|
99
|
+
Given the tests have started running
|
100
|
+
When I pipe to xcpretty with "--simple --no-color"
|
101
|
+
Then I should see that test suite has started
|
102
|
+
|
103
|
+
Scenario: Showing the start of a test suite
|
104
|
+
Given I start a test suite
|
105
|
+
When I pipe to xcpretty with "--simple --no-color"
|
106
|
+
Then I should see the name of suite only
|
107
|
+
|
108
|
+
Scenario: Showing the end of a test suite
|
109
|
+
Given the test suite has finished
|
110
|
+
When I pipe to xcpretty with "--simple --no-color"
|
111
|
+
Then I should see that the test suite finished
|
112
|
+
|
113
|
+
Scenario: Showing failed test output
|
114
|
+
Given I have a failing test in my suite
|
115
|
+
And the test suite has finished
|
116
|
+
When I pipe to xcpretty with "--simple --no-color"
|
117
|
+
Then I should see the name of a failed test
|
118
|
+
And I should see the path of a failed test
|
119
|
+
|
120
|
+
Scenario: Showing successful test output
|
121
|
+
Given I have a passing test in my suite
|
122
|
+
When I pipe to xcpretty with "--simple --no-color"
|
123
|
+
Then I should see the name of a passing test
|
124
|
+
And I should not see the name of the test group
|
125
|
+
And I should not see the path of a passing test
|
126
|
+
|
127
|
+
Scenario: Colorizing slow-ish tests in yellow
|
128
|
+
Given I have a slow-ish test in my suite
|
129
|
+
When I pipe to xcpretty with "--simple --color"
|
130
|
+
Then I should see the test time in yellow
|
131
|
+
|
132
|
+
Scenario: Colorizing slow tests in red
|
133
|
+
Given I have a slow test in my suite
|
134
|
+
When I pipe to xcpretty with "--simple --color"
|
135
|
+
Then I should see the test time in red
|
136
|
+
|
137
|
+
Scenario: Showing pending test output
|
138
|
+
Given I have a pending test in my suite
|
139
|
+
When I pipe to xcpretty with "--simple --no-color"
|
140
|
+
Then I should see the name of a pending test
|
141
|
+
|
142
|
+
Scenario: Showing measuring test output
|
143
|
+
Given I have a measuring test in my suite
|
144
|
+
When I pipe to xcpretty with "--simple --no-color"
|
145
|
+
Then I should see the name of a measuring test
|
146
|
+
|
147
|
+
Scenario: Showing failed test output with color
|
148
|
+
Given I have a failing test in my suite
|
149
|
+
And the test suite has finished
|
150
|
+
When I pipe to xcpretty with "--simple --color"
|
151
|
+
Then I should see a red failed test mark
|
152
|
+
And the final execution message should be red
|
153
|
+
|
154
|
+
Scenario: Showing successful test output with color
|
155
|
+
Given I have a passing test in my suite
|
156
|
+
And the test suite has finished
|
157
|
+
When I pipe to xcpretty with "--simple --color"
|
158
|
+
Then I should see a green passing test mark
|
159
|
+
|
160
|
+
Scenario: Running tests without UTF-8 support
|
161
|
+
Given I have a passing test in my suite
|
162
|
+
And I pipe to xcpretty with "--no-utf --color"
|
163
|
+
Then I should see a non-utf prefixed output
|
164
|
+
|
165
|
+
Scenario: Showing code signing
|
166
|
+
Given I have a file to code sign
|
167
|
+
When I pipe to xcpretty with "--simple --no-color"
|
168
|
+
Then I should see a successful code signing message
|
169
|
+
|
170
|
+
Scenario: Showing code signing a framework
|
171
|
+
Given I have a framework to code sign
|
172
|
+
When I pipe to xcpretty with "--simple --no-color"
|
173
|
+
Then I should see a successful code signing message
|
174
|
+
|
175
|
+
Scenario: Showing target will not be code signed warning
|
176
|
+
Given I have a target which will not be code signed
|
177
|
+
When I pipe to xcpretty with "--simple --color"
|
178
|
+
Then I should see a target will not be code signed warning
|
179
|
+
|
180
|
+
Scenario: Showing preprocess
|
181
|
+
Given I have a file to preprocess
|
182
|
+
When I pipe to xcpretty with "--simple --no-color"
|
183
|
+
Then I should see a successful preprocessing message
|
184
|
+
|
185
|
+
Scenario: Showing a PBXCp copy
|
186
|
+
Given I have a file to copy with PBXCp
|
187
|
+
When I pipe to xcpretty with "--simple --no-color"
|
188
|
+
Then I should see a successful copying message
|
189
|
+
|
190
|
+
Scenario: Build fails when Pod install hasn't been run
|
191
|
+
Given podfile.lock wasn't in sync
|
192
|
+
When I pipe to xcpretty with "--simple --color"
|
193
|
+
Then I should see a red error message
|
194
|
+
And I should see that sandbox is not in sync with Podfile.lock
|
195
|
+
|
196
|
+
Scenario: Compilation fails because missing files in the project
|
197
|
+
Given there was a missing file
|
198
|
+
When I pipe to xcpretty with "--simple --color"
|
199
|
+
Then I should see a red error message
|
200
|
+
And I should see which file is missing
|
201
|
+
|
202
|
+
Scenario: Compilation fails because of syntax errors
|
203
|
+
Given there was a syntax error
|
204
|
+
When I pipe to xcpretty with "--simple --color"
|
205
|
+
Then I should see a red compilation error
|
206
|
+
And I should see a failed line
|
207
|
+
And I should see a cyan cursor
|
208
|
+
|
209
|
+
Scenario: Linker fails with undefined symbols
|
210
|
+
Given the linker has failed with undefined symbols
|
211
|
+
When I pipe to xcpretty with "--simple --color"
|
212
|
+
Then I should see the undefined symbold message
|
213
|
+
And I should see the symbol and reference that caused failure
|
214
|
+
|
215
|
+
Scenario: There are build warnings
|
216
|
+
Given there were warnings in the code
|
217
|
+
When I pipe to xcpretty with "--simple --color"
|
218
|
+
Then I should see a yellow warning message
|
219
|
+
|
220
|
+
Scenario: Showing provisioning profile doesn't support capability
|
221
|
+
Given the provisioning profile doesn't support capability
|
222
|
+
When I pipe to xcpretty with "--simple --no-color"
|
223
|
+
Then I should see the profile doesn't support capability message
|
224
|
+
|
225
|
+
Scenario: Showing provisioning profile doesn't include entitlement
|
226
|
+
Given the provisioning profile doesn't include entitlement
|
227
|
+
When I pipe to xcpretty with "--simple --no-color"
|
228
|
+
Then I should see the profile doesn't include entitlement message
|
229
|
+
|
230
|
+
Scenario: Showing code signing is required error
|
231
|
+
Given the target requires code signing
|
232
|
+
When I pipe to xcpretty with "--simple --no-color"
|
233
|
+
Then I should see the code signing is requried message
|
234
|
+
|
235
|
+
Scenario: Showing no profile matching error
|
236
|
+
Given the matching profile is missing
|
237
|
+
When I pipe to xcpretty with "--simple --no-color"
|
238
|
+
Then I should see the no profile matching message
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Then(/^I should see a passing test in my custom report$/) do
|
2
|
+
custom_report.should include("WOW such PASS.")
|
3
|
+
end
|
4
|
+
|
5
|
+
Then(/^I should see a failed test in my custom report$/) do
|
6
|
+
custom_report.should include("WOW such FAIL.")
|
7
|
+
end
|
8
|
+
|
9
|
+
Then(/^I should see a pending test in my custom report$/) do
|
10
|
+
custom_report.should include("WOW such PENDING.")
|
11
|
+
end
|
12
|
+
|
13
|
+
Then(/^the custom failure counter should show (\d+) tests?$/) do |fail_count|
|
14
|
+
custom_report.should include("Much 1 FAIL.")
|
15
|
+
end
|
16
|
+
|