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

How do you estimate white box testing?

670


what are the risk factors in the project? what is the base for testplan and entry criteria ,exit criteria for test plan?

1951


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

1928


How do you scope out the size of the testing effort?

1918


In how many ways you perform batchtesting ?

1525






What do you understand by usability testing?

662


What is the first test in software testing process?

705


What is stub?

699


What is smoke testing and what is sanity?

649


What is the difference between qa, qc, and testing?

800


what are questions asked in TCS for database tester (sqlserver)?ay idea

2475


can any one post the format of tracebility martrix Plz...... Maid Id: sandhya.shyamala@yahoo.com

1782


how agile testing is performed and what are the related documents.

1402


List out test deliverables?

685


Write the 10 high test cases for making video call/face time?? Write the test cases for credit card accessing the money transfer?? Write the test cases for file transfer from one user to other from Google Drive/drop box?

3649