在VUser脚本中编写Java或C脚本以操纵Ajax中的Web应用程序

编程入门 行业动态 更新时间:2024-10-26 02:28:29
本文介绍了在VUser脚本中编写Java或C脚本以操纵Ajax中的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道是否有可能在Vuser录制的脚本中(用C或Java编写脚本)(在C或Java中)来控制/操作元素,单击Web应用程序/页面上的单选按钮等等. Ajax还在接受测试吗?

I wonder if it is possible to script (in either C or Java) inside a vuser recorded script to control/manipulate elements, clicking radio-buttons and so forth on a web app/page using Ajax and being under test?

问题是,当针对使用Ajax实现的Web应用程序运行vuser脚本时,我需要操纵页面元素才能使脚本进一步运行(使用http-protocol),并且因为http-protocol专注于记录http-录制期间未捕获与Web请求和响应中的流量一样的带有隐藏"单选按钮菜单的操作/客户端行为.

Problem is that when running a vuser script against a web app implemented using Ajax, I need to manipulate page elements in order to get the script running further (using http-protocol) and because http-protocol is focused on recording http-traffic as in web requests and responses the manipulation/client side behavior with a "hidden" radiobutton menu is not captured during recording.

我希望有人知道/已经做过这样的事情?

I hope someone knows/has done something like this?

推荐答案

由于WEB/HTML LoadRunner脚本是在C语言中编译和运行的,因此您可以使用C轻松地做到这一点.您可以编写任意数量的自定义函数,然后调用在整个脚本中都可以随意使用它们.认为最初的录音只是一个起点,然后逐渐消失.

You can do this with C easily since a WEB/HTML LoadRunner script is compiled and run in C. You can write as many custom functions as you want and call them at will all throughout your script. Think of the initial recording as just a starting point and hack away.

从技术上讲,您也可以使用JAVA进行此操作,但是您必须创建一个空的JAVA User脚本并手动编写整个代码.我在处理JAVA服务测试方面也做过类似的工作,但这并不是出于胆小.

Technically you could do this with JAVA as well, but you would have to create an empty JAVA User script and hand code the whole thing. I've done similar work in dealing with JAVA services testing, but it isn't for the faint of heart.

更多推荐

在VUser脚本中编写Java或C脚本以操纵Ajax中的Web应用程序

本文发布于:2023-10-28 13:21:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1536749.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚本   应用程序   VUser   Java   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!