Unit test is a generic term? What types are there? And what ways to apply?

8

Unit test 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?

Whenever I find any post related to unit testing, the vast majority quotes terminology already pertaining to the subject (mock, automated tests, etc.). It forms a discipline grid giving the impression of being a generic term, sometimes giving the impression of being a universal good practice platform for development. Other well-intentioned posts 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 they end up diverting to practical examples, moving away from the definition that I have not yet understood. 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 in SOpt, but that did not completely satisfy my doubts (apart from being different questions): What is the difference between unit test and integrated test What are Unit Tests used for? advantages?

    
asked by anonymous 29.08.2017 / 18:24

1 answer

4

Most of what you want to know has already been answered in Tests, TDD, Unit Test, QA, and the like. What's different about test concepts? .

Unit testing has to do with code quality, serves to improve its robustness, and can be applied to any paradigm.

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

You do not exist 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 specific in another.

Read the Wikipedia article ( in English ) to understand better., There are the concepts. My understanding is that people make it difficult to do what is easy, often approaching "practices" that do not teach what matters and what will make the person know how, and mainly, why to use.

The question is generic, for specific answers, you need specific questions.

    
29.08.2017 / 18:50