From 7596ff56890dc664f7a0403c0079c65bb29451ff Mon Sep 17 00:00:00 2001 From: Aries Hc Date: Thu, 15 Nov 2018 20:26:16 +0800 Subject: [PATCH 1/2] Update test-functional.md --- docs/guide-zh-CN/test-functional.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/guide-zh-CN/test-functional.md b/docs/guide-zh-CN/test-functional.md index 193966c23c..719a67b75a 100644 --- a/docs/guide-zh-CN/test-functional.md +++ b/docs/guide-zh-CN/test-functional.md @@ -1,22 +1,22 @@ 功能测试 ================ -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. +功能测试从用户的角度验证场景。 它类似于[acceptance test](测试-验收.md)。 但是它不是通过HTTP进行通信, 而是填充环境, 如POST和GET参数, 然后直接从代码中执行应用程序实例。 -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: -- [Codeception for Yii framework](http://codeception.com/for/yii) -- [Codeception Functional Tests](http://codeception.com/docs/04-FunctionalTests) +功能测试通常比验收测试快, 并且在失败时提供详细的堆栈跟踪。 作为经验法则, 除非有专门的 Web 服务器设置或者 JavaScript 驱动的复杂 UI, 否则它们应该是首选的。 -## 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). +功能测试是借助于具有良好文档的 Codeception 框架来实现的: + +- [基于YII框架的 Codeception](http://codeception.com/for/yii) +- [Codeception 的功能测试](http://codeception.com/docs/04-FunctionalTests) + +## 运行基本的和高级的模板测试 + +如果你已经开始使用高级模板, 请参阅["testing" 指南](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-testing.md) +有关运行测试的更多细节。 + +如果你已经开始使用基本模板, 请检查其 [README "testing" 部分](https://github.com/yiisoft/yii2-app-basic/blob/master/README.md#testing). From b37ac21111f05e05874de76ea93d92c2c3d63b64 Mon Sep 17 00:00:00 2001 From: deepziyu Date: Fri, 16 Nov 2018 20:41:54 +0800 Subject: [PATCH 2/2] Update test-functional.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix 行数对齐 --- docs/guide-zh-CN/test-functional.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/guide-zh-CN/test-functional.md b/docs/guide-zh-CN/test-functional.md index 719a67b75a..a0b7e638e2 100644 --- a/docs/guide-zh-CN/test-functional.md +++ b/docs/guide-zh-CN/test-functional.md @@ -1,22 +1,22 @@ 功能测试 ================ -功能测试从用户的角度验证场景。 它类似于[acceptance test](测试-验收.md)。 但是它不是通过HTTP进行通信, 而是填充环境, 如POST和GET参数, 然后直接从代码中执行应用程序实例。 - - - -功能测试通常比验收测试快, 并且在失败时提供详细的堆栈跟踪。 作为经验法则, 除非有专门的 Web 服务器设置或者 JavaScript 驱动的复杂 UI, 否则它们应该是首选的。 - +功能测试从用户的角度验证场景。它类似于[验收测试](test-acceptance.md)。 +但是它不是通过 HTTP 进行通信,而是填充环境,如(填充)POST 和 GET 参数, +然后直接在代码里执行 Application 实例。 +功能测试通常比验收测试快,并且在失败时提供详细的堆栈跟踪。 +根据老司机的经验,功能测试应该是首选的,除非有专门的 Web 服务器设置 +或者由 JavaScript 构建的复杂 UI。 功能测试是借助于具有良好文档的 Codeception 框架来实现的: -- [基于YII框架的 Codeception](http://codeception.com/for/yii) +- [Codeception for Yii framework](http://codeception.com/for/yii) - [Codeception 的功能测试](http://codeception.com/docs/04-FunctionalTests) -## 运行基本的和高级的模板测试 +## 运行基本模板和高级模板的测试 -如果你已经开始使用高级模板, 请参阅["testing" 指南](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-testing.md) -有关运行测试的更多细节。 +如果你使用的是高级模板,请参阅[测试指南](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-testing.md) +中关于运行测试的更多细节。 -如果你已经开始使用基本模板, 请检查其 [README "testing" 部分](https://github.com/yiisoft/yii2-app-basic/blob/master/README.md#testing). +如果你使用的是基本模板,请检查其 [README "testing" 部分](https://github.com/yiisoft/yii2-app-basic/blob/master/README.md#testing)。