我正在尝试重播一个加载运行器脚本,该脚本通过RMI调用服务器客户端 - 服务器应用程序。 RMI服务和注册表在服务器上正常运行,因为其他应用程序能够连接并正常工作。
当我尝试重播LoadRunner脚本时,我得到的是stacktrace:
Virtual User Script started at : 2014-03-13 11:03:29
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Actions.
java.rmi.registry.LocateRegistry.getRegistry("mycompamny.abc.xyz.com", 25002, [RMIClientSocketFactory])
sun.rmi.registry.RegistryImpl_Stub.lookup("XMLS")
Error: System.err: java.net.MalformedURLException--Error
System.err: at java.net.URL.<init>(URL.java:601)--Error
System.err: at java.net.URL.<init>(URL.java:464)--Error
System.err: at java.net.URL.<init>(URL.java:413)--Error
System.err: at murex.shared.fs.Connection.<init>(Connection.java:43)--Error
System.err: at murex.shared.property.Properties.fillRMIProperties(Properties.java:231)--Error
System.err: at murex.shared.property.Properties.getObjProperty(Properties.java:91)--Error
System.err: at murex.shared.property.Properties.getProperty(Properties.java:80)--Error
System.err: at murex.apps.middleware.client.core.server.transport.rpc.tcp.socket.SocketUtilities.setSocket(SocketUtilities.java:81)--Error
System.err: at murex.apps.middleware.client.core.server.transport.rpc.tcp.socket.CompressedRMISocketFactory.createSocket(CompressedRMISocketFactory.java:29)--Error
System.err: at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)--Error
System.err: at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)--Error
System.err: at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)--Error
System.err: at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)--Error
System.err: at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)--Error
System.err: at Actions.action(Actions.java:105)--Error
Error: System.err: java.lang.NullPointerException--Error
System.err: at murex.apps.middleware.client.core.server.transport.rpc.tcp.socket.CompressedSocket.getOutputStream(CompressedSocket.java:67)--Error
System.err: at sun.rmi.transport.tcp.TCPConnection.getOutputStream(TCPConnection.java:66)--Error
System.err: at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:202)--Error
System.err: at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)--Error
System.err: at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)--Error
System.err: at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)--Error
System.err: at Actions.action(Actions.java:105)--Error
Error: java.lang.NullPointerException
Error: at murex.apps.middleware.client.core.server.transport.rpc.tcp.socket.CompressedSocket.getOutputStream(CompressedSocket.java:67)
at sun.rmi.transport.tcp.TCPConnection.getOutputStream(TCPConnection.java:66)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:202)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at Actions.action(Actions.java:105)
Abort was called from an action.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
我正在查看'MalformedURLException',但我们传递的网址很好。请帮我解决这个问题。
答案 0 :(得分:0)
很可能是您网址中未处理的动态元素。此外,如果您没有检查LoadRunner脚本的每个步骤是否成功,那么您将面临在此请求之前业务流程脱离轨道的极高且可能性,以及您所做的是请求脱离业务流程的上下文,即使对于看似正确形成的请求,也会在100%的时间内导致错误。
使用web_reg_find()或web_reg_save_param()检查每个步骤是否成功,以获取返回每个页面成功的不同内容。如果您没有收到预期的内容,则分支您的代码以处理不匹配条件。
如果您将检查预期结果与检查处理任何可解决您问题的动态内容进行交叉检查,那么肯定几乎可以接受。