Skip to main content

Exporting Test Plan to Git

Overview

TestChimp's Export to Git feature allows you to sync your test planning artifacts (user stories and test scenarios) to your GitHub repository. This keeps your test plan alongside your codebase, enabling version control, code review workflows, and seamless access for AI coding agents.

Export to Git

How It Works

The Export to Git feature:

  1. Compares local and remote: Identifies new and modified files
  2. Shows a diff view: Displays exactly what will change
  3. Creates a pull request: Raises a PR with all changes for review

This is a one-way export from TestChimp to your repository. Changes made directly in the repository are not imported back into TestChimp.

Why One-Way Export?

TestChimp maintains stable IDs for workflow management, status tracking, and requirement traceability. These IDs are stored in the platform and referenced in frontmatter. A two-way sync would risk ID conflicts and data integrity issues, so we've chosen a reliable one-way export model.

Configuration

Before using Export to Git, you need to configure the integration:

Step 1: Connect GitHub

  1. Navigate to Project SettingsIntegrations
  2. Click Connect GitHub
  3. Authorize TestChimp to access your repositories
  4. Select the repository to connect

Step 2: Configure Folder Mapping

Map TestChimp folders to repository paths:

TestChimp FolderRepository Path
stories/e.g., docs/test-planning/stories/
scenarios/e.g., docs/test-planning/scenarios/

This tells TestChimp where to place the exported files in your repository.

Step 3: Verify Configuration

The configuration panel shows:

  • Connected repository name
  • Mapped folder paths
  • Last export timestamp (if any)

Using Export to Git

Starting an Export

  1. Navigate to Test Planning
  2. Click the Import/Export button in the explorer toolbar
  3. Select Export to Git Repo
  4. TestChimp analyzes your files and compares with the repository

The Diff View

After analysis, you'll see a diff comparison showing:

  • Added files: New stories or scenarios not yet in the repository
  • Modified files: Existing files with changes
  • Unchanged files: Files that are already in sync (not shown)

For each file, you can:

  • View the full diff (additions in green, deletions in red)
  • See the file path in the repository
  • Review the content that will be committed

Creating the Pull Request

  1. Review all changes in the diff view
  2. Edit the PR title and description if needed
  3. Click Create Pull Request
  4. TestChimp:
    • Creates a new branch
    • Commits all changes
    • Opens a pull request against your default branch

After the PR is Created

  • A link to the PR is displayed
  • Review the PR in GitHub as you would any code change
  • Merge when ready
  • Your test planning artifacts are now in your codebase

File Format in Repository

Exported files maintain the markdown format with frontmatter:

User Story Example

---
id: us-123
title: User Login with Email
priority: high
status: approved
labels:
- authentication
- core-flow
created_at: 2024-01-15T10:30:00Z
updated_at: 2024-02-01T14:22:00Z
---

## Description

As a registered user, I want to log in using my email and password
so that I can access my personalized dashboard.

## Acceptance Criteria

- Email field validates proper email format
- Password field masks input
- Invalid credentials show clear error message
- Successful login redirects to dashboard

Test Scenario Example

---
id: ts-456
title: Login - Invalid Credentials Error
priority: high
status: ready
linked_story: us-123
labels:
- authentication
- negative-test
---

## Description

Verify that invalid login credentials display an appropriate error message.

## Preconditions

- User account exists with known credentials
- User is not logged in

## Test Steps

1. Navigate to login page
2. Enter valid email
3. Enter incorrect password
4. Click Login button

## Expected Results

- Error message "Invalid email or password" is displayed
- User remains on login page
- Password field is cleared

Repository Structure

After export, your repository will have:

docs/test-planning/           # Or your configured path
├── stories/
│ ├── authentication/
│ │ ├── login.md
│ │ ├── registration.md
│ │ └── password-reset.md
│ └── billing/
│ ├── subscription.md
│ └── payment.md
└── scenarios/
├── authentication/
│ ├── login-success.md
│ ├── login-invalid-creds.md
│ └── registration-validation.md
└── billing/
├── add-payment.md
└── upgrade-plan.md

Best Practices

Export Regularly

  • Export after significant changes to your test plan
  • Consider exporting at the end of each sprint
  • Export before major releases for documentation

Use Meaningful Commit Messages

The default PR title summarizes changes, but you can:

  • Add context about why changes were made
  • Reference related issues or tickets
  • Note any breaking changes to test structure

Review Before Merging

Even though TestChimp generated the content:

  • Review the diff for accuracy
  • Ensure folder structure is correct
  • Verify no sensitive data is included
  • Check that formatting is consistent

Coordinate with Team

  • Inform the team when exporting
  • Avoid conflicting exports from multiple team members
  • Establish a cadence (e.g., weekly exports)

Troubleshooting

"GitHub authentication expired"

Re-connect GitHub in Project Settings → Integrations.

"Repository not configured"

Set up the repository and folder mappings in Project Settings → Integrations.

"No changes to export"

All files are already in sync with the repository. Make changes in TestChimp and try again.

Large number of changes

If exporting for the first time, expect many "added" files. This is normal for initial sync.

Limitations

  • One-way only: Changes in the repository are not imported back
  • GitHub only: Currently supports GitHub (GitLab/Bitbucket coming soon)
  • PR workflow: Creates PRs rather than direct commits (for safety)
  • Single repository: Each project connects to one repository

Next Steps

With your test plan in Git:

  1. Set up code review: Have team members review test plan PRs
  2. Enable branch protection: Require reviews before merging
  3. Access from AI agents: Point your coding assistants to the test plan folder
  4. Track changes over time: Use git history to see test plan evolution