DTP can display sources from your source control management system (SCM) in Explorer Views. To enable this functionality, DTP must be configured to read sources from the SCM. In addition, the Parasoft code analysis and test execution tool (C/C++test, dotTEST, Jtest, SOAtest) must be connected to the SCM and configured to publish reports to DTP during analysis.
In this section:
Configuring Source Control Settings
The most common scenario is to configure SCM settings in DTP and enable Parasoft tools to also use the SCM connection settings.
- Enable auto-configuration in your Parasoft tool by setting the
truein the tool's .properties configuration file (also see Auto-configuring Code Analysis and Test Execution Tools).
- Choose Report Center Settings from the settings drop-down menu and click Projects. You can also configure SCM settings globally. See Configuring Parasoft Test for All Projects.
- Locate and click on your project to access the settings.
- Specify SCM settings in the Parasoft Test Field. Specific SCM settings are documented in the Parasoft tools user guides. See your tool's documentation for details.
DTP supports many SCMs out of the box and can be extended to support systems that are not natively supported (contact your Parasoft representative). Each SCM has a different set of properties that must be configured. The following example shows settings for SVN:
Customizing Auto-configured SCM Settings for DTP
In some cases, settings reused by Parasoft tools and DTP require further customization. For instance, DTP may require different SCM credentials than the tools. Auto-configuration can still be used by adding the DTP prioritizes the The following precedence of overwriting settings is used in DTP when the same setting appears in Parasoft Test Global Settings and project-specific Parasoft Test settings:
server. prefix to identify the setting as a DTP Server-only setting. In the following Parasoft Test Settings, the SVN executable directory is specified for the Parasoft tool with the
scontrol.svn.exec setting, but for DTP the directory is set with
server. prefix value if the same non-prefixed also appears.
In some cases, settings reused by Parasoft tools and DTP require further customization. For instance, DTP may require different SCM credentials than the tools.
Auto-configuration can still be used by adding the
DTP prioritizes the
The following precedence of overwriting settings is used in DTP when the same setting appears in Parasoft Test Global Settings and project-specific Parasoft Test settings:
Troubleshooting Issues with Source Control System
When source code cannot be displayed from Source Control System:
- Ensure that the report.xml file is published to DTP has source control information. Check that
<Repositories..>section is present. If this is not the case, then the Parasoft tool configuration is incorrect
- Check the source code panel in an explorer view for important information.
- Ensure that all repository settings are present in Parasoft Test setting. Credentials and other repository settings are necessary to display source code
- Ensure that the source control client is available to DTP and correctly configured. Ensure that the client can access the source code using credentials that are configured for DTP.
- For some source control systems, such as Git, ensure that the repository is cloned and up-to-date at DTP. An external cron job may be necessary for Git to update the local repository regularly.
- Verify that your SCM supports modifying, moving, or copying sources during build in order to rule-out disconnecting from the original source control system.
Benefits of Displaying Source Code from SCM
Sources are taken directly from Source Control system, so there is no need to publish and store copies of the source files in DTP Server storage.