创建脚本后验证脚本失败,双引号“变成"了

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

创建脚本后验证脚本失败,双引号“变成"了

andymio
创建脚本后验证脚本失败,双引号“变成"了。请问怎么解决?


2016-08-17 16:36:48,451 ERROR Script error - Error while initialize test runner
net.grinder.engine.common.EngineException: Error while initialize test runner
        at net.grinder.scriptengine.groovy.GroovyScriptEngine.<init>(GroovyScriptEngine.java:71) ~[ngrinder-groovy-3.4.1-SNAPSHOT.jar:na]
        at net.grinder.scriptengine.groovy.GroovyScriptEngineService.createScriptEngine(GroovyScriptEngineService.java:109) ~[ngrinder-groovy-3.4.1-SNAPSHOT.jar:na]
        at net.grinder.engine.process.ScriptEngineContainer.getScriptEngine(ScriptEngineContainer.java:105) ~[grinder-core-3.9.1.jar:na]
        at net.grinder.engine.process.GrinderProcess.run(GrinderProcess.java:330) ~[ngrinder-runtime-3.4.1-SNAPSHOT.jar:na]
        at net.grinder.engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:87) [grinder-core-3.9.1.jar:na]
        at net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntryPoint.java:60) [grinder-core-3.9.1.jar:na]
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
${NGRINDER_HOME}\script\admin\helloworld.groovy: 46: unexpected token: & @ line 46, column 23.
    test = new GTest(1, "www.baidu.com")
                         ^

1 error

        at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149) ~[groovy-all-2.2.1.jar:2.2.1]
Reply | Threaded
Open this post in threaded view
|

Re: 创建脚本后验证脚本失败,双引号“变成&quot;了

007sb
我也试啊,录制的脚本测试的时候也遇到了这样的错误,怎么办?
Reply | Threaded
Open this post in threaded view
|

Re: 创建脚本后验证脚本失败,双引号“变成&quot;了

Mavlarn
In reply to this post by andymio
不太明白,是不是你的引号的问题,包含字符串的话,应该是用英文的双引号。
Reply | Threaded
Open this post in threaded view
|

Re: 创建脚本后验证脚本失败,双引号“变成&quot;了

DianFu
我的也是这问题,是英文的字符串
Reply | Threaded
Open this post in threaded view
|

Re: 创建脚本后验证脚本失败,双引号“变成&quot;了

yu.zhai
In reply to this post by andymio
有人解决了么?
Reply | Threaded
Open this post in threaded view
|

Re: 创建脚本后验证脚本失败,双引号“变成&quot;了

yu.zhai
In reply to this post by andymio
已经解决了,是个bug,需要改动controller里的部分代码