diff --git a/sample/numb.yaml b/demo/numb.yaml similarity index 100% rename from sample/numb.yaml rename to demo/numb.yaml diff --git a/sample/output.txt b/demo/output.txt similarity index 100% rename from sample/output.txt rename to demo/output.txt diff --git a/sample/test.yaml b/demo/test.yaml similarity index 100% rename from sample/test.yaml rename to demo/test.yaml diff --git a/res/doc/usage.txt b/res/doc/usage.txt index 0661ee493d54fb3e8cdaf1d6cd1486a9b04ff02a..47a5a6c2a5e4adb6b97ec27d55ecd5102843620f 100644 --- a/res/doc/usage.txt +++ b/res/doc/usage.txt @@ -7,6 +7,8 @@ gen 根据定义文件生成数据。 -o -out 指定输出文件 -f format 指定输出格式,支持text、json、xml和sql语句几种格式 -t -table 输出格式为table时,用于指定insert语句的表名 +--verbose 增加此参数,显示详细调试信息。 + 为了方便在任意目录中执行%s命令,建议将其加入环境变量中,具体方法参照以下地址。 https://www.ztesting.net/book/ztf-doc/add-to-path-46.html \ No newline at end of file diff --git a/res/json/case-from-prodoct.json b/res/json/case-from-prodoct.json deleted file mode 100644 index 04aee0cda7721b44855dd5118987a1c453cd984f..0000000000000000000000000000000000000000 --- a/res/json/case-from-prodoct.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "code": 1, - "name": "禅道自动化测试框架产品", - "cases": [ - { - "id": 100, - "title": "测试用例01", - "steps": [ - { - "id": 1000, - "title": "步骤01" - } - ] - }, - { - "id": 200, - "title": "登录失败账号锁定策略", - "steps": [ - { - "id": 2000, - "title": "连续输入3次错误的密码" - }, - { - "id": 2010, - "title": "第4次尝试登录", - "expect": "系统提示账号被锁定", - "isCheckPoint": true - }, - { - "id": 2100, - "title": "不连续输入3次错误的密码", - "isGroup": true, - "steps": [ - { - "id": 2101, - "title": "输入2次错误的密码", - "isGroup": false - }, - { - "id": 2102, - "title": "输入1次正确的密码", - "isGroup": false - }, - { - "id": 2103, - "title": "再输入1次错误的密码", - "isGroup": false - }, - { - "id": 2104, - "title": "再输入1次正确的密码", - "expect": "登录成功,账号未被锁定", - "isCheckPoint": true - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/res/json/success.json b/res/json/success.json deleted file mode 100644 index d554f251b32448b2e927228628860151fab1f552..0000000000000000000000000000000000000000 --- a/res/json/success.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "code": 1 -} \ No newline at end of file diff --git a/res/json/zentao-settings.json b/res/json/zentao-settings.json deleted file mode 100644 index 52e6017e60a4ae377e0e096c066e684fc2f07a19..0000000000000000000000000000000000000000 --- a/res/json/zentao-settings.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "code": 1, - "zentaoSettings": { - "modules": [ - { - "Id": 100, - "Code": "admin", - "Name": "Admin", - "IsDefault": false - }, - { - "Id": 200, - "Code": "client", - "Name": "Client", - "IsDefault": false - }, - { - "Id": 300, - "Code": "interface", - "Name": "Interface", - "IsDefault": false - }, - { - "Id": 400, - "Code": "site", - "Name": "Site", - "IsDefault": false - }, - { - "Id": 500, - "Code": "api", - "Name": "API", - "IsDefault": true - }, - { - "Id": 600, - "Code": "testing", - "Name": "Testing", - "IsDefault": false - } - ], - "categories": [ - { - "Id": 100, - "Code": "admin", - "Name": "Admin", - "IsDefault": false - }, - { - "Id": 200, - "Code": "client", - "Name": "Client", - "IsDefault": false - }, - { - "Id": 300, - "Code": "interface", - "Name": "Interface", - "IsDefault": false - }, - { - "Id": 400, - "Code": "site", - "Name": "Site", - "IsDefault": false - }, - { - "Id": 500, - "Code": "api", - "Name": "API", - "IsDefault": false - }, - { - "Id": 600, - "Code": "testing", - "Name": "Testing", - "IsDefault": false - } - ], - "versions": [ - { - "Id": 100, - "Code": "admin", - "Name": "Admin", - "IsDefault": false - }, - { - "Id": 200, - "Code": "client", - "Name": "Client", - "IsDefault": false - }, - { - "Id": 300, - "Code": "interface", - "Name": "Interface", - "IsDefault": false - }, - { - "Id": 400, - "Code": "site", - "Name": "Site", - "IsDefault": false - }, - { - "Id": 500, - "Code": "api", - "Name": "API", - "IsDefault": false - }, - { - "Id": 600, - "Code": "testing", - "Name": "Testing", - "IsDefault": false - } - ], - "priorities": [ - { - "Id": 100, - "Code": "admin", - "Name": "Admin", - "IsDefault": false - }, - { - "Id": 200, - "Code": "client", - "Name": "Client", - "IsDefault": false - }, - { - "Id": 300, - "Code": "interface", - "Name": "Interface", - "IsDefault": false - }, - { - "Id": 400, - "Code": "site", - "Name": "Site", - "IsDefault": false - }, - { - "Id": 500, - "Code": "api", - "Name": "API", - "IsDefault": false - }, - { - "Id": 600, - "Code": "testing", - "Name": "Testing", - "IsDefault": false - } - ] - } -} \ No newline at end of file diff --git a/res/messages_en.json b/res/messages_en.json index 64ed340cb7c3b1db2c818576c69a8343b1f5922e..1d561e613acb1da5b535e6691f944e24f0f0bcab 100644 --- a/res/messages_en.json +++ b/res/messages_en.json @@ -21,6 +21,64 @@ { "id": "current_config", "translation": "Current config:" + }, + + { + "id": "success_to_read", + "translation": "success to read file %s" + }, + { + "id": "fail_to_read_file", + "translation": "Fail to read file %s." + }, + { + "id": "fail_to_parse_file", + "translation": "Fail to parse the content of file %s." + }, + { + "id": "fail_to_parse_ranges", + "translation": "%s is not ResRanges format, try to parse as ResInsts." + }, + + { + "id": "generate_records", + "translation": "Generate %d records, spend %d secs" + }, + { + "id": "save_testdata", + "translation": "Test data saved to %s" + }, + { + "id": "fail_to_connect_sqlite", + "translation": "fail to open SQLite %s, error: %s" + }, + { + "id": "fail_to_exec_query", + "translation": "fail to exec query %s " + }, + { + "id": "fail_to_parse_row", + "translation": "fail to parse sqlite3 row %s" + }, + { + "id": "fail_to_update_row", + "translation": "fail to insert/update row: " + }, + { + "id": "fail_to_save_excel", + "translation": "fail to save excel: " + }, + { + "id": "fail_to_create_table", + "translation": "fail to create table: " + }, + { + "id": "fail_to_insert_data", + "translation": "fail to insert data: " + }, + { + "id": "file_change_time", + "translation": "file change time is " } ] } \ No newline at end of file diff --git a/res/messages_zh.json b/res/messages_zh.json index ceb0eead3985177f70721b2e47163458691832dc..e206a2cc387d1030154fc8b0a7bcf11b7eff4ab5 100644 --- a/res/messages_zh.json +++ b/res/messages_zh.json @@ -16,6 +16,56 @@ { "id": "current_config", "translation": "当前配置:" + }, + + { + "id": "success_to_read", + "translation": "读取文件%s成功。" + }, + { + "id": "fail_to_read_file", + "translation": "读取文件%s失败。" + }, + { + "id": "fail_to_parse_file", + "translation": "解析文件%s失败。" + }, + { + "id": "fail_to_parse_ranges", + "translation": "%s不是ResRanges格式,尝试解析为ResInsts对象。" + }, + + { + "id": "generate_records", + "translation": "生成%d个记录,耗时%d秒。" + }, + { + "id": "save_testdata", + "translation": "成功保存生成的数据到%s。" + }, + { + "id": "fail_to_connect_sqlite", + "translation": "打开SQLite数据库%s失败,错误:%s。" + }, + { + "id": "fail_to_exec_query", + "translation": "SQLite查询失败,语句:%s,错误:%s。" + }, + { + "id": "fail_to_parse_row", + "translation": "SQLite行解析失败,错误%s。" + }, + { + "id": "fail_to_save_excel", + "translation": "保存Excel失败,错误:%s。" + }, + { + "id": "fail_to_create_table", + "translation": "创建表%s失败,错误:%s。" + }, + { + "id": "file_change_time", + "translation": "文件修改时间为%s。" } ] } \ No newline at end of file diff --git a/res/template/bat.tpl b/res/template/bat.tpl deleted file mode 100644 index 3bb48e575092c2e229f88705da5c7269ee2312ff..0000000000000000000000000000000000000000 --- a/res/template/bat.tpl +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -setlocal enabledelayedexpansion -goto start -[case] - -%s - -[esac] -:start - -%s diff --git a/res/template/lua.tpl b/res/template/lua.tpl deleted file mode 100644 index ad7e57f629192bcde164b44d1c1a15a7a44a7fc5..0000000000000000000000000000000000000000 --- a/res/template/lua.tpl +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env lua ---[[ -[case] - -%s - -[esac] -]] - -%s \ No newline at end of file diff --git a/res/template/perl.tpl b/res/template/perl.tpl deleted file mode 100644 index 11c9ac61c03434ffa485a25f97b1d5a76b412c78..0000000000000000000000000000000000000000 --- a/res/template/perl.tpl +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env perl -=pod -[case] - -%s - -[esac] -=cut - -%s \ No newline at end of file diff --git a/res/template/php.tpl b/res/template/php.tpl deleted file mode 100644 index b6bf97df41e3a2094fca39d80673cf475ba25c01..0000000000000000000000000000000000000000 --- a/res/template/php.tpl +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env php - diff --git a/res/template/python.tpl b/res/template/python.tpl deleted file mode 100644 index 68198c12a9ba01f356e8a970e061fa550e63144b..0000000000000000000000000000000000000000 --- a/res/template/python.tpl +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python -''' -[case] - -%s - -[esac] -''' -%s diff --git a/res/template/ruby.tpl b/res/template/ruby.tpl deleted file mode 100644 index 8f74305ce33e245dab4daefa8f948dffc5d42d0f..0000000000000000000000000000000000000000 --- a/res/template/ruby.tpl +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env ruby -=begin -[case] - -%s - -[esac] -=end - -%s diff --git a/res/template/shell.tpl b/res/template/shell.tpl deleted file mode 100644 index 58bc1ec27463bc34a6d3f26facf9dcd23c26aa0a..0000000000000000000000000000000000000000 --- a/res/template/shell.tpl +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -:<