What is the difference between unit testing and
functionality testing ?

Answer Posted / yauri

I'd like to add more explanation about unit testing here as following:
unit testing is whitebox test which is used to test the single piece of code or module (commonly it will be a method of a class). But, in unit test, we are suppose to not using the high resource (e.g. database, web service, etc) and even we don't need to start the server (whole of the application). So, if there's a dependency with the secondary object (a.k.a collaborator), we can use "Test Double" technique (either Dummy, Fake, Stub, Mock). Usually i use Mock objects (e.g. mockito, power mock, easy mock, etc) to replace the real object for testing purpose.
And please notice that basically we can do the unit testing either after writing the production code or before writing any production code.
In extreme programming, we will write the unit test first before write any production code (read Uncle Bob's book ^_^). Commonly it recognized as "Test Driven Development".

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Have you ever completely tested any part of a product? How?

2029


In which all places, testing is done?One is from the server by calling server name.Can u suggest others?

1478


What is the difference between IE, Opera & Mozilla Firefox in web Testing and which brower will think that is much better?

1580


Hi Friends, I've to submit a presentation in my office about "Different bug tracking tools" ? Where can i find (or any site) the templates for the bug tracking tools.

1394


write test case for gmail sign up page ?

1576






What is a testbed in manual testing?

953


What is Independent Testing?

1598


Can anyone please answer the below question on Manual Testing: Tell me about atleast 5 bugs you come across in your last testing?

1585


What are joins and subjoins in the data bases what is data driven testing what is verification and validation What is Quality Assurance (QA) and Quality Control (QC) Is Verification is related to QA and Validation is related to QC ? which type of model you follow basically in your project what is a use case How to test a Bike how to test a Lift (Elevator). which configuration Management tool do you use which Bug tracking tool do you use explain Bug life cycle what is Regression testing what is ALPHA testing ans BETA testing What types of testings comes under Non functional testing what is TEST DIRECTOR what is CMM and CMM i whar are Expressions in Winrunner What is a Compile module Is it Necessary to open the tool first or the application first after getting a bug what will you do if you add a new object or a new module for the existing application then how will you test the application which Defect tracking tool do you use what is change management What is smoke Testing what is sanity testing A application is given to you but the requirements and functionalities are missing what will you do to start the testing which testing documents will be received by the client

1920


what is e-tester?

2050


What are the main key components in web applications and client and server applications?

715


can anybody send the project you have tested with the clear descriptions,and recent bugs u found in that

1686


What criteria would you use to select Web transactions for load testing?

1641


Which testing model is best as per your understanding, and why?

707


What exactly is quality control?

722