Created
June 24, 2012 02:49
-
-
Save katoy/2981237 to your computer and use it in GitHub Desktop.
jenkins-tap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
次のコマンド実行で、tap 出力から html レポートを生成できる。 | |
$ prove -Q --exec="bacon --tap" --formatter=TAP::Formatter::HTML test.rb > 1.html | |
生成レポートの例; | |
http://www.spurkis.org/TAP-Formatter-HTML/test-output.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install bacon | |
# or | |
# bundle install | |
# | |
# bacon test.rb --tap | |
# or | |
# bacon test.rb --tap -Q | |
describe "a example test suite" do | |
it "should consider true as the truth" do | |
true.should.be.true | |
end | |
it "should consider false as the truth, too" do | |
false.should.be.true | |
end | |
it "should consider xxx" do | |
raise "xxx" | |
true.should.be.true | |
end | |
it "should consider true as the truth X-1 # SKIP" do | |
next # skip | |
end | |
it "should consider true as the truth X-2" do | |
next # skip | |
end | |
end | |
# bundle install | |
# $ bacon test.rb --tap -Q | |
output = <<EOS | |
ok 1 - should consider true as the truth | |
not ok 2 - should consider false as the truth, too: FAILED | |
not ok 3 - should consider xxx: ERROR: RuntimeError | |
not ok 4 - should consider true as the truth X-1 # SKIP: MISSING | |
not ok 5 - should consider true as the truth X-2: MISSING | |
1..5 | |
EOS | |
# using from jenkins. | |
# | |
# ビルド | |
# * シェルの実行 | |
# シェルスクリプト bacon %WORKSPACE/test.rb --tap > %ORKSPACE/test.tap.txt | |
# | |
# ビルド後の処理 | |
# * Publish TAP Result | |
# Test Results [test*.tap.txt] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment