Unit test preparation: what is important to keep in mind when working on software architecture?

Let's say I'm starting a new project, quality is the top priority.

I plan to conduct extensive unit testing, what is important to remember when I work on architecture in order to facilitate and expand the capabilities of unit testing?

edit . I read the article several times ago (I cannot find it now), talking about how to decouple the instantiation code from the behavior of classes can be useful in unit testing. These are the design tips I'm looking for here.

+3
source share
5 answers

, , (, ..). , : " , . , " , ".

, , . , , , , API- , , .. , , . , , , , .

, . "" , , , . .

, . , . Flintstones.Wilma.addChild(); , "", "" "".

+3

, , , . , , .

SOLID, .

+1
+1

:

  • : , . - "" . , , , , , .

  • , , . "" , , , ... . (: , , , ..)

  • : , , .

  • , , , . , , . , , !

  • , , ; , , ! , , , . .

!

+1

Your tests will always be as good as your requirements. These may be requirements that you come up with right away, they may be requirements that you come up with one at a time when adding functions, or they may be requirements that arise when sending, and people start telling the boat about loading errors, but you cannot write a good test if no one can or will not accurately document what a thing should do.

0
source

Source: https://habr.com/ru/post/1730303/


All Articles