Page tree

Skip to end of metadata
Go to start of metadata

This topic explains how to build a custom integration to any source control system. In this section:


SOAtest has builtin support for most common version control / source control systems, such as SVN and Git. See Connecting to Your Source Control Repository for details. Additionally, SOAtest includes an open Source Control API, which allows other source control tools to be integrated with SOAtest.

API Javadoc

The Source Control API includes an file containing Javadoc documentation for all classes and interfaces that must be implemented. The Javadoc archive file is located in the <INSTALL>/plugins/com.parasoft.ptest.sourcecontrol.eclipse.core/openapi/ directory.

Main Interfaces

The interface that connects and creates all required implementation is com.parasoft.ptest.sourcecontrol.openapi.IVersionControlFactory.

This factory provides specific implementation for the following interfaces:

  • com.parasoft.ptest.sourcecontrol.openapi.IRepositoryDetector
  • com.parasoft.ptest.sourcecontrol.openapi.IVersionControl
  • com.parasoft.ptest.sourcecontrol.openapi.IVersionControlHelper

Implementation and Compilation

The source control API and all related classes are located in the sourcecontrol.jar file located in the <INSTALL>/plugins/com.parasoft.ptest.libs_<VERSION>/Parasoft directory.

Before you can compile, you may need to add the following additional jar files to your classpath:

  • util.jar  
  • common.jar 
  • preference_api.jar

All JAR files are located in the <INSTALL>/plugins/com.parasoft.ptest.libs_<VERSION> directory.

To implement a custom integration:

  1. Create a project in any location.
  2. Add the required jars to the project's classpath.
  3. Start implementing custom version control support. Begin with the IVersionControlFactory implementation and incrementally add the required classes.

Deployment and Verification

After implementation is completed:

  1. Create a single jar file containing all of the required classes. There are no specific rules concerning the jar file name or package names etc.
  2. Copy your jar file into the <INSTALL>/plugins/com.parasoft.ptest.sourcecontrol.eclipse.core/ext directory and restart SOAtest.
  3. Verify the implementation as follows:
    1. Choose Parasoft> Preferences> Source Control and disable the Use DTP settings option.
    2. Verify that an option for your implementation name appears among the builtin version controls.
    3. Enable the option for your implementation and click New. 
    4. Add the required properties, and click Apply.
    5. Choose Preferences> Scope and Authorship and verify that Use source control to compute scope is enabled.
    6. Open a file controlled by your version control system and right-click anywhere in the file’s source code
    7. Choose Show author at line. You should see valid version control author information.

Sample Implementation

SOAtest ships with a sample implementation for the Source Control Open API. A zipped package is located in <INSTALL>/plugins/com.parasoft.ptest.sourcecontrol.eclipse.core_<VERSION>/openapi/demo.

Create the following directory structure after extracting the file:

  • open_api_demo/demo.jar - Contains a compiled version of the demo source control implementation for Eclipse.
  • open_api_demo/src/* - This is the source code for the Open API demo implementation.
  • open_api_demo/local_repository/* - This is a sample Eclipse project for demonstration purposes.

The demo was compiled using JDK 1.6.0_29.

You can compile and deploy it using the procedures described in the preceding section.

To interact with the demo:

  1. Deploy the demo.jar file.
  2. Unpack the local repository to any location.
  3. Restart your Parasoft Test product.
  4. Import the demo local repository project into your workspace.
  5. Under Parasoft> Preferences> Source Control, enable the demo implementation.
  6. Open a file, right-click anywhere in the file’s source code, then choose Show author at line. You should see valid version control author information.
  • No labels