Follow the instructions below to configure the integration of PractiTest with your local SVN Repository.

General

PractiTest uses 2 “svn hooks” as part of the integration:
  • pre-commit – To validate the issue prior to the commit. Allowing you to verify if the issue exists in the system, and whether it is assigned to the person doing the specific commit.
  • post-commit – To add a record for each commit in PractiTest. The commit details will be available in the Issue Form as a separate tab in each of the issues specified in the commit.

Preparation

  1. In PractiTest, go to Settings → Project Account, and click the “Version Control System Repository” check box.
    support_SVN_Integration1
  2. If your users have different usernames in PractiTest and SVN, go to each user (Settings → Users & Groups → Edit) and update the ‘Repository username’ field.
  3. Find your PractiTest API_KEY and API_SECRET_KEY. This should be available to account managers only, through account settings.
  4. On the side of the SVN, look for the “hooks” folder inside the SVN_REPOS_PATH.
  5. In this folder, find the pre-commit, and the post-commit files.
  6. Download from PractiTest the pre-commit, and post-commit files.

Installation

  • The pre-commit file should be used only if you want to validate the issue before the commit, making sure the issue exists in the system and is assigned to the user. If you do not need this validation, then you do not need to add this file.
  • The post-commit file is used to log each commit to the relevant issue(s), as explained above.
  • Edit the pre-commit and post-commit files with the information below:
PT_API_KEY=“you account key”
PT_API_SECRET_KEY=“your account secret key”
PT_PREFIX=“#” – the prefix for the issue ID, so in your comment you can write something like fixed #928.
  • The following SVN variables need to be similar to the SVN variable you had in your original files. If they are not, change them according to what you had before.
REPOS=“$1”
REV=“$2”
SVNLOOK=/usr/bin/svnlook
XMLSTARLET=/usr/bin/xmlstarlet
  • After saving these files, place them under SVN_REPOS_PATH/hooks directory

Testing

We recommend you test this integration to make sure it works correctly.
You can cover most cases by testing the following 3 basic scenarios:
  • Make a commit to an issue that does not exist, make sure you cannot commit the change.
  • Make a commit to an issue that is not assigned to you, you should also not be able to commit the change.
  • Make a commit to an issue that exists and is assigned to you. Make sure it goes all the way.

Go to that issue in PractiTest and verify the ‘VCS Repository’ tab in the issue is showing the information for your latest commit:

support_SVN_Integration2

If you have any questions, comments or issues please contact us and we’ll be happy to help.