Setting up batch completion notifications in the SDK
As explained in Batch completion notifications, you can set up Eyes using the Eyes Test Manager so that when a batch completes and it includes tests for a defined application, users will get an email or Slack notification informing them of the batch completion, and providing a summary of the test run and a link to the results.
Apart from configuring in the Eyes Test Manager which test applications will be notified and who will get the notifications, you also need to make a small change to the test code using the SDK by adding a call to the
class$batchinfo$setnotifyoncompletion$morp as shown in the following snippet:
Note that the test must run using the
visualgridrunner. The test notifies the Eyes Server that the batch is complete as part of the call to
classicrunner$getalltestresults. For more information on building a test program using a Runner see Writing visual tests with the Eyes SDK.
If you are running a batch of tests in multiple processes or on multiple machines by sharing a batch ID, then you also need to ensure that notifications are only sent when all the tests have completed. On CIs with Eyes plug-ins this is done automatically. If you are using a different infrastructure, then see Close the shared batch to find out how to do this.