Skip to content

Git sync

Git sync keeps a project’s features in AssertThat and the .feature files in a GitHub or Bitbucket repository in step. Product owners and testers write and review scenarios in Jira, and developers get the same Gherkin in the repository, next to the step definitions and test code that run it. No pipeline scripts or API calls are needed.

Each project syncs one repository, one branch and one folder. You choose which side is the master:

Master What a sync does When it runs
AssertThat (export) Writes every feature as a .feature file in the folder and removes .feature files there that no longer match a feature, in one commit or one pull request Sync now on the project settings page, or Sync to Git for single features on the Features page
The repository (import) Imports every .feature file in the folder. A feature with the same name is overwritten, as with a manual upload Every push to the branch, and Sync now

When AssertThat is the master, you also choose how changes reach the repository:

  • Commit directly to the branch, or
  • Open a pull request for each sync, so changes to scenarios are reviewed like any other code change.

File names follow the same rule as downloading features: the feature name in lower case with spaces turned into hyphens, for example Card payment becomes card-payment.feature.

Feature cards with Git sync status on the Features page

AssertThat reaches the repository through a connection:

  • AssertThat GitHub App (GitHub only, recommended). A Jira admin installs the app once for the site, and GitHub decides which repositories it can reach. No tokens to store or rotate, and pushes arrive through the app, so no webhook is needed. See Connect GitHub with the AssertThat GitHub App.
  • Token connection (GitHub or Bitbucket). A Jira admin adds an access token once for the site, optionally limited to some repositories and projects. See Add a token connection.
  • Project token. A project admin enters an access token for one project in its Git integration. Use this when there’s no site-wide connection.

Tokens are stored encrypted and are never shown again, to anyone.

Task Permission
Install the GitHub App, add or change token connections Jira admin
Set up a project’s Git integration, Sync now, read the sync log Project admin
See each feature’s sync status Browse projects
Sync single features from the Features page, add commit messages Edit work items
  1. A Jira admin installs the AssertThat GitHub App or adds a token connection. You can skip this step and use a project token instead.
  2. A project admin sets up the project’s Git integration: connection, repository, branch, folder and master.
  3. Run the first sync with Sync now, then follow each feature’s sync status on the Features page.

Using Azure DevOps, GitLab or another Git host? Built-in sync supports GitHub and Bitbucket. For other hosts, sync from a CI pipeline with the AssertThat API.