testgrinder
Go to testgrinder
  • Overview
  • testgrinder uses
    • Testing
      • User Acceptance Testing
      • Change Testing
      • Regression Testing
      • Performance Testing
      • Stress Testing
    • Data management
      • Data verification
    • Configuration management
    • Training videos development
  • Getting Started
    • Video: Get Started with testgrinder
    • First steps
    • Example Scripts
    • Writing your first scenario
    • Scenarios
    • Run reports
  • Writing Scenarios
    • Anatomy of Maximo UI
      • Maximo login page
      • Start Center
      • Application Screen
      • Value lists
      • Advanced Search
      • Targeting fields with no labels
    • Finding the right steps
    • Step autocompletion
    • Scenarios vs Scenario Outlines
    • Snippets and Templates
      • testgrinder Templates Project
      • testgrinder Snippets Project
  • Examples
    • Interacting with electronic signature dialog
    • Automated granting of application access
    • Add a job plan
    • Add an item
    • Add an item to storeroom
  • Administration
    • Accessing Maximo behind a firewall
    • Managing User Access
    • Using Git to Back Up and Version Control testgrinder Projects
  • Self Managed Private Cloud (SMPC)
    • testgrinder SaaS vs testgrinder SMPC
    • Releases
      • Version 1.0.8
      • Version 1.0.0
    • testgrinder Architecture
    • testgrinder Configuration
      • Configuration Files
      • Database Stored Settings
    • Deployment Instructions
      • Prerequisites
      • Subscribing to testgrinder on AWS Marketplace
      • Virtual Private Cloud
      • Security Groups
      • S3 Buckets
      • IAM Roles
      • Key Pair
      • Launch tg-app
      • Finalize Configuration File .env
      • Finalizing Database Stored Settings
      • Minimal Deployment Complete
      • Install SSL Certificate
      • Force HTTP to HTTPS
      • External Database
      • Configure Auto Scaling Group
        • Target Groups
        • Load Balancers
        • Launch Template
        • Auto Scaling Group
        • Finalize Auto Scale Group Deployment
    • Test the Deployment
    • Monitoring
    • Backup and Restore Database
Powered by GitBook
On this page
  • testgrinder service will be discontinued on January 31, 2025
  • Create a github.com repository
  • Authorize testgrinder access to the repository
  • Link a testgrinder project to the repository
  • Compare a Project to the Repository
  • Export Project to Git
  • Reverting Project Changes
  • Project Version Control
  • Editing Scripts Outside of testgrinder
  • Conclusion

Was this helpful?

  1. Administration

Using Git to Back Up and Version Control testgrinder Projects

PreviousManaging User AccessNexttestgrinder SaaS vs testgrinder SMPC

Last updated 1 year ago

Was this helpful?

testgrinder service will be discontinued on January 31, 2025

testgrinder allows you to link a project to an external git repository. Once the link is established, you can:

  • Compare the project to the latest commit in the specified repository branch

  • Export the project to the repository as a new commit in the branch you specified

  • Revert the project to the latest commit in the repository branch.

As an example, here's the result of comparing a project to the repository:

Let's take a testgrinder project and go through the steps of linking it to a github.com repository, for example, and explore what we can do once the link is established.

The main steps are:

  • Create a github.com repository for the testgrinder project

  • Create an SSH identity in testgrinder (or reuse one created previously)

  • Add the SSH identity's public key to your github.com account to grant testgrinder access to the repository

  • Configure the testgrinder project link to the git repository

Create a github.com repository

Sign in to github.com and create a new repository. Give it any name you like. Here I used tg-project-link-demo:

You may choose either a Public or Private repository - testgrinder can work with both. Keep in mind that a public repository will be visible to anyone on the internet.

At the very least, it is recommended to add a README file to the repository at this time, as this will create the default branch (main) in the repository. Otherwise, you'll need to add a branch yourself as testgrinder expects the branch to exist.

Click Create repository and github will create the repository with the automatically created README file:

When we get to configuring the testgrinder project link to the repository, we will need the repository URL. You can see it by clicking the Code button:

Authorize testgrinder access to the repository

You grant testgrinder access to the repository by first creating an SSH key identity in your testgrinder account and then granting access to the same SSH key in your github repository.

Let's create the SSH key identity in testgrinder first. Sign in to your testgrinder account, click on your name in the top right corner, navigate to the Account page, then select the Identities tab, and click the Add SSH key identity button. Give the identity a name, e.g., github:

Click Add and you'll see the identity appear in the list:

Click View to see the identity's SSH Public Key:

Soon you'll need to copy the Public Key and paste it into github to authorize access from testgrinder.

When creating an identity, testgrinder also creates a Private Key matching the Public Key. The Private Key is stored securely by testgrinder and is never displayed.

Copy the content of the Public Key field to the clipboard and switch to the github.com repository page. Once there, select the repository's Settings tab and select Deploy keys on the left. You should see a page like this:

Click the Add deploy key button. Give it any title you'd like (e.g., testgrinder) and paste the Public Key copied from testgrinder into the Key field. Check off Allow write access to enable testgrinder to export to the repository:

Click the Add key button:

Link a testgrinder project to the repository

For this demo I'll use a simple project with one script in it:

To link the project to the repository, click on the project's root folder and choose the External Repository tab:

Click the Configure button (the button will be available to anyone with [at least] Edit access). Once the configuration editor opens, choose Git and fill in the repository URL, Branch, and choose the identity you created earlier:

Click Save. You should see this page indicating that the link has been configured:

We can test the connection by running the Compare action.

Congratulations! You've established a link between your testgrinder project and a repository in github.

If you run into a problem, please review the previous steps to see if anything was missed. Get in touch with us if you need further assistance.

Compare a Project to the Repository

Click the Compare button. After a few seconds, you should see that testgrinder detected some differences. The Compare action is available to anyone with (at least) View access to the project:

Export Project to Git

When you click the Export button, testgrinder will export the current state of the project as a new commit in the repository branch. The user will need to have Edit access to the project to see the Export button.

Click the Export button. After a few seconds, testgrinder will indicate that the export was a success:

Clicking Compare confirms that the project and the repository now match:

Let's switch to github.com and see the commit that testgrinder has created:

Note that testgrinder puts scripts under the scripts folder. If you have files attached to the project they will appear under the files folder. This allows you to keep other files in the repository without them conflicting with the files testgrinder commits. testgrinder will ignore any file outside of both the scripts folder and files folder. For example, the README file you added earlier when creating the project will still be there.

Note that in the past, when testgrinder referred to scripts as features, and the scripts folder was named features. testgrinder remembers it and acts accordingly when you work with an older repository. Comparing to such an older repository will show that the script files have been renamed. And exporting your project to it will move the scripts to scripts folder and give them the .script extension.

Reverting Project Changes

Let's say you've made changes to the project that you would like to revert to match the latest repository commit. Here I have changed the project by adding a new script and modifying the existing one (as displayed by running Compare):

To undo these changes, click the Revert button, confirm the action, and the changes will be reverted:

Running the Compare action confirms that the revert was successful.

Project Version Control

Every time you export the project, testgrinder creates a new commit in the repository branch. This enables you to export the project at key points of its lifetime and thus maintain a history of changes in the repository.

If you ever need to revert to an earlier commit, simply create a new branch off of the commit, configure the repository link with this branch in testgrinder, and run the Revert action.

Editing Scripts Outside of testgrinder

If you'd like to edit scripts outside of testgrinder (to make mass edits, for example), you may find it useful to export the project to the repository, make the edits, commit the edits, and then revert the testgrinder projects to reflect the changes in the testgrinder project.

Conclusion

We hope you find the integration of testgrinder with external git repositories useful. Let us know what you think or if we can make this more useful to you.

In order for testgrinder to communicate with the git repository, the repository needs to be accessible via the Internet. It may either be a git repository on the server you control or a repository on a hosting provider, such as or .

github.com
bitbucket.org
note: features folder has now been renamed to scripts and script files have the .script extension
note: features folder has now been renamed to scripts and script files have the .script extension
note: features folder has now been renamed to scripts and script files have the .script extension
note: features folder has now been renamed to scripts and script files have the .script extension