Page tree

Skip to end of metadata
Go to start of metadata

You can view sources in Explorer Views from a source control management system (SCM) if DTP is configured to use the SCM and DTP Engines are connected to an SCM and configured to publish reports to DTP during analysis.

In this section:

Process Overview

  1. Configure DTP Engine settings (see DTP Engine documentation for details):
    1. Disable publishing source code to DTP.
    2. Enabled publishing reports to DTP.
    3. Configure DTP Engines to use the source control system.
  2. Enter the source control settings in the Parasoft Test Settings tab for an individual project (see Creating and Managing Projects) or globally (see Configuring Parasoft Test for All Projects). 
  3. Execute tests or code analysis in the DTP Engine and sources will be displayed in explorer views for users with appropriate permissions (see User Administration).

Example of SVN Settings

scontrol.rep.type=svn
scontrol.rep.svn.url=https://svn_server/
scontrol.rep.svn.login=username
scontrol.rep.svn.password=password
scontrol.svn.exec=/usr/bin/svn 

Customizing Auto-configured SCM Settings for DTP

DTP Engines can also be configured to automatically use the Parasoft Test Settings configured in DTP Server (see Auto-configuring DTP Engines). 

In some cases, settings reused by DTP Engines and DTP Server require further customization. For instance, DTP Server may require different Source Control Server credentials than DTP Engine.

Auto-configuration can still be used by adding the 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 DTP Engines with the scontrol.svn.exec setting, but for DTP Server the directory is set with server.scontrol.svn.exec:

scontrol.svn.exec=C\:\\Program Files\\svn\\bin\\svn.exe
server.scontrol.svn.exec=/usr/bin/svn
scontrol.rep1.type=svn
scontrol.rep1.svn.url=http\://foo.bar.com/svn/repos
scontrol.rep1.svn.login=foo
scontrol.rep1.svn.password=65707c
server.scontrol.rep1.svn.login=bar
server.scontrol.rep1.svn.password=19787a

DTP Server always prioritizes the value of setting with server. prefix if the same non-prefixed also appears in the same Parasoft Test view.

The following precedence of overwriting settings is used in DTP Server when the same setting appears in Parasoft Test Global Settings and project-specific Parasoft Test settings:

  • Project specific Parasoft Test Settings with server. prefix
  • Project specific Parasoft Test Settings without server. prefix
  • Parasoft Test Global Settings with server. prefix
  • Parasoft Test Global Settings without server. prefix

Troubleshooting Issues with Source Control System

When source code cannot be displayed from Source Control System:

  • Ensure that report.xml, which is published to DTP Server, has Source Control information. Check that <Repositories..> section is present. If this is not the case, then the DTP Engine configuration is incorrect
  • Check the source code panel in the Violations Explorer, Test Explorer or Coverage Explorer 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 for DTP Server and correctly configured. Ensure that the client can access the source code using credentials that are configured for DTP Server.
  • For some source control systems, such as GIT, ensure that the repository is cloned and up-to-date at DTP Server. An external cron job may be necessary for GIT to update the local repository regularly.

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.

Additional Considerations

  • Some additional effort is required to configure DTP Engines and DTP Server. 
  • Lack of support for source files that are modified, moved, or copied during build (thus get disconnected from original source control system).
  • No labels