What are the four (4) desirable characteristics of a unit test? - ProProfs Discuss
Advertisement

What are the four (4) desirable characteristics of a unit test?

What are the four (4) desirable characteristics of a unit test?

Change Image    Delete



Asked by JonHope, Last updated: Nov 09, 2024

+ Answer
Request
Question menu
Vote up Vote down

2 Answers

H. callum

H. callum

Extrovert, Psyched all the time.

H. callum
H. callum, Content Writer, BA, Birmingham, Albama

Answered Feb 07, 2019

Unit tests are the best documentation for your code, especially when you're working on a code base written by someone else and you don't know why a method or class has been written or what it's supposed to do. If unit tests are in place, you can refer to them to get all these details. They give the information on how this code is designed to be used.

Unit tests act as a proof to prove that the code that's been written is working correctly. They don't replace acceptance testing but supplement it. Bugs caught earlier are easy to fix and economical to project. Unit tests help reduce the passing of trivial bugs on to final builds or even into the field.

upvote downvote
Reply 

John Smith

John Smith

John Smith
John Smith

Answered Apr 07, 2017

Each test is independent of other unit tests.
The test executes fast.
Each test makes assertions about only one logical concept.
Code in each test is as small as possible.
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.