Pages

Friday, November 2, 2012

Difference between error, fault, bug, failure and defect

Figure 1
What is an error?

Error is deviation from actual and expected value.
It represents mistake made by people.

What is a fault?

Fault is incorrect step, process or data definition in a computer program which causes the program to behave in an unintended or unanticipated manner. 
It is the result of the error.

What is a bug?

Bug is a fault in the program which causes the program to behave in an unintended or unanticipated manner.
It is an evidence of fault in the program.

What is a failure?

Failure is the inability of a system or a component to perform its required functions within specified performance requirements.
Failure occurs when fault executes.

What is a defect?

A defect is an error in coding or logic that causes a program to malfunction or to produce incorrect/unexpected results.
A defect is said to be detected when a failure is observed.


So I wrote a C program as mentioned below:
Add two numbers program

Example 1:

As mentioned this program is required to add two numbers.

1        #include<stdio.h>
2       
3        int main ()
4        {
5        int value1, value2, ans;
6       
7        value1 = 5;
8        value2 = 3;
9       
10      ans = value1 - value2; 
11     
12      printf("The addition of 5 + 3 = %d.", ans);
13     
14      return 0;
15      }


When you compile and run this program you see the printed statement as below:

The addition of 5 + 3 = 2.

So after compiling and running this program we realize the program has failed to do what it was supposed to do.
The program was supposed to add two numbers but it certainly did not add 5 and 3. 5 + 3 should be 8, but the result is 2. There could be various reasons as to why the program displays the answer 2 instead of 8. For now we have detected a failure.
As the failure has been detected a defect can be raised.
Now lets go back to the program and analyze what was the fault in the program.

1        #include<stdio.h>
2       
3        int main ()
4        {
5        int value1, value2, ans;
6       
7        value1 = 5;
8        value2 = 3;
9       
10      ans = value1 - value2;  // ----> Bug
11     
12      printf("The addition of 5 + 3 = %d.", ans);
13     
14      return 0;
15      }


We notice at line number 10, there is a ‘-’ sign present instead of ‘+’ sign. So the fault in the program is the ‘-’ sign. Line 10 has the fault which caused the program to deviate from the functionality.
Error is the mistake I made by typing ‘-’ instead of ‘+’ sign. We have observed failure in correct execution of the program. And in this case we can also say we have found the bug.

A tester does not necessarily have access to the code and may be just testing the functionality of the program. In that case the tester will realize the output is faulty and will raise a defect. Due to the observed wrong result it is known of the fact that the program has an error which resulted in the fault in the program and due to which the program failed to give the correct result. But the tester may not know exactly what is causing the error.


                         Find us on facebook: facebook.com/softwaretestingbykunti

137 comments:

  1. Replies
    1. Thanks for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  2. Replies
    1. Thanks Chitransh for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  3. Replies
    1. Thanks Jansher for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
    2. Can you Explain Different Fault Diagnosis Processes according to Modern Technology

      Delete
  4. Simple best example in very clear way ...thanks a lot

    ReplyDelete
    Replies
    1. Thanks Rajkumar for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  5. it is very cleared answer

    ReplyDelete
    Replies
    1. Thanks Mary for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  6. The explanation is really good. I would like an example of Top down and Bottom up approach of testing.

    ReplyDelete
    Replies
    1. Thanks for your comment! I am working on your Top down and Bottom up approach of testing! Sorry for the delay!

      Delete
    2. I have Module Testing / Unit testing post uploaded http://softwaretestingbykunti.blogspot.com/2013/10/module-testing-unit-testing.html
      This would be a suggested read before Top down and Bottom up approach of testing. I am on working on the latter meanwhile!

      Delete
  7. Thanks a lot, the explanation is awesome.

    ReplyDelete
    Replies
    1. Thanks for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  8. Thanks bro gud explanation...

    ReplyDelete
    Replies
    1. Thanks for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  9. very nicely explained!! thanksss :)

    ReplyDelete
    Replies
    1. Thanks for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  10. Hi,
    kindly explain V model and Agile model with example

    Thanks and regards

    ReplyDelete
  11. Replies
    1. Thanks for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  12. Hai, I need some examples for top down approach and bottom up approach in integration testing

    ReplyDelete
  13. EXcellent explanation !!!

    ReplyDelete
    Replies
    1. Thanks for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  14. I'm really thankful to you it helped me a lot :)

    ReplyDelete
    Replies
    1. Thanks for your comment! Please let me know if you need any particular examples / concept explained. I am working on some concepts which will come up soon! Watch this space for more!

      Delete
  15. Hey,
    Best Explanation !!
    But i think Bug and Error are same thing
    Mean
    ans = vaue1 - value2 ;
    this is called Error and Bug also

    Fault:
    Mean if a program/App launched in market and afer some time due to some reason this app not show require answer so this is called Fault in this program .

    Am i right in above concept ???

    ReplyDelete
    Replies
    1. Mirza Anas,

      Thanks for dropping the comment.

      ans=value1-value2;

      Error is the mistake I made by typing ‘-’ instead of ‘+’ sign. We have observed failure in correct execution of the program. And in this case we can also say we have found the bug.

      Yes, you are right that Bug and Error mean the same thing.

      The difference is,

      value1 = 5;
      value2 =3;

      ans should be 8.

      Tester only knows that the answer of the program should be 8.
      He/she does not know why the answer is 2.
      Tester checks that ans is not equal to 8 and reports/files a bug report.

      Developer will check the bug report and then check the program.
      Developer will try to find why 5+3 = 2 according to the program.
      Developer should find that he/she made an error of typing minus sign instead of plus sign. Developer found the bug in the program. YAY!
      Developer will change the minus sign to plus sign.
      Developer will now say that the bug is fixed.

      I hope this helps.

      The program could also be
      ans=value1 - value2 + value2 ;

      In this case
      value1 = 5;
      value2= 3;
      answer should be 8 because the program is to add two numbers.
      But the program when executed gives the ans=5;

      Tester only knows that the answer of the program should be 8.
      He/she does not know why the answer is 5.
      Tester checks that ans is not equal to 8 and reports/files a bug report.

      Developer will check the bug report and then check the program.
      Developer will try to find why 5+3 = 5 according to the program.
      Developer should find that he/she made an error of typing
      ans= value1 - value2 +value2; instead ans = value1 + value2;. Developer found the bug in the program. YAY!
      Developer will change the equation. Now ans = value1 + value2;
      Developer will now say that the bug is fixed.

      Delete
    2. Your Question:
      Fault:
      Mean if a program/App launched in market and afer some time due to some reason this app not show require answer so this is called Fault in this program .

      Answer:

      Yes Fault could mean that too.
      At any time the program does not behave properly due to incorrect step, process or data definition in the computer program, we say that fault has occurred.

      Example.

      I have to write a program that add any two numbers that are integers or decimals.

      And I write the program as below:
      1 #include
      2
      3 int main ()
      4 { float value1, value2;
      5 int ans;
      6
      7 value1 = 5;
      8 value2 = 3;
      9
      10 ans = value1 - value2;
      11
      12 printf("The addition of 5 + 3 = %d.", ans);
      13
      14 return 0;
      15 }

      This program when tested only with integer numbers will give the correct result.

      Although when we add float numbers with this program, the ans will be incorrect and this is the FAULT in the program.

      The reason there is a fault in the program because the developer made error of keeping ans as integer instead of changing it to float.
      This will give incorrect value of ans.
      When two float numbers are added the result should be float and not integer.

      Suppose I tested the program only with integers and thought it was working properly.
      I send the program for release / production.
      The program works fine when end users add two integers.
      The program will show wrong result when end users add one float and one integer OR two float numbers.

      Here the error occured because ans was defined as integer instead of float.

      Delete
  16. It's a very good explanation
    Thank you very much

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. Thanks for this nice article

    ReplyDelete
  19. Thanks for such a clear explanation. I used to experience this problem a lot with my previous software, but thanks to dynamics ax partners I switched to Microsoft Dynamics. It's working great so far!

    ReplyDelete
  20. Nice article you had posted. Its very informative and definitely it will be useful for many people.

    Vehicle tracking system
    Fleet management software

    ReplyDelete
  21. I have been meaning to write something like this on my website and you have given me an idea. Cheers.
    digital marketing training in marathahalli

    digital marketing training in rajajinagar

    ReplyDelete
  22. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    full stack developer training in annanagar

    full stack developer training in tambaram

    full stack developer training in velachery

    ReplyDelete
  23. Resources like the one you mentioned here will be very useful to me ! I will post a link to this page on my blog. I am sure my visitors will find that very useful
    python training institute in chennai
    python training in Bangalore
    python training in pune

    ReplyDelete
  24. Wonderful bloggers like yourself who would positively reply encouraged me to be more open and engaging in commenting.So know it's helpful.
    Blueprism training in Chennai

    Blueprism training in Bangalore

    ReplyDelete
  25. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    Software Testing Courses in Chennai
    Software Testing Courses in Bangalore with placement
    Software Testing courses in Anna Nagar
    Software Testing Certification Training in T nagar
    Software Testing Training in Sholinganallur

    ReplyDelete
  26. Hello I am so delighted I found your blog, I really found you by mistake, while I was looking on Yahoo for something else, anyways I am here now and would just like to say thanks for a tremendous post. Please do keep up the great work.java training in chennai | java training in bangalore


    java training in tambaram | java training in velachery

    ReplyDelete
  27. Very good brief and this post helped me alot. Say thank you I searching for your facts. Thanks for sharing with us!
    Oracle Rac Self Placed Videos

    AWS Self Placed Videos

    Golden Gate Self Placed Videos

    Powershell Self Placed Videos

    ReplyDelete
  28. I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more.python training in bangalore

    ReplyDelete
  29. I feel very grateful that I read this. It is very helpful and very informative and I Python classes in pune really learned a lot from it.

    ReplyDelete
  30. Well, The information which you posted here is very helpful & it is very useful for the needy like me..,

    ReplyDelete
  31. Your info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..
    If you are looking for any Data science Related information please visit our website Data science courses in Pune page!

    ReplyDelete
  32. thanks for Sharing such an Awesome information with us.

    I learned World's Trending Technology from certified experts for free of cost.i Got job in decent Top MNC Company with handsome 14 LPA salary, i have learned the World's Trending Technology from Python training in pune experts who know advanced concepts which can helps to solve any type of Real time issues in the field of Python. Really worth trying Freelance seo expert in bangalore

    ReplyDelete

  33. Excelr is providing emerging & trending technology training, such as for data science, Machine learning, Artificial Intelligence, AWS, Tableau, Digital Marketing. Excelr is standing as a leader in providing quality training on top demanding technologies in 2019. Excelr`s versatile training is making a huge difference all across the globe. Enable ?business analytics? skills in you, and the trainers who were delivering training on these are industry stalwarts. Get certification on "
    best data science courses in hyderabad "
    and get trained with Excelr.

    ReplyDelete
  34. Starting an online business regardless of what type it is, can really be a daunting process. With hundreds of businesses cramming the internet on a daily basis and with the millions already there, I have to ask the question, Do I have a chance of success in whatever niche my business falls into? There are times when some of us have come to the end of the road for our 9am to 5pm jobs, and we think it's time to take on the challenge of being our own boss and manage our own business. However, there are a number of things to take into consideration when thinking about starting your own business. I will only focus on ten main things from a long list which, in my opinion, are of paramount importance when considering an online business. https://1cad.cheapsoftwaredownload.net/autocad-civil-3d.html

    ReplyDelete
  35. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    business analytics course

    ReplyDelete
  36. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites!
    Please check ExcelR Data Science Course in Pune with Placement

    ReplyDelete
  37. Do you like Designing a website or creating a logo for your business? Do have dream about new fonts? Do like creating promotional campaigns? Do you like modifying a picture to make it picture perfect? If the answer to any of these questions is a yes, then you're the right candidate for Adobe certification. Adobe Systems Incorporated is the global leader providing digital marketing and digital media solutions. As a digital media enthusiast a person must have used any one of the products from Adobe's extensive range of software's. The Adobe Photoshop is the one of the most popular digital media creation and editing tool and is widely used as well. Adobe, the pioneer of digital media solutions offers certifications in all of its software products which have a great brand value to it. how to download coreldraw 2019

    ReplyDelete
  38. I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read !! I definitely really liked every part of it and i also have you saved to fav to look at new information in your site.
    for more info:
    https://360digitmg.com/course/certification-program-on-big-data-with-hadoop-spark
    https://360digitmg.com/course/machine-learning-using-python-r
    https://360digitmg.com/course/artificial-intelligence-ai-and-deep-learning

    ReplyDelete
  39. keep up the good work. this is an Ossam post. This is to helpful, i have read here all post. i am impressed. thank you. this is our business analytics courses in Mumbai
    business analytics courses in Mumbai | https://www.excelr.com/data-science-course-training-in-mumbai

    ReplyDelete
  40. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.
    data science courses in pune

    ReplyDelete

  41. Hey, thanks for this great article I really like this post and I love your blog and also Check IOT training in hyderabad at 360DIGITMG.
    360Digitmg IOT training in hyderabad

    ReplyDelete
  42. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science training

    ReplyDelete
  43. Attend The Data Science Training Bangalore From ExcelR. Practical Data Science Training Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Science Training Bangalore.
    Data Science Training Bangalore
    Data Science Interview Questions

    ReplyDelete
  44. microsoft azure tutorial Thanks for sharing such a great information..Its really nice and informative..

    ReplyDelete
  45. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
    360Digitmg pmp training in hyderabad

    ReplyDelete
  46. This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing, data science traning

    ReplyDelete
  47. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. ExcelR Data Science Course In Pune Any way I’ll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info.

    ReplyDelete
  48. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great website

    360 Digitmg Data-science training in chennai

    ReplyDelete
  49. Now imagine the power of computing system. They never forget something at all. This is the most important part. artificial intelligence training in hyderabad

    ReplyDelete
  50. I finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing.

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  51. I think this is a really good article. You make this information interesting and engaging. ExcelR Data science Courses You give readers a lot to think about and I appreciate that kind of writing.

    ReplyDelete
  52. I see the greatest contents on your blog and I extremely love reading them.data science course in malaysia

    ReplyDelete
  53. I feel extremely appreciative that I read this. It is extremely useful and exceptionally enlightening and I truly took in a ton from it.data science course in noida

    ReplyDelete
  54. This was definitely one of my favorite blogs. Every post published did impress me. ExcelR Data Analytics Courses In Pune

    ReplyDelete
  55. very well explained. I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple Linear Regression
    data science interview questions
    KNN Algorithm
    Logistic Regression explained

    ReplyDelete
  56. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.
    Java Training in Chennai

    Java Training in Velachery

    Java Training inTambaram

    Java Training in Porur

    Java Training in Omr

    Java Training in Annanagar

    ReplyDelete
  57. I will really appreciate the writer's choice for choosing this excellent article appropriate to my matter.Here is deep description about the article matter which helped me more.
    Data Analyst Course

    ReplyDelete
  58. Great article. I highly recommended you. Click here for data science course in Hyderabad.

    ReplyDelete
  59. Just pure brilliance from you here. I have never expected something less than this from you and you have not disappointed me at all. I suppose you will keep the quality work going on.
    Data Science Training in Hyderabad

    ReplyDelete
  60. Thanks for the information about Blogspot very informative for everyone
    data science courses in gurgaon

    ReplyDelete
  61. I have expressed a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon…
    Best Institute for Data Science in Hyderabad

    ReplyDelete
  62. Many businesses which are hoping to increase their online presence are hiring an SEO company or using SEO services well to gain every single benefit while achieving their goals. # BOOST Your GOOGLE RANKING.It’s Your Time To Be On #1st Page
    Our Motive is not just to create links but to get them indexed as will
    Increase Domain Authority (DA).We’re on a mission to increase DA PA of your domain
    High Quality Backlink Building Service
    1000 Backlink at cheapest
    50 Free Backlink
    Although attempting to learn SEO yourself is a good idea as well as a tempting one, there are high chances you might implement SEO techniques wrongly because they need months and years of experience.

    ReplyDelete
  63. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
    data scientist training in hyderabad

    ReplyDelete
  64. This is a fabulous post I seen because of offer it. It is really what I expected to see trust in future you will continue in sharing such a mind boggling post
    data scientist training and placement

    ReplyDelete
  65. Cool stuff you have and you keep overhaul every one of us
    pmp training

    ReplyDelete
  66. But sometimes the companies think that they will be on risk, if they will implement Salesforce for their business salesforce training in bangalore

    ReplyDelete
  67. An infromation shared on software testing, well written article. Thanks for the article.

    Data Science Training in Pune

    ReplyDelete
  68. Your website is really cool and this is a great inspiring article.
    data science training in malaysia



    ReplyDelete
  69. this is really nice to read..informative post is very good to read..thanks a lot!
    data scientist training in malaysia

    ReplyDelete
  70. Whatsapp Number Call us Now! 01537587949
    outsourcing in Bangladesh
    USA pone web iphone repair USA
    USA SEX WEB careful
    bd sex video B tex
    bd sex video sex video
    bd sex video freelancing course

    ReplyDelete
  71. A debt of gratitude is in order for sharing the information, keep doing awesome... I truly delighted in investigating your site. great asset...
    full stack web development course malaysia

    ReplyDelete
  72. Nice blog and informative content. Keep updating more blogs again soon. If you want to learn a data science course, then follow the below link.
    Best Data Science Training in Hyderabad

    ReplyDelete
  73. Your content is very unique and understandable useful for the readers keep update more article like this.
    ai course in aurangabad

    ReplyDelete
  74. I have read your article; it is very informative and helpful for me. I admire the valuable information you offer in your articles. Thanks for posting it.
    data analytics course in hyderabad

    ReplyDelete
  75. Attempting to express profound gratitude won't just be satisfactory, for the fabulous clearness in your creation. I will in a brief instant get your rss channel to stay instructed with respect to any updates. data analytics course in pune

    ReplyDelete
  76. Half personal himself create. Popular population color.news today live

    ReplyDelete
  77. School because financial some. Model leave read resource admit man and start. Investment lot idea bed stand.religious

    ReplyDelete
  78. This post is truly outstanding, and I appreciate you for sharing it! I always look forward to the chance to consume such outstanding content brimming with valuable insights. The concepts articulated here are undeniably top-notch and incredibly engaging, which makes the post a delightful read. Please keep up the fantastic work!
    Mobile App Testing: Challenges and Strategies

    ReplyDelete
  79. This fantastic blog is extremely good and well enjoyed with incredible informative content which surely activates the learners to gain enough knowledge. Great work.

    ReplyDelete

  80. Great blog! This post provides a clear and concise explanation of the concepts related to errors, faults, bugs, and failures in software development.
    Also Read: Mastering the Art of Software Testing: A Path to Perfection Introduction

    ReplyDelete

Appreciate your comment...