Unit Testing ASP.NET Applications

I will put a few links related to ASP.NET unit testing.

WATIN

Initially I saw reference to WATIR from Scott Hanselman's post Integrating Ruby and Watir with NUnit .

Recently I've found WatiN Web Application Testing In .Net, including articles WatiN - Web Application Testing In .Net - The Code Project - ASP.NET and WatiN Test Recorder - The Code Project .(The home page for WatiN Test Recorder is here

There is interesting article by Jeremy D. Miller   with comment from ScottGu recommending WatiN .

Using regular expressions in WatiN (e.g. for asp.net long IDs)

 

Also WatiNFixture is a custom fixture for FitNesse - acceptance testing framework.

VSTS ASP.NET tools

From MSDN Overview of ASP.NET Unit Tests  it seems, that you can only test business classes in App_code. However there is a blog post describing Testing the page object for an ASP.NET site  .

HttpRuntime simulator.

To simulate ASP.NET server functionality(i,e.HttpRuntime I am using class based on Haacked's  HttpSimulator. May be http://www.codeplex.com/plasma should be considered. 

Comments on closed problems in "MS Connect" are ignored.

I've asked MS Supportregarding https://connect.microsoft.com/Connect : does MS staff receive notifications when someone adds Community Discussion comment, Rating or Validation comment for closed issues?Or it is better to raise a new issue to grab MS staff attention? It will be good to put the answer to https://connect.microsoft.com/intro.aspx "Submit and Track Feedback"section.

They replied  that no notification is sent to MS staff for a closed bug. If a new bug is submitted for the same issue, it would likely be identified and closed as a duplicate.

I considered to post the following as a suggestion to MS.

Let's consider the following scenario.
I noticed some bug/limitation in Visual Studio. I opened  Feedback website and found that somenone reported the similar problem back in 2005 and it was closed with resolution "postponed" or "Won't fix"(which often means postponed) or "external". I believe that the issue is important and want to ask MS to review/re-consider the resolution. To do this I am adding   Community Discussion comment and/or Rating or Validation comment  with assumption that MS staff will be notified about my comments.
 
Based on your answer that no notification is sent to MS staff for a closed bug, I wouldn't achieve what I wanted. An ability to add  Community Discussion comment, Rating or Validation comment  is MISLEADING and causes confusion for users.
It will be good to show warning when user adds comment to the closed issue.

However I found similar ACTIVE issue raised here: Improve feedback comments handling and reactivation   ,so I just voted as important. 

Lesson learned: If I want to ask MS to read/review/re-consider the closed issue, I have to submit a new bug/suggestion report.

Workaround "The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect" error.

We have a .Net 1.1 application that worked with SQL server 2000. When we changed it to work with sql Server 2005, some calls to SPs returned errors like the following

"The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 8 ("@ParamName"): The supplied value is not a valid instance of data type numeric. Check the source data for invalid values. An example of an invalid value is data of numeric type with scale greater than precision."

It was found, that C# decimal variable can keep values with more than 4 decimal points (e.g. 43.23232322323) and when it is passes to SP parameter as MONEY, combination .Net 1.1 - SQL Server 2005 doesn't work.
Note that combination  .Net 1.1 - SQL Server 2000 and  .Net 2.0 - SQL Server 2005  work fine.

To workaround I've added simple function to round values before assigning SP parameter

       public static decimal SafeMoney(object attribute)
        {
            decimal decMoney = Convert.ToDecimal(attribute);
            decMoney = Math.Round(decMoney, 4);//required in 1.1 to connect to SQL Server 2005
           return decMoney;
        }

 

 

«June»
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567