This topic provides an overview of the code review functionality available across Parasoft Test products.
Parasoft’s Code Review module is designed to make peer reviews more practical and productive by automating preparation, notification, and tracking. It automatically identifies updated code, matches it with designated reviewers, and tracks the progress of each review item until closure. This allows teams to establish a bulletproof review process that ensures the designated items are reviewed and all identified issues are resolved.
Parasoft provides built-in support for the following typical code review flows:
Code Review requires Team Server and at least one Parasoft Test Server Edition.
There are two key workflow variations: default vs. restricted and pre-commit vs. post-commit.
In a restricted workflow, the reviewer must accept each issue. If the author does not agree with the reviewer’s suggestion, he needs to discuss this with the reviewer.
The default workflow is more open: when the author receives comments from a reviewer, he can either apply them to the code, or leave the code as is.
Pre-commit code reviews are for teams who want to review code before adding it to source control. When developers are ready to have a piece of new/modified code reviewed, they run a Code Review Test Configuration from the Parasoft Test UI, then the reviewer is automatically notified about the required review.
Post-commit code reviews are for teams who want to review code after code is committed to source control. A Code Review Test Configuration is typically scheduled to run automatically on a regular basis (for example, every 24 hours). It scans the designated source control repository to identify code that requires review, then sends this information to Team Server, which then distributes it to the designated reviewer. In this scenario, the code authors do not need to perform any special actions to have their code reviewed; simply committing it to source control is sufficient. After the Code Review Test Configuration runs, the designated reviewers are automatically notified about the required reviews.
In a pre-commit process, a code review package is created for code that needs to be accepted before it is committed to source control. In this type of process, the author should always see that packages are finally accepted. At that point, he can commit the files and then close the package.
Some teams who submit code for review via a pre-commit process also like to perform a post-commit nightly scan to:
The following diagrams illustrate the key workflows available:
Post-Commit (Template): This Test Configuration is for teams who want to review code after it is committed to source control (see Pre-Commit vs. Post-Commit). It scans all project files modified in the previous day. This Test Configuration must be duplicated and customized prior to use (e.g, to specify author-reviewer mappings). See Configuring and Running Post-Commit Code Review Scans for details.
Code Review tasks are reported in the GUI as described in Working with the Code Review UI. Code Review details are also provided in the Code Review section of reports generated from command line or GUI analysis. These reports provide an overview of code review tasks and issues per project and per author. It also provides details on pending issues and code review tasks.