...
- Open the Test Configurations dialog by choosing Parasoft> Test Configurations or by choosing Test Configurations in the drop-down menu on the Test Using toolbar button.
- Duplicate an existing Test Configuration (such as Built-in> Code Review> Pre-Commit) or create a new one.
- In the Scope tab, choose Test only files added or modified locally.
- Also in the Scope tab, review the File Filters> Path options settings and adjust them if desired. For details on these Test Configuration settings, see the related product’s User’s Guide ([product_name] User’s Guide> Reference> [product_name] Test Configuration Settings)see Configuring Test Configurations.
- If your reporting preferences are not already set to use a unique session tag for code review scans, go to the Common tab, enable Override Session Tag, then choose one of the preconfigured identifiers, or specify your own. This is the tag that will be assigned to all code reviews that stem from this Test Configuration.
- To ensure proper code review reporting, you must configure a session tag for your code review scans and use that session tag in Concerto to specify which code reviews are associated with particular Concerto projects.
- At the top of the Code Review tab:
- Check Enable Code Review Scanner.
- If you want the report to include code review results from all available team scanners, enable Generate comprehensive report (includes all scanners). This option is not typically used for pre-commit code reviews. If this is not enabled, the report will include only results for the specified session tag.
- Enable Auto publish reviews if you want review tasks to be "published" (uploaded) automatically after this Test Configuration is run. This is recommended for pre-commit code reviews.
- From the Generate tasks with priority box, indicate the priority that should be assigned to all code review tasks that are created using this Test Configuration.
- (Optional) If you want the reviews automatically assigned, use the Authors, Reviewers, Monitors, and Filters tabs to define how you want your code reviews assigned. Reviewers and monitors can be assigned to specific authors, or to specific project areas. If you do not specify options here, each author needs to select the appropriate reviewer for each submitted review.
- In the Authors tab, define the list of developers who are writing code that you want reviewed. For each author, specify an author name and a source control login (if the author’s source control login is different than the author’s name).
- Your list of authors can include all of your developers, or only your junior developers.
- If the developer who commits a code change is not defined in this tab, the change will be marked as coming from an 'undefined author'.
- If you don’t want to define every developer, you can 1) enable the Filter tab’s Accept all (also undefined) authors for reviewed paths, and then 2) Use the Reviewers tab to define which reviewers should review different parts of the code.
- In the Reviewers and Monitors tabs, specify which authors and/or project areas you want each reviewer or monitor to cover.
- Reviewers examine, comment on, and approve code changes. Monitors supervise the entire process to ensure that revisions are being reviewed and then corrected in a timely manner. They do not need to perform any reviews, but can add comments to the revisions or reviews. This role is optional.
- Paths are defined in logical (workspace) path convention. Wildcards are allowed. See the "Filter Tips and Examples" box below for more details and examples.
- You can define reviewers and monitors without mapping them to any particular path or author. Such users will be not assigned to any package automatically, but they will be included in the report and authors will be able to select them in the Code Review Assistant dialog.
- These tabs use OR logic (not AND logic). In other words, you define the name of a reviewer (or monitor), then the authors and review paths you want that person to review (or monitor). Then, if new code comes from either the specified authors OR the specified paths, it will be assigned to the named reviewer or monitor.
- In the Authors tab, define the list of developers who are writing code that you want reviewed. For each author, specify an author name and a source control login (if the author’s source control login is different than the author’s name).
- (Optional) In the Code Review> Filters tab, modify the following options if desired:
- Ignore changes within suppressed blocks: Enable this option if you want the code review scan to ignore all differences that occur between "codereview-begin-suppress" and "codereview-end-suppress" markers. These are the same markers that are used to prevent the compare editor from displaying differences within specific blocks of code (see Hiding Differences for Specific Pieces of Code for details).
- Differences: If you want the code review scan to ignore all current source vs. previous source differences that match a certain pattern, specify the appropriate regular expression here. For example, you might use this to prevent any differences in automatically-generated comments from being flagged as requiring code review.
- Post to Pre-Commit matching: Contains options for hybrid pre-commit and post-commit code review processes, where developers are expected to commit code for review prior to checking but post-commit scans are also used to validate that this process is being followed.
Post to Pre-Commit matching: If you want the post-commit scan to ignore all pre-commit scan vs. post-commit scan differences that match a certain pat-tern, then specify the appropriate regular expression here. For example, you might use this to prevent differences in automatically-generated CVS headers added upon checkin from being flagged for post-commit code review. See Running Post-Commit Scans with a Pre-Commit for more details.
- Pre-commit search range in days: If you want to customize the timeframe used to determine which pre-commit tasks correspond to post-review tasks, change this setting. See Running Post-Commit Scans with a Pre-Commit for more details.
- Accept all (also undefined) authors for reviewed path: If you don’t want to define every developer, you can 1) enable the Accept all (also undefined) authors for reviewed paths, and then 2) Use the Reviewers tab to define which reviewers should review different parts of the code.
- Click Apply to commit the new Test Configuration.
- Share the Test Configuration by right-clicking it, then choosing Upload to Team Server from the shortcut menu.
...
- In the project tree, select the node that represents the changes you want reviewed.
- Run your designated Code Review Test Configuration. This should be in the Team category.
- If you enabled the Show user assistant during scanner run option in the Code Review Preferences panel (strongly recommended), Parasoft Test will display the Code Review assistant.
You can use this dialog to:- Indicate what task the code is related to (this code review will then be associated with this task). You can choose an existing task from the Task list. Or, you can create a new task by entering a new task nam and selecting the Create new Concerto task optionname. This information is used to determine if you are still working on an existing task, or if you have started a new one. Your changes will be grouped by task in the code review packages that are prepared.
- Assign a specific reviewer or monitor to the submitted revision when you are submitting a new task for review. This allows you to override the default reviewer/monitor assignment—or to specify a reviewer if one is not already assigned.
- Provide the reviewer or monitor additional information about the current changes.
- Indicate the priority of the review.
- Enter notes related to the selected file(s). These notes will be captured in a "general task." This is an opportunity to add general comments regarding this review package.
- If your Code Review Test Configuration does not have Auto publish reviews enabled, upload the results to Team Server as follows:
- After the test has completed, click the Generate Report button that is available in the Test Progress panel’s toolbar.
- Complete the Report dialog that opens.
...