The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Software Testing >> Unit Testing

Pages: 1
mfsi_sudhansup
Newbie


Reged: 10/14/11
Posts: 12
What is unit testing?
      #689165 - 10/19/11 10:33 PM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
mfsi_sitamj
Newbie


Reged: 10/11/11
Posts: 15
Re: What is unit testing? [Re: mfsi_sudhansup]
      #689482 - 10/24/11 06:11 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Joe Strazzere
Moderator


Reged: 05/15/00
Posts: 12344
Loc: Massachusetts, USA
Re: What is unit testing? [Re: mfsi_sitamj]
      #689506 - 10/24/11 09:12 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
mfsi_satyakamm
Newbie


Reged: 10/11/11
Posts: 7
Re: What is unit testing? [Re: Joe Strazzere]
      #689791 - 10/28/11 12:42 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Peter Ruscoe
Veteran


Reged: 03/18/02
Posts: 7686
Loc: Tampa Bay
Re: What is unit testing? *DELETED* [Re: mfsi_satyakamm]
      #690252 - 11/03/11 05:07 PM

Post deleted by Administrator

Post Extras: Print Post   Remind Me!   Notify Moderator  
WhoCares
Member


Reged: 09/05/06
Posts: 68
Loc: Vadodara, India
Re: What is unit testing? [Re: Peter Ruscoe]
      #690295 - 11/04/11 05:00 AM

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?


Post Extras: Print Post   Remind Me!   Notify Moderator  
mfsi_nilanjan
Newbie


Reged: 10/12/11
Posts: 4
Re: What is unit testing? [Re: WhoCares]
      #691127 - 11/15/11 06:13 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Joe Strazzere
Moderator


Reged: 05/15/00
Posts: 12344
Loc: Massachusetts, USA
Re: What is unit testing? [Re: mfsi_nilanjan]
      #691135 - 11/15/11 07:22 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
QAMgrMjk
Member


Reged: 11/18/11
Posts: 28
Loc: Florida
Re: What is unit testing? [Re: Joe Strazzere]
      #691553 - 11/18/11 12:48 PM

Unit testing is also supposed to be done by developers.

--------------------
QAMgrMjk


Post Extras: Print Post   Remind Me!   Notify Moderator  
dlai
Junior Member


Reged: 05/02/06
Posts: 1041
Loc: CA, USA
Re: What is unit testing? [Re: QAMgrMjk]
      #701521 - 03/15/12 05:01 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
TJLEE
Member


Reged: 05/26/09
Posts: 96
Loc: Russia
Re: What is unit testing? [Re: dlai]
      #701577 - 03/16/12 03:56 AM

http://en.wikipedia.org/wiki/Unit_testing

--------------------
Regards
Vasily
Blog: http://qaquestions.wordpress.com/

Twitter: http://twitter.com/pythonkaa


Post Extras: Print Post   Remind Me!   Notify Moderator  
NguyenVu
Newbie


Reged: 05/11/12
Posts: 1
Re: What is unit testing? [Re: TJLEE]
      #706665 - 05/11/12 07:26 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
dlai
Junior Member


Reged: 05/02/06
Posts: 1041
Loc: CA, USA
Re: What is unit testing? [Re: NguyenVu]
      #707469 - 05/18/12 03:54 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
rajaasif
Newbie


Reged: 06/20/12
Posts: 1
Re: What is unit testing? [Re: mfsi_sudhansup]
      #710467 - 06/21/12 01:57 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
kshivannarayana
Newbie


Reged: 07/04/12
Posts: 1
Re: What is unit testing? [Re: rajaasif]
      #711443 - 07/04/12 08:43 AM

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

Post Extras: Print Post   Remind Me!   Notify Moderator  
messageinbottle
Newbie


Reged: 06/28/12
Posts: 2
Re: What is unit testing? [Re: kshivannarayana]
      #711467 - 07/04/12 10:13 PM

Hi,

Unit testing is a smallest part of an application or program or modules. developers will do this test..

--------------------
Message in a bottle


Post Extras: Print Post   Remind Me!   Notify Moderator  
myTesting_Bank
Newbie


Reged: 07/18/12
Posts: 18
Loc: Tunisia - France
Re: What is unit testing? [Re: messageinbottle]
      #712423 - 07/18/12 06:21 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 2 anonymous users are browsing this forum.

Moderator:  AJ, Jeanj 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 10986

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5