Skip to content

Commit 0cc6774

Browse files
committed
docs: update the sample and add descriptions of the options
1 parent 4b350e2 commit 0cc6774

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

README.ja.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ require "test/unit/runner/junitxml"
2222

2323
class MyTest < Test::Unit::TestCase
2424
def test_1
25+
print("hello")
2526
assert_equal(1, 2)
2627
end
2728
end
@@ -32,20 +33,28 @@ $ ruby test.rb --runner=junitxml --junitxml-output-file=result.xml
3233
$ cat result.xml
3334
<?xml version="1.0" encoding="UTF-8" ?>
3435
<testsuites>
35-
<testsuite name="MyTest" tests="1" errors="0" failures="1" skipped="0" time="0.0027089">
36-
<testcase classname="MyTest" name="test_1(MyTest)" time="0.0026767" assertions="1">
36+
<testsuite name="MyTest" tests="1" errors="0" failures="1" skipped="0" time="0.0047083">
37+
<testcase classname="MyTest" name="test_1(MyTest)" time="0.0046712" assertions="1">
3738
<failure message="&lt;1&gt; expected but was
3839
&lt;2&gt;.">
3940
Failure:
40-
test_1(MyTest) [test.rb:6]:
41+
test_1(MyTest) [test.rb:7]:
4142
&lt;1&gt; expected but was
4243
&lt;2&gt;.
4344
</failure>
45+
<system-out>hello</system-out>
4446
</testcase>
4547
</testsuite>
4648
</testsuites>
4749
```
4850

51+
## オプション
52+
53+
* --junitxml-output-file=FILE_NAME
54+
* XMLを、標準出力ではなく指定したファイルへ出力します。
55+
* --junitxml-disable-output-capture
56+
* 標準出力と標準エラー出力のキャプチャを行わないようになります。
57+
4958
## ライセンス
5059

5160
[MIT License](https://opensource.org/licenses/MIT)

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ require "test/unit/runner/junitxml"
2222

2323
class MyTest < Test::Unit::TestCase
2424
def test_1
25+
print("hello")
2526
assert_equal(1, 2)
2627
end
2728
end
@@ -32,20 +33,28 @@ $ ruby test.rb --runner=junitxml --junitxml-output-file=result.xml
3233
$ cat result.xml
3334
<?xml version="1.0" encoding="UTF-8" ?>
3435
<testsuites>
35-
<testsuite name="MyTest" tests="1" errors="0" failures="1" skipped="0" time="0.0027089">
36-
<testcase classname="MyTest" name="test_1(MyTest)" time="0.0026767" assertions="1">
36+
<testsuite name="MyTest" tests="1" errors="0" failures="1" skipped="0" time="0.0047083">
37+
<testcase classname="MyTest" name="test_1(MyTest)" time="0.0046712" assertions="1">
3738
<failure message="&lt;1&gt; expected but was
3839
&lt;2&gt;.">
3940
Failure:
40-
test_1(MyTest) [test.rb:6]:
41+
test_1(MyTest) [test.rb:7]:
4142
&lt;1&gt; expected but was
4243
&lt;2&gt;.
4344
</failure>
45+
<system-out>hello</system-out>
4446
</testcase>
4547
</testsuite>
4648
</testsuites>
4749
```
4850

51+
## Options
52+
53+
* --junitxml-output-file=FILE_NAME
54+
* Output XML to the specified file instead of the standard output.
55+
* --junitxml-disable-output-capture
56+
* Disable capture of standard output and standard error.
57+
4958
## License
5059

5160
[MIT License](https://opensource.org/licenses/MIT)

0 commit comments

Comments
 (0)