软件工程 - Test-Driven Development (TDD),测试驱动开发

参考

  1. https://baike.baidu.com/item/测试驱动开发/3328831?fr=aladdin
  2. https://en.wikipedia.org/wiki/Test-driven_development
  3. https://github.com/mjhea0/flaskr-tdd

总结

先写测试,然后写程序pass掉测试,that is 测试驱动开发。


TDD usually follows the "Red-Green-Refactor" cycle, as shown in the image above:

  1. Write a test
  2. Run the test (it should fail)
  3. Write just enough code for the test to pass
  4. Refactor code and retest, again and again (if necessary)
posted @ 2018-06-21 22:52  Rocin  阅读(361)  评论(0)    收藏  举报