public class TestDriver extends java.lang.Object implements DebugReceiver
  solutionname=HelloWorldSolution
  hostname=localhost
  catalogserverendpoints=localhost:2809,server1:2909,server2:2810
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALL_AGENTS |
static int |
MAX_EVENT_SUBMIT_DELAY
The default gateway maximum event submission delay in the test environment (20 seconds), in ms.
|
static java.lang.String |
TEST_EPOCH_PROPERTY
This solution property is used to establish a temporal point of reference
for a sequence of events containing time stamps in the past.
|
| Constructor and Description |
|---|
TestDriver()
Construct a TestDriver using properties from the testdriver.properties file.
|
TestDriver(java.util.Properties properties)
Construct a TestDriver using the specified
Properties. |
| Modifier and Type | Method and Description |
|---|---|
void |
addDebugReceiver(DebugReceiver r)
Add a listener to receive DebugInfo objects received by the TestDriver.
|
boolean |
clearTestEpoch()
Clears the value of the test epoch property.
|
void |
connect()
Initialize the connection to the test environment using previously specified properties.
|
void |
connect(int timeout)
Initialize the connection to the test environment specifying the connection timeout.
|
void |
connect(java.lang.String name)
Initialize the connection to the test environment specifying the solution name.
|
void |
connect(java.lang.String name,
int timeout)
Initialize the connection to the test environment specifying the solution name and connection timeout.
|
EntitySource<com.ibm.ia.model.Entity> |
createEntityLoaderEntitySource(java.lang.String entityLoader)
Create an EntitySource containing the entities from an entity loader
file that has been previously created using the Insights Designer user interface.
|
EventSource<com.ibm.ia.model.Event> |
createEventSequenceEventSource(java.lang.String eventSequence)
Create an EventSource containing the events from an event sequence
file that has been previously created using the Insights Designer user interface.
|
EntitySource<java.io.File> |
createFileEntitySource(DataFormat format,
java.lang.String path)
A FileEntitySource can be used to create a collection of entities from a set of files in a directory.
|
EntitySource<java.io.File> |
createFileEntitySource(DataFormat format,
java.lang.String path,
java.lang.String pattern)
A FileEntitySource can be used to create a collection of entities from a set of files in a directory.
|
EntitySource<java.io.File> |
createFileEntitySource(DataFormat format,
java.lang.String path,
java.lang.String pattern,
int skipFailureBitmask,
java.lang.String encoding)
A FileEntitySource can be used to create a collection of entities from a set of files in a directory.
|
EventSource<java.io.File> |
createFileEventSource(DataFormat format,
java.lang.String path)
A FileEventSource can be used to create a collection of events from a set of files in a directory.
|
EventSource<java.io.File> |
createFileEventSource(DataFormat format,
java.lang.String path,
java.lang.String pattern)
A FileEventSource can be used to create a collection of events from a set of files in a directory.
|
EventSource<java.io.File> |
createFileEventSource(DataFormat format,
java.lang.String path,
java.lang.String pattern,
int skipFailureBitmask,
java.lang.String encoding)
A FileEventSource can be used to create a collection of events from a set of files in a directory.
|
<T extends com.ibm.ia.model.Entity> |
createRelationship(java.lang.Class<T> entity,
java.lang.String key)
Convenience method to create Relationships
|
<T extends com.ibm.ia.model.Entity> |
createRelationship(T t)
Convenience method to create Relationships
|
boolean |
deleteAllEntities()
delete all entity instances of all entity types in the current solution.
|
void |
deleteAllEntities(java.lang.String entityType)
delete all entities of the given type from the grid.
|
void |
deleteEntity(java.lang.String entityType,
java.lang.String entityId)
remove an entity of the given type and ID from the grid.
|
void |
disconnect()
Disconnect from the test environment.
|
boolean |
endTest()
Can be called on the completion of a test to notify the server to
trigger any processing that has been scheduled by, or on behalf of,
an agent.
|
<T extends com.ibm.ia.model.Entity> |
fetchEntity(java.lang.Class<T> entityClass,
java.lang.String entityId)
return an entity from the runtime for the specified entity Class and identifier.
|
com.ibm.ia.model.Event |
getAgentEvent(DebugInfo db)
From the debug object, extract the actual event which was submitted by the agent.
|
com.ibm.ia.model.Event |
getAgentEvent(DebugInfo db,
java.lang.Boolean useXOM) |
<T> T |
getConceptFactory(java.lang.Class<T> conceptFactoryClass)
Provides access to the package specific ConceptFactory of the Java Model,
which should be used to create Events, Entities and Concepts in that package
|
EventFactory |
getEventFactory()
Get an EventFactory to use for creating events.
|
java.lang.Double |
getGlobalValue(java.lang.String name)
Gets the value of the given global variable name.
|
ModelSerializer |
getModelSerializer()
Provides access to the ModelSerializer, which should be used to serialize and parse Events and Entities
|
java.lang.String |
getProductId()
get the name and version of the product
|
java.util.Properties |
getProperties()
get the properties currently defined in the system.
|
int |
getProperty(java.lang.String property,
int def)
get an integer property.
|
java.lang.String |
getProperty(java.lang.String property,
java.lang.String def)
get a String property.
|
java.util.List<java.lang.String> |
getRuntimeServers()
returns a list of runtime servers currently running in the grid cluster.
|
SolutionGateway |
getSolutionGateway()
Returns the solution gateway that is used by the TestDriver instance, if available.
|
java.lang.String |
getSolutionName()
Returns connected solution name, or null if not connected.
|
java.lang.String |
getSolutionProperty(java.lang.String propertyName)
retrieves specified solution property.
|
boolean |
isRuntimeReady()
test to see if the runtime is available and ready.
|
boolean |
isSolutionReady()
Test to see if the current solution is deployed and ready.
|
boolean |
isSolutionReady(java.lang.String solutionName)
Test to see if a solution is deployed and ready.
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
loadEntities(java.util.Iterator<? extends com.ibm.ia.model.Entity> entities)
Load a collection of entities into the system.
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
loadEntities(java.util.List<? extends com.ibm.ia.model.Entity> entities)
Load a collection of entities into the system.
|
void |
loadEntity(com.ibm.ia.model.Entity entity)
Loads an entity into the system.
|
boolean |
processPendingSchedules(java.lang.String dateTime)
Notify the server to trigger any processing that has been scheduled by,
or on behalf of, an agent.
|
boolean |
processPendingSchedules(java.time.ZonedDateTime dateTime)
Notify the server to trigger any processing that has been scheduled by,
or on behalf of, an agent.
|
void |
removeDebugReceiver(DebugReceiver r)
remove a DebugInfo listener.
|
boolean |
resetSolutionState()
reset the state (clear history) of the current solution.
|
void |
runTestScenario(java.lang.String testScenario)
Run the named test scenario file.
|
void |
setGatewayMaxSubmitDelay(int delay)
Set the gateway maximum event submission delay.
|
void |
setProperties(java.util.Properties properties)
Deprecated.
Use
TestDriver(Properties) to set properties programmatically. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Deprecated.
Use
TestDriver(Properties) to set properties programmatically. |
boolean |
setTestEpoch(java.lang.String testEpoch)
Establish a temporal point of reference to process events with time
stamps in the past.
|
java.lang.String |
startRecording()
Start a debug recording on the latest version of the current solution.
|
boolean |
stopRecording()
Stop the active debug recording on the current solution, after which the results of events processed can be viewed
in the web-based debug tool.
|
RoutingStatus |
submitEvent(com.ibm.ia.model.Event event)
Submit an event to the solution.
|
java.util.Map<java.lang.String,RoutingStatus> |
submitEvents(java.util.Iterator<? extends com.ibm.ia.model.Event> events)
Submit a collection of events to the solution.
|
java.util.Map<java.lang.String,RoutingStatus> |
submitEvents(java.util.Iterator<? extends com.ibm.ia.model.Event> events,
boolean useProcessPendingSchedules)
Submit a collection of events to the solution.
|
void |
toXMLBytes(java.io.OutputStream stream,
com.ibm.ia.model.Entity entity)
serializes entity to XML using the generic entity schema and "UTF-8" encoding.
|
java.lang.String |
toXMLString(com.ibm.ia.model.Entity entity)
serializes entity to XML using the generic entity schema.
|
void |
updateEntity(com.ibm.ia.model.Entity entity)
update an entity in the grid.
|
boolean |
validateProperties()
Validate the current properties.
|
boolean |
waitUntilSolutionIdle()
Query the DSI runtime cluster-wide whether there are zero events
being processed for the current solution.
|
boolean |
waitUntilSolutionIdle(int maxWaitSeconds)
Query the DSI runtime cluster-wide whether there are zero events
being processed for the current solution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDebugInfopublic static java.lang.String ALL_AGENTS
public static final int MAX_EVENT_SUBMIT_DELAY
public static final java.lang.String TEST_EPOCH_PROPERTY
public TestDriver()
Construct a TestDriver using properties from the testdriver.properties file.
The testdriver.properties file is located in the directory identified by the Java system property testdriver_home, if set. Otherwise the file is located in the current directory, identified by user.dir.
public TestDriver(java.util.Properties properties)
Construct a TestDriver using the specified Properties.
Note: The testdriver.properties file is not read when using this constructor.
To add or merge properties with an existing testdriver.properties file,
use DriverProperties.DriverProperties() to obtain a Properties object that
contains the contents of the file.
TestDriverException - if an error occurs during initializationproperties - TestDriver configuration propertiespublic final void connect(java.lang.String name,
int timeout)
throws GatewayException
#connect(timeout).
After this method completes, test events can be submitted using submitEvent(Event).GatewayException - if a connection cannot be made within the specified timeout.name - the name of the solutiontimeout - the connection timeout, in secondspublic final void connect(java.lang.String name)
throws GatewayException
connect().
After this method completes, test events can be submitted using submitEvent(Event).GatewayException - if a connection cannot be made within the specified timeout.name - the name of the solutionpublic final void connect(int timeout)
throws GatewayException
connect().
After this method completes, test events can be submitted using submitEvent(Event).GatewayException - if a connection cannot be made within the specified timeout.timeout - the connection timeout, in secondspublic void connect()
throws GatewayException
submitEvent(Event).GatewayException - if a connection cannot be made within the specified timeout.public void disconnect()
public java.lang.String getSolutionName()
public <T extends com.ibm.ia.model.Entity> T fetchEntity(java.lang.Class<T> entityClass,
java.lang.String entityId)
TestDriverException - on errorentityClass - the classname of a class that extends EntityentityId - the identifier of the new entitynull if the entity is not foundpublic void loadEntity(com.ibm.ia.model.Entity entity)
throws java.lang.Exception
com.ibm.websphere.objectgrid.ObjectGridExceptionjava.lang.Exceptionentity - the Entity to loadpublic java.util.Map<java.lang.String,java.util.Set<java.lang.String>> loadEntities(java.util.List<? extends com.ibm.ia.model.Entity> entities)
throws MultipleEntityLoadException
MultipleEntityLoadException - If a problem occurs during the load operation.entities - the entities to loadpublic java.util.Map<java.lang.String,java.util.Set<java.lang.String>> loadEntities(java.util.Iterator<? extends com.ibm.ia.model.Entity> entities)
throws MultipleEntityLoadException
MultipleEntityLoadException - If a problem occurs during the load operation.entities - the entities to loadpublic void updateEntity(com.ibm.ia.model.Entity entity)
TestDriverException - on errorgenericEntity - the GenericEntity to updatepublic void deleteEntity(java.lang.String entityType,
java.lang.String entityId)
TestDriverException - on errorentityType - the type of the entity to removeentityID - the ID of the entity to removepublic void deleteAllEntities(java.lang.String entityType)
TestDriverException - on errorentityType - type of the entity to remove.public boolean deleteAllEntities()
TestDriverException - if connection or other errorpublic boolean endTest()
true if processing is
completed within a predetermined timeout, false
otherwise.com.ibm.ia.Agent#schedule(int delay, TimeUnit unit, String cookie),
com.ibm.ia.Agent#schedule(ZonedDateTime dateTime, String cookie)public boolean processPendingSchedules(java.lang.String dateTime)
throws java.time.format.DateTimeParseException
java.time.format.DateTimeParseException - if the date string is not valid.dateTime - an ISO 8601 date and time String representing the
cutoff time. Pending calls beyond this time are unaffected.true if processing is successful, false
otherwise.com.ibm.ia.Agent#schedule(int delay, TimeUnit unit, String cookie),
com.ibm.ia.Agent#schedule(ZonedDateTime dateTime, String cookie)public boolean processPendingSchedules(java.time.ZonedDateTime dateTime)
dateTime - a ZonedDateTime object representing the cutoff time.
Pending calls beyond this time are unaffected.true if processing is successful, false
otherwise.com.ibm.ia.Agent#schedule(int delay, TimeUnit unit, String cookie),
com.ibm.ia.Agent#schedule(ZonedDateTime dateTime, String cookie)public java.lang.String toXMLString(com.ibm.ia.model.Entity entity)
entity - the entity instance to be serialized.public void toXMLBytes(java.io.OutputStream stream,
com.ibm.ia.model.Entity entity)
throws java.io.IOException
java.io.IOExceptionstream - Output stream to write XML bytes toentity - the entity instance to be serialized.public SolutionGateway getSolutionGateway() throws GatewayException, java.lang.UnsupportedOperationException
GatewayExceptionjava.lang.UnsupportedOperationException - if the TestDriver connection does not support the SolutionGateway.public void setGatewayMaxSubmitDelay(int delay)
throws GatewayException
MAX_EVENT_SUBMIT_DELAY.GatewayExceptiondelay - Delay in ms; 0 for no delay.public EventFactory getEventFactory() throws SolutionException, GatewayException
SolutionExceptionGatewayExceptionpublic <T> T getConceptFactory(java.lang.Class<T> conceptFactoryClass)
throws SolutionException,
GatewayException
SolutionChangedException - indicates that solution has been changed on the serverGatewayException - indicates problem connecting to the solutionSolutionExceptionconceptFactoryClass - ConceptFactory class for a specific Java Model packagepublic ModelSerializer getModelSerializer() throws SolutionException, GatewayException
SolutionChangedException - indicates that solution has been changed on the serverGatewayException - indicates problem connecting to the solutionSolutionExceptionpublic <T extends com.ibm.ia.model.Entity> com.ibm.ia.model.Relationship<T> createRelationship(T t)
throws SolutionException,
GatewayException
SolutionChangedException - indicates that solution has been changed on the serverGatewayException - indicates problem connecting to the solutionSolutionExceptiont - Entity instance for this relationshippublic <T extends com.ibm.ia.model.Entity> com.ibm.ia.model.Relationship<T> createRelationship(java.lang.Class<T> entity,
java.lang.String key)
throws SolutionException,
GatewayException
SolutionChangedException - indicates that solution has been changed on the serverGatewayException - indicates problem connecting to the solutionSolutionExceptionentity - entity class type for this relationshipkey - entity id for this relationshippublic EntitySource<java.io.File> createFileEntitySource(DataFormat format, java.lang.String path) throws TestDriverException
TestDriverException - Thrown if an error occurs initializing the FileEntitySource.format - The DataFormat to use when creating the entities from the content of the files.path - The path to the directory where the files are located. All files in the directory
will be loaded. Null or the empty string are not accepted values.public EntitySource<java.io.File> createFileEntitySource(DataFormat format, java.lang.String path, java.lang.String pattern) throws TestDriverException
TestDriverException - Thrown if an error occurs initializing the FileEntitySource.format - The DataFormat to use when creating the entities from the content of the files.path - The path to the directory where the files are located. All files in the directory
will be loaded. Null or the empty string are not accepted values.pattern - A regular expression describing the files in the directory you wish to load. All files
will be loaded if set to null.public EntitySource<java.io.File> createFileEntitySource(DataFormat format, java.lang.String path, java.lang.String pattern, int skipFailureBitmask, java.lang.String encoding) throws TestDriverException
TestDriverException - Thrown if an error occurs initializing the FileEntitySource.format - The DataFormat to use when creating the entities from the content of the files.path - The path to the directory where the files are located. Null or the empty string are
not accepted values.pattern - A regular expression describing the files in the directory you wish to load. All files
will be loaded if set to null.skipFailureBitmask - A bit mask allowing you to modify the behaviour of this FileEntitySource
when it encounters a problem with loading an entity. Current allowed
values are:
encoding - The character encoding to use when parsing the entities. The default encoding determined
from the file contents will be used if set to null.public EntitySource<com.ibm.ia.model.Entity> createEntityLoaderEntitySource(java.lang.String entityLoader)
TestDriverException - Thrown if an error occurs initializing the entity source.entityLoader - The name of the entity loader file to read e.g. Entites.eldrpublic EventSource<java.io.File> createFileEventSource(DataFormat format, java.lang.String path) throws TestDriverException
TestDriverException - Thrown if an error occurs initializing the FileEventSource.format - The DataFormat to use when creating the events from the content of the files.path - The path to the directory where the files are located. All files in the directory
will be loaded. Null or the empty string are not accepted values.public EventSource<java.io.File> createFileEventSource(DataFormat format, java.lang.String path, java.lang.String pattern) throws TestDriverException
TestDriverException - Thrown if an error occurs initializing the FileEventSource.format - The DataFormat to use when creating the events from the content of the files.path - The path to the directory where the files are located. Null or the empty string are
not accepted values.pattern - A regular expression describing the files in the directory you wish to load. All files
will be loaded if set to null.public EventSource<java.io.File> createFileEventSource(DataFormat format, java.lang.String path, java.lang.String pattern, int skipFailureBitmask, java.lang.String encoding) throws TestDriverException
TestDriverException - Thrown if an error occurs initializing the FileEventSource.format - The DataFormat to use when creating the events from the content of the files.path - The path to the directory where the files are located. Null or the empty string are
not accepted values.pattern - A regular expression describing the files in the directory you wish to load. All files
will be loaded if set to null.skipFailureBitmask - A bit mask allowing you to modify the behaviour of this FileEventSource
when it encounters a problem with submitting an event. Current allowed
values are:
encoding - The character encoding to use when parsing the events. The default encoding determined
from the file contents will be used if set to null.public EventSource<com.ibm.ia.model.Event> createEventSequenceEventSource(java.lang.String eventSequence)
TestDriverException - Thrown if an error occurs initializing the event source.eventSequence - The name of the event sequence file to read e.g. Events.eseqpublic RoutingStatus submitEvent(com.ibm.ia.model.Event event) throws GatewayException, RoutingException
Submit an event to the solution.
Any processing that is scheduled to be processed before or at the time stamp of the event is triggered in chronological order before the event is submitted. However, this method does not synchronize event submission with solution processing.
GatewayExceptionRoutingExceptionevent - The event to be submittedpublic java.util.Map<java.lang.String,RoutingStatus> submitEvents(java.util.Iterator<? extends com.ibm.ia.model.Event> events) throws MultipleEventSubmitException
Submit a collection of events to the solution. Events will be submitted in the order they are provided by the supplied iterator.
Event submission will halt upon the first problem encountered. A map of the RoutingStatus values for all successful event submissions up to the point of the first failure will be attached to the MultipleEventSubmitException thrown as a result of the failure.
Any processing that is scheduled to be processed before or at the time stamp of each event is triggered in chronological order before the event is submitted. However, this method does not synchronize event submission with solution processing.
MultipleEventSubmitException - If a problem occurs with delivery of one of the events.java.lang.NullPointerException - If the supplied iterator is null.events - An iterator returning the events to be submitted.public java.util.Map<java.lang.String,RoutingStatus> submitEvents(java.util.Iterator<? extends com.ibm.ia.model.Event> events, boolean useProcessPendingSchedules) throws MultipleEventSubmitException
Submit a collection of events to the solution. Events will be submitted in the order they are provided by the supplied iterator.
Event submission will halt upon the first problem encountered. A map of the RoutingStatus values for all successful event submissions up to the point of the first failure will be attached to the MultipleEventSubmitException thrown as a result of the failure.
Event submission can be optionally synchronized with solution processing. When synchronized, the test client waits for the solution to process previously submitted events, and any processing that is scheduled to take place before the event to be submitted. Even when not synchronized, processing that is scheduled to be processed before or at the time stamp of the event is triggered in chronological order before the event is submitted.
MultipleEventSubmitException - If a problem occurs with delivery of one of the events.java.lang.NullPointerException - If the supplied iterator is null.events - An iterator returning the events to be submitted.useProcessPendingSchedules - If true, event submission is synchronized with solution processing.public void runTestScenario(java.lang.String testScenario)
TestDriverExceptiontestScenario - The test scenario to run.public boolean isRuntimeReady()
TestDriverException - on errorpublic boolean isSolutionReady()
connect(String name, int timeout ),
These required properties must be set:
DriverProperties.RUNTIME_HOST_NAME
DriverProperties.HTTP_PORT
DriverProperties.ADMIN_USERNAME
DriverProperties.ADMIN_PASSWORD
DriverProperties.TRUSTSTORE_PATHpublic boolean isSolutionReady(java.lang.String solutionName)
solutionName - the name of the solution to querypublic java.util.List<java.lang.String> getRuntimeServers()
TestDriverException - on errorpublic java.lang.String getSolutionProperty(java.lang.String propertyName)
propertyName - public java.lang.Double getGlobalValue(java.lang.String name)
name - The name of the variable to get.null.public com.ibm.ia.model.Event getAgentEvent(DebugInfo db)
DebugInfo - objectpublic com.ibm.ia.model.Event getAgentEvent(DebugInfo db, java.lang.Boolean useXOM)
DebugInfo - objectpublic void addDebugReceiver(DebugReceiver r)
listener - public void removeDebugReceiver(DebugReceiver r)
listener - public java.util.Properties getProperties()
public java.lang.String getProperty(java.lang.String property,
java.lang.String def)
property - the name of the property to return.def - value to return if no property with the given name is currently defined.public int getProperty(java.lang.String property,
int def)
property - the name of the property to return.def - value to return if no property with the given name is currently defined.public boolean validateProperties()
java.lang.IllegalStateException - if properties are invalid@Deprecated public void setProperties(java.util.Properties properties)
TestDriver(Properties) to set properties programmatically.properties - the set of properties to use.@Deprecated
public void setProperty(java.lang.String name,
java.lang.String value)
TestDriver(Properties) to set properties programmatically.name - the name of the propertyvalue - the value to which the property it setpublic boolean setTestEpoch(java.lang.String testEpoch)
throws java.time.format.DateTimeParseException,
java.lang.IllegalArgumentException
java.time.format.DateTimeParseException - if the date string is not valid.java.lang.IllegalArgumentException - if the date string represents a time after the current date
and time.testEpoch - an ISO 8601 date and time String representing a
point in the past to establish as the epoch for a sequence of
test events.true if the test epoch property was set,
false if not.TEST_EPOCH_PROPERTYpublic boolean clearTestEpoch()
true if the test epoch property was cleared,
false if not.TEST_EPOCH_PROPERTYpublic java.lang.String getProductId()
TestDriverException - on errorpublic boolean resetSolutionState()
TestDriverException - on errorpublic boolean waitUntilSolutionIdle(int maxWaitSeconds)
maxWaitSeconds - the maximum number of seconds to wait for the number of
events being processed to become zero. The minimum number of seconds to wait is 1public boolean waitUntilSolutionIdle()
public java.lang.String startRecording()
stopRecording.
Typically, this method is called inside a @Test method of your unit test class. An example is as follows:
public class AJUnitClient {
private TestDriver testDriver = null;
@Before
public void setUp() throws Exception {
testDriver = new TestDriver();
testDriver.connect();
}
@Test
public void testFlightMove() throws Exception {
testDriver.startRecording();
...
// submit event here
...
testDriver.stopRecording();
}
You may also span the recording across multiple @Test, or call this method in @BeforeClass,
and stopRecording in @AfterClass. However, take note that only one recording per solution is allowed.
So, if you have several @Test in your unit test class, and you call the two methods in @Before and @After, respectively,
only the last @Test ran will have recording data.
Also, whenever startRecording() is called, any currently active recording will be stopped before a new recording starts.
If the recording is successfully started, a message looks like one below will be logged.
[08/06/2014 12:07:28] [.] ::INFO:: startRecording was called at com.ibm.ia.runtime.test.HelloWorldRuleAgentTest.sendRuleAgentSingleEvent(HelloWorldRuleAgentTest.java:47)
[08/06/2014 12:07:39] [.] ::INFO:: Debug recording started. [SolutionVersion: hello_world, Author: tester, Recording id: hello_world-0.1|2014-08-06T12:07:39.844-0400]
If the recording cannot be started, check log for reason. An example of the possible cause.
[08/06/2014 11:59:02] [.] ::SEVERE:: Error occurred when starting recording. [SolutionVersion: hello_world_bad, Author: tester]. Message: Not Found
TestDriverException - on errorpublic boolean stopRecording()
startRecording for example use.
If the recording is successfully stopped, a message like below will be logged.
[8/6/14 12:30:23:064 EDT] 00000001 TestDriver I stopRecording() was called at com.ibm.ia.runtime.test.HelloWorldRuleAgentTest.sendRuleAgentMultipleEvents(HelloWorldRuleAgentTest.java:60)
[8/6/14 12:30:25:947 EDT] 00000001 TestDriver I Recording stopped [solution name: hello_world, recording id: hello_world-0.1|2014-08-06T12:26:06.917-0400]
If the recording cannot be stopped, check log for reason. An example of the possible cause:
[08/02/2014 12:38:54] [.] ::SEVERE:: Error occurred when stopping recording. [Solution name: hello_world]. Message: CWMBD0135I: There is no active recording for solution hello_world to stop.
TestDriverException - on error© Copyright IBM 2017