Sep 25, 2007

Multiplication Bug in Microsoft Excel 2007!

12 Comments
Update: Please refer to the "Comments" section of this post for more interesting facts/analysis on this bug!

I came across this interesting error while surfing through Google groups! On 23rd Sept 2007, this error was first reported by one of the group members.

Bug Characteristics:
1. When you try to multiply 850 by 77.1 excel displays the result to be 100,000 instead of the correct answer, i.e. 65,535!
2. It seems that *some* formula that involves *multiplication* and evaluates to 65,535 will act strangely. [It seems that any formula that should evaluate to 65,535 will act strangely. - Edited, thanks to Alan!]
3. If you add 1 to a cell that has one of these incorrect results you get 100001, but deduct 1, and you get 65,534!
4. Displays correct result in Microsoft Excel 2000 and 2003. So it appears to be an issue infesting Excel 2007 alone!
5. Even SUMPRODUCT returns 100000!
=SUMPRODUCT(850,77.1)
=SUMPRODUCT(850,77.1,2,0.5)

Let me Analyze the Error:
Did you notice the peculiarity about the error? This happens for some multiplication formula that should evaluate to 65,535! Like,

=5.1*12850

=10.2*6425
=20.4*3212.5
=40.8*1606.25
=77.1*850
=154.2*425
=212.5*308.4
=308.4*212.5
=425*154.2 and so on… Here is a screenshot depicting the weird calculation!

So it appears to me that it the specialty of the number 65,535 that makes the error unique! Interestingly enough, 65,535 is the highest number which can be represented by an unsigned 16 bit binary and 65,536 requires 32 bits. In other words, the number, 65,535, happens to have two bytes worth of 1 digits in binary. I understand, Microsoft Excel 2007 might be using floating point for numbers, and hence it might not apply here, still I doubt this has got a lot to do with this error! Bugs are usually encountered at boundaries. I wonder how the test team at Microsoft, who were testing the multiplication feature, could miss out such an obvious looking test! Also I am interested to see how Microsoft is going to react to this bug!

Can you see some more interesting attributes of this error? Can you link this to some other testing perspective? Do let me know your viewpoints on this by leaving your comments.

Happy Testing…
Read More »


Tags: , , , ,

Sep 17, 2007

Testing Lessons – Top 5 Secrets to Bug Hunting Success!

18 Comments
Testers should catch bugs in the software that they are testing. They should try to catch as many important bugs as soon as possible. Catching an important bug earlier on the Product Life Cycle can save the Project from financial losses and mitigate risks as compared to catching the same at a later stage in SDLC!

Testers are the voice of the customers/clients. They should work as the representative of the customer/client.

Testers are information providers. They provide important quality related information to the relevant stakeholders in a timely and usable fashion to support decision-making and assist in taking corrective action. Relevant stakeholders may include (but not limited to) customer/sponsor, intended users, management staffs, data analysts, data providers etc.

These are few of the roles that are considered as the
role of a Software Tester. There can be other roles too depending on the context (like organizational structure, domain type, team size, skill level of the tester etc). Before writing further, let me clarify that this particular post is not to argue upon the possible roles of a Software Tester.

Whatever may be the roles of a
Software Tester, "catching bugs" is one of the most important of them, in my opinion. This (catching bugs) is one characteristic that differentiates a good tester from a mediocre tester. [NOTE: "Catching of bugs" should not be confused with "catching more bugs". Trying to evaluate a Tester's skill based on the bug count can be dangerous. Anyway, that is a different topic altogether and may be I would like to write about it in future.]

However, I must confess that I am one of those testers who are good enough at catching bugs. Once one of my friend-cum-colleague had asked me – “Debasis, what is the secret of your bug hunting ability? How do you find the bugs that are generally missed by other testers in the team?” Today, after almost a year after the incident, I am going to answer his question here. I will try to jot down few small yet powerful methods that have helped me in getting an edge over others as far as bug hunting is concerned. I am going to spill my bug hunting secrets here in a hope that it may help other testers in catching more bugs. So here they are:

1. Learn to break rules once in a while. Explore! I have seen testers missing bugs while trying to adhere strictly to pre-defined test cases. Test cases may be good at catching bugs. But the major problem, in my opinion, with test cases is that it is as difficult to attain near-100% test coverage using test cases, as it is impossible to attain a so called 100% bug free product! It is likely for a tester to fall victim to
inattentional blindness, while trying to strictly follow a test case. So along with the test case, also try to explore the functionality under test. I have found it an effective method to catch more bugs that lurk around the functionality but are not covered somehow by the test cases.

2. Look for patterns! Software Bugs are gregarious in nature. They like to stay in groups. They like to infest similar/related functionalities. Most of the bug has its own unique nature that makes it singular. Try to identify it. Try to identify the pattern. While testing a new area, try to use your past test ideas which were successful in uncovering bugs in a similar functionality. Chances are more that you might soon come across some similar bugs in this functionality too. Making a list of the test ideas that helped you to hunt down some important bugs in past can help you too.

3. Hit it hard where it hurts the most! It is easy to get carried away when you come across a bug (can be a crash, a system hang, a functionality error, an UI problem, a performance bottleneck and so on). Take it easy. This might just be the beginning not the end! Don't be tempted to rush and log it into your
bug/issue/defect tracker. Finding a bug merely suggests that there is a loose link in the software here. The system might have gone into an unstable state before you encountered the bug. Assuming that the system is in an unstable state abuse it more. Feed more insane inputs than ever. Fire up gallons of data inputs. Reduce the available system resources. Try to take it to a point where the application under test (AUT) might come to its knees. Who knows you might soon come across an uglier face of the earlier bug! When you find it, don’t forget to note down all the details and check the reproducibility before logging it into the tracker.

4. Listen to the footsteps of the approaching bug! Have you ever heard the footsteps of an approaching bug? Well, I have! By saying this I am not trying to exaggerate the whole issue. One of my common practices while testing (bug hunting!) is to wear my headset. This helps in a couple of fronts. It enables me to hear the various background sounds (like the ding of a warning message, buzz of different message boxes and alert messages etc.). In addition, it also helps me in hearing the sound of some error boxes that might run on the background but don't come on the screen due to some reason! Once I was testing a search box in a web application. When I was hitting the Search button I was hearing a ding but no error message whatsoever. Though the search result pages looked clean, the sound in the background aroused my curiosity. Enquiring more on this revealed that there was an error with the lexical analyzer of the search engine and for some reason the error message was not getting displayed on screen! There were more than 20 search result pages per certain search queries. I am wondering if I could still have caught the bug so easily, had I not been using my headset that time.

5. Two is better than one. Pair it! It is said that testers should never run out of ideas! While this is a desirable quality for any tester, unfortunately this is not always true. After all, a tester is also a human being and is prone to failure! There may be times when no test ideas look like uncovering any bug. I believe it happens with most of the testers. At least it happens with me. I call them as "Dry Days". When none of the test ideas that come into my mind are able to dig out any bug. In such situations I like to shift gears. I use to request one of my tester colleagues to come and test with me. This helps me (us!) from different dimensions. When two of us are testing the same thing at the same point of time, it helps each of us in building our own test ideas. It also helps me building on more test ideas on the test idea created by my partner and vice versa. When a tester works on the same project for a long duration, it is quite possible that the typical work pressure may wear down the spirit of the tester or may result in tunnel vision. Working once in a while in pair (Pair Testing) can work brilliantly in such situations. While testing in pairs you become more focused as you are testing in front of someone and this feeling of "I-am-being-watched" can do wonders in rejuvenating the wore down tester inside you. At least this strategy has worked nicely for me whenever I was going through a rough patch.

These are few of the things that have helped me in catching bugs more efficiently. These are practices that have worked for me in my context. However, these may or may not work for you, as your context might be entirely different from mine. Anyway, you can give them a try and see if they can help you in catching more bugs quickly than you are catching now! Do let me know your ideas and/or views on this through a comment. Here is to your Bug Hunting success!

Happy Testing…
Read More »


Tags: , , , , , , , , , ,

Sep 10, 2007

Smoke Testing Vs. Sanity Testing – Testing Stories from an Indian Tester!

42 Comments
James asks: “What is the main difference between Smoke Testing and Sanity Testing? Are they part of Blackbox or Whitebox testing approach?”

Gokul asks: “What is Build Verification Testing? When is it done? Is it the responsibility of the developer or the tester?”

Ridhima asks: “I am too confused about Smoke and Sanity Testing. Are they same? Or is there any difference between them? If yes, what are the main differences between the approach followed in Smoke Testing and Sanity Testing?”


Testing FAQs like the above keep flooding my inbox! Also I come across such testing questions in other places like online Testing Forums/Testing Communities/Testing Discussion Groups etc. And it looks like everybody (who knows something about testing) has his/her own answer for these type of questions! This amazes me. Terminologies in Testing can be dangerous! A term might mean differently to different persons in different contexts. And the above FAQs present an almost perfect example of how testing terms can lead to confusion!

However, after seeing a wide (wild!) variety of views (on the differences in Smoke Testing and Sanity Testing), I decided it was about time to throw in my 2 cents and write a post about it.

But before I can explain I will like to tell you a small story! “One fine morning Mr. Tester was about to start for office and, much to his distress, he suddenly found out that his old bike would refuse to start! It was Product Release time in office and Mr. Tester was already getting late. The release deadline was round the corner and he had to test an important new feature of the product the very same day! Accidents happen. When you are lucky they happen with others. This time, Mr. Tester wasn’t!

He kept trying to wake up his sleeping old bike but it looked as if it was dead forever! After a considerable amount of struggle and some black patches on his fingers (due to grease) Mr. Tester realized that it was already too late to take it to a garage and started for office by a taxi instead! How he reached office almost one and half hour late (thanks to the Chennai traffic!) and how he had to face his fuming Test Manager is left to the imagination of the readers!

However, after all this Mr. Tester made up his mind to take a new bike and to get rid of the old one. Next weekend, he was seen in the nearest Bike Showroom, talking to the salesman. He was looking for a bike with fair enough pick-up and with good enough fuel consumption. Soon he was able to spot such a model. [At least the bike Company and the Salesman claimed so]. But being a tester himself, how could he take their words for granted without testing it himself! So he wanted to take a test ride and was keen to see the basic features of the bike. He was interested in checking the pick-up, the balance, the control while riding, disk brakes, the digital display etc. However, he was quite satisfied with the result of his test (ride) and brought home the bike.

Now, the poor bike was to go through another series of tests [Poor bike! Must be cursing it's fate for being sold to a crazy "tester"!] This time Mr. Tester was interested to test the performance of the bike over a period of a couple of months. This time features like the fuel mileage, wear and tear of basic mechanical parts of the bike etc were under the scanner! Fortunately (for the Bike Manufacturer), Mr. Tester was satisfied with his findings and has been riding the bike to office (and elsewhere) till today.”

Moral of the Story: Well, all stories are not necessarily attached with morals. However, this story has certainly got some testing morals.

a) Taking a test ride to test the basic features (functionalities) of the bike can be compared to “Smoke Testing” a product. In the above story, while taking the test ride, Mr. Tester was determining if the basic features of the bike were stable and acceptable. In a typical testing environment, when a build is received for testing, a smoke test is run to determine if the build is stable and can be considered for further testing. Testers usually do a Smoke Testing before accepting the build for further testing. The tester "touches" all areas of the application without getting too deep into the functionality.

b) Testing the bike performance in detail after bringing it home can be compared to “Sanity Testing” a product. Testing those features in detail was not possible in the showroom or while taking test ride. In a typical testing environment, when a new build is received with minor modifications, instead of running a thorough regression test suite, a sanity test is performed so as to determine that the build has actually fixed the issues and no further issue has been introduced by the fixes. Sanity testing is generally a subset of regression testing and a group of test cases are executed that are related with the changes made to the product.

Smoke Testing Vs. Sanity Testing:
1) “Smoke Testing” is usually done on the nightly/interim build to test its stability. Therefore “Smoke testing” is often called as “Build Verification Testing” too. In contrast, “Sanity Testing” is usually done during the later cycles after thorough regression cycles are over. When multiple cycles of testing are executed, “Sanity Testing” is done towards the Product release phase.


2) “Smoke Testing” is done following a shallow and wide approach where all the basic and major areas are tested without going too deep into the functionality. In contrast, “Sanity Testing” is usually a focused but limited form of regression testing, which follows a deep and narrow approach to test a particular functionality in detail.

3) “Smoke Testing” is done by developers before the build is released or by testers before accepting a build for further testing. On the other hand, “Sanity Testing” is done mostly by the testers.

4) “Smoke Tests” are mostly in form of scripted form (either written test cases or automated test scripts) whereas “Sanity Tests” are mostly non-scripted!

5. “Smoke Testing” can be compared with the normal health check-up of the product whereas the “Sanity Testing” can be compared with some specialized tests to reveal possible problems with a particular functionality of the product!

Hope this helps in explaining the concept of “Smoke Vs. Sanity Testing” in a better way. Feel free to comment on my views by leaving behind your comment. If you know any better way to explain it, please share with me by leaving your comment. Thanks.

Happy Testing …
Similar Posts:
Read More »


Tags: , , , , , , , ,

Sep 1, 2007

Blogger NEW + Firefox 2 = ‘Exceptional’ Error!

3 Comments
I was reading through some of my latest blog entries and realized that it has been long since I had posted a bug! So, I thought it was time to test something. This time I selected Blogger to test it’s compatibility with Firefox 2. I chose them because, both Blogger and Firefox are known to be very reliable and robust in their own areas. And still, few days back I had noticed an unusual Blogspot Server Downtime, which had resulted in non-availability of all blogspot blogs that are hosted on blogspot servers. Here is a screenshot of the 502 Server Error. This was something I had never witnessed before and was unusual, considering the fact that blogspot is owned and hosted by Google! The error message told me that it was a ‘Temporary Google Server Error’ and to try in another ‘30 seconds’! But the server was (or rather ‘servers were’; as it takes several servers to maintain millions of blogspot blogs) down for at least 2 hours. [Could be more too. I had tried during a period of almost 2 hours and the server was down!]

However, I was to test the browser compatibility of Blogger with Firefox 2. For those who are new to Browser Compatibility Testing, this can be a small introduction:

In Browser Compatibility Testing, we compare the way a website/web page looks and behaves on different browsers. The testing focus is primarily given to how different browsers interpret the web page’s code (HTML). We also test whether the browser recognizes and supports certain special HTML codes like the rendering of iframes, javascript snippets etc.

While testing, I found out a crash resulting due to an exception when creating a new post in Blogger using Firefox 2 as my browser.

Steps to Reproduce:
1. Log in to your Blogger NEW account using Firefox 2 as the browser.
2. Click on the New Post link on the dashboard.
3. Copy-paste a blog entry from a MS Word document! [This can be a quite common user scenario when the user writes and saves a blog entry as a MS Word file and later uses the text from the MS Word file to create a new blog entry in Blogger.]
4. Now in the Blogger window select the entire text (Ctrl+A) in the blog entry edit area [please refer the
screenshot]
5. Click on the drop-down menu for fonts and select a different font. I had selected ‘Georgia’. But it appears to me as if the crash is reproducible for the other available font types too! Selecting a different font should give you the
crash. If you are unable to get a crash by changing the font type, change it to another font. Soon you should get the crash!

The crash report says: “An attempt to modify formatting failed unexpectedly. A possible solution may be to save your post as a draft and reopen this post and apply formatting again. [Exception…]”. I saved the post as a draft and tried to apply formatting again after reopening the post (as suggested in the crash report); but in vein! Every time I tried, I kept getting the same crash. So finally I had to give up and use Internet Explorer to get the desired formatting before posting the blog entry.

Inferences:
1. Copying from MS Word and pasting the text into Blogger formatting window looks like an important step to reproduce the crash.
2. Selecting all the text by using (Ctrl+A) also seems to play a major role in reproducing the crash.
3. This crash does not happen in Internet Explorer. So it looks like a compatibility issue of Blogger with Firefox 2.
4. The crash report fails to help the user at several points.
a) At first look, the crash reports does look like a bunch of garbage (mostly contains technical looking information) and can be scary for a novice non-techno-savvy user!
b) Although the crash message contains some log information (stack dump!), how it could help the end user in avoiding the crash is still debatable.
c) Though the report tells the user on how to recover from the crash, however, the information does not facilitate recovery! So error report fails on the functionality aspect.
5. This crash is also reproducible while editing an existing Blogger post!

This crash is still reproducible (as on the time of posting of this entry). So, go ahead and try if you can reproduce it or not! Let me know your test result via commenting.

Happy Testing…

Similar Posts:
Read More »


Tags: , , , , , , , ,
 

» Today's Popular

  • How to apply Testing in Real World!
  • Google - Boundary Value Exploration!
  • How to win the Testing World Cup?
  • Do "Testers" Assure Quality!
  • How to Break MS Word 2000!
  • Expect the Unexpected!
  • Yet another Bug in Google Suggest!
  • Test Automation Tool - Rational Robot
  • 50 Software Testing/SQA Interview FAQs!

    © 2013. All Rights Reserved | Software Testing Tricks | Template by TechChunks

    Home | About | Top