Subscribe to SQM and join the other 100,000 monthly readers

Always have the most current updates on software, Agile, mobile development, testing and more right at your fingertips.

Subscribe by email:

Your email:

Search

Current Articles | RSS Feed RSS Feed

TestComplete Video Training Website

 

Today we would like to tell you about one more useful website devoted to TestComplete, which was launched about a month ago. This website is dedicated entirely to online video training. By now more than 15 screencasts on TestComplete have been posted there. They illustrate how you can maximize the effective use of TestComplete and how its features can help you easily and thoroughly perform automated software and web testing.

Happy Holidays from the Bear Cave!

 
HolidayBears-small

Whatever holidays you celebrate - now and throughout the year - the Smart Bears wish you the very best of times!

AQtime for C++ code coverage analysis

 

A new AQtime 6.30 review was recently posted to the Our Craft blog. The author, danielmeyer, shares his experience of using AQtime when performing C++ code coverage testing. He has never used AQtime before, so the post contains his first impression of AQtime’s Coverage Profiler along with step-by-step description of his actions.

Agile Code Review in Austin

 

Last month I did a presentation at the Agile Development Practices conference in Orlando on peer code review.

Peer Code Review: An Agile Process

 
This month's newsletter discusses how peer code review can be used by Agile teams to drive better software quality. The article was written by Gregg Sporar of Smart Bear Software and published in the proceedings of the Agile Development Practices conference in November 2009, Gregg has kindly given us permission to share it with you. We hope you have a great holiday and enjoy Gregg's article.

Is Peer Code Review Agile?

Peer code review is one of the most effective ways to improve software quality – but is it agile? Done correctly, it absolutely is. The Agile Manifesto[1] states:

  1. Individuals and interactions over processes and tools
  2. Working software over comprehensive documentation
  3. Customer collaboration over contract negotiation
  4. Responding to change over following a plan
Research has consistently shown that code review produces software with fewer defects, which aligns with the emphasis on working software. And what could be more interactive than two or more software developers talking (or instant messaging or emailing) about the code and making real-time improvements?


Yet many agile practitioners consider peer code review to be part of the “bad old world” of waterfall development and reject its inclusion in agile projects. This newsletter shows how code reviews can be conducted using methods that align perfectly with the fundamental principles of agile development.

Moving Beyond the “Code Review Stigma”
Historically, the process for conducting code review was pretty “anti-agile.” As originally conceived by Michael Fagan in 1976, code inspections[4] were a heavyweight code review process that led to an entire generation of software developers who believed meetings were necessary in order to review code.


Heavyweight processes and meetings are not regarded favorably on agile projects, and that stigma has tainted the concept of code review. This “guilt by association” has worn away over time, but misconceptions still linger.


The biggest misconception is that meetings are required to do code review. Fagan stated that meetings are required, as have other researchers. But Lawrence Votta of AT&T Bell Labs was not convinced. His study[6] showed that if developers read the code before the meeting in order to find defects, actually having a meeting will only increase the total defects found by 4% (while often tying up several hours of valuable time per participant).


Recent studies have confirmed that code review can be effective without meetings. Jason Cohen, founder of Smart Bear Software®, conducted a study[3] at Cisco Systems® that showed that a lightweight peer code review approach was as effective as a heavyweight code inspection process, but more time-efficient by a factor of 7x.


Yet even agile devotees who recognize that meetings are not required have misconceptions about code review: “We only use the latest techniques here – code review is from the past and provides no value,” or “All the unit tests pass, so why do we need to do code reviews?” If you take away the meetings and the heavyweight process, but leave the interaction, responsiveness, and dedication to continuous improvement, then code review is very much an agile practice.

How Does Code Review Align With Agile?
Delving into the underlying principles[2] of the Agile Manifesto provides specific evidence that code review is agile:

Working software is the primary measure of progress. Software developers are fallible, just like all other humans. We make mistakes. Some of those mistakes can be detected automatically (unit tests, static analysis tools, etc.) but just as professional writers have human editors in addition to spell-check software, software developers benefit from having one or more other developers examine their source code. It is interesting how much time we spend during an iteration discussing the requirements with our stakeholder(s) and the emerging design and architecture with other software developers, but when it comes time to actually write the code the tendency is for each developer to work in isolation. The interaction during discussions of requirements, architecture, and design uncovers flaws. The same principle applies to the writing of the code. Code reviews uncover flaws and have another key benefit that is prized by agilists – the feedback is kept close to the point of creation and happens sooner – before the code gets to QA or customers.

Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely. That’s a tall order. To help meet it, agile teams frequently practice collective code ownership. The goal is that each portion of the source code is understood by more than one member of the team. To reach that goal, it is important to pay attention to the bus number for each part of the code – how many team members would have to get struck by a bus before no one was left that understood the code? If the bus number for a section of the code is less than two, then that’s a problem. By encouraging the reading and discussing of the source, code review helps maintain collective code ownership, increasing the bus number for the reviewed code. That way, if a team member is on vacation, or leaves the team, progress can continue at the same pace.

Continuous attention to technical excellence and good design enhances agility. All software developers have egos and most of them are naturally curious people who enjoy learning new things. Developers who know that their code will be reviewed tend to write better code because they know that their reputation is on the line. No one wants to be thought of as the weak link in the chain. A corollary is that developers who review other’s code get an opportunity to learn new tricks and techniques. A key step in mastering any craft is to benefit from the experience of others.

Types of Lightweight Code Review
Lightweight code review provides the right mix of code review process with agile practice, allowing effective and efficient code reviews without overwhelming burden. There are four different approaches to doing lightweight code review in an agile environment. Each has its strengths and weaknesses and they are not mutually exclusive, so there is no single right or wrong approach. As with so much in the agile world, each team needs to decide for itself which approach is correct.


  1. Over the shoulder. This is the easiest technique of all: when it is time for a code review, find a developer and sit down with him or her in front of the code. Face to face communication is an easy, high-bandwidth medium for the author’s explanation of the code. An obvious drawback is that not all teams have all members in one location. An additional issue is that the reviewer is being interrupted – after the review it will take time for that developer to get back to the same level of productivity. The biggest risk with this sort of approach, though, is that it can end up being a walk through instead of a review. If the reviewer has no prior access to the materials then typically the author does most of the talking, which can result in a passive reviewer who spends more time nodding than asking questions about the code.
  2. Email pass-around. When the code is ready, send it out over email. One of the advantages of this approach is that reviewers and authors can be in different locations. Another advantage is that the reviewers can do the review at their convenience. One obvious downside is that as the review proceeds and the emails get nested in multiple replies, it becomes more difficult to follow the conversation. And if files are reworked and line numbers change, it can be challenging to determine which version of a file – or even which line – is being referenced by a particular comment. But perhaps the biggest drawback is that it can be difficult to answer a simple question: When is the review finished?
  3. Pair programming. One of the Extreme Programming world’s key contributions has been pair programming, which in some ways is a continuous code review. The advantages are that no workflow or tools or interruptions get in the way. Further, the review is at a deep level since the developer who is reviewing has the same level of experience with the code. One obvious downside is that the time commitment is non-trivial. A less obvious downside is that the reviewer is “too close” to the code to give it a good review. After all, a key benefit of code review is to get outside opinions. If two developers are pairing to the extent that they have the exact same view of the code then the code review will likely not be as effective.
  4. Tool-assisted review. Code review tools exist to help overcome the shortcomings of the approaches listed above. They can package up source files, send notifications to reviewers, facilitate communication, ensure defects are fixed, and more. The obvious downside is that they require at the very least time for installation and configuration, and in the case of commercial products, money for license purchases. A popular tool for peer code review is Code Collaborator (http://www.codecollaborator.com).

Techniques for Optimal Code Reviews
Regardless of which type of lightweight code review your team chooses, there are tips and techniques[5] for preventing wasted time and improving the results:

Reducing Costs with Good Requirements and Code Reviews

 

Teams constrained by resources are always looking for a competitive advantage in reducing costs and improving software quality. This advantage can be achieved by implementing two best practices:

Basics of Test Driven Development (TDD)

 
If you've heard of Test Driven Development (TDD) before but was not sure what it was or how it works, this newsletter provides a summary of the approach.

What is Test Driven Development?
Test Driven Development is a unique way to develop software by starting the process by collecting a requirement, developing test cases for the requirement, followed by the coding process. For traditional development and testing shops, this process "feels backwards" because traditional approaches perform the coding before beginning testing. However, this approach has been used for years by Agile Development teams.

So how does it Work?
For TDD to work, create your test cases using an automated testing tool and then write the code that causes the automated test(s) to pass. So here are the steps:
  1. First fully understand the requirement
  2. Create automated test(s) that test the requirement
  3. Create the coding logic -- test it by running the automated test(s)
  4. Once the automated test(s) pass, the coding then fulfills the requirement
  5. Re-factor the code for better maintainability, run the automated test(s) again to ensure it still works
What are the Advantages of TDD?
Studies have shown that Test Driven Development reduces defect density, improves software quality, and in some cases make team productivity higher. Empirical Software Engineering Journal published a paper that summarized 4 cases studies (1 at IBM, 3 at Microsoft), where they followed the TDD practice and evaluated the effectiveness of it. For more information on this study, visit
http://www.infoq.com/news/2009/03/TDD-Improves-Quality.

Helpful Resources
Below are some helpful resources and templates to aid you in developing software solutions:
  • Software Planner -
http://www.SoftwarePlanner.com
  • TestComplete (Automated Testing Tool) - http://www.TestComplete.com
  • Software Development /QA Templates -http://www.softwareplanner.com/Templates.asp
  • Test Case Training - http://www.SoftwarePlanner.com/Services.asp
  • Pragmatic Agile Development - http://www.softwareplanner.com/PADOverview.pdf
  • 15 Useful Test Cases for ensuring Consistent User Interfaces

     
    When testing user interfaces, it is easy to overlook test cases that ensure that your user interface is user-friendly and consistent. This newsletter identifies 20 test cases that might be considered when testing user interfaces for consistency.

    15 Useful Test Cases for ensuring Consistent User Interfaces
    1. Screen Font Type - Ensure that the screen font family matches from screen to screen. Mismatching fonts within the same sentence and overuse of different fonts can detract from the professionalism of your software user interface.
    2. Screen Font Sizes - Ensure that the screen font sizes match from screen to screen. A good user interface will have an accompanying style guide that explicitly defines the font type and size for headers, body text, footers, etc.
    3. Colors - Ensure that screens do not use different color sets as to cause an inconsistent and poorly thought-out user interface design. Your style guide should define header colors, body background colors, footer colors, etc.
    4. Icons - Ensure that icons are consistent throughout your application by using a common icon set. For example, a BACK link that contains an icon next to it should not have a different icon on one screen versus another. Avoid free clip-art icons, opt for professionally designed icons that complement the overall look and feel of your screen design.
    5. Narrative Text - Having narrative text (screen instructions) is a great way to communicate how to use a specific screen. Ensure that narrative text appears at the same location on the screen on all screens.
    6. Brevity - Ensure that narrative text, error messages and other instructions are presented in laymen's terms but are brief and to-the-point.
    7. Dialog Box Consistency - Use a style guide to document what choices are available for dialog boxes. You should have not have Save/Cancel dialog on one screen and an OK/Cancel on another, this is inconsistent.
    8. Links - If your application has links on the screen (e.g. Save as Spreadsheet, Export, Print, Email, etc.), ensure that the links have consistent spacing between them and other links, that the links appear in the same order from screen to screen, and that the color of the links are consistent.
    9. Menus - If your application has menu items, ensure that menu items that are not applicable for the specific screen are disabled and the order in which each menu item appears is consistent from screen to screen.
    10. Buttons - If your application has buttons (e.g. Submit, OK, Cancel, etc), ensure that the buttons appear in a consistent order from screen to screen (e.g. Submit then Cancel).
    11. Abbreviation Inconsistencies - If your screens contain abbreviations (e.g. Nbr for number, Amt for amount, etc), the abbreviations should be consistent for all screens in your application. Again, the style guide is key for ensuring this.
    12. Delete Confirmations - It is a good practice to ask the user to confirm before deleting an item. Create test cases to ensure that all delete operations require the confirmation. Taking this a step further, it would also be great to allow clients to turn off specific confirmations if they decide to do this.
    13. Save Confirmations - It is good practice to ask the user to confirm an update if updates are made and they navigate to another item before explicitly saving. Create test cases to ensure that all record movement operations require the confirmation when updates are made. Taking this a step further, it would also be great to allow clients to turn off specific confirmations if they decide to do this.
    14. Grammar and Spelling - Ensure that you have test cases that look for grammar or spelling errors.
    15. Shortcuts - If your application allows short cut keys (like CTRL+S to save), ensure that all screens allow using of the consistent shortcuts.

    20 Useful Test Cases for testing User Interfaces

     
    When testing user interfaces, it is easy to overlook test cases that would be helpful for a more thoroughly tested solution. This newsletter identifies 20 test cases that might be considered when testing user interfaces.

    20 Useful Test Cases for testing User Interfaces
    1. Required Fields - If the screen requires data entry on a specific field, it is good practice to identify the required fields with a red asterisk and to give a friendly warning if the data is left blank.
    2. Data Type Errors - If the screen contains dates, numeric, currency or other specific data types, ensure that only valid data can be entered.
    3. Field Widths - If the screen contains text boxes that allow data entry, ensure that the width of data entered does not exceed the width of the table field (e.g. a title that allows 100 characters in the database should not allow more than 100 characters to be entered from the user interface).
    4. Onscreen Instructions - Any screen that is not self-explanatory to the casual user should contain onscreen instructions that aid the user.
    5. Keep Onscreen Instructions Brief - While onscreen instructions are great, keep the wording informative, in layman's terms, but concise.
    6. Progress Bars - If the screen takes more than 5 seconds to render results, it should contain a progress bar so that the user understands the processing is continuing.
    7. Same Document Opened Multiple Times - If your application opens the same document multiple times, it should append a unique number to the open document to keep one document from overwriting another. For example, if your application opens a document named Minutes.txt, if it opens the same document for the same user again, consider having it append the time to the document or sequentially number it (Minutes2.txt or Minutes_032321.txt).
    8. Cosmetic Inconsistencies - The screen look, feel and design should match the other screens in your application. Creating and using a style guide is a great way to ensure consistency throughout your application.
    9. Abbreviation Inconsistencies - If your screens contain abbreviations (e.g. Nbr for number, Amt for amount, etc), the abbreviations should be consistent for all screens in your application. Again, the style guide is key for ensuring this.
    10. Save Confirmations - If your screen allows changing of data without saving, it should prompt you to save if you move to another record or screen.
    11. Delete Confirmations - If a person deletes an item, it is a good idea to confirm the delete. However, if your user interface allows deleting several records in a row, in some cases you might consider allowing them to ignore the confirmation as it might get frustrating to click the confirmation over and over again.
    12. Type ahead - If your user interface uses combo boxes (drop down lists), be sure to include type ahead (if you have hundreds of items in a list, if you type in the first letter it will skip to the first item that begins with that letter).
    13. Grammar and Spelling - Ensure that you have test cases that look for grammar or spelling errors.
    14. Table Scrolling - If your application lists information in table format, if the data in the table extends past one page, the scrolling should scroll the data but leave the table headers in tact.
    15. Error Logging - If fatal errors occur as users use your application, ensure that your applications writes those errors to a log file, event viewer or a database table for later review. Log the routine the error was in, the person logged on, and the date/time of the error.
    16. Error Messages - Ensure that error messages are informative, grammatically correct, and not condescending.
    17. Shortcuts - If your application allows short cut keys (like CTRL+S to save), test each shortcut to ensure it works in all different browsers (if the application is web based).
    18. Invalid Choices - Do not include instructions for choices not available at the time. For example, if a screen cannot be printed due to the state of the data, the screen should not have a Print button.
    19. Invalid Menu Items - Do not show menu items that are not available for the context you are currently in.
    20. Dialog Box Consistency - Use a style guide to document what choices are available for dialog boxes. You should have not have Save/Cancel dialog on one screen and an OK/Cancel on another, this is inconsistent.
    Helpful Resources
    Below are some helpful resources and templates to aid you in developing software solutions:
    • Software Planner -
    http://www.SoftwarePlanner.com
  • TestComplete (Automated Testing Tool) - http://www.TestComplete.comSoftware Development /QA Templates -http://www.pragmaticsw.com/Templates.asp
  • Test Case Training - http://www.PragmaticSW.com/Services.asp
  • Pragmatic Agile Development - http://www.pragmaticsw.com/PADOverview.pdf
  • Benefits of Keyword Driven Testing for Test Automation

     

    Most software companies have considered automated testing and many have fully automated their regression test cases in an effort to reduce manual effort needed to test new builds of their software. Many companies that have been successful with automation attribute it to keyword driven testing techniques that reduce the time spent creating test cases.

    All Posts