Analyze Unit Test State Service

To view the results, verifying a successful configuration, run the analyzeUnitTestState RESTful web service.

The End Point for this example is:

<URL>/jderest/v2/scheduler/analyzeUnitTestState

In this example, <URL> is the AIS Server where the scheduler runs.

In the service body, replace the values that look like <xxxx> with the appropriate values.

Service Body

{
          "username": "<user>",
          "password": "<password>",
          "environment": "<environment>",
          "role": "<role>",
}

Return Body

{
    "unitTestResults": {
        "testSucceeded": true,
        "errorEventIndex": [],
        "errorEvent": [],
        "unitTestEvents": [
            {
                "environment": "JDV920",
                "role": "*ALL",
                "jasserver": null,
                "token": null,
                "deviceName": null,
                "ssoEnabled": false,
                "ssoUniqueId": null,
                "psToken": null,
                "username": "jde",
                "jasProcessingInstruction": null,
                "unitTestJobBehavior": {
                    "unitTestStartupHost": {
                        "protocol": "http",
                        "host": "an_ais_host_1",
                        "port": "7101"
                    },
                    "id": "a",
                    "unitTestHostActions": [],
                    "unitTestHostCount": 1,
                    "runningOnSingleServer": true
                },
                "executionHost": "http:// an_ais_host_1:7101"
            },
            {
                "environment": "JDV920",
                "role": "*ALL",
                "jasserver": null,
                "token": null,
                "deviceName": null,
                "ssoEnabled": false,
                "ssoUniqueId": null,
                "psToken": null,
                "username": "jde",
                "jasProcessingInstruction": null,
                "unitTestJobBehavior": {
                    "unitTestStartupHost": {
                        "protocol": "http",
                        "host": " an_ais_host_2",
                        "port": "7101"
                    },
                    "id": "a",
                    "unitTestHostActions": [],
                    "unitTestHostCount": 1,
                    "runningOnSingleServer": true
                },
                "executionHost": "http:// an_ais_host_1:7101"
            }
        ],
        "jobsStopped": null
    }
}

The most important value in this return body is the "testSucceeded": "true" pair. Everything else describes details of the successful executions of the unit test by the scheduler. In this case, there are two "unitTestEvents," meaning that the unit test ran twice. Because it is successful, your scheduler resilience is properly configured. If a different payload is returned or the testSucceeded is false, check the logs for that AIS Server.

When you have completed your testing, stop the server using the stop RESTful web service described previously.