我尝试从我的
SoapUI
测试用例中生成负载测试。它有许多测试步骤,其中前10个步骤涵盖了登录过程。 LoadTest
在一个Groovy
脚本中停止,该脚本应该从前一个测试步骤的输出中获取参数值。当直接执行时,它可以正常工作,但在作为LoadTest
执行时会出现错误。groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String# . Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class [B] [class [C] [class java.lang.String] groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.String# . Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class [B] [class [C] [class java.lang.String] error at line: 5
Groovy
脚本会导致上述错误:
def tc1 = testRunner.testCase.getTestStepAt(context.currentStepIndex-1);
String rawData = new String(tc1.testRequest.response.rawResponseData);
Reger reger = new Reger(rawData);
String myvar1 = reger.getNthMatch(/<myregex>/, 0);