The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Software Testing >> Unit Testing

Pages: 1
playeru
Newbie


Reged: 03/17/12
Posts: 1
Unit testing bugs that no longer reproduce
      #701666 - 03/17/12 04:35 PM

Here is a common scenario on the project I work on: a bug is logges, then when verified at a later time, the scenario no longer reproduces. Or maybe it never really did, who knows. The question is, do we make a unit test for it to make sure it will not reproduce in the future? If yes, how do we check the test is correct, since the flow test fails - fix is added - test passes, does not apply bere?

Post Extras: Print Post   Remind Me!   Notify Moderator  
dlai
Junior Member


Reged: 05/02/06
Posts: 1041
Loc: CA, USA
Re: Unit testing bugs that no longer reproduce [Re: playeru]
      #702936 - 03/29/12 07:29 AM

Do you mean the scenario which the bug occurs no longer exists, or the bug just disappeared without an explicit fix checked in (was fixed by some other code change that no one knows about?)

In the former case you can't write a unit test. In the latter case, there's some room to write unit test. You can write a unit test using the inputs and expected results that originally produced the bug. You can try mutating the code to break the code for testing the unit test. Of course you still can't absolutely be sure the unit test will test for that exact bug. But it's still a nice to have if it doesn't take too much time to create. Can a piece of code be over tested?

--------------------
David Lai
Sr. QA / Test Lead
LinkedIn profile


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 3 anonymous users are browsing this forum.

Moderator:  AJ, Jeanj 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 1952

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5