Package guru.mikelue.jdut.testng
This package mainly contains various listeners of TestNG for initializing
Otherwise, you may use @BeforeXXX or @AfterXXX of TestNG and API of YAML loading.
YamlConductorFactory
.Listeners
IInvokedMethodYamlFactoryListener
- Listeners for method invocation, asIInvokedMethodListener
ISuiteYamlFactoryListener
- Listeners for suite events, asISuiteListener
ITestContextYamlFactoryListener
- Listeners for test events, asITestListener
Write your own listener
The easy way to write your own listener is to inherit one of above listeners on your customization.Otherwise, you may use @BeforeXXX or @AfterXXX of TestNG and API of YAML loading.
-
Class Summary Class Description IInvokedMethodYamlFactoryListener This listener uses conventions of file name by (classpath:<package>/<class_name>-<method_name>.yaml
) for conducting data.ISuiteYamlFactoryListener This listener uses file name(classpath:<suite_name>.yaml
for resource(ClassLoader
of current thread) of conducting data.ITestContextYamlFactoryListener This listener uses file name(classpath:<test_name>.yaml
) for resource(ClassLoader
of current thread) of conducting data.TestNGConfigUtil Provides utility for processing instance ofTestNGConfig
annotation.TestNgResourceNaming Provides generating of resource name by format string(MessageFormat
) and properties ofITestContext
,ITestNGMethod
, orISuite
.YamlFactoryListenerBase Defines the basic, overridable method for constructing listeners. -
Annotation Types Summary Annotation Type Description TestNGConfig Defines the behaviours working byIInvokedMethodYamlFactoryListener
.
With@TestNGConfig(oneTimeOnly=true)
, the data conductor performs actions only on first time and last time of multiple tests on a testing method.