public class AgentAPI extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
AgentAPI.MbtSessInfo |
| Modifier | Constructor and Description |
|---|---|
protected |
AgentAPI(Server svr_p) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeModel(String modelName_p)
to close the model (release memory).
|
String |
getAgentID()
returns the agentID.
|
RunResult |
getModelStats(String modelName_p)
retrieves model execution stats for a model execution
|
String |
getNextCmd()
retrieves the next command from the model.
|
String |
getNextCmd(long timeoutMillis_p)
retrieves the next command from the model.
|
protected void |
modelClosed() |
String |
regAgent(String modelName_p)
register agent to TestOptimal to be connected to the running model.
|
String |
setResult(boolean isSuccess_p,
String result_p)
sends the result back to the model to be recorded.
|
String |
setResult(boolean isSuccess_p,
String result_p,
String reqTag_p) |
String |
setResult(boolean isSuccess_p,
String result_p,
String reqTag_p,
String assertID_p) |
String |
setResult(boolean isSuccess_p,
String result_p,
String reqTag_p,
String assertID_p,
Map<String,Object> moreAttrs_p) |
String |
startModel(String modelName_p)
starts model execution on TestOptimal server with default sequencer Optimal.
|
String |
startModel(String modelName_p,
Constants.MbtMode mbtMode_p)
starts model execution on TestOptimal server with specified sequencer/MBT Mode.
|
String |
startModel(String modelName_p,
List<Trans> transList_p,
boolean optimal_p)
starts model execution on TestOptimal server to cover the transitions specified.
|
void |
stopModel()
to interrupt model execution.
|
protected AgentAPI(Server svr_p)
public String getAgentID()
public String startModel(String modelName_p) throws APIError
modelName_p - model nameAPIError - on any errorpublic String startModel(String modelName_p, Constants.MbtMode mbtMode_p) throws APIError
modelName_p - model namembtMode_p - Optimal, Priority, Pairwise, RandomAPIError - on any errorpublic String startModel(String modelName_p, List<Trans> transList_p, boolean optimal_p) throws APIError
modelName_p - model nametransList_p - List of transitions to be covered.optimal_p - true if to generate minimal number of test steps, false to cover the transitions in the order
specified in tranList_p.APIError - on any errorpublic String regAgent(String modelName_p) throws APIError
modelName_p - model nameAPIError - on any errorpublic String getNextCmd() throws APIError
APIError - on any errorpublic String getNextCmd(long timeoutMillis_p) throws APIError
timeoutMillis_p - number of milliseconds the agent should wait for the next command from TestOptimal server.APIError - on any errorpublic String setResult(boolean isSuccess_p, String result_p) throws APIError
isSuccess_p - true to record the current test step as success/passed. false to record as failed.result_p - text resultAPIError - on any errorpublic String setResult(boolean isSuccess_p, String result_p, String reqTag_p) throws APIError
isSuccess_p - true or falseresult_p - passed or failed messagereqTag_p - requiremet tag/codeAPIError - on any errorpublic String setResult(boolean isSuccess_p, String result_p, String reqTag_p, String assertID_p) throws APIError
isSuccess_p - true or falseresult_p - passed or failed messagereqTag_p - requiremet tag/codeassertID_p - identifier to be assigned to the check - either passed or failed.APIError - on any errorpublic String setResult(boolean isSuccess_p, String result_p, String reqTag_p, String assertID_p, Map<String,Object> moreAttrs_p) throws APIError
isSuccess_p - true or falseresult_p - passed or failed messagereqTag_p - requiremet tag/codeassertID_p - identifier to be assigned to the check - either passed or failed.moreAttrs_p - additional attributes in Map<String, Object> to be passed to the model.APIError - on any errorpublic void stopModel()
throws APIError
APIError - on any errorpublic void closeModel(String modelName_p) throws APIError
modelName_p - model nameAPIError - on any errorpublic RunResult getModelStats(String modelName_p) throws APIError
modelName_p - model nameAPIError - on any errorprotected void modelClosed()
Copyright © 2020. All rights reserved.