What are unit testing and integration testing, and what other types of testing should I know about?

后端 未结 9 2218
感动是毒
感动是毒 2020-12-22 22:42

I\'ve seen other people mention several types of testing on Stack Overflow.

The ones I can recall are unit testing and integration testing. Especially unit testing i

9条回答
  •  鱼传尺愫
    2020-12-22 23:05

    Unit testing is simply the idea of writing (hopefully) small blocks of code to test independent parts of your application.

    For example, you might have a calculator application and you need to make sure the addition function works. To do this you write a separate application that calls the addition function directly. Then your test function will evaluate the result to see if it jives with what you expected.

    It's basically calling your functions with known inputs and verifying the output is exactly what you expected.

提交回复
热议问题