Learn to perform coding standards analysis using a predefined configuration. Tests that check for coding standards compliance help you identify coding construction defects that are likely to cause application problems, e.g. poor performance, memory leaks, security vulnerabilities, etc.
For this exercise, you will check how well an ATM project source file complies with the predefined coding standard rules in the "Parasoft’s Recommended Rules" Test Configuration. This set contains Severe Violation (Severity 1) rules, which checks for source code defects that are very likely to cause bugs in the program.
- Set the "Parasoft’s Recommended Rules" Test Configuration as the favorite:
- Select Parasoft> Test Configurations.
- Expand Builtin > Static Analysis and right-click on Parasoft’s Recommended Rules.
- Select Duplicate from the shortcut menu. The Test Configuration is copied to the User-defined folder.
- Right-click the Parasoft’s Recommended Rules configuration in the User-defined folder and select Set As Favorite > F Demo Configuration.
- Click Close to continue.
Select ATM.cxx in the project tree.
Click the Run Tests button in the toolbar:
Review test results in the Test Progress area. A tab labeled with the Test Configuration you ran (Parasoft’s Recommended Rules) displays test progress and summary information.
Click the Quality Tasks tab to view more specific information about test violations. If you do not see the Quality Tasks tab, select Parasoft> Show View> Quality Tasks.