mfsi_sudhansup
Newbie
Reged: 10/14/11
Posts: 12
|
|
Hi All, what is unit testing : Unit testing is a test level used to test the modules or programs or objects or classes separately from the rest of the module depending upon that module.By unit testing we can easyly find out the bugs or errors.It is also known as component/module/program testing.
|
mfsi_sitamj
Newbie
Reged: 10/11/11
Posts: 15
|
|
Hello,
In computer programming, unit testing is a method by which individual units of source code are tested to determine if they are fit for use.
The primary goal of unit testing is -> Take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly as you expect.
Each unit is tested separately before integrating them into modules to test the interfaces between modules. Unit testing has proven its value in that a large percentage of defects are identified during its use.
The most common approach to unit testing requires drivers and stubs to be written. The driver simulates a calling unit and the stub simulates a called unit. The investment of developer time in this activity sometimes results in demoting unit testing to a lower level of priority and that is almost always a mistake.
Regards Sitam
|
Joe Strazzere
Moderator
Reged: 05/15/00
Posts: 12344
Loc: Massachusetts, USA
|
|
Sitam,
Did you get your definition from here? http://msdn.microsoft.com/en-us/library/aa292197(v=vs.71).aspx
-------------------- - Joe
Visit AllThingsQuality.com to learn more about quality, testing, and QA!
I speak only for me. I do not speak for my employer, nor for anyone else.
|
mfsi_satyakamm
Newbie
Reged: 10/11/11
Posts: 7
|
|
A unit test is a code that tests a "unit": a class, a function, or a module. Unit Tests are built and run during the development cycle(i.e. executed by developers) Unit Tests are normally run in isolation of other layers.
|
Peter Ruscoe
Veteran
Reged: 03/18/02
Posts: 7686
Loc: Tampa Bay
|
|
Post deleted by Administrator
|
WhoCares
Member
Reged: 09/05/06
Posts: 68
Loc: Vadodara, India
|
|
Quote:
Do you get extra credit from your employer for this?
Question we should ask is are they testing other's knowledge or trying to confirm their knowledge?
|
mfsi_nilanjan
Newbie
Reged: 10/12/11
Posts: 4
|
|
Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing is often automated but it can also be done manually. Unit Testing mainly done by the developers.
|
Joe Strazzere
Moderator
Reged: 05/15/00
Posts: 12344
Loc: Massachusetts, USA
|
|
Quote:
Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing is often automated but it can also be done manually.
Or, http://searchsoftwarequality.techtarget.com/definition/unit-testing
-------------------- - Joe
Visit AllThingsQuality.com to learn more about quality, testing, and QA!
I speak only for me. I do not speak for my employer, nor for anyone else.
|
QAMgrMjk
Member
Reged: 11/18/11
Posts: 28
Loc: Florida
|
|
Unit testing is also supposed to be done by developers.
-------------------- QAMgrMjk
|
dlai
Junior Member
Reged: 05/02/06
Posts: 1041
Loc: CA, USA
|
|
Traditionally unit testing is done by developers mainly because they are closest to the code. You'll hear excuses like, "I don't know the design until I play around with the code." The problem with that is when the same developer writes the test, it creates bias, where the unit test will be written to mold around the code. Ideally you want your unit tests to be grey boxed and based on the requirements and possible cases, and not just bare minimum to get 100% code coverage.
Sometimes it's better to have a different person other than the developer writing the unit test. This could be a peer developer, or a test developer, or even QA personnel on a mixed agile team. This allows the unit test to be written more according to the requirements and interfaces rather than on the code implementation.
You might throw the argument, "Hey, what about Test Driven Development?". To that I say.. you still lack the 2nd pair of eyes and will miss certain scenarios. Of course you'll write code to make the unit test pass, but how about the scenarios you don't think about? There will still need to be a review by the original developer, and he might need to help create a few more cases to ensure 100% code coverage as he knows the internals of the code.
-------------------- David Lai
Sr. QA / Test Lead
LinkedIn profile
|
TJLEE
Member
Reged: 05/26/09
Posts: 96
Loc: Russia
|
|
http://en.wikipedia.org/wiki/Unit_testing
-------------------- Regards
Vasily
Blog: http://qaquestions.wordpress.com/
Twitter: http://twitter.com/pythonkaa
|
NguyenVu
Newbie
Reged: 05/11/12
Posts: 1
|
|
Thanks, I need help to about what 's different between unit test and white box. I think white box that is technology of unit test ? Thanks to all.
-------------------- Beautiful scenes Vietnam
http://vietnamscenes.com
|
dlai
Junior Member
Reged: 05/02/06
Posts: 1041
Loc: CA, USA
|
|
Unit tests are whitebox by definition. But not all white box tests are unit tests. (However most people are referring to unit test when they mention white box tests in a job posting).
1 example of a non-unit whitebox test is using a debugger to inject values during a manual test, then monitoring code coverage using a code coverage tool.
-------------------- David Lai
Sr. QA / Test Lead
LinkedIn profile
|
rajaasif
Newbie
Reged: 06/20/12
Posts: 1
|
|
Unit testing is a 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. While on the other hand Mainframe unit testing is widely used in large IT companies.
-------------------- mainframe unit testing
|
kshivannarayana
Newbie
Reged: 07/04/12
Posts: 1
|
|
Unit is a smallest part of an application or program. Developers will check each and every developed unit as well as combination of units as per addressing the design document
|
messageinbottle
Newbie
Reged: 06/28/12
Posts: 2
|
|
Hi,
Unit testing is a smallest part of an application or program or modules. developers will do this test..
-------------------- Message in a bottle
|
myTesting_Bank
Newbie
Reged: 07/18/12
Posts: 18
Loc: Tunisia - France
|
|
Unit testing is set of test cases that allow to check optimal use case of developed feature. they are executed by developer.
-------------------- QA activities, follow CMMI certification process.
|