Testing the Watson Assistant installation

After you install Watson Assistant, you can run a deployment verification test (DVT) to make sure that your service is working properly.

Permissions you need for this task:
You must be an administrator of the Red Hat® OpenShift® project.

This testing is a convenient way to check that a deployment is healthy. You can run a test immediately after deployment or periodically. Follow the steps in Running the test to run the first test on your Watson Assistant instance. If you already ran a test, follow the steps in Rerunning the test.

Running the test

Complete the following steps to run the first DVT on your Watson Assistant instance:

  1. Go to the project where Watson Assistant is installed:
    oc project ${PROJECT_CPD_INSTANCE}
  2. Export the name of your Watson Assistant instance as an environment variable:
    
    export INSTANCE=`oc get wa -n ${PROJECT_CPD_INSTANCE} |grep -v NAME| awk '{print $1}'` export VERSION=`oc get wa -n ${PROJECT_CPD_INSTANCE} |grep -v NAME| awk '{print $2}'`
  3. Run the test:
    cat <<EOF | oc apply -f -
    apiVersion: assistant.watson.ibm.com/v1
    kind: WatsonAssistantDvt
    metadata:
      name: ${INSTANCE}
      namespace: ${PROJECT_CPD_INSTANCE}
      annotations:
        oppy.ibm.com/disable-rollback: "true"
    spec:
      labels:
        "app.kubernetes.io/instance": ${INSTANCE}
      version: ${VERSION}
      assistantInstanceName: ${INSTANCE}
      # The cucumber test tags to execute
      testTags: "@accuracy,@callouts,@dialogs,@dialogErrors,@dialogV1,@dialogV1errors,@embedsearch,@entities,@exactMatch,@folders,@fuzzy,@generic,@healthcheck,@intents,@languagexx,@newse,@openentities,@patterns,@prebuilt,@recommends,@search,@slots,@spellcheck,@spellcheckfr,@v2authorskill,@v2authorwksp,@v2healthcheck,@v2skillref,@v2snapshots,@workspaces"
      cluster:
        type: "private"
        # :image_pull_secrets: pull secret names
        imagePullSecrets: []
        dockerRegistryPrefix: ""
    EOF

    Your changes initiate a pod named ${INSTANCE}-dvt. This ${INSTANCE}-dvt pod starts a pod named dvt that runs the verification test.

  4. Check whether the ${INSTANCE}-dvt pod is available:
    oc get pods |grep dvt
  5. Optional: You can run the following command to view the logs from the pod while it is running:
    oc logs ${INSTANCE}-dvt -f
  6. Check the status of the test:
    oc get dvt ${INSTANCE}
    When the test is successful, a message similar to the following example is displayed:
    NAME   PHASE       TESTRESULT   VERSION   AGE
    wa     Completed   Passed       4.6.5   5h54m

Rerunning the test

Complete the following steps to rerun a DVT:

  1. If you need to rerun the test, run the following command to delete the DVT custom resource:
    oc delete dvt ${INSTANCE}
  2. After you delete the custom resource, complete the steps from Running the test.