There is full lists :link

First we take look the Tools related with Visual Studio:

MSTest, the unit test framework in Visual Studio

Coded UI Test

Microsoft Fakes,

Microfoft Test Manager

Visual Studio Memory Profiler

Visual Studio Performance profiler

Visual Studio Load Test, part of VS Ultimate(Testing Performance and Stress Using Visual Studio Web Performance and Load Tests)

TestDriven.Net, unit test running for Visual Studio

Other Test tools I have used:


JetBrains ReSharper UnitTest , 



Categories: Agile | UnitTest | Visual studio 10/up


My Spectflow feature file

My Step files:
#region Fill fields in form and Submit UserAccountInfo Request

    [Given(@"I on the UserAccountInfo metadata UI test page")]
    public void GivenIOnTheUserAccountInfoMetadataUITestPage()

    [Given(@"I have entered All fields for UserAccountInfo Metedat UI")]
    public void GivenIHaveEnteredAllFieldsForUserAccountInfoMetedatUI()


    [When(@"I click submit button for UserAccountInfo Metedat UI")]
    public void WhenIClickSubmitButtonForUserAccountInfoMetedatUI()

    [Then(@"The Request Url woll displayed in Request section of UserAccountInfo Metedat UI")]
    public void ThenTheRequestUrlWollDisplayedInRequestSectionOfUserAccountInfoMetedatUI()
      var divRequest= CurrentBrowser.Div(Find.ById("divRequest"));

    [Then(@"The AccountInfo will be loaded in Response Section of UserAccountInfo Metedat UI")]
    public void ThenTheAccountInfoWillBeLoadedInResponseSectionOfUserAccountInfoMetedatUI()
        var divResponse = CurrentBrowser.Div(Find.ById("divOutput"));




    public  class WebBrowserHelper
        public static Browser CurrentBrowser
                if (!ScenarioContext.Current.ContainsKey("browser"))
                    ScenarioContext.Current["browser"] = new IE();
                return (Browser)ScenarioContext.Current["browser"];
        public static void Close()
            if (ScenarioContext.Current.ContainsKey("browser"))

My Codes:

 BrowserExtension.cs (1.72 KB) WebBrowserHelper.cs (.85 KB) UserAdminStepHelper.cs (.75 KB) 
UserStoryForMetadataUI_LoadUserAccount.step.cs (5.74 KB) UserStoryForMetadataUI_LoadUserAccount.feature (1.25 KB)
Categories: Agile | C# | UnitTest

November 28, 2012
@ 10:59 PM
we are practice BDD by using specflow.

for a web application, when  the user story converted to specflow acceptance test,  it is all for broswer.

Acceptance test for controller is only for developer, not for non-tech business owner/analyst

So I want to use some tool to fill the gap.  After some Google search, I found Coded UI and WatiN could do this job.

Below two articles have a very good example how to do it.

specflow with CodedUI

Specflow with WatiN

Ok...which one is better?

 I need to try them and  compare them.

After try both of them,
I think Watin is much better for programmer and much easy to use.
my CodeUI code was broken soon after couple change, and it is very difficult to intigrate with the specflow.

see my other post for my code of specflow and watiN

Categories: Agile | C# | UnitTest

Our company haven't Team Foundation Server, to do the integration web test, I plan to extend our existed AppMonitor application to run my .webtest file.  the AppMon just simply call powershell script to send request to the webpage, if it can pick up the webtest, it can do more complicate testing.

To approach that final goal, the first thing is get the classes for the .webtest file deserialization.

below are my steps:
1. rename webtest1.webtest to webtest1.xml
2. in VS command line window, run "xsd webtest1.xml", and you will get webtest1.xsd
3. "xsd webtest1.xsd /classes", you class will be generated.

xsd webtest1.xml
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'C:\Users\llj\Documents\Visual Studio 2010\Projects\TestProject1\Te

xsd webtest1.xsd /classes
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'C:\Users\llj\Documents\Visual Studio 2010\Projects\TestProject1\Te

Categories: C# | UnitTest

Fiddler2 includes the ability to capture web traffic (including AJAX requests) for later playback with the Visual Studio Web Test product.

Simply run Fiddler and then interact with your Web Application.  When you've finished using your web application, click File > Export Sessions > All Sessions. In the dialog, choose Visual Studio WebTest.


Categories: UnitTest

Tools--> Manage Add-ons--> Microsoft Corporation-->Microsoft Web Test Record
(and I noticed the Fiddler2 is not enable there either..)

After enable it, You can see the Web Test Recorder bar in the IE window's left.


Categories: UnitTest | VS 2008

What is TestContext?

TestContext is a abstract class of Microsoft.VisualStudio.TestTools.UnitTesting namespace that provides various information about the current test run. Purposes that has been served by TestContext Class -

1.  To store information and provide information to the unit tests during Unit Test Run.

2.  Provide a mechanism to measure performance of your code being tested by the Unit Test.

3.  In Testing the web service it stores the additional information, like server's URL.

4.  In Asp.Net unit tests, it get holds of the Page object.

5.  For Data Driven Unit Tests , it provides access to the data rows.

Categories: Agile | C# | UnitTest | VS 2008