|
向大家请教个问题,我们要用loadrunner进行性能测试,采用的是java vuser协议。开发写好了jar包,而且开发的对他们写的jar写好了使用的例子。我们将jar包正确导入并写好了脚本.
CLASSPATH:.;C:\Program Files\Java\jdk1.5.0\bin;.\;%JAVA_HOME%\lib\tools.jar;C:\Program Files\Java\jre1.5.0\lib;C:\Program Files\Mercury\LoadRunner\classes;C:\Program Files\Mercury\LoadRunner\lib
PATH:.;C:\Program Files\Java\jdk1.5.0\bin;%JAVA_HOME%\lib\tools.jar;C:\Program Files\Mercury\LoadRunner\bin;C:\Program Files\Java\jre1.5.0\bin;
脚本编译时日志中会打出下面的内容:
[main] WARN JavaUtils : Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.可是功能执行的是正常的。
在运行场景中运行时总是报下面现条错误
1.Error: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
2.at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:104)
at org.apache.axis.utils.XMLUtils.getDOMFactory(XMLUtils.java:221)
at org.apache.axis.utils.XMLUtils.<clinit>(XMLUtils.java:83)
at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
at org.apache.axis.client.AxisClient.<init>(AxisClient.java:52)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at com.leadtone.sme.autotests.ms.anhui.wsclient.MicroSoftBindManagerImplServiceLocator.<init>(MicroSoftBindManagerImplServiceLocator.java:12)
at com.leadtone.sme.autotests.ms.anhui.AnhuiMockAdc.<clinit>(AnhuiMockAdc.java:34)
at com.leadtone.sme.autotests.ms.anhui.AhClient.<clinit>(AhClient.java:29)
at com.leadtone.sme.tp.Actions.action(Actions.java:28)
在网上找了很久也没有找到解决方案
大家能帮我分析一下这个错是为什么吗?
针对jar包开发写的使用例子
package com.leadtone.sme.tp;
import com.leadtone.sme.autotests.SiResponse;
import com.leadtone.sme.autotests.ms.anhui.AhClient;
public class AhPerformanceTest {
public static void main(String[] args) {
AhClient client = new AhClient();
SiResponse response = client.corpOpen("wwp_tp_eccode34", "106587652345678", "AD_UFID_009",
"163.com", "0");
System.out.println("resultcode: " + response.getResultCode());
System.out.println("resultmsg: " + response.getResultMsg());
System.out.println();
}
}
我们在loadrunner写的脚本如下:
package com.leadtone.sme.tp;
import lrapi.lr;
import com.leadtone.sme.autotests.SiResponse;
import com.leadtone.sme.autotests.ms.anhui.AhClient;
public class Actions
{
public int init() {
return 0;
}//end of init
public int action() {
AhClient client = new AhClient();
SiResponse response = client.corpOpen("ahcorp08301924", "123456789301924", "ahcorp08301924",
"ahcorp08301924.com", "1");
System.out.println("resultcode: " + response.getResultCode());
System.out.println("resultmsg: " + response.getResultMsg());
System.out.println();
return 0;
}//end of action
public int end() {
return 0;
}//end of end
}
[ 本帖最后由 janne09 于 2010-9-1 21:09 编辑 ] |
|