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 vRealize Orchestrator server, where you can run your unit tests against a deployed content in a test endpoint. Whenever you set an vRealize 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 ( vRealize Orchestrator), 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. The format of tests is:

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

When you select the unit server while testing content, the new unit tests is run 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.

You can input available properties 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.
packageName Name of content.
packageId Content Unique Identifier in the repository.
endpointUser User name of endpoint being tested.
endpointServer Server name of endpoint being tested.
endpointPassword Secure password of the endpoint being tested.