Page tree

Skip to end of metadata
Go to start of metadata

Objective

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.

  1. Set the "Parasoft’s Recommended Rules" Test Configuration as the favorite:
    1. Select Parasoft> Test Configurations.
    2. Expand Builtin > Static Analysis and right-click on Parasoft’s Recommended Rules.
    3. Select Duplicate from the shortcut menu. The Test Configuration is copied to the User-defined folder.
    4. Right-click the Parasoft’s Recommended Rules configuration in the User-defined folder and select Set As Favorite > F Demo Configuration.



    5. Click Close to continue.

  2. Select  ATM.cxx  in the project tree.

     

     

  3. Click the Run Tests button in the toolbar:

     

    By default, this button will run the Test Configuration currently set as the favorite. In this case, the "Parasoft’s Recommended Rules" Test Configuration is executed.

     

  4. 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.




  5. 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.

  • No labels