-
public class TestPlanService
-
-
Field Summary
Fields Modifier and Type Field Description public final static TestPlanServiceINSTANCE
-
Method Summary
Modifier and Type Method Description final List<TestPlanExecution>getPlanExecutions(TestPlan plan)final List<TestPlan>getTestPlansByNamespaceAndNlpModel(String namespace, String nlpModel)final List<TestPlan>getTestPlansByNamespace(String namespace)final List<TestPlan>getTestPlansByApplication(String applicationId)final UnitremoveDialogFromTestPlan(TestPlan plan, Id<Dialog> dialogId)final UnitaddDialogToTestPlan(TestPlan plan, Id<Dialog> dialogId)final UnitremoveTestPlan(TestPlan plan)final UnitsaveTestPlan(TestPlan plan)final TestPlangetTestPlan(Id<TestPlan> planId)final TestPlanExecutiongetTestPlanExecution(TestPlan testPlan, Id<TestPlanExecution> testExecutionId)final UnitsaveTestPlanExecution(TestPlanExecution testPlanExecution)final TestPlanExecutionsaveAndRunTestPlan(ConnectorRestClient client, TestPlan plan, Id<TestPlanExecution> executionId)This function saves the given test plan in the mongo database and then run the test plan. final TestPlanExecutionrunTestPlan(ConnectorRestClient client, TestPlan plan, Id<TestPlanExecution> executionId)This function execute the given common test plan. final StringcheckEquality(ClientMessage $self, ClientMessage expectedMessage)This function checks if the answer sent by the bot equals the expected expectedMessage stored in the test step. -
-
Method Detail
-
getPlanExecutions
final List<TestPlanExecution> getPlanExecutions(TestPlan plan)
-
getTestPlansByNamespaceAndNlpModel
final List<TestPlan> getTestPlansByNamespaceAndNlpModel(String namespace, String nlpModel)
-
getTestPlansByNamespace
final List<TestPlan> getTestPlansByNamespace(String namespace)
-
getTestPlansByApplication
final List<TestPlan> getTestPlansByApplication(String applicationId)
-
removeDialogFromTestPlan
final Unit removeDialogFromTestPlan(TestPlan plan, Id<Dialog> dialogId)
-
addDialogToTestPlan
final Unit addDialogToTestPlan(TestPlan plan, Id<Dialog> dialogId)
-
removeTestPlan
final Unit removeTestPlan(TestPlan plan)
-
saveTestPlan
final Unit saveTestPlan(TestPlan plan)
-
getTestPlan
final TestPlan getTestPlan(Id<TestPlan> planId)
-
getTestPlanExecution
final TestPlanExecution getTestPlanExecution(TestPlan testPlan, Id<TestPlanExecution> testExecutionId)
-
saveTestPlanExecution
final Unit saveTestPlanExecution(TestPlanExecution testPlanExecution)
-
saveAndRunTestPlan
final TestPlanExecution saveAndRunTestPlan(ConnectorRestClient client, TestPlan plan, Id<TestPlanExecution> executionId)
This function saves the given test plan in the mongo database and then run the test plan.
- Parameters:
client- is the client to use for running the test plan.plan- is the common test plan to run.
-
runTestPlan
final TestPlanExecution runTestPlan(ConnectorRestClient client, TestPlan plan, Id<TestPlanExecution> executionId)
This function execute the given common test plan. It goes over all steps of related tests and sends each step as a dialog.
- Parameters:
client- is the client to use for the dialogs.plan- is the common test plan to run.
-
checkEquality
final String checkEquality(ClientMessage $self, ClientMessage expectedMessage)
This function checks if the answer sent by the bot equals the expected expectedMessage stored in the test step.
- Parameters:
expectedMessage- is the message to expect as an answer from the bot.
-
-
-
-