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, asIInvokedMethodListenerISuiteYamlFactoryListener- Listeners for suite events, asISuiteListenerITestContextYamlFactoryListener- 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>.yamlfor resource(ClassLoaderof current thread) of conducting data.ITestContextYamlFactoryListener This listener uses file name(classpath:<test_name>.yaml) for resource(ClassLoaderof current thread) of conducting data.TestNGConfigUtil Provides utility for processing instance ofTestNGConfigannotation.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.