TestNGWrapperSuite(xmlSuiteFilenames : scala.List[java.lang.String])
Suite that wraps existing TestNG test suites, described by TestNG XML config files. This class allows
existing TestNG tests written in Java to be run by ScalaTest.
One way to use this class is to extend it and provide a list of one or more
names of TestNG XML config file names to run. Here's an example:
class MyWrapperSuite extends TestNGWrapperSuite(
List("oneTest.xml", "twoTest.xml", "redTest.xml", "blueTest.xml")
You can also specify TestNG XML config files on
Runner's command line with
-t parameters. See
the documentation for
Runner for more information.
TestNGWrapperSuites with ScalaTest's
Runner, you must include TestNG's jar file on the class path or runpath.
This version of
TestNGSuite was tested with TestNG version 5.7.
- Josh Cough
Methods inherited from Suite
nestedSuites, execute, execute, execute, execute, tags, groups, testNames, suiteName, pending, pendingUntilFixed, expectedTestCount
Methods inherited from Assertions
assert, assert, assert, assert, convertToEqualizer, intercept, expect, expect, fail, fail, fail, fail
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
run(testName : scala.Option[java.lang.String], reporter : Reporter, stopper : Stopper, filter : Filter, properties : scala.collection.immutable.Map[java.lang.String, Any], distributor : scala.Option[Distributor], tracker : Tracker) : Unit
- Runs TestNG with the XML config file or files provided to the primary constructor, passing reports to the specified
testName - If present (Some), then only the method with the supplied name is executed and groups will be ignored.
reporter - The reporter to be notified of test events (success, failure, etc).
filter - a
Filter with which to filter tests based on their tags
stopper - the
Stopper may be used to request an early termination of a suite of tests. However, because TestNG does not support the notion of aborting a run early, this class ignores this parameter.
properties - a
Map of properties that can be used by the executing
Suite of tests. This class does not use this parameter.
distributor - an optional
Distributor, into which nested
Suites could be put to be executed by another entity, such as concurrently by a pool of threads. If
Suites will be executed sequentially.
Because TestNG handles its own concurrency, this class ignores this parameter.
Copyright (C) 2001-2010 Artima, Inc. All rights reserved.