# Continuous Infrastructure Testing as code

> Synchronize Continuous Infrastructure Testing tests with a remote source code repository

---

Site [llms.txt](/llms.txt)

---

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](/docs/cmp/configure/integrations/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](/docs/cmp/configure/administration/system/miscellaneous-settings/) allows editing. While it is read-only, **Push to Remote Source** is disabled.

## Add a test from a repository

1. Go to **Admin** > **Continuous Infrastructure Testing**.
1. Select **Add**, then **Add Action Test from Repository**.
1. Provide a **Repository**, **Branch**, and the test's JSON file.
1. Select **Save**.

## Related

- [Integrate a remote source code repository](/docs/cmp/configure/integrations/source-code-repository/): Linking a repository and setting credentials for your commits.
- [Continuous Infrastructure Testing](/docs/cmp/use/orchestration/cit/): Writing and scheduling tests.
