test-unit-runner-junitxml 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 701cf2bc13f6f5c82a5907bfab0d37c4af45dad3
4
- data.tar.gz: d49eab3c3dee6ed2b0b7559024368cff79917a83
3
+ metadata.gz: 23814485ec23c86574aaa9f48ea15f74e854c31f
4
+ data.tar.gz: 36c10ddfab5d5b3df64c04cc260e0fd0dcde0aac
5
5
  SHA512:
6
- metadata.gz: 296147c324d43ebf138c1db60bf0f2b1f260e07a1a01fd42a62b0a80910ef643146c7476a9bda67be77d0f29e070d5f95d2792c68db236939aedafd30543f5e3
7
- data.tar.gz: 14512b3671114d09568b8c97650d3a309f6e2ba332873e79a6f0ce56b0eecec7a4f6af21377fe967382bc8c9753087d70c78e00f8b415cb3cf6da4fe64d5a555
6
+ metadata.gz: 0b24f5226693abff5cd79b9561d932ee67dc2dd295fbb5d8b4cccf5121dedf48813525174b8b5220a933b9c53acd195438335002900b7a7233a0a86e23696dca
7
+ data.tar.gz: f61cb81a29422756472442ecdfb74315222cb6b34fc81eb40e59305c75110109ec60aa2be0af3c997f265983304e36b829dc54f5fde608dfa2a2ad3b93e29d11
@@ -0,0 +1,59 @@
1
+ [[English](README.md)]
2
+
3
+ [![Build Status](https://travis-ci.org/kenichiice/test-unit-runner-junitxml.svg?branch=master)](https://travis-ci.org/kenichiice/test-unit-runner-junitxml)
4
+
5
+ # Test::Unit::Runner::JUnitXml
6
+
7
+ Test::Unit::Runner::JUnitXml は [test-unit](https://github.com/test-unit/test-unit) のテスト結果をJUnit XML形式で出力するライブラリです。
8
+
9
+ ## インストール方法
10
+
11
+ $ gem install test-unit-runner-junitxml
12
+
13
+ ## 使い方
14
+
15
+ `test/unit/runner/junitxml.rb` をロードすると、テストスクリプトの `--runner` オプションに `junitxml` を指定できるようになります。これを指定すると、テスト結果がJUnit XML形式で出力されれうようになります。
16
+
17
+ また、 `--junitxml-output-file` オプションも追加され、このオプションで指定したファイルにテスト結果を出力することができるようになります。
18
+
19
+ ```ruby
20
+ # test.rb
21
+ require "test/unit/runner/junitxml"
22
+
23
+ class MyTest < Test::Unit::TestCase
24
+ def test_1
25
+ assert_equal(1, 2)
26
+ end
27
+ end
28
+ ```
29
+
30
+ ```
31
+ $ ruby test.rb --runner=junitxml --junitxml-output-file=result.xml
32
+ $ cat result.xml
33
+ <?xml version="1.0" encoding="UTF-8" ?>
34
+ <testsuites>
35
+ <testsuite name="MyTest"
36
+ tests="1"
37
+ errors="0"
38
+ failures="1"
39
+ skipped="0"
40
+ time="0.0048183">
41
+ <testcase classname="MyTest"
42
+ name="test_1(MyTest)"
43
+ time="0.0047834"
44
+ assertions="1">
45
+ <failure message="&lt;1&gt; expected but was
46
+ &lt;2&gt;.">
47
+ Failure:
48
+ test_1(MyTest) [test.rb:6]:
49
+ &lt;1&gt; expected but was
50
+ &lt;2&gt;.
51
+ </failure>
52
+ </testcase>
53
+ </testsuite>
54
+ </testsuites>
55
+ ```
56
+
57
+ ## ライセンス
58
+
59
+ [MIT License](https://opensource.org/licenses/MIT)
data/README.md CHANGED
@@ -1,5 +1,59 @@
1
- # Test::Unit::Runner::JUnitXml
1
+ [[日本語](README.ja.md)]
2
2
 
3
3
  [![Build Status](https://travis-ci.org/kenichiice/test-unit-runner-junitxml.svg?branch=master)](https://travis-ci.org/kenichiice/test-unit-runner-junitxml)
4
4
 
5
- WIP
5
+ # Test::Unit::Runner::JUnitXml
6
+
7
+ Test::Unit::Runner::JUnitXml is a [test-unit](https://github.com/test-unit/test-unit) runner that reports test result in JUnit XML format.
8
+
9
+ ## Installation
10
+
11
+ $ gem install test-unit-runner-junitxml
12
+
13
+ ## Usage
14
+
15
+ By loading `test/unit/runner/junitxml.rb`, you can select `junitxml` runner via the `--runner` command line option of test script. This runner reports test result in JUnit XML format.
16
+
17
+ In addition, `--junitxml-output-file` command line option is added, and it becomes possible to output the test result to the file specified by this option.
18
+
19
+ ```ruby
20
+ # test.rb
21
+ require "test/unit/runner/junitxml"
22
+
23
+ class MyTest < Test::Unit::TestCase
24
+ def test_1
25
+ assert_equal(1, 2)
26
+ end
27
+ end
28
+ ```
29
+
30
+ ```
31
+ $ ruby test.rb --runner=junitxml --junitxml-output-file=result.xml
32
+ $ cat result.xml
33
+ <?xml version="1.0" encoding="UTF-8" ?>
34
+ <testsuites>
35
+ <testsuite name="MyTest"
36
+ tests="1"
37
+ errors="0"
38
+ failures="1"
39
+ skipped="0"
40
+ time="0.0048183">
41
+ <testcase classname="MyTest"
42
+ name="test_1(MyTest)"
43
+ time="0.0047834"
44
+ assertions="1">
45
+ <failure message="&lt;1&gt; expected but was
46
+ &lt;2&gt;.">
47
+ Failure:
48
+ test_1(MyTest) [test.rb:6]:
49
+ &lt;1&gt; expected but was
50
+ &lt;2&gt;.
51
+ </failure>
52
+ </testcase>
53
+ </testsuite>
54
+ </testsuites>
55
+ ```
56
+
57
+ ## License
58
+
59
+ [MIT License](https://opensource.org/licenses/MIT)
@@ -2,7 +2,7 @@ module Test
2
2
  module Unit
3
3
  module Runner
4
4
  module Junitxml
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
8
8
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{A test-unit runner that reports test result in JUnit XML format.}
13
13
  #spec.description = %q{TODO: Write a longer description or delete this line.}
14
- #spec.homepage = "TODO: Put your gem's website or public repo URL here."
14
+ spec.homepage = "https://github.com/kenichiice/test-unit-runner-junitxml"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Specify which files should be added to the gem when it is released.
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
  #spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ["lib"]
25
25
 
26
- spec.add_development_dependency "bundler", "~> 2.0"
27
- spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "bundler"
27
+ spec.add_development_dependency "rake"
28
28
 
29
- spec.add_runtime_dependency "test-unit", "~> 3.0"
29
+ spec.add_runtime_dependency "test-unit"
30
30
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit-runner-junitxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OGAWA KenIchi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-14 00:00:00.000000000 Z
11
+ date: 2019-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: test-unit
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '0'
55
55
  description:
56
56
  email:
57
57
  - kenichi@ice.email.ne.jp
@@ -63,6 +63,7 @@ files:
63
63
  - ".travis.yml"
64
64
  - Gemfile
65
65
  - LICENSE.txt
66
+ - README.ja.md
66
67
  - README.md
67
68
  - Rakefile
68
69
  - lib/test/unit/runner/junitxml.rb
@@ -70,7 +71,7 @@ files:
70
71
  - lib/test/unit/ui/junitxml/testrunner.rb
71
72
  - lib/test/unit/ui/junitxml/xml.erb
72
73
  - test-unit-runner-junitxml.gemspec
73
- homepage:
74
+ homepage: https://github.com/kenichiice/test-unit-runner-junitxml
74
75
  licenses:
75
76
  - MIT
76
77
  metadata: {}