Home  >  Article  >  php教程  >  测试驱动开发(TDD)For PHP

测试驱动开发(TDD)For PHP

WBOY
WBOYOriginal
2016-06-06 19:47:38945browse

地址:http://net.tutsplus.com/sessions/test-driven-php/ 此系列文章介绍了测试驱动开发的一些基本概念、自动化测试以及如何在PHP中去进行实践。详细介绍了PHPUnit的用法,以及结合Selenium进行user acceptances tests。另外还介绍了Mockery,并与PHPUnit

地址:http://net.tutsplus.com/sessions/test-driven-php/


此系列文章介绍了测试驱动开发的一些基本概念、自动化测试以及如何在PHP中去进行实践。详细介绍了PHPUnit的用法,以及结合Selenium进行user acceptances tests。另外还介绍了Mockery,并与PHPUnit’s mocking framework进行了横向比较。


花了一段时间看完了这一系列的教程,感觉写测试代码的最大好处一方面是保证代码的可靠性,另一方面就是维护的方便性。试想对于一个大项目,时隔半年或更久需对部分功能进行重构或是bug修复,如何保证重构或修复后整个系统依然是正确无误呢?


人肉?NO!!!这时候以前觉得费时费力写的测试代码就能显现它的威力了,跑一跑测试代码就能一目了然


备注:文章中的视频是放在youtube上的,观看需翻墙。。。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn