When you create a content endpoint, you can select supportTest policy to enable the system to run unit tests after deploying a content to the test environment.

There are two servers here:
  • Unit test server
  • Test endpoint
The server is a staging environment in which you can deploy the contents and run unit tests against the deployed contents to the environment.

Unit Test Server

The test server is a vRO server, where you can run your unit tests against a deployed content in a test endpoint. Whenever you set an orchestrator endpoint as a test endpoint, it tests the vRealize Orchestrator package and is deployed automatically to this endpoint allowing unit or integration tests. There are some basic tests already present in the package and you can extend the tests in the unit test server as well.

Menu options for Unit Test Server

Sample Unit Test Flow

Common Tests

All tests under the PackageType Common folder are run.

If you go to the unit test server (vRO), under the Content Management Tests, you can view separate folders for all content types. For each content type folder, there is a common folder present where you see all the common workflows that are run for a given content type.

Package Specific Tests

Specific tests can be run per content name as well. For example, if an Automation-XaaSBlueprint content called "Add AD User" requests a unit test called "Add AD User - Test 1" can be created, which can connect to a given Content endpoint, and run the XaaS Blueprint and wait to see if it was successful. The format of tests is:

<content name - test name> and under the <Content-Type> folder.

Whenever you select the unit server while testing content, the new unit tests is also run based on the content type against the deployed content in a test endpoint.

The following lists the overall functionality of unit tests:

  • Common unit tests workflows can be written under common folder per content type
  • Unit test workflow for a given content can be written under <Content Type> and name the workflow as <Content name> - <Tests name>.
  • If there is a test failure, then the test displays an error from a workflow.
  • Checks the available inputs to test a workflow

Sample Workflows

You can refer to the existing unit workflows available in their vRealize Orchestrator (policy set to test). Navigate to a common folder in vRealize Orchestrator, Workflows > Content Management Tests > Content Type > Common.

Input properties available for a unit test workflow that is provided by the platform.

Property Name Description
version Version of content being tested.
testEndpointLink The content endpoint link within the repository.
tenant The tenant being connected to.
packageVersionLink The version link to the repository.
packageType Type of Content. Automation-CompositeBlueprint.
packageName Content Name
packageId Content Unique Identifier in the repository.
endpointUser The username of the endpoint being tested against.
endpointServer The server name of the endpoint being tested against.
endpointPassword The password (SecureString) of the endpoint being tested against.