BDD 被吹捧为“TDD 做对了”。
然而,TDD 广泛用于单元测试,而不是端到端集成测试。
哪种测试最适合 BDD?
最佳答案
Which kind of test (integration tests, unit tests) is most appropriate for BDD?
如 Behavior-Driven Development with SpecFlow and WatiN 中所述,我将在两个嵌套循环中使用两者
* writing a failing integration tests
* writing a failing unit test as part of the solution of the integration test
* making the unittest pass
* refactor
* writing the next failing unit test as part of the integration test
* unitl the integration test passes
* writing the next failing integration tests
关于unit-testing - BDD 是否应该通过单元测试、集成测试或两者都自动化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5957847/