I entered an item on the VS forums. Edwer Fang was able to reproduce this issue and suggested that I enter a bug here...description below:
I have noticed a specific problem with VS 2010 Web Test playback. Tests that have a Query string Parameter TARGET without a space in the name (ex: Target = Web_Site1) will pass. Tests that have a TARGET with a space in the name (ex: Target = Web Site1) will fail. The tests have been converted from VS 2008, and the same tests pass in VS 2008. In VS 2010 they always fail if the TARGET contains a space. To test this theory I created two duplicate sites (TARGETS), one with and one without a space. I ran the same web test against both sites, using different logins to cause the re-directs to either TARGET site. The one with the space fails, the one without passes.
Any known bugs and / or workarounds for this issue? For now, I am going to attempt to re-record the same test to see if the value is handled properly when recorded in VS 2010 instead of using a test that was converted from VS 2008. Unfortunately, I don't have time to record and debug my entire suite of web tests to handle the space issue and re-naming the TARGET sites to eliminate spaces is not an option.
--------------------------------------------------------------------------------------------------------------------
It seems like the authentication process immediately rejects the request if there is a space in the actual target name...Possibly because it is looking for the space, instead it gets a +, and responds with a 401 - BAD REQUEST. The failed requests in VS 2010 appear identical to the same passed request in VS 2008, TARGET=Web+Site1.
Re-recording the test with VS 2010 produces the same error.
I recorded this same login action with Fiddler and I see that the initilal login request is contains TARGET=Web Site1. A subsequent redirect then contains a + and shows TARGET=Web+Site1. VS 2010 never gets to this redirect, which leads me to believe that perhaps the + sign is being forced into the initial request by VS 2010, causing the error. Does VS 2010 do anything different than VS 2008 in this regard, becuse nothing is different between the two enviornments except the failure with sites containing a space? There also doesn't seem to be any way for me to manipulate this request within the web test, and try to force the space. It's like VS 2010 is doing this automatically, where VS 2008 did not?????
The contents of this blog were gathered from the blogger real life experiences and from the different forums related to automated test.
Thursday, October 14, 2010
Friday, August 20, 2010
Unable to pass date value dd/mm/yyyy through csv file data binding in the webtest.
Hi,
I am using CSV file for data binding in my Webtest.
I have to pass the date value in this format dd/mm/yyyy, through csv file.
I am using excelsheet and then i am saving this file into .CSV format.
When i am adding this file as a data source,all the data rows displayed correctly.
But the date values displayed in the format m/dd/yyyy,which is not acceptable by the application.
How i can change CSV file date format from m/dd/yyyy to dd/mm/yyyy?
---------------------------------------------------------------------
If I may offer a suggestion to determine where the problem lies...
Instead of using a CSV file for the Date of Birth, create a Context Parameter called DOB and give it a value of 15/05/1987. Use the context parameter in place of the data bound parameter to see if it is translating it the same way (with Date & Time) or as you expect it to (dd/mm/yyyy).
If it work this way, you may need to force a format of the data from the CSV file. I would suggest that you look at the UKVSTS Web Test Plugin (http://www.codeplex.com/UKVSTS/Wiki/View.aspx?title=UKVSTS%20Web%20Test%20Plug%20In&referringTitle=Home). This might help.
Good luck.
----------------------------------------------------------------
Hi,
Thanks for your reply.
I have tried following options:
1. ctl00$ContentPlaceHolder1$ClientDetailControl$TextBoxDateOfBirth= <%= DateTime.Now.ToString ("15/05/1987") %> ,I have used same thing which has given in the UKVSTS.script is passing.
But when i tried to pass date values through .csv in this script variable again i was getting date and time.I have used dd/mm/yyyy format in the .csv.
2.ctl00$ContentPlaceHolder1$ClientDetailControl$TextBoxDateOfBirth=
<%= DateTime.Now.ToString ("{{DataSource1.DateValue#csv.DOB2}}") %>
getting same error.
I have used script parameter not context parameter...can you explain how i can create context parameter?
================================================================
I believe that you have misinterpreted the examples provided for the plugin by using the DateTime.Now.ToString function. I believe that what you should be doing is this:
<%= String.Format("{0:dd/MM/yyyy}", DateTime.Parse({{DataSource1.DateValue#csv.DOB2}}))) %>
(Note: I may be missing a paren or curly brace somewhere)
Good luck.
======================================================
Thanks Lewis,
It is working fine.
Thanks,
Bhawana
I am using CSV file for data binding in my Webtest.
I have to pass the date value in this format dd/mm/yyyy, through csv file.
I am using excelsheet and then i am saving this file into .CSV format.
When i am adding this file as a data source,all the data rows displayed correctly.
But the date values displayed in the format m/dd/yyyy,which is not acceptable by the application.
How i can change CSV file date format from m/dd/yyyy to dd/mm/yyyy?
---------------------------------------------------------------------
If I may offer a suggestion to determine where the problem lies...
Instead of using a CSV file for the Date of Birth, create a Context Parameter called DOB and give it a value of 15/05/1987. Use the context parameter in place of the data bound parameter to see if it is translating it the same way (with Date & Time) or as you expect it to (dd/mm/yyyy).
If it work this way, you may need to force a format of the data from the CSV file. I would suggest that you look at the UKVSTS Web Test Plugin (http://www.codeplex.com/UKVSTS/Wiki/View.aspx?title=UKVSTS%20Web%20Test%20Plug%20In&referringTitle=Home). This might help.
Good luck.
----------------------------------------------------------------
Hi,
Thanks for your reply.
I have tried following options:
1. ctl00$ContentPlaceHolder1$ClientDetailControl$TextBoxDateOfBirth= <%= DateTime.Now.ToString ("15/05/1987") %> ,I have used same thing which has given in the UKVSTS.script is passing.
But when i tried to pass date values through .csv in this script variable again i was getting date and time.I have used dd/mm/yyyy format in the .csv.
2.ctl00$ContentPlaceHolder1$ClientDetailControl$TextBoxDateOfBirth=
<%= DateTime.Now.ToString ("{{DataSource1.DateValue#csv.DOB2}}") %>
getting same error.
I have used script parameter not context parameter...can you explain how i can create context parameter?
================================================================
I believe that you have misinterpreted the examples provided for the plugin by using the DateTime.Now.ToString function. I believe that what you should be doing is this:
<%= String.Format("{0:dd/MM/yyyy}", DateTime.Parse({{DataSource1.DateValue#csv.DOB2}}))) %>
(Note: I may be missing a paren or curly brace somewhere)
Good luck.
======================================================
Thanks Lewis,
It is working fine.
Thanks,
Bhawana
Subscribe to:
Comments (Atom)
Unix/Linux Commands
Flow control Syntax break Exit a loop. continue Exit the current iteration of the loop and proceed with the next iteration. Ctrl+C Key com...
-
%systemroot%\system32\inetsrv\config\applicationHost.config https://docs.microsoft.com/en-us/iis/configuration/system.applicationhos...
-
hi everybody, i am doing load test for 10 users,20users,30users working fine upto to this point if increase to 40 users iam getting error a...