Unit Testing Interview Questions and Answers

Unit Testing Interview Questions and Answers
1)What is Unit Testing?
A.Testing of individual component of software.
2)At what phase of SDLC, Unit Testing Starts?
A.Unit testing starts with coding phase simultaneously after design phase.
Actually, Unit testing is performed by Developers. And it is done, once they are done with the completion of their code development. Like whenever code is done for a module or a project the unit testing starts, even you can do unit testing of a page also.
3)How you prepare Test data in unit testing process???
A.Preparing proper test data is a core part of any testing process. a developer or tester can develop a test data as per project requirement. Either it can be a production data or any dummy data. It is responsibility of a tester or developer to prepare good data for unit testing process. Tester should create his/her own test data additional to the existing standard production data. Your test data set should be ideal in terms of cost and time. Design our test data considering following categories:
Test data set examples:
1)No data: Run your unit test on blank or default data. and check if proper error messages are generated.
2)Valid data set: Create it to check if application is
functioning as per requirements and a valid input data is
properly saved in database or files with out any error.
3)Invalid data set: Prepare invalid data set to check
application behavior for negative values, alphanumeric
string inputs (Negative unit testing).
4)Illegal data format: Make one data set of illegal data
format. System should not accept data in invalid or illegal
format. Also check proper error messages are generated.
5)Boundary Condition data set: Check Data if it is out of range. Identify application boundary cases and prepare
data set that will cover lower as well as upper boundary
conditions.
6)Data set for performance, load and stress testing: This
data set should be large in volume.
This way creating separate data sets for each test
condition will ensure complete test coverage.

No comments:

 
Top Blogs