Page tree

Skip to end of metadata
Go to start of metadata

In this section:

Introduction

You can enable DTP to read and display JUnit and TestNG source files from you source control management system (SCM), which is a more efficient method than publishing copies of your files (see Publishing Source Files to DTP). Refer to the DTP documentation for additional information about using the Test Explorer view. 

General Configuration

Source control settings are configured in the selenic.properties configuration file located in the Selenic installation directory. The report.dtp.publish setting must also be enabled to enable DTP to display sources from source control. The report.dtp.publish.src setting is independent from the source control configuration and should be set to false if you intend to enable DTP to display source files using Selenic's source control configuration.

Open the selenic.properties file and specify the min or full mode for the report.scontrol setting in the SOURCE CONTROL section:

# === Source Control ===
# Enables source control integration on DTP server:
#    filtering by branches, viewing revisions, browsing code on the DTP server.
# Enables paths for locations, revision, branches and comments for quality tasks.
#    off: no information is reported
#    min: repositories, file paths and revisions are reported
#    full: also task revisions and comments are reported
report.scontrol=min

  You can specify the following modes:

full The report includes information about repositories, file paths, and revisions, as well as task revisions and comments.
min The report includes information about repositories, file paths, and revisions.
off Default. Information from source control is not included in the report.

In addition to enabling the report.scontrol setting, you will need to configure the source control settings for your system in the selenic.properties file.

Subversion Configuration

# === SUBVERSION ===
scontrol.rep1.type=svn
scontrol.rep1.svn.url=https\://<path_to_your_svn_server>:<port>
scontrol.rep1.svn.login=<user_name>
scontrol.rep1.svn.password=<password>
scontrol.svn.exec=<path_to_svn_executable>

Specify the following settings to configure Subversion:

scontrol.rep<n>.type

This setting indicates that the repository type is Subversion. You can configure multiple repositories by adding an identifying value to the property name, e.g.:

scontrol.rep1.type=svn 

scontrol.rep2.type=svn 

scontrol.rep<n>.svn.url

This setting specifies the protocol, server name, port and starting repository path.

The URL should not include the project name and a trailing slash (/) to ensure that DTP can properly process information about your files. 

You can configure multiple repositories by adding an identifying value to the property name, e.g.:

scontrol.rep1.svn.url=http\://mycompany.svn-host.com/svn 

scontrol.rep2.svn.url=http\://mycompany.svn-alt-host.com/svn 

scontrol.rep<n>.svn.loginThis setting specifies the Subversion user name.  
scontrol.rep<n>.svn.password

This setting specifies user's password to Subversion.

Use java -jar selenic_analyzer.jar -encodepass <PASSWORD> to encode the passwords of source control users. See -encodepass <password> for details. 

scontrol.svn.execThis setting specifies the path to an external client executable (svn).

Git Configuration

# === GIT ===
scontrol.rep1.type=git
scontrol.rep1.git.url=https\://<path_to_your_git_server>:<port>
control.rep1.git.branch=<branch>
scontrol.rep1.git.workspace=<path_to_workspace>
scontrol.git.exec=<path_to_git_executable>

Specify the following settings to configure Git:

scontrol.rep<n>.type

This setting indicates that the repository type is Git. You can configure multiple repositories by adding an identifying value to the property name, e.g.:

scontrol.rep1.type=git 

scontrol.rep2.type=git 

scontrol.rep<n>.git.url

This setting specifies the protocol, server name, port of the remote repository.

The URL should not include the project name and a trailing slash (/) to ensure that DTP can properly process information about your files. 

You can configure multiple repositories by adding an identifying value to the property name, e.g.:

scontrol.rep1.git.url=http\://mycompany.git-host.com/git 

scontrol.rep2.git.url=http\://mycompany.git-alt-host.com/git 

scontrol.rep<n>.git.branchThis setting specifies the Git branch. Default is master.
scontrol.rep<n>.git.workspace

This setting specifies the directory that contains the local Git repository.

Use double backslashes to specify the file path on Windows.

A Git repository is considered shallow if the .git directory contains a shallow file. Git may not accurately produce authorship data when checking out shallow clones from a repository. You should check out full clones to retrieve accurate authorship information

scontrol.git.exec

This setting specifies the path to git executable. If not set, assumes git command is on the PATH.  

Use double backslashes to specify the file path on Windows.

Microsoft Team Foundation Server Configuration 

# === GIT ===
scontrol.rep1.type=git
scontrol.rep1.git.url=https\://<path_to_your_git_server>:<port>
control.rep1.git.branch=<branch>
scontrol.rep1.git.workspace=<path_to_workspace>
scontrol.git.exec=<path_to_git_executable>

Specify the following settings to configure Team Foundation Server (TFS):

scontrol.rep<n>.type

This setting indicates that the repository type is TFS. You can configure multiple repositories by adding an identifying value to the property name, e.g.:

scontrol.rep1.type=tfs

scontrol.rep2.type=tfs 

scontrol.rep<n>.tfs.url

This setting specifies the URL to TFS repository.

The URL should not include the project name and a trailing slash (/) to ensure that DTP can properly process information about your files. 

You can configure multiple repositories by adding an identifying value to the property name, e.g.:

scontrol.rep1.tfs.url=http\://mycompany.tfs-host.com/tfs

scontrol.rep2.tfs.url=http\://mycompany.tfs-alt-host.com/tfs 

scontrol.rep<n>.tfs.loginThis setting specifies the TFS user name.  
scontrol.rep<n>.tfs.password

This setting specifies user's password to TFS.

Use java -jar selenic_analyzer.jar -encodepass <PASSWORD> to encode the passwords of source control users. See -encodepass <password> for details. 

  • No labels