Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2024.2

This topic explains how to configure SOAtest to compute authorship and assign quality tasks across the team.

Sections includeIn this section:

Table of Contents
maxLevel12

About Task Assignment and Authorship

There are typically many different team members working on a development project throughout the SDLC, from developers of application logic to developers of the Web interface and QA testers verifying end-to-end processes and transactions.

...

  • Allow each team member to import only his or her assigned tasks from command line tests into the UI.
  • Give each team member a report that contains only his or her assigned tasks.
  • Indicate in the manager report which team member is responsible for which tasks.

Task Assignment

SOAtest can assign tasks based on source control data in a number of ways:

...

Tip

If you have added source files to a project in the SOAtest environment, you can see the team member assigned to a particular line of that source file, as well as information about when it was last modified:

  1. Open an editor for the appropriate file.
  2. Right-click the line whose author you want to view and choose Parasoft > Show Author at Line.

Note that if you are not using source control data to calculate task ownership, the message will show modification information for the file (rather than for the specific line selected).

Understanding Author and Task Assignments

SOAtest can assign error ownership according to source control data (from supported source control systems), the @author Javadoc tag, xml mapping files (direct file-to-author mappings), and/or the current local user.

...

Tip

To see the author assigned to a particular line of source code, as well as information about when it was last modified:

  1. Open an editor for the appropriate file.
  2. Right-click the line whose author you want to view and choose Parasoft > Show Author at Line.

Note that if you are not using source control data to calculate authorship, the message will show modification information for the entire file (rather than for the specific line selected).

Changing How Authorship is Computed

Authorship computation settings can be specified:

...

For details on how to set authorship settings through settings, see Configuring Settings.

Anchor
Specifying File-to-Author_Mappings
Specifying File-to-Author_Mappings
Specifying File-to-Author Mappings

If you want to directly specify which authors are responsible for which files, rather than have authorship calculated automatically, you can specify file-to-author mappings. These mapping can be automatically configured once, then shared across the team using the auto-configuration process described in Configuring Preferences Overview.

...

Code Block
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE authorship (View Source for full doctype...)>
<authorship>
  <!-- assigns all files named: "foo/src/SomeClass.java" to "author1" -->
  <file author="author1" path="foo/src/SomeClass.java" />

  <!-- assigns all files whose names starts with any character (except /) and ends with "oo/
src/SomeClass.cs" to "author2" -->
  <file author="author2" path="?oo/src/SomeClass.cs" />
  <!-- assigns all *.c files in any directory to "author3" -->
  <file author="author3" path="**.c" />
  <!-- assigns every file whose path has a folder named "src" to "author4" -->
  <file author="author4" path="**/src/**" />
  <!-- assigns all files located in directory "src" to "author5" -->
  <file author="author5" path="src/**" />
  <!-- assigns all files in directory "src" whose name starts with "Test" i.e. "src/some/
other/dir/TestFile.java" to "author6" -->
  <file author="author6" path="src/**/Test*" />
</authorship>

Generating an XML Mapping File from Source Control

You can use a script to generate an XML mapping file from a source control system. The following example Perl script demonstrates how to generate an authorship mapping file from Git. If you are using a different source control system, make the appropriate modifications.

Code Block
#!perl
 
############################################################
# GetAuthors.pl
# Sample script to generate file --> author mapping.
# Note that this is usually run only once, when you first
# deploy C++test .
#
# This script assumes that you have a list of all the files in the
# project. For example, such a list can be obtained on windows
# by using "dir /s/b *.c" for c files.
############################################################
 
sub GetAuthor
############################################################
# Gets the author (person who last modified the file) for
# the input file.
############################################################
{
   my $fileName = shift(@_);
   return `git log --pretty=format:"%an" -1 $fileName`;
}
 
print "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
print "<mapping>\n";
 
############################################################
# AllCFiles.txt has a list of all the c files in the
# project. The following loop iterates through all the
# files and assigns owners to each.
############################################################
open(FILELIST, "<AllCFiles.txt") || die "Could not open AllCSFiles.txt";
while (<FILELIST>)
{
    chop;
    my $fileName = $_;
    my $author = GetAuthor($fileName);
    if ($author eq "")
    {
        $author = "DontKnow";
    }
    print "<file path=\"$fileName\" ";
    print "author=\"$author\" />\n";
}
 
print "</mapping>\n";

Anchor
Configuring Task Assignment and Code Authorship_Settings
Configuring Task Assignment and Code Authorship_Settings
Specifying Author-to-Author and Author-to-Email Mappings

By default, SOAtest assumes that each username value it detects (for example, based on source control data, the system’s local user settings, @author tags, direct mapping files, imported scanner.properties files) is the code author’s username, and that the related developer’s email is [username]@[mail_domain].

...

Info
iconfalse
titleSpecifying Author Mapping in Settings

You can also specify the author mappings in a settings file (from the command line or in the SOAtest preferences stored on DTP).

To do this:

  1. Use authors.mapping to specify the appropriate mappings.
  2. Use authors.user to specify email settings.

For example:

authors.mapping1=baduser,gooduser

authors.mapping2=brokenuser,fixeduser

authors.mapping3=olduser,newuser

authors.user1=gooduser,[email protected],Gooduser Stowe

authors.user2=fixeduser,[email protected],Fixeduser White

...

Determining Case Sensitivity Mode

You can determine whether author values are treated as case sensitive or case insensitive. This case sensitivity setting applies to author values in:

...

The case sensitivity setting here should match the case sensitivity setting in DTP. By default, DTP is case sensitive. For details on configuring case sensitivity in DTE, see the DTP Documentation on https://docs.parasoft.com/.

Case Sensitivity Details

The case sensitivity setting determines whether multiple variations of the same username will be treated as one user or multiple users, For example:

...

Case insensitive mode is especially helpful when teams use an external database where the case of the usernames is not significant. If the username david is stored as DAVID in the database and you are in case sensitive mode, tasks imported for DAVID will not be matched up to david.

Case Sensitivity Configuration

You can set case sensitivity settings for how SOAtest processes usernames within your Parasoft environment.

...

You can also configure this mode with the settings option authors.ignore.case=true|false. For details on settings options, see Configuring Settings.

Handling Authorship When Using Multiple Source Control Systems

If you and/or your team members work with multiple source control systems, but use the same login for them all, start the product as follows to ensure accurate authorship computation from source control:

  • Standalone Jtest: jtest -J-Duser.name=your_username ...
  • Standalone SOAtest: SOAtest -J-Duser.name=your_username ...
  • Standalone C++test: cpptest -J-Duser.name=your_username ...
  • Plugin: eclipse .... -vmargs -Duser.name=your_username

Manually Setting the Local User

If you are using "local user" data to determine authorship, Parasoft will, by default, use the local user settings defined on the machine.

...