All Classes and Interfaces
Class
Description
Helper methods to find @Test and @Configuration tags.
Thrown when two array elements differ
Checks for array ending method argument match with or without filtering injectables.
Custom iterator class over a 2D array
Assertion tool class.
This interface facilitates the use of
Assert.expectThrows(java.lang.Class<T>, org.testng.Assert.ThrowingRunnable)
from Java 8.An assert class with various hooks allowing its behavior to be modified by subclasses.
A set of assert methods.
Simple implementation of IAttributes.
A simple abstraction over
ReentrantLock
that can be used in conjunction with
try..resources
constructs.This class
Superclass to represent both @Test and @Configuration methods.
Represents the basic attributes associated with object creation.
Utility class for different class manipulations.
Implementation of an IClass.
This class maintains a map of
<Class, List<ITestNGMethod>>
.Defines criteria for finding two items "equal enough".
An implementation of IConfiguration
This class wraps access to beforeGroups and afterGroups methods, since they are passed around the
various invokers and potentially modified in different threads.
Represents an exception that is thrown when a configuration method is not invoked.
Encapsulation of either a method or a constructor.
Deprecated.
Convert XML files to YAML and vice versa.
Represents the parameters that are associated with object creation.
Represents a means to add in custom attributes to @
Test
annotated tests.Mark a method as supplying data for a test method.
An implementation of IDataProvider.
A holder class that is aimed at acting as a container for holding various different aspects of a
data provider such as listeners/interceptors etc.,
Checks the conformance as per data-provide specifications.
When no
ITestNGListenerFactory
implementations are available, TestNG defaults to this
implementation for instantiating listeners.Simple implementation of IMethodSelectorContext
Intended to be the default way of instantiating objects within TestNG.
Helper class to keep track of dependencies.
Represents the elaborate set of attributes required for object creation.
Checks for method argument match with or without filtering injectables.
A No operation retry analyzer that exists just to let us use proper types in @
Test.retryAnalyzer()
Supports Object instantiation taking into account Dependency Injection.
Representation of the graph of methods.
Symbols in this class are used by the Eclipse plug-in, do not modify them without updating the
plug-in as well.
Reporter that generates a single-page HTML report of the test results.
Groups
EmailableReporter2.MethodResult
s by class.Groups test results by method.
Groups
EmailableReporter2.TestResult
s by suite.Groups
EmailableReporter2.ClassResult
s by test, type (configuration or test), and status.|--------------------|---------|-------|------------|------------------------------------------|
| FailedWithinSuccess| Skipped | Failed| Status Code| Remarks |
|--------------------|---------|-------|------------|------------------------------------------|
| 0 | 0 | 0 | 0 | Passed tests | | 0 | 0 | 1 | 1 | Failed tests | | 0 | 1 | 0 | 2 | Skipped tests
| | 0 | 1 | 1 | 3 | Skipped/Failed tests | | 1 | 0 | 0 | 4 | FailedWithinSuccess tests | | 1 | 0
| 1 | 5 | FailedWithinSuccess/Failed tests | | 1 | 1 | 0 | 6 | FailedWithinSuccess/Skipped tests
| | 1 | 1 | 1 | 7 | FailedWithinSuccess/Skipped/Failed tests |
|--------------------|---------|-------|------------|------------------------------------------|
Deprecated.
Marks a method as a factory that returns objects that will be used by TestNG as Test classes.
An implementation of IFactory
This class represents a method annotated with @Factory
This reporter is responsible for creating testng-failed.xml
Assertion tool for File centric assertions.
A string buffer that flushes its content to a temporary file whenever the internal string buffer
becomes larger than MAX.
Simple graph class to implement topological sort (used to sort methods based on what groups they
depend on).
An orchestrator that works with a
IDynamicGraph
graph to execute nodes from the DAG in an
concurrent fashion by using a ThreadPoolExecutor
This annotation specifies what Guice modules should be used to instantiate this test class.
Implementations of this interface will gain access to the
XmlSuite
object and thus let
users be able to alter a suite or a test based on their own needs.The parent interface for all the annotations.
This interface defines how annotations are found on classes, methods and constructors.
For backward compatibility.
Life cycle methods for the assertion class.
A trait that is used by all interfaces that lets the user add or remove their own attributes.
Base interface for IBeforeSuite, IAfterSuite, etc...
IClass
represents a test class and a collection of its instances.If a test class implements this interface, its run() method will be invoked instead of each
configuration method found.
Encapsulate the @Configuration / @testng.configuration annotation
Listener interface for events related to configuration methods.
Deprecated.
As of release 7.0.0, replaced by
IConfigurationListener
A parameter of this type will be passed to the run() method of a IConfigurable.
Represents the capabilities of a simple container to hold data
An interface that helps add custom xml tags to the TestNG generated xml report.
A trait shared by all the annotations that have dataProvider/dataProviderClass attributes.
Encapsulate the @DataProvider / @testng.data-provider annotation
This interface helps define an interceptor for data providers.
A listener that gets invoked before and after a data provider is invoked by TestNG.
Represents the attributes of a
DataProvider
annotated method.Represents the graphical representative capabilities of an entity.
A listener used to monitor when a TestNG run starts and ends.
A TestNG listener that can be used to build graph representations of TestNG methods as and when
they are being executed on a real-time basis.
Represents the capability to create a custom
ExecutorService
by downstream consumers.Encapsulate the @Factory / @testng.factory annotation
Alternative of @Test(enabled=false)
If a test class implements this interface, its run() method will be invoked instead of each @Test
method found.
A parameter of this type will be passed to the run() method of a IHookable.
Encapsulate the @
Ignore
annotationAllows customization of the
Injector
creation when working with dependency injection.This class defines a pair of instance/class.
Helps keep track of when a method was invoked
An interface representing a method that has been invoked by TestNG.
A listener that gets invoked before and after a method is invoked by TestNG.
This class defines an invoker.
This interface captures a test method along with all the instances it should be run on.
This class is used to alter the list of test methods that TestNG is about to run.
This interface is used to augment or replace TestNG's algorithm to decide whether a test method
should be included in a test run.
An implementation of this interface is passed to all the Method Selectors when their
includeMethod() is invoked.
This interface provides
Module
to implicitly add to the Guice context.This interface is used by the moduleFactory attribute of the @Guice annotation.
Panels that are accessible from the navigator.
Enumeration of injectables.
convenience means to add and remove injectables.
Utility class for object instantiations.
Hides complexity of calling methods of
IInvokedMethodListener
.Indicates which of the methods of a
IInvokedMethodListener
should be called.A Runnable Method invoker.
This class is responsible for invoking methods: - test methods - configuration methods - possibly
in a separate thread and then for notifying the result listeners.
Represents the associations of a class with one or more instances.
A wrapper class that wraps around an array and associates a unique Id that can be used as a key
for the array.
A wrapper object that associates a unique id to every unique test class object.
Represents the capabilities of an implementation that is capable of dispensing new Objects for
TestNG
Helps produce a
Comparator
that can be used to determine order of execution for a bunch
of ITestNGMethod
methods.Represents the ability to retrieve the parameters associated with a factory method.
Parent interface for annotations that can receive parameters.
Encapsulate the @Parameters / @testng.parameters annotation
Used by Parser to perform changes on an XML suite after it's been parsed.
This interface can be implemented by clients to generate a report.
A convenient interface to use when implementing listeners.
Interface to implement to be able to have a chance to retry a failed test.
Represents the ability to retry a data provider.
A dummy implementation which disables retrying of a failed data provider.
Interface defining a Test Suite.
Listener for test suites.
This class represents the result of a suite run.
If a test class implements this interface, it will receive a special treatment, such as having
the test name displayed in the HTML reports.
Encapsulate the @Test / @testng.test annotation.
This class represents a test class:
The test methods
The configuration methods (test and method)
The class file
Note that the methods returned by instances of this class are expected to be correct at runtime.
This class is used by TestNG to locate the test classes.
This class defines a test context which contains all the information for a given test run.
A listener for test running.
This interface allows to modify the strategy used by TestRunner to find its test methods.
This is a marker interface for all objects that can be passed as a -listener argument.
A factory used to create instances of ITestNGListener.
Describes a TestNG annotated method and the instance on which it will be invoked.
Deprecated.
- This interface stands deprecated as of TestNG
v7.9.0
.Parent interface of all the object factories.
This interface captures methods common to @Test and @Configuration
This class describes the result of a test.
An interface defining the notification for @Test results and also
@Configuration
results.A factory for TestRunners to be used by SuiteRunners.
A factory that creates workers used by
GraphThreadPoolExecutor
Represents the capabilities of a XML serializer (As string)
A runnable object that is used by
GraphThreadPoolExecutor
to execute tasksThis class implements IAnnotationFinder with JDK5 annotations
This class creates implementations of IAnnotations based on the JDK5 annotation that was found on
the Java element.
A JUnit XML report generator (replacing the original JUnitXMLReporter that was based on XML
APIs).
A simple abstraction over
ReentrantLock
that can be used when
we need to be dealing with a dictionary of lockable objects wherein we traditionally would have
used the synchronized
keyword.Listener interface that can be used to determine listener execution order.
A Utility that helps us differentiate between a user's listener and preferential Listener.
This annotation lets you define listeners directly on a test class instead of doing so in your
testng.xml.
A container to hold lists indexed by a key.
TestNG logging now uses slf4j logging facade to satisfy the logging needs.
Log the messages of all the assertions that get run.
Collections of helper methods to help deal with test methods
Collection of helper methods to help sort and arrange methods.
Collections of helper methods to help deal with invocation of TestNG methods
An interface to validate conformance of input arguments to its target method.
Input context for MethodMatchers.
Thrown from MethodMatcher.
This class describes a method selector: - The class that implements it - Its priority
Turn off TestNG injection for a parameter.
A simple bean bag that is intended to help share objects during the lifetime of TestNG without
needing it to be a singleton.
Marks a method as the object factory to use for creating all test instances.
The internal representation of @ObjectFactory
Default factory for test creation.
Specifies that the current parameter is optional.
Override the groups included in the XML file with groups specified on the command line.
Utility class that finds all the classes in a given package.
A simple holder for parameters that contains the parameters and where these came from (data
provider or testng.xml)
Origin of the parameters.
Describes how to pass parameters to a @Test method.
Methods that bind parameters declared in testng.xml to actual values used to invoke methods.
A parameter passing helper class.
An implementation of IParameters
Parser
is a parser for a TestNG XML test suite file.The main entry for the XML generation operation
Utility class for setting JavaBeans-style properties on instances.
Utility class to handle reflection.
A class that contains the expected exceptions and the message regular expression.
This class is used for test methods to log messages that will be included in the HTML reports
generated by TestNG.
Stores the information regarding the configuration of a pluggable report listener.
Display the reporter output for each test result.
An implementation of IRetryAnalyzer that allows you to specify the maximum number of times you
want your test to be retried.
This class contains all the information needed to determine what methods should be run.
This class houses handling all JVM arguments by TestNG
This class houses handling all JVM arguments related to TestNG's default reports.
A container to hold sets indexed by a key.
The root exception for special skip handling.
When an assertion fails, don't throw an exception but record the failure.
Functionality to allow tools to analyse and subdivide stack traces.
Deprecated.
- This reporter is deprecated as of TestNG
7.9.0
in favour of Main
SuiteRunner
is responsible for running all the tests included in one suite.An
IWorker
that is used to encapsulate and run Suite RunnersA state object that records the status of the suite run.
An
IThreadWorkerFactory
for SuiteRunner
sImplementation of the Tarjan algorithm to find and display a cycle in a graph.
Mark a class or a method as part of the test.
An implementation of ITest
Exception thrown when an exception happens while running a test method.
This class implements an HTML reporter for individual tests.
If this annotation is used on a parameter of a data provider, that parameter is the instance of
the test method which is going to be fed by this data provider.
A simple ITestListener adapter that stores all the tests that were run.
A helper class that internally houses some of the listener related actions support.
This implementation leverages a supplier to lazily load the test methods (data) for the very
first time and "remembers it" for later invocations.
FIXME: reduce contention when this class is used through parallel invocation due to
invocationCount and threadPoolSize by not invoking the @BeforeClass and @AfterClass which are
already invoked on the original method.
The class to work with "-testnames", "-ignoreMissedTestNames", and VM argument
"-Dtestng.ignore.missed.testnames".
This class is the main entry point for running tests in the TestNG framework.
This class creates an ITestClass from a test class.
Suite definition parser utility.
The base class for all exceptions thrown by TestNG.
This class represents a test method.
The default strategy for finding test methods: look up annotations @Test in front of methods.
Represents an exception that is thrown when a test method is not invoked.
Display the list of <test> tags.
This class represents the result of a test.
This class takes care of running one Test.
This class implements a simple TextFormatter because the brainded default formatter of
java.util.logging outputs everything on two lines and it's ugly as butt.
A simple reporter that collects the results and prints them on standard out.
Wrapper exception for ExecutionExceptions.
Exception used to signal a thread timeout.
A helper class to interface TestNG concurrency usage.
A
SkipException
extension that transforms a skipped method into a failed method based on
a time trigger.A Utility class that deals with time.
A sample task to be executed.
Helper methods to parse annotations.
Reporter printing out detailed messages about what TestNG is going to run and what is the status
of what has been just run.
Represents a proxy for an actual instance of
ITestNGMethod
but with the exception that it
generates a unique hashcode that is different from the original ITestNGMethod
instance
that it wraps.This class describes the tag
<class>
in testng.xml.interface groups the XML constants tries to emulate what's in
org.apache.tools.ant.taskdefs.optional.junit.XMLConstants to be compatible with junitreport
This class is the default method selector used by TestNG to determine which methods need to be
included and excluded based on the specification given in testng.xml.
This class describes the tag
<method-selector>
in testng.xml.This class describes the tag
<package>
in testng.xml.The main entry for the XML generation operation
This class allows you to generate an XML text document by pushing and popping tags from a stack
maintained internally.
This class describes the tag <suite> in testng.xml.
Configuration failure policy options.
Parallel modes.
Utility writing an ISuiteResult to an XMLStringBuffer.
A utility class to work with
XmlSuite
This class describes the tag <test> in testng.xml.
Static helpers for XML.
YAML support for TestNG.
v7.10.0