Print Page | Close Window

Better Understanding of unit testing...

Printed From: One Stop Testing
Category: Types Of Software Testing @ OneStopTesting
Forum Name: Unit Testing @ OneStopTesting
Forum Discription: Discuss All that is need to be known about Unit Software Testing and its Tools.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=4783
Printed Date: 18Dec2024 at 12:11pm


Topic: Better Understanding of unit testing...
Posted By: tanushree
Subject: Better Understanding of unit testing...
Date Posted: 25Feb2008 at 4:06am
Unit Testing:

Unit testing consists of running the test functions, procedures and methods that reside in the application under test. A “unit” may be anything from a single function to an entire library. TestComplete provides special features that let you access these test functions and includes support for JUnit, NUnit, MSTest and DUnit tests.

Unit testing consists of testing the functions, procedures or methods that a source module makes available to the rest of the application. A “unit” may be anything from a single function to an entire library. The essential point of unit testing is that only a small part of the application is tested.

Usually, the easiest way to do this is to write a small application, called a “driver” or “test harness”, that exercises these exposed functions and reports the results. The driver or harness is normally written with the same development tool as the unit under test. The test harness must have the same access to the unit programming interface (for example, header in C++, Interface part in Delphi) as all of the other units in the final application.

At a minimum, any automated testing tool should provide a way to --

Run the unit testing harness and feed input values to it.
Obtain results from the unit testing harness.
Compare the results against stored values.

TestComplete does all of these conveniently. The Stores function keeps most forms of output as standards for later comparison, which you can accomplish using TestComplete’s built-in methods.

The fact that TestComplete can access internal objects, methods and properties of the application under test, gives you the ability to put the test harness methods in TestComplete scripts, or in the tested application itself. In order for TestComplete to access internal objects, methods and properties of an application, this application must be compiled as an Open Application. Also, there are some language-specific requirements that your application's methods and properties must meet if you want to access them from the TestComplete unit testing code.

TestComplete supports MSTest, JUnit, NUnit, DUnit and TCUnitTest unit test types.

TCUnitTest tests are unit tests that are performed by TestComplete itself (to learn how TestComplete can access the testing application’s internals, see above). Once you have specified the application to be tested, you can visually configure which methods you want to call and in which order to call them.

MSTest, JUnit, NUnit and DUnit tests are performed by the corresponding unit testing tool (MSTest, JUnit, NUnit or DUnit), not by TestComplete. TestComplete lets you visually customize which tests to run and with which parameters. TestComplete projects let you coordinate all of your test types with one interface.





Replies:
Posted By: cprasenjit26
Date Posted: 23Jul2009 at 5:25am

Unit Testing very well explained by you.

-------------------------------------------
http://softwareqatestings.com - Software Testing



Print Page | Close Window