小黑小波比.nodejs功能测试

zmzp@zmzp1:~/data/s910$ node single --test
Default Log Start...
x86 don't support memwatch
test> 
可使用下列命令:
	@login app.task.action a:b ;功能调用测试
	@api.app.task.action a=b   ;功能调用测试
	unit <times>               ;为一个目录进行测试
	unit <times>.<testfile>    ;为一个文件进行单元测试
	jshint api                 ;为API目录检测js代码质量
	jshint app                 ;为APP目录检测js代码质量
test> @api.admin.passwordrecover.tel tel=22222
查到了!
===ERROR:2014-9-9T21:10:4星期二 
uncaught_exception:ReferenceError: alert is not defined
    at _.sql.query.success.failure.e.result.status (/home/zmzp/data/s910/app/admin/passwordrecover.js:55:5)
    at Object.callback.success (/home/zmzp/data/s910/Server/core/core.js:154:5)
    at Object.callback.success (/home/zmzp/data/s910/api/common/biz.js:133:9)
    at null.callback (/home/zmzp/data/s910/api/common/biz.js:258:14)
    at Query.handleReadyForQuery (/home/zmzp/data/s910/Server/node_modules/pg/lib/query.js:82:10)
    at null.<anonymous> (/home/zmzp/data/s910/Server/node_modules/pg/lib/client.js:159:19)
    at emit (events.js:117:20)
    at Socket.<anonymous> (/home/zmzp/data/s910/Server/node_modules/pg/lib/connection.js:109:12)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:764:14)
=========

===OUTPUT:2014-9-9T21:10:4星期二 
test worker will exit...
=========

===OUTPUT:2014-9-9T21:10:5星期二 
test worker exit...
=========

===OUTPUT:2014-9-9T21:10:5星期二 
test request total : 0
=========

zmzp@zmzp1:~/data/s910$ node single --test
Default Log Start...
x86 don't support memwatch
test> @api.admin.passwordrecover.tel tel=22222
查到了!
226789
{"status":1}
time:43ms ops:23.25581395348837
test> @api.admin.passwordrecover.tel tel=22222
[]
724835
{"status":1}
time:29ms ops:34.48275862068966
test> @api.admin.passwordrecover.tel tel=123
[ { ucode: '00259ccde0-257b-4fb9-a341-5ef5c2642cad',
    email: null,
    telphone: '123',
    uname: '123',
    usex: null,
    utype: 1,
    upassword: 'PK/kD5K+asd9J5K0smfC2hHj8wh7k7sZxsUTN4aYS0Q=',
    ucreate: '463205279467',
    status: 1 } ]
474602
{"status":1}
time:31ms ops:32.25806451612903
test>
</pre><pre name="code" class="plain">
zmzp@zmzp1:~/data/s910$ node single -test
Default Log Start...
x86 don't support memwatch
test> @api.admin.passwordrecover.code StuPhone=15198943477 ValidateCode=123
成功![object Object]
{"status":1}
time:58ms ops:17.24137931034483
test> @api.admin.passwordrecover.code StuPhone=15198943477 ValidateCode=123
1
成功![object Object]
{"status":1}
time:15ms ops:66.66666666666667
test> @api.admin.passwordrecover.code StuPhone=15198943477 ValidateCode=asdbcxzcv
1
成功![object Object]
{"status":1}
time:32ms ops:31.25
test> @api.admin.passwordrecover.code StuPhone=15198943477 ValidateCode=asdbcxzcv
[{"a":"0"}]
成功![object Object]
{"status":1}
time:8ms ops:125
test> @api.admin.passwordrecover.code StuPhone=15198943477 ValidateCode=asdbcxzcv
[]
验证码不正确!请仔细核对!
{"status":2}
time:31ms ops:32.25806451612903
test> @api.admin.passwordrecover.code StuPhone=15198943477 ValidateCode=asdbcxzcv
[]
验证码不正确!请仔细核对!
{"status":2}
time:5ms ops:200
test> Exit tester!
zmzp@zmzp1:~/data/s910$ 

1.当多个参数值,参数与参数之间加个空格.

test> @api.admin.passwordrecover.code StuPhone=15198943477 ValidateCode=asdbcxzcv

2.在服务端js的参数,要定义e.params.xxxx 不要直接写参数名

你可能感兴趣的:(小黑小波比)