test-output-parser 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +6 -0
- data/lib/test_output_parser/framework/rspec.rb +16 -0
- data/lib/test_output_parser/framework.rb +6 -0
- data/lib/test_output_parser/version.rb +3 -0
- data/lib/test_output_parser.rb +8 -0
- data/spec/fixtures/sample-failed-rspec-output.txt +4356 -0
- data/spec/fixtures/sample-junit-output.txt +146 -0
- data/spec/fixtures/sample-rspec-output.txt +194 -0
- data/spec/spec_helper.rb +19 -0
- data/spec/test_count_spec.rb +27 -0
- data/test-output-parser.gemspec +25 -0
- metadata +109 -0
@@ -0,0 +1,146 @@
|
|
1
|
+
$ git fetch --prune --all
|
2
|
+
Fetching origin
|
3
|
+
Command git fetch --prune --all exited successfully with status 0.
|
4
|
+
|
5
|
+
$ git reset --hard FETCH_HEAD
|
6
|
+
HEAD is now at 2a6804f Create README.md
|
7
|
+
Command git reset --hard FETCH_HEAD exited successfully with status 0.
|
8
|
+
|
9
|
+
$ git clean -fdx
|
10
|
+
Removing target/
|
11
|
+
Command git clean -fdx exited successfully with status 0.
|
12
|
+
|
13
|
+
$ git checkout master
|
14
|
+
Already on 'master'
|
15
|
+
Command git checkout master exited successfully with status 0.
|
16
|
+
|
17
|
+
$ git reset --hard 2a6804f850c9dcb5cc56143342eec8396410537e
|
18
|
+
HEAD is now at 2a6804f Create README.md
|
19
|
+
Command git reset --hard 2a6804f850c9dcb5cc56143342eec8396410537e exited successfully with status 0.
|
20
|
+
|
21
|
+
$ git submodule update --init
|
22
|
+
Command git submodule update --init exited successfully with status 0.
|
23
|
+
|
24
|
+
$ git remote set-url --push origin 'git@github.com:akshaykarle/dropwizard-snapci-sample'
|
25
|
+
Command git remote set-url --push origin 'git@github.com:akshaykarle/dropwizard-snapci-sample' exited successfully with status 0.
|
26
|
+
|
27
|
+
$ export SNAP_CI=true
|
28
|
+
$ export CI=true
|
29
|
+
$ export LANG=en_US.UTF-8
|
30
|
+
$ export LC_ALL=en_US.UTF-8
|
31
|
+
$ export SNAP_PIPELINE_COUNTER=5
|
32
|
+
$ export SNAP_STAGE_NAME=Test
|
33
|
+
$ export SNAP_BRANCH=master
|
34
|
+
$ export SNAP_COMMIT=2a6804f850c9dcb5cc56143342eec8396410537e
|
35
|
+
$ export SNAP_COMMIT_SHORT=2a6804f
|
36
|
+
|
37
|
+
$ mvn package
|
38
|
+
[INFO] Scanning for projects...
|
39
|
+
[INFO]
|
40
|
+
[INFO] ------------------------------------------------------------------------
|
41
|
+
[INFO] Building microblog 0.0.1-SNAPSHOT
|
42
|
+
[INFO] ------------------------------------------------------------------------
|
43
|
+
[INFO]
|
44
|
+
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ microblog ---
|
45
|
+
[debug] execute contextualize
|
46
|
+
[INFO] Using 'UTF-8' encoding to copy filtered resources.
|
47
|
+
[INFO] Copying 1 resource
|
48
|
+
[INFO]
|
49
|
+
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ microblog ---
|
50
|
+
[INFO] Changes detected - recompiling the module!
|
51
|
+
[INFO] Compiling 13 source files to /var/go/repo/target/classes
|
52
|
+
[INFO]
|
53
|
+
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ microblog ---
|
54
|
+
[debug] execute contextualize
|
55
|
+
[INFO] Using 'UTF-8' encoding to copy filtered resources.
|
56
|
+
[INFO] skip non existing resourceDirectory /var/go/repo/src/test/resources
|
57
|
+
[INFO]
|
58
|
+
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ microblog ---
|
59
|
+
[INFO] Changes detected - recompiling the module!
|
60
|
+
[INFO] Compiling 4 source files to /var/go/repo/target/test-classes
|
61
|
+
[INFO]
|
62
|
+
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ microblog ---
|
63
|
+
[INFO] Surefire report directory: /var/go/repo/target/surefire-reports
|
64
|
+
|
65
|
+
-------------------------------------------------------
|
66
|
+
T E S T S
|
67
|
+
-------------------------------------------------------
|
68
|
+
Running com.snapci.microblog.core.ErrorResponseTest
|
69
|
+
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.161 sec
|
70
|
+
Running com.snapci.microblog.resources.UserResourceTest
|
71
|
+
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.271 sec
|
72
|
+
Running com.snapci.microblog.resources.MicroBlogResourceTest
|
73
|
+
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec
|
74
|
+
|
75
|
+
Results :
|
76
|
+
|
77
|
+
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0
|
78
|
+
|
79
|
+
[INFO]
|
80
|
+
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ microblog ---
|
81
|
+
[INFO] Building jar: /var/go/repo/target/microblog-0.0.1-SNAPSHOT.jar
|
82
|
+
[INFO]
|
83
|
+
[INFO] --- maven-shade-plugin:2.1:shade (default) @ microblog ---
|
84
|
+
[INFO] Including com.yammer.dropwizard:dropwizard-core:jar:0.6.2 in the shaded jar.
|
85
|
+
[INFO] Including com.sun.jersey:jersey-core:jar:1.17.1 in the shaded jar.
|
86
|
+
[INFO] Including com.sun.jersey:jersey-server:jar:1.17.1 in the shaded jar.
|
87
|
+
[INFO] Including asm:asm:jar:3.1 in the shaded jar.
|
88
|
+
[INFO] Including com.sun.jersey:jersey-servlet:jar:1.17.1 in the shaded jar.
|
89
|
+
[INFO] Including com.yammer.metrics:metrics-core:jar:2.2.0 in the shaded jar.
|
90
|
+
[INFO] Including com.yammer.metrics:metrics-servlet:jar:2.2.0 in the shaded jar.
|
91
|
+
[INFO] Including com.yammer.metrics:metrics-jetty:jar:2.2.0 in the shaded jar.
|
92
|
+
[INFO] Including com.yammer.metrics:metrics-logback:jar:2.2.0 in the shaded jar.
|
93
|
+
[INFO] Including com.yammer.metrics:metrics-jersey:jar:2.2.0 in the shaded jar.
|
94
|
+
[INFO] Including com.yammer.metrics:metrics-annotation:jar:2.2.0 in the shaded jar.
|
95
|
+
[INFO] Including com.fasterxml.jackson.core:jackson-databind:jar:2.1.4 in the shaded jar.
|
96
|
+
[INFO] Including com.fasterxml.jackson.core:jackson-annotations:jar:2.1.4 in the shaded jar.
|
97
|
+
[INFO] Including com.fasterxml.jackson.core:jackson-core:jar:2.1.4 in the shaded jar.
|
98
|
+
[INFO] Including com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.1.4 in the shaded jar.
|
99
|
+
[INFO] Including com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.1.4 in the shaded jar.
|
100
|
+
[INFO] Including com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.1.4 in the shaded jar.
|
101
|
+
[INFO] Including com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.1.2 in the shaded jar.
|
102
|
+
[INFO] Including net.sourceforge.argparse4j:argparse4j:jar:0.4.0 in the shaded jar.
|
103
|
+
[INFO] Including org.slf4j:slf4j-api:jar:1.7.4 in the shaded jar.
|
104
|
+
[INFO] Including org.slf4j:jul-to-slf4j:jar:1.7.4 in the shaded jar.
|
105
|
+
[INFO] Including ch.qos.logback:logback-core:jar:1.0.10 in the shaded jar.
|
106
|
+
[INFO] Including ch.qos.logback:logback-classic:jar:1.0.10 in the shaded jar.
|
107
|
+
[INFO] Including org.slf4j:log4j-over-slf4j:jar:1.7.4 in the shaded jar.
|
108
|
+
[INFO] Including org.eclipse.jetty:jetty-server:jar:8.1.10.v20130312 in the shaded jar.
|
109
|
+
[INFO] Including org.eclipse.jetty.orbit:javax.servlet:jar:3.0.0.v201112011016 in the shaded jar.
|
110
|
+
[INFO] Including org.eclipse.jetty:jetty-continuation:jar:8.1.10.v20130312 in the shaded jar.
|
111
|
+
[INFO] Including org.eclipse.jetty:jetty-servlet:jar:8.1.10.v20130312 in the shaded jar.
|
112
|
+
[INFO] Including org.eclipse.jetty:jetty-security:jar:8.1.10.v20130312 in the shaded jar.
|
113
|
+
[INFO] Including org.eclipse.jetty:jetty-http:jar:8.1.10.v20130312 in the shaded jar.
|
114
|
+
[INFO] Including org.eclipse.jetty:jetty-io:jar:8.1.10.v20130312 in the shaded jar.
|
115
|
+
[INFO] Including org.eclipse.jetty:jetty-util:jar:8.1.10.v20130312 in the shaded jar.
|
116
|
+
[INFO] Including com.google.guava:guava:jar:14.0.1 in the shaded jar.
|
117
|
+
[INFO] Including com.google.code.findbugs:jsr305:jar:2.0.1 in the shaded jar.
|
118
|
+
[INFO] Including org.hibernate:hibernate-validator:jar:4.3.1.Final in the shaded jar.
|
119
|
+
[INFO] Including javax.validation:validation-api:jar:1.0.0.GA in the shaded jar.
|
120
|
+
[INFO] Including org.jboss.logging:jboss-logging:jar:3.1.0.CR2 in the shaded jar.
|
121
|
+
[INFO] Including joda-time:joda-time:jar:2.2 in the shaded jar.
|
122
|
+
[INFO] Including com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.1.2 in the shaded jar.
|
123
|
+
[INFO] Including com.yammer.dropwizard:dropwizard-jdbi:jar:0.6.2 in the shaded jar.
|
124
|
+
[INFO] Including com.yammer.dropwizard:dropwizard-db:jar:0.6.2 in the shaded jar.
|
125
|
+
[INFO] Including org.apache.tomcat:tomcat-dbcp:jar:7.0.37 in the shaded jar.
|
126
|
+
[INFO] Including org.jdbi:jdbi:jar:2.41 in the shaded jar.
|
127
|
+
[INFO] Including com.yammer.metrics:metrics-jdbi:jar:2.2.0 in the shaded jar.
|
128
|
+
[INFO] Including com.yammer.dropwizard:dropwizard-migrations:jar:0.6.2 in the shaded jar.
|
129
|
+
[INFO] Including org.liquibase:liquibase-core:jar:2.0.5 in the shaded jar.
|
130
|
+
[INFO] Including com.mattbertolini:liquibase-slf4j:jar:1.0.0 in the shaded jar.
|
131
|
+
[INFO] Including postgresql:postgresql:jar:9.1-901.jdbc4 in the shaded jar.
|
132
|
+
[INFO] Including mysql:mysql-connector-java:jar:5.1.26 in the shaded jar.
|
133
|
+
[INFO] Replacing original artifact with shaded artifact.
|
134
|
+
[INFO] Replacing /var/go/repo/target/microblog-0.0.1-SNAPSHOT.jar with /var/go/repo/target/microblog-0.0.1-SNAPSHOT-shaded.jar
|
135
|
+
[INFO] Dependency-reduced POM written at: /var/go/repo/dependency-reduced-pom.xml
|
136
|
+
[INFO] Dependency-reduced POM written at: /var/go/repo/dependency-reduced-pom.xml
|
137
|
+
[INFO] ------------------------------------------------------------------------
|
138
|
+
[INFO] BUILD SUCCESS
|
139
|
+
[INFO] ------------------------------------------------------------------------
|
140
|
+
[INFO] Total time: 6.524s
|
141
|
+
[INFO] Finished at: Mon Dec 23 13:23:54 UTC 2013
|
142
|
+
[INFO] Final Memory: 50M/233M
|
143
|
+
[INFO] ------------------------------------------------------------------------
|
144
|
+
Command mvn package exited successfully with status 0. Took 8.13 seconds.
|
145
|
+
Saving console log for later
|
146
|
+
Saving artifact in target
|
@@ -0,0 +1,194 @@
|
|
1
|
+
$ git clone git://localhost/ThoughtWorksInc/gnocci .
|
2
|
+
Cloning into '.'...
|
3
|
+
Checking connectivity... done
|
4
|
+
Command git clone git://localhost/ThoughtWorksInc/gnocci . exited successfully with status 0.
|
5
|
+
|
6
|
+
$ git checkout master
|
7
|
+
Already on 'master'
|
8
|
+
Command git checkout master exited successfully with status 0.
|
9
|
+
|
10
|
+
$ git reset --hard ab58c045db121dfde023ccef7a684ab33e2dbd1d
|
11
|
+
HEAD is now at ab58c04 Move mixlib-shellout dep from Akshay's personal account to ThoughtWorksInc
|
12
|
+
Command git reset --hard ab58c045db121dfde023ccef7a684ab33e2dbd1d exited successfully with status 0.
|
13
|
+
|
14
|
+
$ git submodule update --init
|
15
|
+
Command git submodule update --init exited successfully with status 0.
|
16
|
+
|
17
|
+
$ git remote set-url --push origin 'git@github.com:ThoughtWorksInc/gnocci'
|
18
|
+
Command git remote set-url --push origin 'git@github.com:ThoughtWorksInc/gnocci' exited successfully with status 0.
|
19
|
+
|
20
|
+
$ export SNAP_CI=true
|
21
|
+
$ export CI=true
|
22
|
+
$ export LANG=en_US.UTF-8
|
23
|
+
$ export LC_ALL=en_US.UTF-8
|
24
|
+
$ export SNAP_PIPELINE_COUNTER=76
|
25
|
+
$ export SNAP_STAGE_NAME=FastFeedback
|
26
|
+
$ export SNAP_BRANCH=master
|
27
|
+
$ export SNAP_COMMIT=ab58c045db121dfde023ccef7a684ab33e2dbd1d
|
28
|
+
$ export SNAP_COMMIT_SHORT=ab58c04
|
29
|
+
|
30
|
+
$ bundle install --standalone --path bundle --local
|
31
|
+
Fetching git://github.com/ThoughtWorksInc/mixlib-shellout.git
|
32
|
+
Resolving dependencies...
|
33
|
+
Installing rake (10.1.0)
|
34
|
+
Installing addressable (2.3.5)
|
35
|
+
Installing ansi (1.4.3)
|
36
|
+
Installing archive-tar-minitar (0.5.2)
|
37
|
+
Installing cabin (0.6.1)
|
38
|
+
Installing arr-pm (0.0.8)
|
39
|
+
Installing json (1.8.0)
|
40
|
+
Installing nokogiri (1.5.10)
|
41
|
+
Installing uuidtools (2.1.4)
|
42
|
+
Installing aws-sdk (1.25.0)
|
43
|
+
Installing backports (3.3.5)
|
44
|
+
Using bundler (1.3.5)
|
45
|
+
Installing ffi (1.9.0)
|
46
|
+
Installing childprocess (0.3.9)
|
47
|
+
Installing clamp (0.6.1)
|
48
|
+
Installing diff-lcs (1.2.4)
|
49
|
+
Installing http_parser.rb (0.5.3)
|
50
|
+
Installing ftw (0.0.36)
|
51
|
+
Installing fpm (0.4.42)
|
52
|
+
Using gnocci (0.0.1) from source at .
|
53
|
+
Installing mixlib-cli (1.3.0)
|
54
|
+
Installing mixlib-config (2.0.0)
|
55
|
+
Using mixlib-shellout (1.2.0) from git://github.com/ThoughtWorksInc/mixlib-shellout.git (at master)
|
56
|
+
Installing rspec-core (2.14.5)
|
57
|
+
Installing rspec-expectations (2.14.3)
|
58
|
+
Installing rspec-mocks (2.14.3)
|
59
|
+
Installing rspec (2.14.1)
|
60
|
+
Installing tagged_logging (0.1.2)
|
61
|
+
Updating files in vendor/cache
|
62
|
+
Your bundle is complete!
|
63
|
+
It was installed into ./bundle
|
64
|
+
Command bundle install --standalone --path bundle --local exited successfully with status 0. Took 17.49 seconds.
|
65
|
+
|
66
|
+
$ bundle exec rake spec
|
67
|
+
/opt/local/ruby/2.0.0-p247/bin/ruby -S rspec spec/unit/artifact_spec.rb spec/unit/command_spec.rb spec/unit/console_log_artifact_spec.rb spec/unit/duration_formatter_spec.rb spec/unit/git_spec.rb spec/unit/mode/ci_spec.rb spec/unit/mode/pull_spec.rb spec/unit/mode/push_spec.rb spec/unit/run_list_spec.rb spec/unit/stage_spec.rb --format documentation
|
68
|
+
|
69
|
+
Gnocci::Artifact
|
70
|
+
should create artifact tarball beginning at the artifact basepath
|
71
|
+
round robin test, push and pull should restore artifacts to original location
|
72
|
+
#fetch_from_storage_location
|
73
|
+
should copy the artifacts from the artifact path to the current dir
|
74
|
+
should abort when the fetch fails
|
75
|
+
#push_to_storage_location
|
76
|
+
should push the artifacts to the right path
|
77
|
+
should abort when the push fails
|
78
|
+
|
79
|
+
Gnocci::Command
|
80
|
+
should run the command and write the command to console log
|
81
|
+
should write the command output to console log
|
82
|
+
should fail with an exception when command fails
|
83
|
+
should display the duration of a command run when requested
|
84
|
+
should not display the duration of a command run when not requested
|
85
|
+
should write the exit code when command executes but fails with error
|
86
|
+
should write the stderr to console log in case command does not exist and prints to stdout
|
87
|
+
should write signal to the stderr when the command is SIGHUP 'ed
|
88
|
+
should write signal to the stderr when the command is SIGINT 'ed
|
89
|
+
should write signal to the stderr when the command is SIGKILL 'ed
|
90
|
+
should write signal to the stderr when the command is SIGPIPE 'ed
|
91
|
+
should write signal to the stderr when the command is SIGALRM 'ed
|
92
|
+
should write signal to the stderr when the command is SIGTERM 'ed
|
93
|
+
should write signal to the stderr when the command is SIGXCPU 'ed
|
94
|
+
should write signal to the stderr when the command is SIGXFSZ 'ed
|
95
|
+
should write signal to the stderr when the command is SIGVTALRM 'ed
|
96
|
+
should write signal to the stderr when the command is SIGPROF 'ed
|
97
|
+
should write signal to the stderr when the command is SIGILL 'ed
|
98
|
+
should write signal to the stderr when the command is SIGTRAP 'ed
|
99
|
+
should write signal to the stderr when the command is SIGABRT 'ed
|
100
|
+
should write signal to the stderr when the command is SIGFPE 'ed
|
101
|
+
should write signal to the stderr when the command is SIGSYS 'ed
|
102
|
+
should not write signal to the stderr when the command is SIGQUIT 'ed
|
103
|
+
|
104
|
+
Gnocci::ConsoleLogArtifact
|
105
|
+
#push_to_storage_location should push console log to storage_path for s3 push later
|
106
|
+
|
107
|
+
Gnocci::DurationFormatter
|
108
|
+
format duration
|
109
|
+
< 1
|
110
|
+
returns '0.xxxxx seconds' formatted string
|
111
|
+
> 1 and < 60
|
112
|
+
returns 'xx.xx seconds' formatted string
|
113
|
+
> 60 and < 120
|
114
|
+
returns 'x minute xx.xx seconds' formatted string
|
115
|
+
> 120 and < 300
|
116
|
+
returns 'x minutes xx.x seconds' formatted string
|
117
|
+
> 300
|
118
|
+
returns 'x minutes xx seconds' formatted string
|
119
|
+
= 61
|
120
|
+
returns 'x minute x second' formatted string
|
121
|
+
= 1
|
122
|
+
returns 'x second' formatted string
|
123
|
+
format seconds
|
124
|
+
uses passed in precision if specified unless result is 0
|
125
|
+
sub second times
|
126
|
+
returns 5 digits of precision
|
127
|
+
strips off trailing zeroes beyond sub-second precision
|
128
|
+
0
|
129
|
+
strips off trailing zeroes
|
130
|
+
> 1
|
131
|
+
strips off trailing zeroes
|
132
|
+
second and greater times
|
133
|
+
returns 2 digits of precision
|
134
|
+
returns human friendly elasped time
|
135
|
+
|
136
|
+
Gnocci::Git
|
137
|
+
#run
|
138
|
+
on command failure
|
139
|
+
should fail with the right message
|
140
|
+
.git directory does not exist
|
141
|
+
should perform a git clone and reset
|
142
|
+
.git directory exists
|
143
|
+
should perform a git pull and reset
|
144
|
+
|
145
|
+
Gnocci::Mode::CI
|
146
|
+
#run
|
147
|
+
should perform git operations and run the stage
|
148
|
+
|
149
|
+
Gnocci::Mode::Pull
|
150
|
+
should tell current stage to pull artifacts
|
151
|
+
|
152
|
+
Gnocci::Mode::Push
|
153
|
+
should tell current stage to push all artifacts
|
154
|
+
|
155
|
+
Gnocci::RunList
|
156
|
+
should initialize cli config properly
|
157
|
+
should parse git info
|
158
|
+
should parse pipelines and stages
|
159
|
+
|
160
|
+
Gnocci::Stage
|
161
|
+
#run
|
162
|
+
should run tasks in order
|
163
|
+
should set the right env for the command
|
164
|
+
should give preference to user set environment vars over snap declared vars
|
165
|
+
with artifacts
|
166
|
+
should fetch artifacts from previous stages and push current artifacts to temp location
|
167
|
+
should run tasks in order
|
168
|
+
|
169
|
+
Finished in 3.14 seconds
|
170
|
+
58 examples, 0 failures
|
171
|
+
/opt/local/ruby/2.0.0-p247/bin/ruby -S rspec spec/integration/artifact_s3_spec.rb spec/integration/console_log_artifact_s3_spec.rb spec/integration/gnocci_spec.rb spec/integration/s3_delete_spec.rb --format documentation
|
172
|
+
|
173
|
+
Gnocci::Artifact
|
174
|
+
#push_to_s3
|
175
|
+
should push the artifacts to the right path
|
176
|
+
should error out and refuse to push to s3 if the storage path does not contain anything
|
177
|
+
should fetch and unpack the artifacts into the storage path
|
178
|
+
|
179
|
+
Gnocci::ConsoleLogArtifact
|
180
|
+
#push_to_s3 should push console log to s3 from the local storage
|
181
|
+
|
182
|
+
Gnocci
|
183
|
+
should switch to repo directory
|
184
|
+
should take a run list, artifact path and a stage name and run all tasks.
|
185
|
+
should set default environment variables
|
186
|
+
should fail if any task fails and create artifacts
|
187
|
+
|
188
|
+
Gnocci::Mode::Delete
|
189
|
+
should delete all artifacts for the specified project from s3
|
190
|
+
|
191
|
+
Finished in 11.98 seconds
|
192
|
+
9 examples, 0 failures
|
193
|
+
Command bundle exec rake spec exited successfully with status 0. Took 16.88 seconds.
|
194
|
+
Saving console log for later
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
require 'test_output_parser'
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
11
|
+
config.run_all_when_everything_filtered = true
|
12
|
+
config.filter_run :focus
|
13
|
+
|
14
|
+
# Run specs in random order to surface order dependencies. If you find an
|
15
|
+
# order dependency and want to debug it, you can fix the order by providing
|
16
|
+
# the seed, which is printed after each run.
|
17
|
+
# --seed 1234
|
18
|
+
config.order = 'random'
|
19
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe TestOutputParser do
|
4
|
+
it 'should count the number of specs ran for one example' do
|
5
|
+
TestOutputParser.count("1 example, 0 failures").should == [1, 0, 0]
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'should count the number of specs ran for one rspec run' do
|
9
|
+
TestOutputParser.count("25 examples, 0 failures").should == [25, 0, 0]
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should count the number of specs ran for multiple rspec runs' do
|
13
|
+
TestOutputParser.count("25 examples, 1 failure\n\n\n5 examples, 3 failures").should == [30, 4, 0]
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should ignore lines not related to rspec test summary' do
|
17
|
+
TestOutputParser.count(File.read("spec/fixtures/sample-rspec-output.txt")).should == [67, 0, 0]
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should count failures correctly' do
|
21
|
+
TestOutputParser.count(File.read("spec/fixtures/sample-failed-rspec-output.txt")).should == [1460, 1, 3]
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should count the number of pending specs' do
|
25
|
+
TestOutputParser.count(File.read("spec/fixtures/sample-failed-rspec-output.txt")).should == [1460, 1, 3]
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'test_output_parser/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "test-output-parser"
|
8
|
+
spec.version = TestOutputParser::VERSION
|
9
|
+
spec.authors = ["Akshay Karle"]
|
10
|
+
spec.email = ["akshay.a.karle@gmail.com"]
|
11
|
+
spec.summary = %q{A gem to get the summary of test outputs for further processing}
|
12
|
+
spec.description = ""
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
|
24
|
+
spec.add_development_dependency "rspec"
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: test-output-parser
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Akshay Karle
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: ''
|
56
|
+
email:
|
57
|
+
- akshay.a.karle@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".ruby-gemset"
|
65
|
+
- ".ruby-version"
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- lib/test_output_parser.rb
|
71
|
+
- lib/test_output_parser/framework.rb
|
72
|
+
- lib/test_output_parser/framework/rspec.rb
|
73
|
+
- lib/test_output_parser/version.rb
|
74
|
+
- spec/fixtures/sample-failed-rspec-output.txt
|
75
|
+
- spec/fixtures/sample-junit-output.txt
|
76
|
+
- spec/fixtures/sample-rspec-output.txt
|
77
|
+
- spec/spec_helper.rb
|
78
|
+
- spec/test_count_spec.rb
|
79
|
+
- test-output-parser.gemspec
|
80
|
+
homepage: ''
|
81
|
+
licenses:
|
82
|
+
- MIT
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 2.2.0
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: A gem to get the summary of test outputs for further processing
|
104
|
+
test_files:
|
105
|
+
- spec/fixtures/sample-failed-rspec-output.txt
|
106
|
+
- spec/fixtures/sample-junit-output.txt
|
107
|
+
- spec/fixtures/sample-rspec-output.txt
|
108
|
+
- spec/spec_helper.rb
|
109
|
+
- spec/test_count_spec.rb
|