提交 0c54929d 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

doc

上级 6825e19c
# Default ignored files
/workspace.xml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/go.iml" filepath="$PROJECT_DIR$/.idea/go.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
Version = 1
Language = en
Url =
Account =
Password =
Bat =
Js =
Lua =
Perl =
Php =
Python =
Ruby =
Shell =
Tcl =
......@@ -17,6 +17,6 @@ pid=0
import requests
import re
html = requests.get('http://pms.zentao.net/user-login.html').content #need to install luasocket library, pip install requests
html = requests.get('http://pms.zentao.net/user-login.html').content #need to install requests library, pip install requests
elem = re.search(r"<img src='(.*?)' .*>", html.decode("utf-8")).group(1)
print('>> ' + elem)
......@@ -17,6 +17,6 @@ pid=0
import requests
import json
jsonStr = requests.get('http://pms.zentao.net/?mode=getconfig').content #need to install luasocket library, pip install requests
jsonStr = requests.get('http://pms.zentao.net/?mode=getconfig').content #need to install requests library, pip install requests
jsonObj = json.loads(jsonStr)
print('>> ' + jsonObj['sessionID'])
===start /home/aaron/dev/go/zentaoatf/demo/lang/tcl/1_string_match.tl at 2019-09-26 04:07:16
>> hello
>> 13905120512
>> abc123
===end /home/aaron/dev/go/zentaoatf/demo/lang/tcl/1_string_match.tl at 2019-09-26 04:07:16
===start /home/aaron/dev/go/zentaoatf/demo/lang/tcl/2_webpage_extract.tl at 2019-09-26 04:07:16
>> /theme/default/images/main/zt-logo.png?v=biz3.4
===end /home/aaron/dev/go/zentaoatf/demo/lang/tcl/2_webpage_extract.tl at 2019-09-26 04:07:16
===start /home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl at 2019-09-26 04:07:16
===end /home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl at 2019-09-26 04:07:16
{"Env":"linux","Pass":2,"Fail":1,"Skip":0,"Total":3,"StartTime":1569496036,"EndTime":1569496036,"Duration":0,"Cases":[{"Id":0,"ProductId":0,"Path":"/home/aaron/dev/go/zentaoatf/demo/lang/tcl/1_string_match.tl","Status":"pass","Title":"check string matches pattern","Steps":[{"Id":"1.","Name":"","Status":true,"CheckPoints":[{"Numb":1,"Expect":"hello","Actual":"hello","Status":true}]},{"Id":"2.","Name":"","Status":true,"CheckPoints":[{"Numb":1,"Expect":"1\\d{10}","Actual":"13905120512","Status":true}]},{"Id":"3.","Name":"","Status":true,"CheckPoints":[{"Numb":1,"Expect":"%s%d","Actual":"abc123","Status":true}]}]},{"Id":0,"ProductId":0,"Path":"/home/aaron/dev/go/zentaoatf/demo/lang/tcl/2_webpage_extract.tl","Status":"pass","Title":"extract content from webpage","Steps":[{"Id":"3.","Name":"","Status":true,"CheckPoints":[{"Numb":1,"Expect":".*zt-logo.png","Actual":"/theme/default/images/main/zt-logo.png?v=biz3.4","Status":true}]}]},{"Id":0,"ProductId":0,"Path":"/home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl","Status":"fail","Title":"check remote interface response","Steps":[{"Id":"3.","Name":"","Status":false,"CheckPoints":[{"Numb":1,"Expect":"^[a-z0-9]{26}","Actual":"N/A","Status":false}]}]}]}
\ No newline at end of file
2019-09-26 04:07:16 Found 3 scripts
(1/3) Pass [/home/aaron/dev/go/zentaoatf/demo/lang/tcl/1_string_match.tl ] 0.check string matches pattern (0.00s)
(2/3) Pass [/home/aaron/dev/go/zentaoatf/demo/lang/tcl/2_webpage_extract.tl ] 0.extract content from webpage (0.00s)
(3/3) Fail [/home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl] 0.check remote interface response (0.00s)
Failed Scripts:
[/home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl] 0.check remote interface response
Step 3. Fail
[Expect] ^[a-z0-9]{26}
[Actual] N/A
2019-09-26 04:07:16 Run scripts 3 scripts in 0 secs, 2(66.0%) Pass, 1(33.0%) Fail, 0(0.0%) Skip. Report /home/aaron/dev/go/zentaoatf/result.txt
===start /home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl at 2019-09-26 04:07:22
===end /home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl at 2019-09-26 04:07:22
{"Env":"linux","Pass":0,"Fail":1,"Skip":0,"Total":1,"StartTime":1569496042,"EndTime":1569496042,"Duration":0,"Cases":[{"Id":0,"ProductId":0,"Path":"/home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl","Status":"fail","Title":"check remote interface response","Steps":[{"Id":"3.","Name":"","Status":false,"CheckPoints":[{"Numb":1,"Expect":"^[a-z0-9]{26}","Actual":"N/A","Status":false}]}]}]}
\ No newline at end of file
2019-09-26 04:07:22 Found 1 scripts
(1/1) Fail [/home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl] 0.check remote interface response (0.00s)
Failed Scripts:
[/home/aaron/dev/go/zentaoatf/demo/lang/tcl/3_http_inteface_call.tl] 0.check remote interface response
Step 3. Fail
[Expect] ^[a-z0-9]{26}
[Actual] N/A
2019-09-26 04:07:22 Run scripts 1 scripts in 0 secs, 0(0.0%) Pass, 1(100.0%) Fail, 0(0.0%) Skip. Report /home/aaron/dev/go/zentaoatf/result.txt
......@@ -17,4 +17,5 @@ zip -r ztf/ztf-linux-2.0.beta1.zip ztf/ztf-linux ztf/demo ztf/conf ztf/log
zip -r ztf/ztf-mac-2.0.beta1.zip ztf/ztf-mac ztf/demo ztf/conf ztf/log
error_log(json_encode($_POST, JSON_FORCE_OBJECT));
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
\ No newline at end of file
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册