How do you write unit test cases ?

Answers were Sorted based on User's Feedback



How do you write unit test cases ?..

Answer / mms zubeir

Both the above answers are wrong.

Unit test cases are normally not written after coding but
they are written before coding.

So, break up the functionality into smallest pieces like
each broken piece of functionality can accept an input
criteria as well as output criteria.

Is This Answer Correct ?    75 Yes 9 No

How do you write unit test cases ?..

Answer / naveen verma

First approach must be to break your code. Write the
testcase with wrost condition first and best condition later.

Is This Answer Correct ?    40 Yes 7 No

How do you write unit test cases ?..

Answer / kns

Test cases are normally written on a basis of your low level
design document say SDD.SDDis the correct document that
covers the complete flow of your project which is based on
your requirement doc.SDD also covers the complete
requirement along with the sudo code in it ,SDD also covers
the functionality ,so for creating your test case keep SDD
in front ,it will also help you to trace the requirement
back(tracebility metrics).So fetcch the correct requirement
from the sdd , break it and write every case for that break
requirement.

Is This Answer Correct ?    9 Yes 2 No

How do you write unit test cases ?..

Answer / solomon blessing

Mostly Unit testcases are written by developers and not by
testers. If a tester has to write a unit testcase
Eg: For Username field should contain only 15 charac

TestId :1 Description :Verify whether the Username field
accepts 15 charachters Steps : 1.Click the URL 2.Give
positive and negative input values Expected
Result:The username field should contain 15 characters only

Is This Answer Correct ?    7 Yes 0 No

How do you write unit test cases ?..

Answer / imran

Test Case describes exactly how the test should be carried
out.
1. Input the data for a field.
2. what should be expected result.
3. what is the actual result.
4. whether the test case is pass or fail.

and if there is any comments or note needed, then put the
comments about the functionality.

Is This Answer Correct ?    7 Yes 2 No

How do you write unit test cases ?..

Answer / krishnamoorthy

i am write test very well and don't copy from other
whatever you know write the test.

Is This Answer Correct ?    11 Yes 28 No

Post New Answer

More Project Planning Interview Questions

How do you handle change requests ?

4 Answers   Microsoft, Trigent,


can any body help me to know the procedure followed by programmer/developer inorder to develop a project. what are the steps, how he/she get the SRS,technical document??how does he submit his wotk to TL/PM/Business Analyst?? How does these documents review?? how the developer starts coding? how does he deploy his coding in server? in which server he will deploy?? what are the important document a developer should have??? Pls give me a real time scenario of development process, how it is going on in a company???? Thanks in advance

1 Answers  


What is the project management structure in your project? Is a PL assigned to the project?

0 Answers   ABC,


Where and how are the risks associated with your project identified and documented?

2 Answers  


When you come in to the office, how do you know what you have to do during the day?

0 Answers   ABC,






What procedures do you follow to arrive at the project schedule?

3 Answers  


How do you create the Software Project Management Plan (SPMP)?

0 Answers   IBM,


How do speedup the project delivery without affecting the cost?

6 Answers   emc2, HCL,


How do the audits cover planning activities?

3 Answers   Microsoft,


How do you estimate the effort for your project? Where is the estimation procedure documented?

4 Answers  


Does XML has white spaces?

1 Answers  


What are the two data table in Microsoft Project 2007?

1 Answers  


Categories