Sha256: 5cf073a2a74d3bd512dc30c85d0bb43d1a07c3cfc764103995a0c27a7a38e098

Contents?: true

Size: 853 Bytes

Versions: 3

Compression:

Stored size: 853 Bytes

Contents

require_relative './test_xml_generator'

class TestXmlXUnitPublisher < Test::Unit::TestCase
  def test_postbuild_xunit_publisher
    builder = JenkinsJob::Builder.new

    builder.freestyle 'foo' do
      postbuild do
        publish_xunit_report 'a\\b' do
          failed_threshold :total_failed_tests => 0
          unstable_threshold :total_skipped_tests => 0
        end
      end
    end

    actual = builder.config_as_xml_node('foo')

    assert 'a\\b', actual.xpath('./project/publishers/xunit/types/NUnitJunitHudsonTestType/pattern').text
    assert '0', actual.xpath('./project/publishers/xunit/thresholds/org.jenkinsci.plugins.xunit.threshold.FailedThreshold/failureThreshold').text
    assert '0', actual.xpath('./project/publishers/xunit/thresholds/org.jenkinsci.plugins.xunit.threshold.SkippedThreshold/unstableThreshold').text
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubyjobbuilderdsl-0.0.8 test/test_xunit_publisher.rb
rubyjobbuilderdsl-0.0.6 test/test_xunit_publisher.rb
rubyjobbuilderdsl-0.0.4 test/test_xunit_publisher.rb