Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Automated Quality Assurance Philip Johnson Collaborative Software Development Laboratory  Information and Computer Science...
Objectives <ul><li>Understand motivation for automated quality assurance through static analysis, and how it differs from ...
Quality Assurance <ul><li>High level: </li></ul><ul><ul><li>Does the system satisfy the three prime directives?  </li></ul...
Manual QA <ul><li>Examples of manual QA techniques: </li></ul><ul><ul><li>Writing unit tests with JUnit </li></ul></ul><ul...
Automated QA <ul><li>Examples of automated QA: </li></ul><ul><ul><li>Lint, Checkstyle, PMD, FindBugs, DependencyFinder, Co...
A Quick Tour of Automated QA Tools
 
 
 
 
 
 
 
 
 
 
 
 
The three primary Automated QA tools for this class
 
Checkstyle <ul><li>Checkstyle performs source code analysis. </li></ul><ul><ul><li>Originally for &quot;coding standard&qu...
 
 
PMD <ul><li>PMD also performs source code analysis. </li></ul><ul><ul><li>More 'design' oriented than Checkstyle. </li></u...
 
 
FindBugs <ul><li>FindBugs analyzes byte codes, not source codes. </li></ul><ul><li>Example problem: ignored return value: ...
 
QA in this class <ul><li>One goal of this course is to provide you with a set of techniques to build </li></ul><ul><ul><li...
 
Upcoming SlideShare
Loading in …5
×

Introduction to automated quality assurance

3,989 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Introduction to automated quality assurance

  1. 1. Automated Quality Assurance Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu HI 96822
  2. 2. Objectives <ul><li>Understand motivation for automated quality assurance through static analysis, and how it differs from “manual” quality assurance. </li></ul><ul><li>Learn about various automated quality assurance tools. </li></ul><ul><li>Understand the strengths and weaknesses of the Java-based static analysis tools used in this class (Checkstyle, PMD, FindBugs). </li></ul>
  3. 3. Quality Assurance <ul><li>High level: </li></ul><ul><ul><li>Does the system satisfy the three prime directives? </li></ul></ul><ul><li>Low level: </li></ul><ul><ul><li>Does the system have “good” tests? </li></ul></ul><ul><ul><li>Does the system conform to coding standards? </li></ul></ul><ul><ul><li>Does the system contain code known to be defect-prone? </li></ul></ul><ul><ul><li>Does the system satisfy its requirements? </li></ul></ul><ul><li>We use a combination of “manual” and “automated” techniques to assess QA at the “high” and “low” levels. </li></ul>
  4. 4. Manual QA <ul><li>Examples of manual QA techniques: </li></ul><ul><ul><li>Writing unit tests with JUnit </li></ul></ul><ul><ul><li>Conducting code reviews. </li></ul></ul><ul><li>Strengths of manual QA: </li></ul><ul><ul><li>Find defects involving requirements. </li></ul></ul><ul><ul><li>Low false positive rate. </li></ul></ul><ul><li>Weaknesses of manual QA: </li></ul><ul><ul><li>Difficult/expensive approach to low-level implementation defects. </li></ul></ul><ul><ul><li>Must be redone for all projects. </li></ul></ul>
  5. 5. Automated QA <ul><li>Examples of automated QA: </li></ul><ul><ul><li>Lint, Checkstyle, PMD, FindBugs, DependencyFinder, Coverity, FxCop </li></ul></ul><ul><li>Strengths of automated QA: </li></ul><ul><ul><li>Can find classes of implementation defects that developers may not be skilled enough in the language/environment to detect via testing or inspection! </li></ul></ul><ul><ul><li>Can be reused on any project. </li></ul></ul><ul><li>Weaknesses: </li></ul><ul><ul><li>Potential high false positive rate. </li></ul></ul><ul><ul><li>Does not find requirements-level defects. </li></ul></ul>
  6. 6. A Quick Tour of Automated QA Tools
  7. 19. The three primary Automated QA tools for this class
  8. 21. Checkstyle <ul><li>Checkstyle performs source code analysis. </li></ul><ul><ul><li>Originally for &quot;coding standard&quot; (formatting) </li></ul></ul><ul><ul><li>Now includes design-level best practice compliances. </li></ul></ul><ul><li>Classes of checks: </li></ul><ul><ul><li>JavaDoc, Naming Conventions, Headers, Size Violations, Imports, WhiteSpace, Modifers, Block Checks, Coding, Class Design, Duplicate Code, Metrics, J2EE. </li></ul></ul><ul><li>Can be extended with new checks. </li></ul><ul><li>Use a configuration file to customize what checks your system should comply with. </li></ul>
  9. 24. PMD <ul><li>PMD also performs source code analysis. </li></ul><ul><ul><li>More 'design' oriented than Checkstyle. </li></ul></ul><ul><ul><li>Lots of overlap. </li></ul></ul><ul><li>PMD rulesets: </li></ul><ul><ul><li>Basic, Braces, Code Size, Clone, Controversial, Coupling, Design, Finalizers, Import, J2EE, JavaBeans, JUnit, Logging, Migrating, Naming, Optimizations, Exceptions, Strings, Security, Unused Code, JSP, JSF. </li></ul></ul><ul><li>Eventually, can choose one of PMD/Checkstyle. </li></ul>
  10. 27. FindBugs <ul><li>FindBugs analyzes byte codes, not source codes. </li></ul><ul><li>Example problem: ignored return value: </li></ul><ul><ul><li>String b = &quot;bob&quot;; b.replace('b', 'p'); if(b.equals(&quot;pop&quot;)){...} </li></ul></ul><ul><li>FindBugs defect detectors are quite different in nature from source code analyzers because the system can perform forward and backward data flow. </li></ul>
  11. 29. QA in this class <ul><li>One goal of this course is to provide you with a set of techniques to build </li></ul><ul><ul><li>high quality systems </li></ul></ul><ul><ul><li>as fast as possible </li></ul></ul><ul><li>To accomplish this, you must learn how to apply the correct mix of automated and manual QA techniques. </li></ul><ul><ul><li>Don ’t write tests (or do reviews) to catch defects that an automated QA tool can find. </li></ul></ul><ul><ul><li>Don ’t believe that automated QS tools can find all of your errors. </li></ul></ul>

×