Home > Software Quality Tips > Software Testing > How to apply modeling techniques to support software testing
Software Quality Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SOFTWARE TESTING

How to apply modeling techniques to support software testing


Michael Kelly
09.17.2009
Rating: -4.88- (out of 5)


Software quality news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Modeling is how we build cohesive ideas about the software we're testing. It's how we take the random bits of information we gain about the software we're testing and put them together to build something useful. When we work on projects, our models grow and contract over time. As we learn new information, we test the model with it. If we need to, we incorporate that new information into the model.

As testers, we work with models all the time. Sometimes these models are formal, defined using UML or drawn up in a modeling tool like Visio. Sometimes they are informal, created in your head, drawn on the back of a napkin. Regardless of the format, we use models when we're learning about the product and when we're testing the product. When we're learning, we're model building. When we're testing, we're model checking.

Using models to help generate test cases

When I'm testing, I do a lot of modeling. I actually draw pictures. I draw them in my notebook, on whiteboards, and using tools. They aren't just in my head. I have a couple of heuristics I use to know when I'm done modeling a testing problem:

  1. If I can't derive explicit test cases from my model, perhaps it's not detailed enough and I need to keep working on it.
  2. If I can't explain it quickly to another tester, perhaps it's too detailed and I need to abstract it a bit more to simplify it.

Let's look at quick example. The following screenshot comes from bullets and lists in Microsoft Word - it displays the New Style dialog.

[IMAGE]

Figure 1: New Style dialog in Microsoft Word

If I were going to test this dialog and it's features, one of the first things I'd want to do would be to model different aspects of the problem space. One complex area that occurs to me when I look at this is how this dialog interacts with different boundaries in the application. The various sizes for page size, margins,...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Model-driven development (MDD)
Parasoft Concerto targets policy-driven development
Waterfall versus iterative development misconceptions
Agile development growing, but problems remain
Jazz suite updated at IBM Rational Software Conference
Integrating application lifecycle management (ALM) processes provides additional benefits
UML gains nod for Microsoft Visual Studio Team System edition
Techniques to help prevent software project failure
Model-Driven Software Development: Technology, Engineering, Management -- Chapter 2, MDSD: Basic Ideas and Terminology
Telelogic, BigLever integrate model-driven development and software product line technology
Model-driven development tool facilitates software development

Software Testing
How to deal with iteration issues in Agile
How to stop developer vs. tester, quality-killing blame game
Calculating mean time to failure in performance testing
The lowdown on PCI compliance
5 ways to answer executives' unfair software test, QA questions
10 steps to acing Web app security assessments
Three software regression testing steps can perfect defect fixes
Exploring mobile layout testing, emulators and goals
Preparing for testing applications in the cloud
Hack maliciously to boost your software's security

Software testing models and approaches (Context-driven, Factory, Analytic, Quality, IV&V)
Software Testing: New software testing technologies bring new challenges
Software Testing Ezines
Recognizing appropriate scenarios for context testing
Rich Internet applications security testing checklist
Seven steps for a quality change and configuration management program
How to create performance testing workload models
Transitioning from AJAX to .NET what changes to expect in RIA's
Oracle VM Template Builder aims to speed deployment of VMs
Why automated software testing fails and pitfalls to avoid
Streamlining test planning and design

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
IC-BPMS  (SearchSoftwareQuality.com)
model-driven development  (SearchSoftwareQuality.com)
reuse-oriented model  (SearchSoftwareQuality.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


indentation, font size and image size all come into play when you look at this dialog.

Here's an example of how I might model the problem:

[IMAGE]

Figure 2: Example model showing the relationships of various boundaries in Word

Once I have a model like this, I can use it to start generating test ideas. For example, if the software will let me make the left indentation for my list object greater than my right page margin, I might find a problem. Similarly, if the software will let me make the left indentation for my list object greater than my right page size limit, I might find a problem. This process continues for each variable I've drawn.

Very quickly I can generate a large number of test cases. For example, just working from left to right you can come up with the following base test cases:

  • left margin plus left indentation greater than right page margin
  • left margin plus left indentation greater than right page size limit
  • left margin plus left indentation plus image width greater than right page margin
  • left margin plus left indentation plus image width greater than right page size limit
  • left margin plus left indentation plus rendered font width (based on font size) greater than right page margin
  • left margin plus left indentation plus rendered font width (based on font size) greater than right page size limit

For each of those test scenarios, you can have a number of tests where you look at different values for each variable: like zero, a default value, a common value, a very large value, etc.... That process can then be repeated, working from right to left, top to bottom, and bottom to top where in each case you identify possible relationships between variables.

When I'm testing, models get my mind moving again. Sometimes when I'm looking at a screen -- particularly a screen I've been looking at for the last four hours -- my mind goes blank. But if I'm looking at a diagram, the ideas come back.

Using tours to help model the problem space

If I'm completely unfamiliar with the application I'm working with, I start by touring. This is a model building technique that helps me understand what's in the application. As I'm touring, I make notes, sketch pictures, and write down all my questions.

I have a mnemonic I use when I'm touring applications: FCC CUTS VIDS. The mnemonic stands for the following:

  • Feature tour: Move through the application and get familiar with all the controls and features you come across
  • Complexity tour: Find the five most complex things about the application.
  • Claims tour: Find all the information in the product that tells you what the product does.
  • Configuration tour: Attempt to find all the ways you can change settings in the product in a way that the application retains those settings.
  • User tour: Imagine five users for the product and the information they would want from the product or the major features they would be interested in.
  • Testability tour: Find all the features you can use as testability features and/or identify tools you have available that you can use to help in your testing.
  • Scenario tour: Imagine five realistic scenarios for how the users identified in the user tour would use this product.
  • Variability tour: Look for things you can change in the application - and then you try to change them.
  • Interopeability tour: What does this application interact with?
  • Data tour: Identify the major data elements of the application.
  • Structure tour: Find everything you can about what comprises the physical product (code, interfaces, hardware, files, etc...).

They are called tours because you are not necessarily looking for problems. You are simply learning the application. For a tour to become a test you would have to have some way of knowing you've found a problem, like a requirements document, another product or some other method. If there's no software to tour, so you can also simply tour documents: like requirements documents, design documents, mock-ups, etc...

Next steps

In a future tip, we'll take a look at applying application tours to a real application. As part of that tip, we'll look at example findings and you'll be able to see how those findings might lead to various models that you can use to help in your testing. In the meantime, take some time to look at some common project diagrams and modeling techniques. I particularly like sequence diagrams and state diagrams, but I find that good use case diagrams and class diagrams can also do the trick. A bit less common, I often find creating a simple UCML diagram is enough to get me thinking about new types of risks or areas of the application to cover.

If you're already familiar with creating these types of models, then I recommend practicing drawing your own. It gets easier with practice. Once you're comfortable reading and creating models like these, practice using them to generate test ideas. For example, when looking at a sequence and activity diagrams, ask yourself what would happen in the system if a specific line didn't happen or didn't happen correctly. As you generate your test cases, find some people whom you can work with to get feedback on your test ideas.

Over time, you'll find that it becomes easier to both create and use models like these to help with your testing. As you gain experience, you'll also find that your ability to develop ad hoc models will steadily progress.

Rate this Tip
To rate tips, you must be a member of SearchSoftwareQuality.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Software Design & Testing - Project Management
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts