Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
84eb4fe7
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
11 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
84eb4fe7
编写于
7月 18, 2019
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use yaml to save properties like language etc.
上级
e2af7326
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
42 addition
and
40 deletion
+42
-40
conf.yaml
conf.yaml
+1
-0
config.yaml
config.yaml
+0
-1
src/config/config.go
src/config/config.go
+2
-4
src/config/constant.go
src/config/constant.go
+1
-1
xdoc/script-template-sample.txt
xdoc/script-template-sample.txt
+0
-31
xdoc/script-template-yaml.txt
xdoc/script-template-yaml.txt
+35
-0
xdoc/scripts/tc-100.php
xdoc/scripts/tc-100.php
+3
-3
未找到文件。
conf.yaml
0 → 100644
浏览文件 @
84eb4fe7
language
:
en
config.yaml
已删除
100644 → 0
浏览文件 @
e2af7326
language
:
zh
src/config/config.go
浏览文件 @
84eb4fe7
...
...
@@ -25,9 +25,7 @@ func GetInst() Config {
}
func
InitConfig
()
{
config
:=
Config
{}
buf
,
_
:=
ioutil
.
ReadFile
(
"config.yaml"
)
yaml
.
Unmarshal
(
buf
,
&
config
)
config
:=
GetInst
()
fmt
.
Println
(
color
.
BlueString
(
"current config %+v"
,
config
))
...
...
@@ -36,7 +34,7 @@ func InitConfig() {
}
func
Set
(
param
string
,
val
string
)
{
buf
,
_
:=
ioutil
.
ReadFile
(
"config.yaml"
)
buf
,
_
:=
ioutil
.
ReadFile
(
ConfigFile
)
yaml
.
Unmarshal
(
buf
,
&
config
)
if
param
==
"lang"
{
...
...
src/config/constant.go
浏览文件 @
84eb4fe7
...
...
@@ -7,5 +7,5 @@ const (
LanguageEN
=
"en"
LanguageZH
=
"zh"
ConfigFile
=
"conf
ig
.yaml"
ConfigFile
=
"conf.yaml"
)
xdoc/script-template-sample.txt
已删除
100644 → 0
浏览文件 @
e2af7326
<?%s
<<<TC
title: with multi lines.
caseId: %d
steps:
@group1:
step1.1
step1.2
step1.3
@step2
step3
@step4
expects:
#
expect line1 point 1
expect line2 point 1
#
expect for point 2
#
expect for point 3
TC;
echo '#';
scriptsForPoint1();
echo '#';
scriptsForPoint2();
echo '#';
scriptsForPoint3();
?>
xdoc/script-template-yaml.txt
0 → 100644
浏览文件 @
84eb4fe7
<?%s
<<<TC
caseId: 100
title: 用户登录
steps:
-
id: step1000 # 可省略
name: 打开登录页面
-
id: step1010
name: 输入正确的用户名和密码
-
id: step1020
name: 点击'登录'按钮
checkpoint: true
expects:
-
stepId: step1020 # 可省略,数量和steps中对应上即可
expect: # @step1020期望结果, 可以有多行
readme:
- 脚本输出日志和expects章节中,#号标注的验证点需保持一致对应
- 脚本中/* */标注的需用代码替换,//注解的为说明文字
- 参考样例https://github.com/easysoft/zentaoatf/tree/master/xdoc/sample
TC;
echo '#';
scriptsForPoint1();
echo '#';
scriptsForPoint2();
echo '#';
scriptsForPoint3();
?>
xdoc/scripts/tc-100.php
浏览文件 @
84eb4fe7
...
...
@@ -3,9 +3,9 @@
caseId: 100
title: 用户登录
steps: @开头的为含验证点的步骤
step
1000 打开登录页面
step
1010 输入正确的用户名和密码
@
step
1020 点击'登录'按钮
1000 打开登录页面
1010 输入正确的用户名和密码
@1020 点击'登录'按钮
expects:
#
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录