views:

25

answers:

1

Hi, We've web application developed using MVC2. I am recording webtests for all views in our web app. I'm using VS2008 test edition installed on separate machine for these webtests. My problem is - my recorded webtests fail for a view. THis particular view contains 2 upload controls. Common errors are - 1. Request failed: Empty path name is not legal. 2. Request failed: Context parameter '$HIDDEN1.EParamList[0].EParID' not found in test context

One thing I want to mention here is that we have used JSon calls to invoke controller methods. We've done this to avoid postbacks. But we have not used Json calls for upload controls. So on upload call recorded in webtest, I can see all other parameters with empty value passed to method. Generally all our views contain tabs e.g. view1(view1.aspx) contains tabs represented by user controls(.ascx). Telrik's tabstrip is used to represent tabs. For a json call, only requierd parameters for method are sent and they can be seen in webtest also. But whenever there is any post back call (like upload), webtest shows all parameters in this particular call.

what should i do to avoid these errors.

TIA, kaps

A: 

Hi,

It is hard to tell what can be wrong with your WebTest without seeing any code.

1. Request failed: Empty path name is not legal.

I haven't seen this particular error message before so I can only guess what it means by the massage (so I could be wrong). My suggestion would be to check post parameters of the request which is causing that error and check properties of the "File Upload" node. It could be that there is blank file path in that parameter.

2. Request failed: Context parameter '$HIDDEN1.EParamList[0].EParID' not found in test context

This is quite common message. It means that the context parameter which current request is referencing is missing. This will happen if the extraction rule for hidden field "1" is incorrect. If you inspect all execution responses going backwards you will probably find (can't remember the name now but I think it is called details) failed extraction rule. Fixing that rule should solve the second problem.

I'm working on the WebTest recording and enhancing guide which might be of interest to you.

Thanks, Maciej

Maciej Zaleski