How to bind user defined extraction rule dynamically in WebTest?

拈花ヽ惹草 提交于 2021-02-08 12:11:54

问题


Apart from "Promote Dynamic parameter to webtest parameter"(which binds session key only), Can we able to bind fetchgriddata=>grid name,execute grid action,etc? for which extraction rules are user defined.


回答1:


Immediately after a test is recorded, Visual Studio asks whether it should "Promote dynamic parameters to webtest parameters". If you are not sure then answering "Yes" is normally best. After recording and promoting dynamic parameters the test can be further customized (i.e. made to work). One of the tools is the use of extraction rules and then using the extracted values in later parts of the test.

The way that promoting dynamic parameters to webtest parameters works is by creating extraction rules and inserting the values where needed. This automated detection of dynamic data finds many things but it does not (and I think it can not) find all dynamic data items. Hence the test author often needs to find other dynamic data items.

Back on the details of the question. You cannot add extraction rules to a web test before "Promote dynamic parameters to webtest parameters" is asked. Hence the values in your extraction rules cannot be automatically bound into the test.

See also this page which has some more details.



来源:https://stackoverflow.com/questions/48278276/how-to-bind-user-defined-extraction-rule-dynamically-in-webtest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!