public class ModelAPI extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ModelAPI(Server svr_p) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeModel(String modelName_p)
closes the model (to release memory).
|
RunResult |
genPaths(String modelName_p)
generate test paths (test cases) for a model (uploaded) using the default Optimal sequencer.
|
RunResult |
genPaths(String modelName_p,
Constants.MbtMode mbtMode_p)
generate test paths (test cases) for a model (uploaded).
|
RunResult |
genPaths(String modelName_p,
Constants.MbtMode mbtMode_p,
int timeoutMillis_p)
generate test paths (test cases) for a model (uploaded).
|
RunResult |
genPathsPartial(String modelName_p,
List<Trans> transList_p,
boolean optimal_p)
generate test paths (test cases) to cover a subset of transitions in a model.
|
RunResult |
genPathsPartial(String modelName_p,
List<Trans> transList_p,
boolean optimal_p,
int timeoutMillis_p)
generate test paths (test cases) to cover a subset of transitions in a model.
|
String |
getGraphCoverage(String modelName_p,
String outFilePath_p)
download coverage graph for current model execution.
|
String |
getGraphModel(String modelName_p,
String outFilePath_p)
download model graph.
|
String |
getGraphMSC(String modelName_p,
String outFilePath_p)
download MSC graph for current model execution.
|
String |
getGraphSequence(String modelName_p,
String outFilePath_p)
download sequence/traversal graph for current model execution.
|
Model |
getModel(String modelName_p)
retrieves model from TestOptimal server.
|
Map<String,Object> |
runModel(RunRequest runReq_p)
runs the model and waits for completion.
|
Map<String,Object> |
runModel(String modelName_p)
runs the model and waits for completion.
|
Map<String,Object> |
runModelMCase(String modelName_p,
String[] mcaseList_p)
runs MCases on the model specified and waits for completion.
|
void |
upload(Model model_p)
uploads a model to TestOptimal server.
|
protected ModelAPI(Server svr_p)
public void upload(Model model_p) throws APIError
model_p - model objectAPIError - on any errorpublic Model getModel(String modelName_p) throws APIError
modelName_p - model nameAPIError - on any errorpublic RunResult genPaths(String modelName_p) throws APIError
modelName_p - name of the modelAPIError - on any errorpublic RunResult genPaths(String modelName_p, Constants.MbtMode mbtMode_p) throws APIError
modelName_p - name of the modelmbtMode_p - choose one of the model sequencers: Optimal, Priority, Pairwise, Random.APIError - on any errorpublic RunResult genPaths(String modelName_p, Constants.MbtMode mbtMode_p, int timeoutMillis_p) throws APIError
modelName_p - name of the modelmbtMode_p - choose one of the model sequencers: Optimal, Priority, Pairwise, Random.timeoutMillis_p - # of milliseconds to wait for the generation to completeAPIError - on any errorpublic RunResult genPathsPartial(String modelName_p, List<Trans> transList_p, boolean optimal_p) throws APIError
modelName_p - name of the model (uploaded)transList_p - list of transitions to be coveredoptimal_p - true to generate minimal # of test steps to cover all transitions in transList_p,
false to generate test path by covering the transitions in transList_p in the order they are
listed.APIError - on any errorpublic RunResult genPathsPartial(String modelName_p, List<Trans> transList_p, boolean optimal_p, int timeoutMillis_p) throws APIError
modelName_p - name of the model (uploaded)transList_p - list of transitions to be coveredoptimal_p - true to generate minimal # of test steps to cover all transitions in transList_p,
false to generate test path by covering the transitions in transList_p in the order they are
listed.timeoutMillis_p - # of milliseconds to wait for the generation to complete. 0 for no timeoutAPIError - on any errorpublic Map<String,Object> runModel(String modelName_p) throws APIError
modelName_p - model nameAPIError - on any errorpublic Map<String,Object> runModel(RunRequest runReq_p) throws APIError
runReq_p - run request with execution optionsAPIError - on any errorpublic Map<String,Object> runModelMCase(String modelName_p, String[] mcaseList_p) throws APIError
modelName_p - model namemcaseList_p - list of MCase names to be executed.APIError - on any errorpublic void closeModel(String modelName_p) throws APIError
modelName_p - model nameAPIError - on any errorpublic String getGraphModel(String modelName_p, String outFilePath_p) throws APIError
modelName_p - model nameoutFilePath_p - where to save the graphAPIError - on any errorpublic String getGraphCoverage(String modelName_p, String outFilePath_p) throws APIError
modelName_p - model nameoutFilePath_p - where to save the graphAPIError - on any errorpublic String getGraphSequence(String modelName_p, String outFilePath_p) throws APIError
modelName_p - model nameoutFilePath_p - where to save the graphAPIError - on any errorCopyright © 2020–2021. All rights reserved.