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 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.
For Tanzu Operations Manager tiles, a typical test pyramid progresses as follows:
Unit tests for each tile component. For example, service components, broker, adapter, and metrics emitter, both manual by developer and in an automated pipeline.
System tests of the tile’s BOSH release, including:
System tests of tile operation in Tanzu Operations Manager.
opsmgr
gem that called the Tanzu Operations Manager API from Ruby.System tests might incur costs from using third-party services, IaaS resources, and others.
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:
Create an org and space in which to run the test.
Register the tile service broker.
Activate service access for the created org.
Go through all service plans (or a subset of them):
Delete the service broker.
Delete the test org and space.
These are general recommendations for designing and running tests on 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:
Reuse tests 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 your customer does.