This topic explains how to configure Parasoft Test products C++test to compute authorship and assign quality tasks across the team.
...
Using technologies ranging from peer review workflow automation, to static analysis, to unit testing, to runtime error detection, to SOA policy enforcement, to functional testing of individual SOA components as well as end-to-end test scenarios, Parasoft Test products C++test generates quality tasks for the various team members to perform. These tasks can then be assigned to the appropriate team members based on manual assignments or automatically-detected authorship data.
...
QA Task Assignment
For QA, Parasoft Test C++test can assign tasks based on source control data in a number of ways:
- If you are going to be statically analyzing source files in your source control system or executing functional tests with test files are stored in your source control system, you can set up Parasoft Test C++test to use data from your source control system in order to assign tasks. Static analysis tasks are assigned to the person who introduced them. Test failures are assigned to the person who last worked on the related test.If you are using Parasoft Test for functional testing, you can directly specify task owners for specific test suites or other resources.
- If you will be using Parasoft Test C++test to automate peer review, review task assignment is defined through the Code Review interface (described in the Code Review section).
Tip |
---|
If you have added source files to a project in the Parasoft Test C++test 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:
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
...
C++test’s Author and Task Assignments
Parasoft Test C++test 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.
If you use multiple sources to determine authorship, authorship priority is determined by reading your settings in the Preference panel’s Scope and Authorship page from top to bottom (source control first, @author tags second, a direct mapping file next, current user last). However, if one of the selected options does not determine an author (for instance, the @author tag was selected but the file does not have an @author tag), Parasoft Test C++test determines authorship based on the next option selected. If Parasoft Test C++test still fails to determine an author, the user is set as "unknown". Likewise, if none of these options is selected, the user is set as "unknown."
If you configure Parasoft Test configure C++test to use both source control and @author tags for authorship computation, source control will be checked whenever possible, and @author will be used for projects and files which are not under source control.
If you choose to use the current local user, the local user will be considered the author and the local modification time will be considered the last modification time.
Parasoft Test C++test assigns authorship and tasks as follows:
- If authorship is determined based on source control data, Parasoft Test C++test reads source control data to determine who last modified the file/line/method, etc. that is related to the task, then assigns the task to that person.
- If authorship is determined based on @author Javadoc tags, Parasoft Test C++test looks for the @author Javadoc tag that is nearest to the code associated with the task, then assigns the task to the author whose username is returned.
- For method-level tasks, it checks the Javadoc for the method, then for the enclosing class, then for the first class of the file; the first non-null author is returned.
- For class-level tasks, it checks the Javadoc for the class, then for the first class of the file; the first non-null author is returned.
- For line level tasks, it checks the Javadoc for the enclosing method, then for the class, then for the first class of the file; the first non-null author is returned.
- For file and file-level tasks, the first author of the first class of the file is returned
- If file-to-author mappings are specified directly, authorship is assigned according to those settings.
- Otherwise, the local user will be considered responsible for the task and the local modification time will be considered the last modification time.
- When a static analysis violation is suppressed, it is associated with the person who committed the suppression.
...
- Through the Scope and Authorship preferences page in the Parasoft Test C++test GUI.
- Through localsettings.
...
- Choose Parasoft> Preferences to open the Preferences dialog.
- Select the Parasoft> Scope and Authorship category in the left pane.
- Use the available controls to indicate how you want Parasoft Test C++test to compute scope and authorship.
- Use source control (modification author) to computer scope: Source control data will be used to compute authorship.
- Use file system (xml map) to compute scope: You will directly specify how you want tasks assigned for particular files or sets of files (for example, you want developer1 to be responsible for one set of files, developer2 to be responsible for another set of files, and so on). See Specifying File-to-Author Mappings for details.Use file system (@author tag) to compute scope: The @author Javadoc tag will be used to compute authorship. This is available for Jtest only.). See Specifying File-to-Author Mappings for details.
- Use file system (current user) to compute scope: The local user name will be used to compute authorship.
- Click OK to set and save your settings.
...
Alternatively, you can direct Parasoft Test C++test to use the exported XML file by either:
...
Code Block |
---|
#!perl ############################################################ # GetAuthors.pl # Sample script to generate file --> author mapping. # Note that this is usually run only once, when you first # deploy Parasoft Test 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(@_); my $author = "DontKnow"; system qq(cvs log $fileName > cvslog.txt); open(TMPFILE, "< cvslog.txt") || die "Could not open cvslog.txt"; while (<TMPFILE>) { chop; if (m/(^date.*author:)(.*)(;[\s]*state)(.*)/) { $author = $2; } } close TMPFILE; return $author; } 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); print "<file path=\"$fileName\" "; print "author=\"$author\" />\n"; } print "</mapping>\n"; |
Anchor | ||||
---|---|---|---|---|
|
By default, Parasoft Test C++test assumes that each username value it detects (e.g., 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].
...
- Choose Parasoft> Preferences.
- Open the Parasoft> Authors tab.
- Ensure that Use Concerto DTP settings is not enabled.
- Ensure that Authors mapping file location is not enabled.
- If you want to specify "author to email" mappings:
- Got to the Login / Email / Full name table.
- Click Add.
- Specify the desired mapping in the table
- If you want to specify "author to author" mappings:
- Go to the Reassign tasks from this author... To this author table.
- Click Add.
- Specify the desired mapping in the table.
- Click the Apply button to save your changes.
Info | ||||
---|---|---|---|---|
| ||||
In all the UI locations that allow you to enter a team member’s name or email address (e.g., email notifications, reassign tasks, test only files authored by, etc.), you can start typing a name/address, then select one of the autocomplete suggestions.
A warning will alert you if enter a name or email that is not in the Concerto DTP database—for example, in case you made a typo. |
Info | ||||
---|---|---|---|---|
| ||||
You can also specify the author mappings in a localsettings file (from the command line or in the Parasoft Test C++test preferences stored on ConcertoDTP). To do this:
For example:
|
...
- Code Review
- Quality Tasks
- Reports
- Scope and Authorship
- Concerto DTP Tasks
- Test Configurations (e.g., Scope tab > Author options and Code Review tab)
The case sensitivity setting here should match the case sensitivity setting in ConcertoDTP. By default, Concerto DTP is case sensitive. For details on configuring case sensitivity in ConcertoDTP, see the Concerto DTP User’s Guide.
Case Sensitivity Details
...