VS 2010 中的负载测试
我正在执行一个包含 3 个页面的 Web 测试,其中一个是 Silverlight 页面和一个控制器页面(每个页面都从控制器页面调用,并且再次将控制权返回给控制器页面)。
当第一个链接 ID 单击时,它会生成一个 ID,该 ID 必须在每笔交易中继续使用,直到交易完成。
第一个页面是 Silverlight 页面,它与 WCF 服务进行交互以执行事务。通过 Silver light 提交请求时,WCF 服务会生成一个 ID,但由于服务中的数据以 XML 形式返回,因此 wcfservice 的整个输出如果被视为在记录时找到的硬编码的字符串数据。
因此,从第一页(silverlight)返回到控制器页面后,它始终具有相同的 ID,该 ID 在记录的测试中作为字符串存储在服务中。由于我没有获得正确的 ID,我无法前进到其他页面。
实际上,根据我的说法,系统不会将从 WCF Web 服务返回的数据检测为动态数据,而是将其视为硬编码字符串。
怎么解决,请帮忙。
Load测试的一些错误写如下:
Extraction Rule Error ExtractValues event 139 No hidden fields were found in the response.
Exception WebTestException 84 There is no context parameter with the name '$HIDDEN1.ConfiguratorTracker$hdnWorkFlowGuid' in the WebTestContext
I am performing a webtest containing 3 pages once of which is a Silverlight page and a Controller page (every page is invoked from controller page and again the control is given back to Controller page).
When the 1st link id clicked it generates one ID that has to be carried forward in every transaction till the completion of the transaction.
The 1st page is a Silverlight page it interacts thorough WCF services to do the transaction.while submitting A request through Silver light the WCF service generates a ID but since the data from the service is returned in XML form, the entire output of the wcfservice if treated as a string data of which is hardcoded which is found at the time of recording.
So, After coming back from the 1st page (silverlight) to the Controller page it is always coming with the same ID which is stored as a string in the service in the recorded test. Since I am not getting the PROPER ID I am not able to move forward to other pages.
Actually, according to me system is not detecting the data returned from a WCF web service as a dynamic one and instead treating it as a hardcoded string.
How to resolve it, please help.
Some errors of Load test are written below:
Extraction Rule Error ExtractValues event 139 No hidden fields were found in the response.
Exception WebTestException 84 There is no context parameter with the name '$HIDDEN1.ConfiguratorTracker$hdnWorkFlowGuid' in the WebTestContext
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您已创建基于文本响应而不是隐藏字段的提取规则。您可能想看一下正则表达式提取规则。
Make sure you've created an Extraction Rule that is based on the Text Response and not a hidden field. You might want to take a look at a RegEx Extraction Rule.