Continuous Infrastructure Testing as code
2 minute read
A test that runs an action can be pushed to a repository and refreshed from it later, and you can add a test from an action already in a repository. Tests of other kinds have no repository tab. This requires a repository linked to Cloud Management Platform (CMP) and repository credentials on your profile so commits are attributed to you. See Integrate a remote source code repository.
Push and refresh a test
Open the test from Admin > Continuous Infrastructure Testing, then select the Repository tab. Unlike other content types, this tab keeps the same name regardless of which provider the repository belongs to.
Push to Remote Source opens a form for a Repository, Branch, and Commit Message. If the test has been pushed before, select Preview first to see what changed. After the push, the result includes a link to open a pull request.
Refresh from Remote Source prompts for a Repository and Branch, then updates the test in CMP based on the repository’s contents. It appears once the test has been pushed or created from a repository, and the tab also shows the repository, the remote source URL, and when the test was last refreshed.
A test that comes from a repository is read-only unless Remote Content Mode in Miscellaneous Settings allows editing. While it is read-only, Push to Remote Source is disabled.
Add a test from a repository
- Go to Admin > Continuous Infrastructure Testing.
- Select Add, then Add Action Test from Repository.
- Provide a Repository, Branch, and the test’s JSON file.
- Select Save.
Related
- Integrate a remote source code repository: Linking a repository and setting credentials for your commits.
- Continuous Infrastructure Testing: Writing and scheduling tests.