Good testing assures tile developers that their product installs and runs properly on diverse platforms and ensures that the tile you install can provide the service on your platform. Use the following tile testing practices for VMware Tanzu Operations Manager.

Arrange for a pyramid structure for testing, starting with unit tests and moving up to successively broader and more automated levels of integration.

Use Concourse for creating build pipelines that follow this test structure. Other continuous integration tools must support a pyramid testing approach.

Tile test pyramid

For VMware Tanzu Operations Manager tiles, a typical test pyramid progresses as follows:

  1. Unit tests for each tile component. For example, service components, broker, adapter, and metrics emitter, both manual by developer and in an automated pipeline.

  2. System tests of the tile’s BOSH release, including:

    • Functional tests that cover the main features of the service. The main features typically interact with almost all important external integration points, because the tests confirm product capability.
    • Smoke tests or life cycle tests for service instances that create and bind a service instance. You call it from a test app, verify the logs it generates, and delete it. For a typical end-to-end test sequence, see Smoke Tests.
  3. System tests of tile operation in Tanzu Operations Manager.

    • These include:
      • Configuration checks that test every external configurable integration point and connection to remote servers using configured credentials.
      • Default checks that confirm “happy path” capability.
    • Use the Tanzu Operations Manager API to verify that property blueprints in the tile metadata are correct and that they translate correctly to the BOSH manifest that Tanzu Operations Manager generates.
    • Use the om tool to call the Tanzu Operations Manager API programmatically from Go. Avoid the unsupported opsmgr gem that called the Tanzu Operations Manager API from Ruby.
    • Confirm manually that the tile wires property blueprints to the expected pane and form controls in the UI.
    • Test your environment using one of the environments described in Development Environments.

System tests might incur costs from using third-party services, IaaS resources, and others.

Smoke tests

Smoke tests are end-to-end life cycle tests for service instances that you can include as post-deploy errands within a tile, and also automate in Concourse or other integration platforms.

A typical smoke test runs as follows:

  1. Create an org and space in which to run the test.

  2. Register the tile service broker.

  3. Enable service access for the created org.

  4. Go through all service plans (or a subset of them):

    1. Create a service instance for the plan.
    2. Push a test app.
    3. Bind the service instance to the app.
    4. Use the app in a way that exercises the service instance. For a data service, for example, write and read from the service instance.
    5. Unbind the service instance.
    6. Delete the service instance.
    7. Delete the test app.
  5. Delete the service broker.

  6. Delete the test org and space.

General recommendations

These are general recommendations for designing and running tests on VMware Tanzu Operations Manager tiles:

  • Leave the environment exactly as it was before the test was run.

  • Generate verbose logging with lots of contextual data to make troubleshooting easier.

  • Design test suites for re-usability by making them highly parameterizable. Important parameters include:

    • External settings such as domains, credentials, and certificates.
    • Plans to test against. For example, the Redis for VMware Tanzu Operations Manager smoke tests use identical code for two different service plans: pre-provisioned and on-demand.
    • Timeouts, numbers of retries, and other settings that must be adjusted for different environments.
    • Switches to include or exclude portions of the tests, such as generating metrics or backups.
  • Use the tests again that exist already, for example, in Concourse.

  • Use an example Cloud Foundry app that uses your service. This app can serve for testing, doing a demo of your tile capabilities, and as a code example. See the MySQL Test App an example.

  • When testing manually, using the UI is better than calling the underlying API directly. Use UIs and APIs the way a customer would.

check-circle-line exclamation-circle-line close-line
Scroll to top icon