Class: Jerbil::TestNG::TestNGTask

Description

A task to run testng test suites or individual tests.

Example

  Jerbil::TestNG::TestNGTask.new(:test) do |t|
    t.outputdir = TESTOUTPUTDIR
    t.tests     = JAVA_TEST_FILES
    t.depends_on :test_compile
  end

The test classes can be specified by passing a Jerbil::JavaFileList to tests, or by setting the location of xml test suites using suites.

Attributes

NameRead/write?Description
listeners RW A list of test listeners to use. Defaults to DefaultTestListener if empty.
name RW
outputdir RW Where the testng output should go. Default "test-output".
report RW Whether to generate HTML reports. Defaults to true.
suites RW A list of locations of testng suite.xml files.
tests RW A JavaFileList specifing tests to run. TestNGTask will use to_classes to obtain the class files from the list.
workingdir RW Working dir to use during test execution.

Public Class methods


new (name) {|self if block_given?| ...}

    # File lib/jerbil/testng_task.rb, line 46
46:       def initialize(name)
47:         @name = name
48:         @tests = []
49:         @outputdir = "test-output"
50:         @report = true
51:         @suites = []
52:         @workingdir = nil 
53:                                 @listeners = []
54:         yield self if block_given?
55:         depends_on workingdir unless workingdir.nil?
56:         depends_on outputdir
57:         define
58:       end