What I understood is -
Unit Testing is testing of the module by developer, I think dev can do it by any method, by checking functions/ constructors/loops etc.
Whitebox testing includes testing through API's (routines) by writing wrappers, if API's are disclosed to testing team.
And if code is open for testers then may be like dev tester can also do testing for Branches/Statements
--mrinalini
-------------------------------------------------------
Unit testing is done by Developer to test the concern module (unit code) developed by him using some test code (its very simple).
He usually check for any real time User Scenario, which area of code in the product is getting executed mostly (like conditional loop since mostly in loops happy path is
consider by developer while development so there were max possibility of exception raising). There are always some area in the product which get executed minimally in real time.
So by White Box Testing we make sure that the code which is getting executed mostly is under good performance & all the boundary value, exception are working as expected.
-amit
-------------------------------------------------------
Here is formal definition for both terminologies:
White box testing
Main article: White box testing
White box testing is when the tester has access to the internal data structures and algorithms including the code that implement these.
Types of white box testing
The following types of white box testing exist:
- API testing (application programming interface) - testing of the application using public and private APIs
- Code coverage - creating tests to satisfy some criteria of code coverage (e.g., the test designer can create tests to cause all statements in the program to be executed at least once)
- Fault injection methods - improving the coverage of a test by introducing faults to test code paths
- Mutation testing methods
- Static testing - White box testing includes all static testing
Test coverage
White box testing methods can also be used to evaluate the completeness of a test suite that was created with black box testing methods. This allows the software team to examine parts of a system that are rarely tested and ensures that the most important function points have been tested.[21]
Two common forms of code coverage are:
- Function coverage, which reports on functions executed
- Statement coverage, which reports on the number of lines executed to complete the test
They both return a code coverage metric, measured as a percentage.
Testing levels
Tests are frequently grouped by where they are added in the software development process, or by the level of specificity of the test.
[edit]Unit testing
Main article: Unit testing
Unit testing refers to tests that verify the functionality of a specific section of code, usually at the function level. In an object-oriented environment, this is usually at the class level, and the minimal unit tests include the constructors and destructors.[25]
These type of tests are usually written by developers as they work on code (white-box style), to ensure that the specific function is working as expected. One function might have multiple tests, to catch corner cases or other branches in the code. Unit testing alone cannot verify the functionality of a piece of software, but rather is used to assure that the building blocks the software uses work independently of each other.
Unit testing is also called component testing.
Above definition source: http://en.wikipedia.org/wiki/Software_testing
Chaitanya Hasabnis
-------------------------------------------------------
I believe, Unit testing is done by developer to verify that the module which he developed is working correctly in the application. And whitebox tester tests whole application which covers code coverage, functions etc…
Vishal Shinkar
-------------------------------------------------------
I would say …
Unit test cases are created by dev team which is having ‘Constructive’ type of view….Varification
White box testes created by a Tester which has ‘Destructive’ type of view….Validation
Adding Vijay …..
Regards,
Aabha Choudhari,-------------------------------------------------------
Unit testing is done by Dev and Whitebox by Testers..
Didn't get satisfactory answer till now.
By Mrinalini
Test Comment
ReplyDeleteWhite-box testing is a verification technique software engineers can use to examine if their code works as expected. White-box testing is testing that takes into account the internal mechanism of a system orcomponent. White-box testing is also known as structural testing, clear box testing, and glass box testing. The connotations of “clear box” and “glass box” appropriately indicate that you have full visibility of the internal workings of the software product, specifically, the logic and the structure of the code.
ReplyDeleteWith white-box testing, you must run the code with predetermined input and check to make sure that the code produces predetermined outputs. Often programmers write stubs and drivers for white-box testing. Basically White box testing includes:
1) White-Box Testing by Stubs and Drivers
2) Deriving Test Cases
3) Basis Path Testing
4) Data Flow Testing
5) Failure (“Dirty”) Test Cases
6) Flow Graphs Revisited
Unit testing, which is testing of individual hardware or software units or groups of related units. A unit is a software component that cannot be subdivided into other components. dev write white-box test cases to examine whether the unit is coded correctly. Unit testing is important for ensuring the code is solid before it is integrated with other code. Once the code is integrated into the code base, the cause of an observed failure is more difficult to find. Also, since the dev writes and runs unit tests him or herself, companies often do not track the unit test failures that are observed– making these types of defects the most private” to the software engineer. We all prefer to find our own mistakes and to have the opportunity to fix them without others knowing.