T - the type virtual resource configuration objectpublic interface VirtualResourceProvider<T>
| Modifier and Type | Method and Description |
|---|---|
T |
configure(TestContext testContext,
VirtualResource virtualResource,
PropertiesReader configReader)
A method to configure a virtual resource.
|
default void |
load(TestContext testContext,
VirtualResource virtualResource,
VirtualResourceInstance instance,
Set<String> dataFiles)
Load the given list of data file into the local resource prior to the resource being
used.
|
VirtualResourceInstance |
start(TestContext testContext,
VirtualResource virtualResource,
T configuration)
Start the virtual resource with the given testContext and configuration.
|
void |
stop(TestContext testContext,
VirtualResource virtualResource,
VirtualResourceInstance instance)
Stop the virtual resource.
|
T configure(TestContext testContext, VirtualResource virtualResource, PropertiesReader configReader)
A method to configure a virtual resource. Configuring a virtual resource typically
involves creating a default configuration object that can be further configured by a
ConfigHandler method. Please note:
start(org.testifyproject.TestContext, org.testifyproject.annotation.VirtualResource, java.lang.Object)
method.
.testify.yml configuration
properties. A specific section in .testify.yml can be specified through
VirtualResource.configKey().
ConfigHandler method before it is passed to
start(org.testifyproject.TestContext, org.testifyproject.annotation.VirtualResource, java.lang.Object)
method
testContext - the test contextvirtualResource - test class virtual resource annotationconfigReader - the value of configReaderVirtualResourceInstance start(TestContext testContext, VirtualResource virtualResource, T configuration) throws Exception
testContext - the test contextvirtualResource - test class virtual resource annotationconfiguration - the virtual resource configuration objectException - an exception thrown while startingdefault void load(TestContext testContext, VirtualResource virtualResource, VirtualResourceInstance instance, Set<String> dataFiles) throws Exception
testContext - the test contextvirtualResource - test class remote resource annotationinstance - the virtual resource instancedataFiles - a data files that should be loadedException - an exception thrown while loading datavoid stop(TestContext testContext, VirtualResource virtualResource, VirtualResourceInstance instance) throws Exception
testContext - the test contextvirtualResource - test class virtual resource annotationinstance - the value of instanceException - an exception thrown while stoppingCopyright © 2016–2018 Testify Project. All rights reserved.