介绍(Introduction) 入门(Getting Started) 应用结构(Application Structure) 请求处理(Handling Requests) 关键概念(Key Concepts) 配合数据库工作(Working with Databases) 接收用户数据(Getting Data from Users) 显示数据(Displaying Data) 安全(Security) 缓存(Caching) RESTful Web 服务(RESTful Web Services) 开发工具(Development Tools) 测试(Testing) 高级专题(Special Topics) 小部件(Widgets) 助手类(Helpers)

功能测试

社区推荐:掘金是一个面向程序员的技术社区,从后端到架构,从 PHP 最佳实践到一线大厂经验分享,无论入门还是进阶,来掘金你不会错过后端开发的任何一个技术干货。

Functional test verifies scenarios from a user's perspective. It is similar to acceptance test but instead of communicating via HTTP it is filling up environment such as POST and GET parameters and then executes application instance right from the code.

Functional tests are generally faster than acceptance tests and are providing detailed stack traces on failures. As a rule of thumb, they should be preferred unless you have a special web server setup or complex UI powered by JavaScript.

Functional testing is implemented with the help of Codeception framework which has a nice documentation about it:

Running basic and advanced template tests

If you've started with advanced template, please refer to "testing" guide for more details about running tests.

If you've started with basic template, check its README "testing" section.

TPshop
发现错别字或您认为此页面需要改进?
点此进入 Github 编辑