This topic explains how to build a custom integration to any source control system you want to integrate with Parasoft Test (e.g., for code review, scope filters and authorship detection — see About Parasoft Test’s Source Control Supportfor details). Parasoft . Parasoft Test provides builtin support for most common version control / source control systems, as described in Connecting to Your Source Control Repository. In addition, it provides an open Source Control API, which allows other source control tools to be integrated with Parasoft Test.
Sections includeIn this section:
Table of Contents | ||
---|---|---|
|
...
API Javadoc (Eclipse only)
The Parasoft Test online web-based help system provides a Source Control API topic that includes Javadoc documentation for all classes and interfaces that must be implemented. You can also find this Javadoc in the Parasoft Test installation directory at [INSTALL_DIRThe Javadoc is located in the <INSTALL>\plugins\com.parasoft.xtestptest.sourcecontrol.eclipse.core\javadoc \openapidirectory.
Main Interfaces
The interface that connects and creates all required implementation is com.parasoft.xtestptest.sourcecontrol.openapi.IVersionControlFactory.
This factory provides specific implementation for the following interfaces:
- com.parasoft.xtestptest.sourcecontrol.openapi.IRepositoryDetector
- com.parasoft.xtestptest.sourcecontrol.openapi.IVersionControl
- com.parasoft.xtestptest.sourcecontrol.openapi.IVersionControlHelper
...
The source control API and all related classes are located in the jar file at [INSTALL_DIR] sourcecontrol.jar file located in the <INSTALL>\plugins\com.parasoft.xtestptest.libs_<VERSION>/Parasoft/ sourcecontroldirectory.jar.
Before you can compile, you may need to add the following additional jar files to your classpath:
- [INSTALL_DIR]\com.parasoft.xtest.libs/Parasoft/util.jar[INSTALL_DIR]\com.parasoft.xtest.libs/Parasoft/
- common.jar [INSTALL_DIR]
- preference_api.jar
All JAR files are located in the <INSTALL>\plugins\com.parasoft.
...
ptest.libs
...
_<VERSION> directory.
To implement a custom integration:
...
- 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.
- Copy your jar file into your Parasoft Test installation directory and restart your Parasoft Test product. The installation directory is:Eclipse: [INSTALL_DIR]the <INSTALL>\plugins\com.parasoft.xtestptest.sourcecontrol.eclipse.core\extVisual Studio: [INSTALL_DIR]\com.parasoft.xtest.libs.vstudio/extext directory and restart SOAtest.
- Verify the implementation as follows:
- Choose Parasoft> Preferences> Source Control.Ensure that Use Concerto settings is cleared and disable the Use DTP settings option.
- Verify that a checkbox with an option for your implementation name appears among the builtin version controls.
- Select Enable the checkbox option for your implementation , and click New.
- Add , add the required properties, and then click Apply.
- Go to the Choose Preferences> Scope and Authorship page and and verify that Use source controlcontrol to compute scope is enabled.
- Open a file controlled by your version control system , and right-click anywhere in the file’s source code, then choose
- Choose Show author at line. You should see valid version control author information.
Sample Implementation
Parasoft Test provides SOAtest ships with a sample implementation for the Source Control Open API. A zipped package is located in [INSTALL_DIR]<INSTALL>\plugins\com.parasoft.xtestptest.sourcecontrol.eclipse.core_<VERSION>\openapi\demo\.
After you extract Create the following directory structure after extracting the open_api_demo.zip file, the following directory structure should be created:
- open_api_demo/demo.jar - Contains a compiled version of the demo source control implementation for Eclipse.open_api_demo/demo.dll - Contains a compiled version of the demo source control implementation for Visual Studio 2005 or later.
- 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.
...
- Deploy the demo.jar file.
- Unpack the local repository to any location.
- Restart your Parasoft Test product.
- Import the demo local repository project into your workspace.
- Under Parasoft> Preferences> Source Control, enable the demo implementation.
- 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.
...