静态和动态测试的区别
静态测试:
静态测试是一种软件测试方法,用于检查软件中的缺陷,而无需实际执行软件应用程序的代码。
在开发的早期阶段进行静态测试以避免错误,因为它更容易找到故障源并且可以轻松修复。使用动态测试找不到的错误,可以通过静态测试轻松找到。
动态测试:
动态测试是一种软件测试,用于分析代码的动态行为。它包括对分析的输入值和输出值的软件测试。
静态测试和动态测试的区别:
Static Testing | Dynamic Testing |
---|---|
It is performed in the early stage of the software development. | It is performed at the later stage of the software development. |
In static testing whole code is not executed. | In dynamic testing whole code is executed. |
Static testing prevents the defects. | Dynamic testing finds and fixes the defects. |
Static testing is performed before code deployment. | Dynamic testing is performed after code deployment. |
Static testing is less costly. | Dynamic testing is highly costly. |
Static Testing involves checklist for testing process. | Dynamic Testing involves test cases for testing process. |
It includes walkthroughs, code review, inspection etc. | It involves functional and nonfunctional testing. |
It generally takes shorter time. | It usually takes longer time as it involves running several test cases. |
It can discover variety of bugs. | It expose the bugs that are explorable through execution hence discover only limited type of bugs. |
Static Testing may complete 100% statement coverage in comparably less time. | While dynamic testing only achieves less than 50% statement coverage. |
Example:
| Example:
|