Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DTPDEVEL and version 2024.2

...

In this section:

Table of Contents

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.

  1. Enable auto-configuration autoconfiguration in your Parasoft tool by setting the dtp.autoconfig property to true in the tool's .properties configuration file (also see Auto-configuring Autoconfiguring Code Analysis and Test Execution Tools). 
  2. Choose Report Center Settings from the settings drop-down menu and click Projects. You can also configure SCM settings globally. See Configuring Parasoft Tool Settings for All Projects
  3. Locate and click on your project to access the settings.
  4. Specify SCM settings in the Parasoft Tool 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.   

Customizing

...

Autoconfigured SCM Settings for DTP

Excerpt

In some cases, settings reused by Parasoft tools and DTP require additional customization. For instance, DTP may require different SCM credentials than the tools.

Auto-configuration Autoconfiguration can still be used by adding the the server. prefix to identify the setting as a DTP Server-only setting. In the following Parasoft Tool 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.scontrol.svn.exec:

No Format
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 prioritizes the server. prefix value if the same non-prefixed also appears.

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

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

Displaying Sources from Git Repositories

You will need to configure DTP as outlined below in order to display your tested project's source code from a Git repository.

  1. Create a local clone of the Git repository on the machine where DTP is installed. If it's not already installed, download and install the Git client, then choose a location for the clone and run:

    Code Block
    git clone --mirror <URL_TO_REMOTE_REPO>

    Do this for each Git repository that you test with Parasoft tools and want to see the tested source code in DTP.

  2. In order for DTP to show the proper code, you need to ensure that your clones stay up to date. To update a clone, run:

    Code Block
    git remote update <URL_TO_REMOTE_REPO>

    It is recommended that you automate this task, for example with a Jenkins job or a Linux cron job. Do this for each repository you cloned in the step above.

  3. Within DTP, go to the Report Center Settings and configure the tool settings for your DTP project so that it points to your local Git clones. See Configuring Parasoft Tool Settings for Projects for more information about this process. The example below shows a configuration for two Git repositories, scontrol.rep1.git.workspace and scontrol.rep2.git.workspace, but you should configure for as many repositories as you cloned.

    Code Block
    scontrol.rep1.git.workspace=<LOCAL_CLONE_DIRECTORY>
    scontrol.rep1.git.branch=master
    scontrol.rep1.type=git
    scontrol.rep1.git.url=<URL_TO_REMOTE_REPO>
    
    scontrol.rep2.git.workspace=<LOCAL_CLONE_DIRECTORY>
    scontrol.rep2.git.branch=master
    scontrol.rep2.type=git
    scontrol.rep2.git.url=<URL_TO_REMOTE_REPO>

Displaying Sources from SVN Repositories

The following configuration is an example of an SVN connection.

...

Do not include a trailing slash (/). Make sure to keep this consistent across all projects.

Troubleshooting Issues with Source Control System

When source code cannot be displayed from Source Control System:

...