SlideShare a Scribd company logo
1 of 2
13.Describe object-oriented unit testing.?
Solution
unit testing is a software testing method by which individual units of source code, sets of one or
more computer program modules together with associated control data, usage procedures, and
operating procedures, are tested to determine whether they are fit for use. Intuitively, one can
view a unit as the smallest testable part of an application. In procedural programming, a unit
could be an entire module, but it is more commonly an individual function or procedure. In
object-oriented programming, a unit is often an entire interface, such as a class, but could be an
individual method. Unit tests are short code fragments created by programmers or occasionally
by white box testers during the development process. It forms the basis for component testing.
Ideally, each test case is independent from the others. Substitutes such as method stubs, mock
objects, fakes, and test harnesses can be used to assist testing a module in isolation. Unit tests are
typically written and run by software developers to ensure that code meets its design and behaves
as intended.
Unit testing provides a sort of living documentation of the system. Developers looking to learn
what functionality is provided by a unit, and how to use it, can look at the unit tests to gain a
basic understanding of the unit's interface (API).
Unit test cases embody characteristics that are critical to the success of the unit. These
characteristics can indicate appropriate/inappropriate use of a unit as well as negative behaviours
that are to be trapped by the unit. A unit test case, in and of itself, documents these critical
characteristics, although many software development environments do not rely solely upon code
to document the product in development.
13-Describe object-oriented unit testing--Solutionunit testing is a so.docx

More Related Content

Similar to 13-Describe object-oriented unit testing--Solutionunit testing is a so.docx

Ch8-Software Engineering 9
Ch8-Software Engineering 9Ch8-Software Engineering 9
Ch8-Software Engineering 9
Ian Sommerville
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
Venkat Alagarsamy
 
unit 4.pptx very needful and important p
unit 4.pptx very needful and important punit 4.pptx very needful and important p
unit 4.pptx very needful and important p
20EC040
 

Similar to 13-Describe object-oriented unit testing--Solutionunit testing is a so.docx (20)

Software testing
Software testingSoftware testing
Software testing
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
 
Ch8-Software Engineering 9
Ch8-Software Engineering 9Ch8-Software Engineering 9
Ch8-Software Engineering 9
 
unittesting-190620114546 (1).pptx document
unittesting-190620114546 (1).pptx documentunittesting-190620114546 (1).pptx document
unittesting-190620114546 (1).pptx document
 
Unit testing - what is its importance
Unit testing - what is its importanceUnit testing - what is its importance
Unit testing - what is its importance
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
Testing Strategies in .NET: From Unit Testing to Integration Testing
Testing Strategies in .NET: From Unit Testing to Integration TestingTesting Strategies in .NET: From Unit Testing to Integration Testing
Testing Strategies in .NET: From Unit Testing to Integration Testing
 
Testing Strategies for Node.pdf
Testing Strategies for Node.pdfTesting Strategies for Node.pdf
Testing Strategies for Node.pdf
 
Unit Testing vs Integration Testing
Unit Testing vs Integration TestingUnit Testing vs Integration Testing
Unit Testing vs Integration Testing
 
Manuel testing word
Manuel testing wordManuel testing word
Manuel testing word
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answers
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answers
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
6 Common Types of Software Testing.pdf
6 Common Types of Software Testing.pdf6 Common Types of Software Testing.pdf
6 Common Types of Software Testing.pdf
 
Ch8
Ch8Ch8
Ch8
 
Ch8
Ch8Ch8
Ch8
 
software engineering
software engineeringsoftware engineering
software engineering
 
unit 4.pptx very needful and important p
unit 4.pptx very needful and important punit 4.pptx very needful and important p
unit 4.pptx very needful and important p
 
Test driven development(tdd)
Test driven development(tdd)Test driven development(tdd)
Test driven development(tdd)
 

More from patriciab30

ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docxID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
patriciab30
 
I- Which type of star oscillates in brightness in a pattern in such a.docx
I- Which type of star oscillates in brightness in a pattern in such a.docxI- Which type of star oscillates in brightness in a pattern in such a.docx
I- Which type of star oscillates in brightness in a pattern in such a.docx
patriciab30
 
I need to write a soil chemistry paper using scientific articles and j.docx
I need to write a soil chemistry paper using scientific articles and j.docxI need to write a soil chemistry paper using scientific articles and j.docx
I need to write a soil chemistry paper using scientific articles and j.docx
patriciab30
 
I need help writing a python 3 function- I need to write a function th.docx
I need help writing a python 3 function- I need to write a function th.docxI need help writing a python 3 function- I need to write a function th.docx
I need help writing a python 3 function- I need to write a function th.docx
patriciab30
 
I need help with my geotechnical engineering HW-- Can a soil have a lo.docx
I need help with my geotechnical engineering HW-- Can a soil have a lo.docxI need help with my geotechnical engineering HW-- Can a soil have a lo.docx
I need help with my geotechnical engineering HW-- Can a soil have a lo.docx
patriciab30
 
I need help m5 In the modern Respond to the following questions with s.docx
I need help m5 In the modern Respond to the following questions with s.docxI need help m5 In the modern Respond to the following questions with s.docx
I need help m5 In the modern Respond to the following questions with s.docx
patriciab30
 
12- Your friend has high protein and sugar in her urine- She repeats t.docx
12- Your friend has high protein and sugar in her urine- She repeats t.docx12- Your friend has high protein and sugar in her urine- She repeats t.docx
12- Your friend has high protein and sugar in her urine- She repeats t.docx
patriciab30
 
11- What are the components of the user interface-SolutionNow a days t.docx
11- What are the components of the user interface-SolutionNow a days t.docx11- What are the components of the user interface-SolutionNow a days t.docx
11- What are the components of the user interface-SolutionNow a days t.docx
patriciab30
 

More from patriciab30 (20)

ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docxID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
 
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docx
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docxI- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docx
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docx
 
I- H low do you know when to name something as an ionic compound- 2- H.docx
I- H low do you know when to name something as an ionic compound- 2- H.docxI- H low do you know when to name something as an ionic compound- 2- H.docx
I- H low do you know when to name something as an ionic compound- 2- H.docx
 
I- Which type of star oscillates in brightness in a pattern in such a.docx
I- Which type of star oscillates in brightness in a pattern in such a.docxI- Which type of star oscillates in brightness in a pattern in such a.docx
I- Which type of star oscillates in brightness in a pattern in such a.docx
 
I- Describe the different bonds that exist between the different macro.docx
I- Describe the different bonds that exist between the different macro.docxI- Describe the different bonds that exist between the different macro.docx
I- Describe the different bonds that exist between the different macro.docx
 
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docx
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docxI- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docx
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docx
 
I) What are secondary bonding interactions (also called charge transfe.docx
I) What are secondary bonding interactions (also called charge transfe.docxI) What are secondary bonding interactions (also called charge transfe.docx
I) What are secondary bonding interactions (also called charge transfe.docx
 
I need to write a soil chemistry paper using scientific articles and j.docx
I need to write a soil chemistry paper using scientific articles and j.docxI need to write a soil chemistry paper using scientific articles and j.docx
I need to write a soil chemistry paper using scientific articles and j.docx
 
I need help with CH4- What is its intermolecular force- Question 4 of.docx
I need help with CH4- What is its intermolecular force- Question 4 of.docxI need help with CH4- What is its intermolecular force- Question 4 of.docx
I need help with CH4- What is its intermolecular force- Question 4 of.docx
 
I need help writing this program in MIPS MARS assembly language 2- Mak.docx
I need help writing this program in MIPS MARS assembly language 2- Mak.docxI need help writing this program in MIPS MARS assembly language 2- Mak.docx
I need help writing this program in MIPS MARS assembly language 2- Mak.docx
 
I need help writing a python 3 function- I need to write a function th.docx
I need help writing a python 3 function- I need to write a function th.docxI need help writing a python 3 function- I need to write a function th.docx
I need help writing a python 3 function- I need to write a function th.docx
 
I need help with my geotechnical engineering HW-- Can a soil have a lo.docx
I need help with my geotechnical engineering HW-- Can a soil have a lo.docxI need help with my geotechnical engineering HW-- Can a soil have a lo.docx
I need help with my geotechnical engineering HW-- Can a soil have a lo.docx
 
I need help m5 In the modern Respond to the following questions with s.docx
I need help m5 In the modern Respond to the following questions with s.docxI need help m5 In the modern Respond to the following questions with s.docx
I need help m5 In the modern Respond to the following questions with s.docx
 
I need help describing the two kinds of people who are responsible for.docx
I need help describing the two kinds of people who are responsible for.docxI need help describing the two kinds of people who are responsible for.docx
I need help describing the two kinds of people who are responsible for.docx
 
12- Your friend has high protein and sugar in her urine- She repeats t.docx
12- Your friend has high protein and sugar in her urine- She repeats t.docx12- Your friend has high protein and sugar in her urine- She repeats t.docx
12- Your friend has high protein and sugar in her urine- She repeats t.docx
 
12- Under which of the following circumstances is the principal-agent.docx
12- Under which of the following circumstances is the principal-agent.docx12- Under which of the following circumstances is the principal-agent.docx
12- Under which of the following circumstances is the principal-agent.docx
 
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx
 
11- What are the components of the user interface-SolutionNow a days t.docx
11- What are the components of the user interface-SolutionNow a days t.docx11- What are the components of the user interface-SolutionNow a days t.docx
11- What are the components of the user interface-SolutionNow a days t.docx
 
11- The employer payroll tax expense on employee wages that is paid fo.docx
11- The employer payroll tax expense on employee wages that is paid fo.docx11- The employer payroll tax expense on employee wages that is paid fo.docx
11- The employer payroll tax expense on employee wages that is paid fo.docx
 
110) When you create a form from two tables that have a one-to-many re.docx
110) When you create a form from two tables that have a one-to-many re.docx110) When you create a form from two tables that have a one-to-many re.docx
110) When you create a form from two tables that have a one-to-many re.docx
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 

Recently uploaded (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

13-Describe object-oriented unit testing--Solutionunit testing is a so.docx

  • 1. 13.Describe object-oriented unit testing.? Solution unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use. Intuitively, one can view a unit as the smallest testable part of an application. In procedural programming, a unit could be an entire module, but it is more commonly an individual function or procedure. In object-oriented programming, a unit is often an entire interface, such as a class, but could be an individual method. Unit tests are short code fragments created by programmers or occasionally by white box testers during the development process. It forms the basis for component testing. Ideally, each test case is independent from the others. Substitutes such as method stubs, mock objects, fakes, and test harnesses can be used to assist testing a module in isolation. Unit tests are typically written and run by software developers to ensure that code meets its design and behaves as intended. Unit testing provides a sort of living documentation of the system. Developers looking to learn what functionality is provided by a unit, and how to use it, can look at the unit tests to gain a basic understanding of the unit's interface (API). Unit test cases embody characteristics that are critical to the success of the unit. These characteristics can indicate appropriate/inappropriate use of a unit as well as negative behaviours that are to be trapped by the unit. A unit test case, in and of itself, documents these critical characteristics, although many software development environments do not rely solely upon code to document the product in development.