简体   繁体   English

无法为 .Net 桌面应用程序执行 Load Runner 脚本

[英]Unable to do Load Runner Scripting for .Net Desktop application

I need to test a.Net windows application using LoadRunner 12.53.我需要使用 LoadRunner 12.53 测试 .Net windows 应用程序。 Tried couple of methods but no success.尝试了几种方法但没有成功。

  • Method1: Used.Net protocol and clicked start recording方法一:使用.Net协议,点击开始录制

    Error: Start Recording Failed.错误:开始录制失败。

    No recording log was created.没有创建记录日志。 LR failed to launch the desktop application. LR 无法启动桌面应用程序。

  • Method2: Used Web Http/Html protocol.方法2:使用Web Http/Html协议。

    Due to the below error, application cannot start 'Error:The Type initializer for (app.client.fromMainWrapper) threw an exception由于以下错误,应用程序无法启动“错误:(app.client.fromMainWrapper) 的类型初始值设定项抛出异常

What to do?该怎么办?

Try to check if there is any web traffic in your .NET app via a tool called Fiddler.尝试通过名为 Fiddler 的工具检查您的 .NET 应用程序中是否有任何 web 流量。 If yes, then use proxy recording mode of Web HTTP/HTML protocol to generate the script (Remote Application via LoadRunner proxy option in Record list).如果是,则使用Web HTTP/HTML协议的代理录制方式生成脚本(Record列表中的Remote Application via LoadRunner proxy选项)。 Pcap file is another option if you just exported the traffic captured by Fiddler or Wireshark into a.pcap file and then import it into VuGen from the start recording dialog.如果您只是将 Fiddler 或 Wireshark 捕获的流量导出到 .pcap 文件,然后从开始录制对话框将其导入 VuGen,则 Pcap 文件是另一种选择。

  1. does your application communicate across HTTP?您的应用程序是否通过 HTTP 进行通信? If not, why did you use this prototocol?如果不是,你为什么使用这个协议?
  2. Let's talk about the communications architecture of your application.让我们谈谈您的应用程序的通信架构。 Please describe the client and the next upstream architectural component that itt communicates with.请描述 itt 与之通信的客户端和下一个上游架构组件。 This should help to identify the types of communications protocols in play and how to automate the application effectively这应该有助于识别正在使用的通信协议类型以及如何有效地自动化应用程序
  3. Please take a look at the Visual Studio add-in documentation.请查看 Visual Studio 加载项文档。 This will allow the developers of the.Net appliction to develop Nunit and.Net virtual users straight from the application source code.这将允许 .Net 应用程序的开发人员直接从应用程序源代码开发 Nunit 和 .Net 虚拟用户。 This is the ideal development path for.Net virtual users where the source is available.对于有源码的 .Net 虚拟用户来说,这是理想的开发路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM