From d2410c2d1ce9567afef3610fb8eab7bf08c25d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E4=BA=AE?= Date: Thu, 15 Nov 2018 12:47:55 +0800 Subject: [PATCH] Update test-functional.md --- docs/guide-zh-CN/test-functional.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/guide-zh-CN/test-functional.md b/docs/guide-zh-CN/test-functional.md index 047bc252ab..193966c23c 100644 --- a/docs/guide-zh-CN/test-functional.md +++ b/docs/guide-zh-CN/test-functional.md @@ -1,11 +1,22 @@ 功能测试 ================ -> Note: 这部分正在开发中。 +Functional test verifies scenarios from a user's perspective. It is similar to [acceptance test](test-acceptance.md) +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. -- http://codeception.com/docs/05-FunctionalTests +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: -请参阅 `apps/advanced/tests/README.md` 和 `apps/basic/tests/README.md` 提供的说明。 +- [Codeception for Yii framework](http://codeception.com/for/yii) +- [Codeception Functional Tests](http://codeception.com/docs/04-FunctionalTests) + +## Running basic and advanced template tests + +If you've started with advanced template, please refer to ["testing" guide](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-testing.md) +for more details about running tests. + +If you've started with basic template, check its [README "testing" section](https://github.com/yiisoft/yii2-app-basic/blob/master/README.md#testing).