Is unit testing a generic term? What types are there? And what ways to apply?

Asked

Viewed 349 times

9

Unit testing is a generic term for any test of an independent part of a program? Or is it a exclusive term for object-oriented paradigms, with procedures already known?

Every time I find any post related to unit testing, the vast majority cites terminology already pertaining to the subject (mock, automated tests, etc.). Forms a grid of disciplineOras giving the impression of being a generic term, Oras giving the impression of being a universal good practice the development platform. Other posts well-intentioned in relation to the question, focus on the application of the unit test to a given platform (Shell, Jasmine, etc.). Others still start with a good definition, but end up deviating to practical examples, moving away from the definition that I still do not understand. The result of these readings is usually to have more questions than answers.

What are the main types that exist? And what ways to apply these?

There are two good topics here at Sopt, but that did not satisfy my doubts completely (besides being different questions): What is the difference between unit test and integrated test What are Unit Tests for and what are the advantages?

1 answer

5


Most of what you want to know has already been answered in Tests, TDD, Unit Test, QA and similar. What is the difference between concepts on tests?.

Unit testing is about code quality, serves to improve code robustness, and can be applied to any paradigm.

Object orientation can help a little apply unit tests, but the modular programming also. It has more to do with how to develop than with the specific paradigm.

There are several types of unit tests, there are several techniques to apply it, there are several tools.

What is generic and what is specific depends on the point of view, all terminology can be generic or specific according to how it is used. So the term is generic in one sense and is specific in another.

Read the wikipedia article (in English) To better understand, there are the concepts. My understanding is that people hinder what is easy, often with approach "practices" that do not teach what matters and that will make the person know how, and mainly why use.

The question is generic, to get specific answers, you need specific questions.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.