Archive for January, 2011
Like most people, I don’t always read those pesky agreements that come with software these days, but I made an exception for the Tune-Up package I’m installing to try to revive my tired old Windows XP system. I came across this curious contradiction in the warranty section of the agreement:
The Software and your documentation are free of defects if they can be used in accordance with the description of the Software and its functionalities that was provided by TuneUp at the point in time that you received the Software and documentation. Further qualities of the Software are not agreed.
Since no Software is free of defects, we urgently recommend you to back up your data regularly.
Okay, guys, what is it? Is the software free of defects or not? If it is free of defects, perhaps you could enlighten us all on how you did that?
Here’s another good observation on a question in the Advanced Test Manager book. Gianni Pucciani commented about question 18 in chapter 3:
Assume you are a test manager in charge of integration testing, system testing, and acceptance testing for a bank. You are working on a project to upgrade an existing automated teller machine system to allow customers to obtain cash advances from supported credit cards. The system should allow cash advances from $20 to $500, inclusively, for all supported credit cards. The supported credit cards are American Express, Visa, Japan Credit Bank, Eurocard, and MasterCard.
During test execution, you find five defects, each reported by a different tester, that involve the same problem with cash advances, with the only difference between these reports being the credit card tested. Which of the following is an improvement to the test process that you might suggest?
A. Revise all cash advance test cases to test with only one credit card.
B. Review all reports filed subsequently and close any such duplicate defect reports before assignment to development.
C. Change the requirements to delete support for American Express cards.
D. Have testers check for similar problems with other cards and report their findings in defect reports.
The answer is D. Gianni commented, “I see that B is a reactive solution, does not really improve the process. But I probably misinterpreted D: I thought of D as a duplication of work, cause I thought it was suggesting that each testers execute the same test case with all the 4 credit cards. Instead I suppose the real sense was that each tester should just check, before filing a new bug, bug reports already opened on the same issue, and add information in there… The improvement I would suggest is that each tester executes his/her own test cases with all the 4 cards, which I think is better than D.”
Yes, Gianni, this is the sense in which I meant option D. When testers find a bug, they should isolate it by checking against the other cards. One of the problems with multiple choice questions is that you can’t use an entire paragraph in each option!
I’m going to start a semi-regular feature in this blog, talking about testing best practices. If you know me and my consulting company, RBCS, you know that we spend time with clients around the world, in every possible industry, helping people improve their testing with training or consulting services, or doing testing for them with our outsourcing services. Our work gives me insights into what goes on, the actual day-to-day practice of software testing.
Now, not all of what goes on is good. There are bad practices, and we help clients fix those. But you don’t need me to write about what not to do. Aren’t there enough scolding bloviators in our business? With a click of your mouse, you can read these people’s disdainful rants about testers they think are stupid, testers they think are in the wrong “school of testing,” testers they love to hate. Lecture, scold, rant, bloviate. How tedious!
So, being a contrarian, I will do the opposite: With the exception of the paragraph above—where I poured well-earned scorn on people who write bad things about other testers—let’s focus on good news. A blog entry on best practices should discuss testing best practices that my associates and I have observed other smart people doing.
I want to start with Agile testing when it works. No, I’m not recanting. Yes, I’ve written about the testing challenges of Agile, and I stand by what I wrote. Yes, I can talk about testing worst practices in some Agile teams, and I might in some future post—but not here. Here, I focus on what’s right about Agile. Here are five testing best practices we’ve found in Agile done right:
Unit testing. Okay, it’s true that most programmers, even Agile programmers, still have a lot to learn about proper test design. But if you’re a professional tester like me, you have love hearing programmers talk about the importance of unit testing. We all know that unit tested software is easier to system test.
Static analysis. Not only do smart Agile programmers like unit testing, they like static analysis, too. Coding standards are hip again. Cyclomatic complexity is back. Writing more testable, more maintainable code: that’ll make testers’ lives easier in the long run.
Component integration testing. This under-appreciated test level exists—on properly run Agile projects. You can go years on sequential-model projects without seeing component integration testing. However, on a good Agile teams, people look for integration failures, and, because of continuous integration, the underlying integration bugs aren’t hard to find.
Tools, tools, tools—and many free. All of this talk about unit testing, static analysis, and component integration testing would be just that—talk—without tool support. Fortunately, the Agile—err, what should we call it?—movement, revolution, fad, concept, pick your term, has brought with it a lot of tools to support these best practices, along with other best practices. For those of us without unlimited budgets—and isn’t that all of us?—a lot of the best tools are free, too.
Tester and developer teamwork. At the beginning of our latest assessment, I had a great conversation with a test manager who works on Agile projects. Among areas of agreement: our shared joy at the death of a bad idea. The bad idea in question was this: the idea that the role of the test team is the quality cop, the enforcer, the Dirty Harry to the punks of the software team. “Seeing as I can refuse to approve the release, you gotta ask yourself one question: Do you feel lucky, programmer?” Instead, we see more people working together, collaborating for quality, and that’s especially true on good Agile teams.
One recent morning, I spent three hours talking to two programmers—real seasoned professionals with years in the field—talking to them about testing. The testing that they did. In fact, it wasn’t so much about testing, but testing as an essential tactical element in a larger strategy for higher quality code. They really knew testing, and they knew how the Agile approach and tools were helping them to achieve better testing and thus better code. At the end of our talk, I mentioned how much I enjoyed talking to programmers about good testing and good code.
He replied, “Yeah, we spend a lot of time around here talking to each other about that. How to be better craftsmen. How to test better. How to build better code.”
Wow. If the entire methodology, the lifecycle, the tools, and every other aspect of Agile fades away, leaving behind only the habits of programmers serious about code quality, and testers working cooperatively with them to achieve it, that will be a signal achievement in the software engineering profession. Best practices, indeed.
My colleague Gianni Pucciani wrote recently to suggest a discussion:
I would like to propose a discussion on your blog, about how to manage the testing environment when multiple testers are running tests concurrently, basically sharing the test environment. In my organization we rely heavily on virtualization, therefore each tester has it’s own installation of the system under test on a separate virtual machine, and there are no concurrency issues. I was wondering whether this is a standard practice and how this issue was managed when virtualization software was not used as much as now.
This is a great topic for discussion. Certainly, many of our clients are using virtualization to try to insulate testers from each other, and also to insulate manual and automated environments. Probably the worst train wrecks that I’ve seen, from a test environment perspective, related to unvirtualized environments shared across manual and automated tests.
Of course, in some cases the systems under test only read data from shared repositories, which prevents the concurrency problem Gianni mentioned. In other cases each instance of the system under test (one instance per tester) has its own data for reading and writing, which also avoids the problem.
So, how about other readers of the blog? What have you done to deal with the problems that can arise with parallel testers, testing in the same hardware environments at the same time, or with concurrent manual and automated testing in the same hardware environments? How has the much-ballyhooed cloud affected this issue, if at all?
It was bound to happen: Sharp-eyed reader Gianni Pucciani caught a bug in the Advanced Software Testing: Volume 2 book he is using to prepare for the ISTQB exam.
Question 15: You are a test manager in charge of system testing on a project to update a cruise-control module for a new model of a car. The goal of the cruise-control software update is to make the car more fuel efficient.
You have written a first release of the system test plan based on the final requirements specification. You receive an early draft of the design specification. Identify all of the following statements that are true.
A. Do not update the system test plan until the final version of the design specification is available.
B. Produce a draft update of the system test plan based on this version of the design specification.
C. Check this version of the design specification for inconsistencies with the requirements specification.
D. Participate in the final review of the design specification but not any preliminary reviews of the design specification.
E. Review the quality risk analysis to see if the design specification has identified additional risk items.
The answer key in the book says that A, C, and E are correct answers, but, as Gianni pointed out to me, the right answer is B, C, and E. As he explained, “My reasoning was following the ‘test early’ principle, so even if the design is not complete, the information in there could help preparing the testing activities, especially if your are short of time and trust the design team.” That is, of course, correct. Nice catch, Gianni.
As I mentioned earlier in this blog, we are adopting a unique feature here. Readers can submit questions about my books to me to answer in this blog. I will answer at most one a week–as I have a lot of other work going on, which I hope everyone can understand–but I will get to the questions eventually. Here’s the first question, from Gianni Pucciani of CERN.
I finished reading the book Advanced Software Testing Vol.2 for the preparation of the ISTQB AL-TM. First of all thanks a lot, I found the book excellent, with lots of good tips that one could not know without adequate experience, and very well explained. Now I am reviewing all the chapters and their Q/A. I am planning to send you an email at the end of each chapter in case I have doubts, in order to clarify some of the questions.
For Chapter 1 I have only one doubt, on question #2 [which I've inserted here].
Assume you are a test manager working on a project to create a programmable thermostat for home use to control central heating, ventilation, and air conditioning (HVAC) systems. This project is following a sequential lifecycle model, specifically the V-model. Currently, the system architects have released a first draft design specification, based on the approved requirements specification released previously. Which of the following are appropriate test tasks to execute at this time?
A. Design tests from the requirements specification.
B. Analyze design-related risks.
C. Execute unit test cases.
D. Write the test summary report.
E. Design tests from the design specification .
The solution is A, B, E, but I don’t agree on A. It asks to identify the tests that are appropriate to execute at this time (release of the first draft design, requirements specification was already released). A (design tests from the requirements specification) is wrong in my opinion because this should have already been done as soon as the requirements specification was available. So, I don’t think A is appropriate, it can be done “now,” but it should have been done before. I would agree with including A if the questions was “identify the tests that can be done at this time”. The Chapter stresses the importance of testing activities aligned with the development process. Executing A at that time for me is an example of sub-optimal alignment. What do you think?
CERN IT Dept.
Gianni, you are correct that the design of tests based on the requirements should have started earlier, which is indeed a key theme of the chapter. However, that set of test tasks might not have been completed yet. In addition, the design of tests from design specifications often involves referring to the requirements specification as well (e.g., as a test oracle). Therefore, it is appropriate that the test tasks described in option A take place at this time.
I hope that helps?
Recently, one of our licensed instructors asked me about a question in our Advanced Test Analyst course, related to two very useful test design techniques, the decision table and the related cause-effect graph. The question is as follows:
An on-line shoe-selling e-commerce Web site stocks the following options for men’s loafers:
Tassel: Tassel (T) or non-tassel (~T)
Color: Black (B), cordovan (C), or white (W)
Size: all full and half sizes from 8 to 14 (S=n)
The store is overstocked with tasseled loafers of all sizes and colors, along with white loafers in all sizes, and cordovan loafers in sizes 13, 13 ½, and 14. As a result, they are offering a 10% discount (10%) and free shipping (FS) on these items. Design a full decision table that shows all combinations of conditions, then collapse that table by using don’t care (“-“) notation where one or two conditions cannot influence the action. Which of the following statements is true about these two tables?
A. The full table has 8 rules; the collapsed table has 5.
B. The full table has 12 rules; the collapsed table has 7.
C. The full table has 12 rules; the collapsed table has 5.
D. Both tables have 12 rules, as no combinations can collapse
The instructor wrote, “The answer is C – however I was wondering if you explain the logic to as to why?”
Okay, so here’s the trick. The full table has twelve rules (columns) because you have one condition with three possible values (color) and two conditions with two possible values (size >= 13 and tassel), so 3×2x2=12. Because half of the columns have tassel == true, then six columns collapse to one, leaving seven columns. The four remaining columns that collapse to leave two columns each (or five columns total) have to do with color being black (which is not on sale no matter size) and color being white (which is on sale no matter size).
So, you can completely test the combinations of conditions for the business logic behind the discount with just twelve tests, and, if you are pressed for time, just five tests will give you pretty good risk mitigation.
From time to time, I get questions about the books I’ve written. I’ve never found a way (at least, one that I thought worked properly) to handle those questions efficiently. Now I have an idea, and we’ll see if it works. If you are a reader of one of my books, and have a question about something in that book, you can send the question to email@example.com with the subject line “Book Question for Blog”. Put your question in the body of the e-mail, watch the blog, and within a 2-3 days you should see an answer.