Showing posts with label Test Automation. Show all posts
Showing posts with label Test Automation. Show all posts

Monday, July 1, 2013

Measures for optimizing Productivity

From experience the productivity of software development is affected by the following key areas - in different intensity and without any claim to comprehensiveness:
  • Knowledge and experiences of the involved staff
  • Their motivation, especially the willingness to increase productivity
  • Knowledge management, i.e. the ability to make the required knowledge available for staff at the right time
  • Risk management, i.e. the ability to anticipate negative influences on productivity and to take countermeasures prematurely
  • Constructive quality assurance, e.g. by predefined processes, methods, guidelines which give process security, or by standards and reusable components, which help reducing development and testing efforts
  • Automation, e.g. code generation in the area of implementation and test automation in the area of analytical qa. Automated testing reduces the test effort, at the same time it increases the reliability of test results and by early and continuous tests it enables quality improvements (see: Are Quality Improvements always reducing the Productivity?).
In these areas it is worthwhile to look out for improvement measures.

Monday, April 15, 2013

Using Sonar for steady Analyses of the Code Quality



The platform Sonar allows static code analyses of different projects and presents the results in a standardised form. Sonar applies some own rules enhanced by the rules of integrated tools as e.g. FindBugs, Checkstyle or PMD (for the Java world).

The experiences with Sonar used in a huge portfolio of applications are good. For Java there are more than 800 rules available, which are well described, can be activated and deactivated and can be configured regarding the severity of violations (e.g. Blocker, Critical, etc.) or parameters. Experience has shown that it is better not to use the standard configuration but to discus an own configuration with the most experienced developers and to rate less rather than more rules as blockers. Further it is important that the process model respectively the quality gates clearly define that e.g. it is forbidden to use a release as long as there are blockers, which at least are potential production defects.

Sonar Dashboard showing the results of a Code Analysis (Sample)
Additionally to these rules Sonar measures the comment density, the rate of commented or duplicated code, the cyclomatic complexity, the lack of cohesion in methods (LCOM4) and the class complexity (response for a class, RFC), which are proven indicators for the code quality. Based on an own coding styleguide, which should clearly define threshold values for these metrics, a Sonar profile can be used to set these thresholds for an indication of warnings and errors for each metric. This makes sure that each application being analyzed will be measured and rated by the same standard.

Best practise is to integrate the Sonar code analysis in the build processes of the different applications. Then, after each new build, i.e. each night or continuously - according to the configuration, a new analysis result is available.

The Sonar web client presents the analysis results in dashboards and even in case of a huge portfolio of applications clearly structured. There are tools for e.g. the analysis of time courses or hotspots. The authorized user can drill-down for each violation into the code and, if required, declare it as false-positive.

The experience is that only with a tool such as Sonar the definition of a coding styleguide is really worthwhile, because the compliance can be checked without extensive time and in short intervals.

Information about Sonar can be found at http://www.sonarqube.org/features/.

Monday, March 25, 2013

The Impact of Testing on Productivity



No doubt: Intensive testing improves quality. But manual testing has risks: Often the test result depends on the tester’s form on that day. The attention diminishes when the same test cases are executed again and again. The effort of the testers costs time and budget, which results in a reduction of the productivity.

Additionally to the developer's quality-awareness, constructive QA by processes, methods, tools, frameworks, re-usable components, etc. automated testing is a key to increase quality without reducing the productivity. Test automation even can increase productivity because many defects are detected earlier (probably more defects and much earlier than with manual testing) and thus the costs for bug-fixing are lower. The following list shows some well-proven test automation methods:

  • Continuous integration of components which are completed and checked-in by the developers to an executable application (build automation). Thereby it can be permanently verified that the code is compileable, references e.g. to libraries can be resolved, etc.
  • Execution of all unit tests, e.g. JUnit classes, created by the developers – within the continuous integration process.
  • Performing a tool-based code analysis to check the conformity with the agreed programming guidelines. For this very powerful tools as Sonar are available, which can also be executed within the continuous integration process (see: Using Sonar for steady Analyses of the Code Quality).
  • Automated GUI tests (black box tests) where scripts enter values into the fields of web dialogs, activate dialog elements and check for asserted values or states. For this tools as Sahi or Selenium are proven, where complex scenarios of test cases can be defined which help to verify that an application is still working as expected after every new build process (regression testing).
  • Automated load tests to analyze the behaviour of a system regarding permanent load or overload and related to its concurrent use by many users, processing large amounts of data or a high number of transactions.
No doubt that automated test methods can improve quality and productivity. The earlier defects can be detected, the lower the effort for bug-fixing is. The higher the degree of automation, the lower are the personnel costs. Both have a positive effect on the productivity.