Applies to ReadyAPI 2.8, last modified on September 11, 2019

About

It is considered a good practice to store tests and test projects in source control. This way, you can easily work on your tests along with your teammates, share your test cases, revert changes, and so on.

ReadyAPI 2.5 and later include built-in support for Git repositories. This allows you to put your test project files to and get them from a Git repository directly from within the ReadyAPI UI, without using any third-party tool.

If you use a ReadyAPI version earlier than 2.5, then to integrate with Git, you should use the Git integration plugin.

Supported repositories

ReadyAPI supports Git repositories located in repository-hosting systems like GitHub, GitLab or Bitbucket, as well as Git repositories that reside on servers in your local network.

Enable Git support

Git integration commands in ReadyAPI works with composite projects only. These projects store test cases and other data as separate files instead of a single XML file. To make your project composite and enable integration with Git:

  • Double-click the project in the Navigator panel to open the project editor, and click the Enable integration with Git button in the editor toolbar:

    Git integration: Enable version control

    Click the image to enlarge it.

  • If your project was not saved, ReadyAPI shows the Save project dialog. Select the location where you want to save the project, enter the project name and click Save.

Note: You can make your project composite by setting the Composite Project property of your project to true. However, to initialize a Git repository in the project folder and thus enable Git integration, you will have to click the Enable integration with Git button anyway, or run the git init command in the Git console.

Also, we recommend that you enable the following two ReadyAPI settings:

This will make your ReadyAPI project files friendlier to the “auto-merge” feature of Git. To learn more, see Merging changes.

Import project from a Git repository

To get a project from a Git repository and open it, select File > Import Project from Git and specify a Git repository:

Import Project from Git menu command
Git integration: Import Project from Git dialog

Click the image to enlarge it.

  • In the Project Directory field, select an empty directory, to which ReadyAPI will place the project from the repository.

  • Select the protocol (SSH or HTTPS) you use to connect to the repository and specify the connection settings:

    • For the HTTPS protocol, specify the username and password to access the repository.

      If you use two-factor authentication on GitHub, specify a personal access token in the Password field.
      For instructions on how to generate a personal access token, see https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line.
    • For the SSH protocol, specify the path to your private key and the passphrase you use when generating it.

  • Click OK.

ReadyAPI will clone the repository from the default branch to your hard drive and open the project.

Git integration: Import Project From VSC dialog

Click the image to enlarge it.

  • In the Import Project dialog select Local.

  • In the Project Directory field, select the directory to which you cloned the repository.

  • Click OK.

ReadyAPI opens the project. After that, you can commit, push, and pull changes from ReadyAPI.

How it works

ReadyAPI offers a number of commands to perform typical operations on the project files. You can find them in the context menu you invoke for a project in the Navigator panel, and in the Project submenu of the main menu:

Git integration items in the main menu

Click the image to enlarge it.

Git integration items in the context menu

Click the image to enlarge it.

Once your project is in the repository, you use the menu commands to work with it. For more information, see the following topics:

In case of an error ...

See Also

Integrations
Teamwork

Highlight search results