-1

我正在尝试重播一个负载运行器脚本,该脚本通过 RMI 对服务器客户端-服务器应用程序进行调用。RMI 服务和注册表在服务器上运行良好,因为其他应用程序能够连接并正常工作。

当我尝试重放 LoadRunner 脚本时,我得到了堆栈跟踪:

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”,但我们传递的 URL 很好。请帮我解决这个问题。

4

1 回答 1

0

很可能是您的 URL 中未处理的动态元素。此外,如果您没有检查 LoadRunner 脚本的每一步是否成功,那么您的业务流程很有可能在此请求之前已经偏离轨道,而您正在发出的请求是业务流程的上下文,即使对于看起来是正确格式的请求,也会导致 100% 的错误。

使用 web_reg_find() 或 web_reg_save_param() 检查每个步骤是否成功,以在每个返回的页面|响应上获得不同的成功。如果您没有收到预期的结果,则分支您的代码以处理不匹配情况。

如果您将检查预期结果与交叉检查处理任何可以解决您的问题的动态内容配对,那么几率肯定很接近。

于 2014-03-13T13:32:29.003 回答