goc/tests/README.md

30 lines
776 B
Markdown
Raw Normal View History

2021-07-22 15:02:27 +00:00
# How to run e2e test
## 如何运行集成测试
2021-07-23 03:17:53 +00:00
首先编译 goc并加入 `PATH`
2021-07-22 15:02:27 +00:00
```
2021-07-23 03:17:53 +00:00
make install
2021-07-22 15:02:27 +00:00
make e2e
```
## 如何添加 sample
为了不让 case 之间执行时互相干扰,集测设计了 samples 管理系统。
`tests/e2e/samples` 目录中,按如下格式在 `meta.yaml` 中添加 sample 的元信息:
```yaml
samples:
basic:
dir: basic-project
description: a basic project only print hello world
gomod:
dir: invalidmod-project
description: a project which contains invalid go.mod
```
其中 basic 是键值dir 是目录名description 你可以添加一些说明,让大家一目了然这个 sample 的特点。
然后就按照 `meta.yaml` 填写的信息在 samples 目录内添加相应的工程目录即可。