File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1- == 测试套件结构
2-
3- // 翻译中。。。。(yuansheng)
4-
5- 使用 `Test::Nginx` 驱动我们的测试套件,通常会用一个公共的目录结构以及规范的测试文件名样式,用来组织我们的测试集合。
6- 这些会让用户更容易明白,这些测试用例在项目源码中的目录关系,以及测试用例的使用情况。
7- 它不是必须的,然而,按照这种常见惯例组织,还是非常推荐的。
1+ == Test Suite Layout
82
93Projects using `Test::Nginx` to drive their test suites usually have a
104common directory layout and common test file name patterns to organize
@@ -13,10 +7,6 @@ to reason about the location of the test suite in a project source tree
137and the usage of the tests. It is not really required, however, to use
148this common convention; it is just highly recommended.
159
16- 按照惯例,这些项目在当前源码的根目录下,有个 `t/` 目录用来存放测试文件。
17- 每个测试文件包含一些具有相同属性或关联度的测试用例,保存在扩展名为 `.t` 的文件中,可以很容易的表明它们自身是 “测试文件”。
18- 下面的目录树结构,是真实项目 link:https://github.com/openresty/headers-more-nginx-module[headers-more-nginx-module] 的测试套件:
19-
2010By convention, such projects have a `t/` directory at the root of their
2111source tree where test files reside in. Each test file contains test cases
2212that are closely related in some way and has the file extension `.t` to
@@ -41,7 +31,6 @@ project:
4131 └── vars.t
4232....
4333
44-
4534When you have many test files, you can also group them further with sub-directories
4635under `t/` . For example, in the link:https://github.com/openresty/lua-nginx-module[lua-nginx-module]
4736project, we have sub-directores like `023-rewrite/` and `024-access/` under
Original file line number Diff line number Diff line change 1- == Test Suite Layout
1+ == 测试套件结构
2+
3+ // 翻译中。。。。(yuansheng)
4+
5+ 使用 `Test::Nginx` 驱动我们的测试套件,通常会用一个公共的目录结构以及规范的测试文件名样式,用来组织我们的测试集合。
6+ 这些会让用户更容易明白,这些测试用例在项目源码中的目录关系,以及测试用例的使用情况。
7+ 它不是必须的,然而,按照这种常见惯例组织,还是非常推荐的。
28
39Projects using `Test::Nginx` to drive their test suites usually have a
410common directory layout and common test file name patterns to organize
@@ -7,6 +13,10 @@ to reason about the location of the test suite in a project source tree
713and the usage of the tests. It is not really required, however, to use
814this common convention; it is just highly recommended.
915
16+ 按照惯例,这些项目在当前源码的根目录下,有个 `t/` 目录用来存放测试文件。
17+ 每个测试文件包含一些具有相同属性或关联度的测试用例,保存在扩展名为 `.t` 的文件中,可以很容易的表明它们自身是 “测试文件”。
18+ 下面的目录树结构,是真实项目 link:https://github.com/openresty/headers-more-nginx-module[headers-more-nginx-module] 的测试套件:
19+
1020By convention, such projects have a `t/` directory at the root of their
1121source tree where test files reside in. Each test file contains test cases
1222that are closely related in some way and has the file extension `.t` to
@@ -31,6 +41,7 @@ project:
3141 └── vars.t
3242....
3343
44+
3445When you have many test files, you can also group them further with sub-directories
3546under `t/` . For example, in the link:https://github.com/openresty/lua-nginx-module[lua-nginx-module]
3647project, we have sub-directores like `023-rewrite/` and `024-access/` under
You can’t perform that action at this time.
0 commit comments