Showing posts with label vs2010. Show all posts
Showing posts with label vs2010. Show all posts

Ease your Visual Studio development with a SQL Server alias

A quick little tip on how to manage connection strings in your applications with a SQL Alias that you can create with “SQL Server Configuration Manager”
SQL Server connection strings in app.config

Code52 Show and Tell: My pet project CopyCat - Lessons learned

CopyCat – A big fat cat walking and waltzing the internetz

Figure: CopyCat – A big fat cat walking and waltzing the internetz
 

I am a pretty normal geek. At least I think I am normal and a geek. I see geeks as people (yes really) that want to play with things, discover new things and build things. When geeks play with things they discover new things quite often.
(Similar story heard and “adapted” from Scott Hanselman) 
After I ‘ve discovered something I want to scream it out to someone:

“Look at this dude!! Isn’t that awesome???”

A normal reaction that you get from a non-geek:

“Wow… Is this showing the weather in form of colors that you could just get by watching out the window?”

This is the pattern for the reaction that you normally get
“Wow… Is this <something> that does <somethingUselessAtBeginning> that you could just get by doing <somethingElse>?”

TFS source control - Watch your application grow like a garden

Start little and grow a garden
Figure: Not a garden yet, but everything starts small

On every project that I am part of, I setup an email alert that sends me an email for each check-in that happens.
This helps me to follow what's going on on the codebase and to watch the application grow. I say "grow" because we construct software by growing it like a garden, and *not* constructing it like a building.

"Architecture is a bad metaphor. We don't construct our software like a building, we grow it like a garden."
from Craig Larman, http://www.infoq.com/articles/large-scale-agile-design-and-architecture

It's official: Manual deployments are BAD, Automated Deployments are a WIN!

*Updated* 14 November 2011: Video is not on vimeo anymore but on tv.ssw.com

 

The video video recording of my talk "Continuous Delivery with TFS, msbuild and msdeploy" is finally online.

Please say
"Thanx" to Raj.
Thanks to Adam Cogan for introducing me so nicely, he almost got my last name right this time Winking smile

The video is on tv.ssw.com -> which just launched BTW and is a great learning resource)  
and embedded here


Figure: Video recording of Continuous Delivery - SSW Sydney User Group - Peter Gfader

 

Have fun and send me some feedback

 

My related blog posts about Continuous Delivery

  1. The pain with deployments can be found in this blog post.
  2. How to and some tips and tricks for TFS2010 regarding deployment

The slides are on SlideShare

VS2010 - Debugging not working

We just faced an interesting problem on one of our dev's computers.
He is not able to debug any VS2010 solution: Windows Forms, WPF, Web Forms… There is no chance to debug anything on his 64bit machine.

Problem:

  1. Add breakpoint
  2. Hit F5 on your project
  3. Break point doesn't get hit

Continuous Delivery with TFS, msbuild and msdeploy

We had a great crowd last Wednesday night at the Sydney .NET UG. Thanks everyone!

For everyone who couldn't make it, ping Raj (our video guy) and tell him to get the recording up and running Winking smile
The video is online: Continuous Delivery with TFS, msbuild and msdeploy!


Agenda of the talk

  1. Pain
  2. Goals
  3. How To
    1. Start from scratch
    2. Existing System
  4. Best Practices

 

"Continuously" testing with Visual Studio 2010

I used the following notes as guide line for my talk Sydney ALT.NET, and just post them here for future reference…
Had a great night @ the user group and interesting insights into stackoverflow from Sam Saffron.

 

An important aspect of Agile is the feedback loop or in other words: We want short feedback cycles.
Check out Scott Ambler post for why those feedback loops are so important in Agile http://www.ambysoft.com/essays/whyAgileWorksFeedback.html

TFS 2010 Build - Lesson learned --> Treat warnings as errors

We came across a weird issue with our TFS 2010 build server. We have an MVC3 web application where we added a new Silverlight application. Since we added that Silverlight application our build fails. We get error messages like these:

#1
image C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (1852): Copying file ClientBin\BuildAuction.xap to obj\Release\Package\PackageTmp\ClientBin\BuildAuction.xap failed. Could not find file 'ClientBin\BuildAuction.xap'.

#2
image Copying file C:\Builds\4\WoolTradePlus\WooltradePlus - Build and Test on Checkin\Binaries\BuildAuction.xap failed. Access to the path 'C:\Builds\4\WoolTradePlus\WooltradePlus - Build and Test on Checkin\Sources\trunk\WoolTradePlus\MvcApplicationXXX\ClientBin\BuildAuction.xap' is denied.

image
Figure: Spiderman and Batman to the rescue


Here is my journey to fix this problem

3 keyboard productivity tips for VS2010 - "Look Ma no mouse"

I am a big fan of little check-ins as often as possible during the day, instead of 1 big check-in at the end of the day.

Microsoft ASP.NET - Too many options

*Updated* 10 May 2011: From Tarn's feedback: I made it more clear that the target audience "Beginners with ASP.NET" get confused.

TL;DR

I think Microsoft's message for beginners on ASP.NET is wrong, by suggesting we have 3 players for doing web development with MS tooling, as per http://www.asp.net/get-started

Me thinks: There is "Web Pages", "MVC" and "Webforms", and tools: "WebMatrix" and "VS2010".
But should we really suggest all of them?

Code contracts - Is it only about argument validation?

*Updated* 3 April 2011: Update how to enable Intellisense for code contracts

 

There are more and more articles coming out about Code Contracts. Some of them talk only about input validation and miss the goal of Code Contracts. What else can we do with Code Contracts?

image
Figure: Real world validation message


Microsoft DevLabs says: Code Contracts express coding assumptions

 

question_and_answer[5] What are coding assumptions?

Do you automate your deployment process? (aka Continuous Deployment)

As you may know I am a big fan of automation. I try to automate as many things in my life as possible.
Major reason for automating, is:
I don't have to worry about those "things" anymore, and can focus on other nice "things".

"Things" to automate:

Let me know what you automate in your life!

Clean Code Development talk at the #netug

image 
Thanks everyone for attending. I enjoyed last night… Special Thanks to Giordano Scalzo's whose slide I used as a base for my talk, and with who I had interesting conversations about ideas and slides…
Make sure to check the list of "good code attributes" at the end of the post. That's the list that we came up with, during the user group…

Content

  1. What
    1. Why Code matters!
    2. What is Bad?
    3. What is Good?
  2. Why
    1. The Broken Window Theory
    2. The Grand Redesign in the Sky
    3. The Sushi Chef Rule (would be nice - NA)
    4. The Hotel Room Rule (would be nice - NA)
    5. The Boy Scout Rule
  3. How
    1. OOP Patterns and Principles
    2. SOLID Principles
  4. How to measure clean code?
    Tools

 

 

PS
If you are able to apply the "Hotel Room Rule" in your projects let me know!


image
Figure: Hotel Room Rule: "Let someone else clean up your code every day"

 

 

What is the difference between "StyleCop" vs. "VS2010 Code Analysis" vs. "FxCop"

I had this conversation the other day and started some investigation into this. Here is my quick recap from the below links

  • VS2010 Code analysis includes FxCop + more
  • VS2010 Code analysis and FxCop analyze assemblies
  • StyleCop is not part of the VS2010 Code analysis suite and checks C# coding style
  • StyleCop analyses source code

"Hidden" shortcuts for testers in Visual Studio

Like most of us, I learned the following shortcuts from the menu
image
Figure: VS Run tests menu items with shortcuts

Ctrl+R,T Run tests in current context
Ctrl+R,A Run all tests in solution
Ctrl+R,Y Run all impacted tests

with their corresponding Debug Mode, by using <Ctrl> for the second keystroke. E.g. Ctrl+R,Ctrl+T Debug tests in current context

Today I discovered these additional shortcuts.
I discovered those by changing some shortcuts from using MSTest to TestDriven, as per suggestion from RBanks54 (which rocks BTW, both)

VS2010 - Pro Power Tools - Highlight the selected tab in the document well

If you are using Visual Studio 2010 and you don't have downloaded the Pro Power Tools, then do it now!
One awesome feature of that extension is the Document Well Plus, that gives you nice coloring of tab pages.
1 problem though… see below
image 
Bad Figure: VS2010 - Document well - Which one is the current selected tab?

No debugging in Silverlight 4 with VS2010?

If you get this nice error message, you are probably lost, because there is no hints on WHY!!!???

clip_image002

Microsoft Visual Studio
---------------------------
Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version.

 

Check your registry!!

When you create a Silverlight project, VS looks for the HKLM,SOFTWARE\Microsoft\Silverlight\Components\Debugging reg key to make sure you have the dev runtime. 
And when you debug, Silverlight looks for the HKLM\Software\Microsoft\.NETFramework\DbgpackShimPath reg key.

Thanks Amy!! Check out her blog about Silverlight and web dev

 

So your registry should have those keys and pointing to

 

On 64bit machines check

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Silverlight\Components\Debugging

image

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework

image

Both these keys should point to the same version (see my examples for Silverlight RTM)

Unable to open project in Expression Blend (since you are using VS2010 with .NET 4)

If you get the following problem in Expression Blend 3.0.1927.0: “Unsupported project”

image
Figure: Error messages in Expression Blend

 

Add the following pieces manually to your project file (.proj)

<PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
  <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>

and (not sure if that is actually needed…)

<ExpressionBlendVersion>3.0.1927.0</ExpressionBlendVersion>

 

image
Figure: Applied changes to the .proj file

 

Reason: Expression Blend is not .NET 4 aware, so it needs this switch at the top of the project file

TDD with C# 4 dynamic keyword

*Updated* 2 Mai 2011: The "dynamic" keyword in C#4 was not meant to be used in the below scenario. Use VS2010 code completion instead.


We know that if you are using TDD, then you should write your test before you are implementing anything else, don’t we :-)
image
Figure: 1. Write a failing test (red), 2. Make the test pass (green), 3. Refactor your code

But if you are thinking about new methods, you can’t really run the tests because your unit test wont compile, see the following example.

 

[TestMethod()]
        public void CalculatorThingAdd_2PositiveNumbers_ResultAdded()
        {
            // Arrange
            CalculatorThing myCalculator = new CalculatorThing();
            int result = 0; 
            int expcected = 3;

            // Act
            result = myCalculator.Addition(1, 2);
            
            // Assert
            Assert.AreEqual(result, expcected);

        }

ap--delete BAD code example: In TDD I would like to run this test, before I implement the method “Addition”

 

On compiling this test, you get the following error message

Error    1    'ConsoleApplication.CalculatorThing' does not contain a definition for 'Addition' and no extension method 'Addition' accepting a first argument of type 'ConsoleApplication.CalculatorThing' could be found (are you missing a using directive or an assembly reference?)   

 image
ap--delete Figure: Code want compile, because “Addition” is not implemented, and C# is static type safe on compile time

 

But you can avoid this by using the dynamic keyword, see below

 

 

[TestMethod()]
        public void CalculatorThingAdd_2PositiveNumbers_ResultAdded()
        {
            // Arrange
            dynamic myCalculator = new CalculatorThing();
            int result = 0; 
            int expcected = 3;

            // Act
            result = myCalculator.Addition(1, 2);
            
            // Assert
            Assert.AreEqual(result, expcected);

        }

apcheck_thumb1 GOOD code example: This code compiles nicely

 

 

image
apcheck_thumb1 Figure: Code compiles, because myCalculator is a dynamic object and evaluated on runtime not on compile time

 

But if you run this test you get:

image
Figure: Test failed because method not implement

Test method CalculatorConsole.Tests.CalculatorTest.CalculatorThingAdd_2PositiveNumbers_ResultAdded threw exception:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'ConsoleApplication.CalculatorThing' does not contain a definition for 'Addition'

 

NICE!!!!
We have a failing test! 
image

Now go and implement the method and make the test pass!
image

Smack down!! WatiN vs Selenium vs VS2010 Test Lab Manager

*Updated* 21 March 2011: Updated how "Coded UI tests" finds a control with info from Balagans Blog - How does “Coded UI test” finds a control? 

 

We need Web functionality tests!!! (and a lot of people are already doing them)
Reasons?

  1. Easier to find bugs
  2. No need for a lot of manual testing
  3. Maintainability of your code (THIS IS BIG!!)
    1. When we change something (Code, DB, scripts, HTML,...) we want to verify if our user stories working as expected
    2. We setup web tests for each user story that we have.
  4. We can use web tests in load tests or stress tests
  5. … lots more

Note from Wikipedia
Stress testing: Simulates increased load, more than expected
Load testing: End to end performance testing under anticipated load

 

I tried the following 3 players (recommendations from work mates, and others..)

  1. Selenium
  2. WatiN
  3. Visual Studio 2010 & the Test & Lab Manager

All of these 3 tools provide a recording tool, where you can record your browsing actions and generate code from that.
This is important!!!
No one wants to write these tests manually!

 

Do the test recording

apcheck_thumb1 Selenium Test recorder just works.

Record your session. Copy & paste to Visual Studio. Done

ap--delete Watin Test recorder v2 throw exception

Bug reported here: http://sourceforge.net/tracker/index.php?func=detail&aid=2934193&group_id=193118&atid=944137

ap--delete Watin Test recorder V1 generates unsupported code -> manual fixing needed :-(

 

Code output of recorder

selenium.Open("/Public/default.aspx"); selenium.Click("//div[@id='userlogin']/div/div[2]"); selenium.Click("//div[@id='userstatusLoggedOut']/div/a/span"); selenium.WaitForPageToLoad("30000");
selenium.Type("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm_CreateUserStepContainer_FirstName", "o"); selenium.Type("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm_CreateUserStepContainer_LastName", "g"); selenium.Type("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm_CreateUserStepContainer_Email", "peter@gfader.com"); selenium.Type("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm_CreateUserStepContainer_ConfirmEmail", "peter@gfader.com"); selenium.Type("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm_CreateUserStepContainer_Password", "password!"); selenium.Type("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm_CreateUserStepContainer_ConfirmPassword", "password!"); selenium.Click("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm___CustomNav0_StepNextButtonButton"); selenium.WaitForPageToLoad("30000");
selenium.Click("link=Log Out"); selenium.WaitForPageToLoad("30000");

Figure: Simulating a user registration with Selenium

 

IE ie = new IE("about:blank"); ie.GoTo("http://REMOVED.ssw.com.au/Public"); ie.Div(Find.ByCustom("innertext", "Member Login")).Click(); ie.Link(Find.ByUrl("http://REMOVED.ssw.com.au/Public/Profile/Register.aspx")).Click();
ie.TextField(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$CreateUserStepContainer$FirstName")).TypeText("Peter"); ie.TextField(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$CreateUserStepContainer$LastName")).TypeText("Gfader"); ie.TextField(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$CreateUserStepContainer$Email")).TypeText("petermenuqggfader.com"); ie.TextField(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$CreateUserStepContainer$Password")).TypeText("petermenuqggfader.com"); ie.TextField(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$CreateUserStepContainer$Password")).TypeText("passmenumenuqword!"); ie.TextField(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$CreateUserStepContainer$ConfirmPassword")).TypeText("passmenuqword!"); ie.Button(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$__CustomNav0$StepNextButtonButton")).Click();

Figure: Simulating a user registration with WatiN

 

apcheck_thumb1 Selenium is a tool to create tests for web apps

apcheck_thumb1 Selenium’s output is a whole test class

apcheck_thumb1 Selenium’s output code is using relative URL’s (that you define in your test base URL)

apcheck_thumb1 Selenium code: Easy to read

ap--delete WatiN: The code output from the test recorder v1 is quite complicated to read.

I prefer Seleniums: “selenium.Click” instead of the long string and then seeing the “Click()”

// WatiN
watin.TextField(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$CreateUserStepContainer$ConfirmPassword")).TypeText("password, f17");
watin.Button(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$__CustomNav0$StepNextButtonButton")).Click();

// Selenium
selenium.Type("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm_CreateUserStepContainer_ConfirmPassword", "password");
selenium.Click("ctl10_MainContentArea_ctl00_ctl00_CreateUserForm___CustomNav0_StepNextButtonButton");
         

Figure: Code comparison of WatiN with Selenium. Enter text in a password field and click on button

ap--delete WatiN : Output code from Watin Test recorder v1 was wrong.

Some input control TypeText() was missing
Finding of elements didn't always work E.g.  <a href="xx"> <span> My funkty test </span> </a>  

 

Running the tests

ap--delete Selenium needs a JAVA server to execute the tests

apcheck_thumb1 WatiN doesn't need a proxy server!

ap--delete Selenium is quite slow to run

Output from the Selenium Java server (see the 2 seconds of start up gap)

19:11:54.341 INFO - Command request: getNewBrowserSession[*chrome, http://REMOVED.ssw.com.au/Public/, ] on session null
19:11:54.341 INFO - creating new remote session
19:11:54.341 INFO - Allocated session 69581bdd207a4684b61f6c368af906f0 for http://REMOVED.ssw.com.au/Public/, launching...
19:11:54.370 INFO - Preparing Firefox profile...
19:11:56.895 INFO - Launching Firefox...

 

Code maintainance

apcheck_thumb1 Selenium makes working with Firefox perfectly together: uses the same name as in HTML

E.g. ctl10_MainContentArea_ctl00_ctl00_SubTotal

That means you can copy & paste from FireBug directly to Visual Studio

string priceSubTotalOnCheckout = selenium.GetText("ctl10_MainContentArea_ctl00_ctl00_SubTotal");

ap--delete Watin replaces the underscores with a dollar sign (This is annoying when copy paste from FireBug)

ctl10_MainContentArea_ctl00_ctl00_SubTotal
    needs to be converted to
ctl10$MainContentArea$ctl00$ctl00$SubTotal

string resultText = browser.Element(Find.ByName("ctl10$MainContentArea$ctl00$ctl00$SubTotal")).Text;

 

Note
image
Figure: Selenium is coming from the Java world, as you can see this here. No properties :-) --> GetXXX

 

What about  Visual Studio 2010 and Test & Lab Manager

  1. In Test & Lab Manager you define a test case that links to a user story
    1. User story: As a customer I want to search and buy a bag so that I satisfy my needs for a bag
    2. Test case below
      image
  2. Now you run you test with an Action recording
    1. This is easy. Just follow the instructions from the test case
    2. Done
  3. Close down Test Lab Manager and open Visual Studio, add "Coded UI test" with an "Existing action recording"
  4. Code that you get

[DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", "http://win-peterG:8080/tfs/DefaultCollection;Peter-Gfader-WebTest", "140", DataAccessMethod.Sequential), TestMethod] public void CodedUITestMethod1() { this.UIMap.Openbrowser(); this.UIMap.Gotostartpage();
this.UIMap.ClickonRegisterNew(); this.UIMap.EnterdetailsfirstnamelastnameemailpasswordParams.Ctl10MainContentAreaEditText = TestContext.DataRow["firstname"].ToString(); this.UIMap.EnterdetailsfirstnamelastnameemailpasswordParams.Ctl10MainContentAreaEdit1Text = TestContext.DataRow["lastname"].ToString(); this.UIMap.EnterdetailsfirstnamelastnameemailpasswordParams.Ctl10MainContentAreaEdit2Text1 = TestContext.DataRow["email"].ToString(); this.UIMap.EnterdetailsfirstnamelastnameemailpasswordParams.Ctl10MainContentAreaEdit3Text1 = TestContext.DataRow["email"].ToString(); this.UIMap.EnterdetailsfirstnamelastnameemailpasswordParams.Ctl10MainContentAreaEdit4Text = TestContext.DataRow["password"].ToString(); this.UIMap.EnterdetailsfirstnamelastnameemailpasswordParams.Ctl10MainContentAreaEdit5Text = TestContext.DataRow["password"].ToString(); this.UIMap.Enterdetailsfirstnamelastnameemailpassword(); this.UIMap.ClickonRegister();
this.UIMap.Searchforbag(); this.UIMap.Add1stbagfoundtoshoppingcart();
this.UIMap.Gotoshoppingcart();
this.UIMap.DoCheckout();
this.UIMap.EnterAddressdetails(); this.UIMap.Placeorder(); }

Figure: Code generated by VS2010 for a registration of a new user, searching for a bag, adding this bad and going through the checkout

apcheck_thumb1 VS2010 code is very easy to read. And there are a lot of things happening behind the scenes

UIMap is a huge file generated for you that does all the magic behind the scenes, like finding controls, clicking buttons, …

UIMap: Strongly typed representation of controls

 

How is Visual Studio finding controls?

        public HtmlInputButton RegisterButton
        {
            get
            {
                if ((this.mRegisterButton == null))
                {
                    this.mRegisterButton = new HtmlInputButton(this);

                    #region Search Criteria

                    this.mRegisterButton.SearchProperties[HtmlProperties.Button.Id] = "ctl10_MainContentArea_ctl00_ctl00_CreateUserForm___CustomNav0_StepNextButtonButton";
                    this.mRegisterButton.SearchProperties[HtmlProperties.Button.Name] = "ctl10$MainContentArea$ctl00$ctl00$CreateUserForm$__CustomNav0$StepNextButtonButton";
                    this.mRegisterButton.FilterProperties[HtmlProperties.Button.DisplayText] = "Register";
                    this.mRegisterButton.FilterProperties[HtmlProperties.Button.Type] = "submit";
                    this.mRegisterButton.FilterProperties[HtmlProperties.Button.Title] = null;
                    this.mRegisterButton.FilterProperties[HtmlProperties.Button.Class] = null;
                    this.mRegisterButton.FilterProperties[HtmlProperties.Button.ControlDefinition] = "id=ctl10_MainContentArea_ctl00_ctl00_Cre";
                    this.mRegisterButton.FilterProperties[HtmlProperties.Button.TagInstance] = "40";
                    this.mRegisterButton.WindowTitles.Add("Peter Gfader | Sign Up - Windows Internet Explorer");

                    #endregion

                }
                return this.mRegisterButton;
            }
        }

Figure: VS 2010 Beta2 generated code for finding a button on a web page. I think this is way TOO STRICT

ap--delete VS2010: All the "SearchProperties"above have to match, otherwise the button won’t be found. If too many controls are found from the "SearchProperties", the "FilterProperties" are applied one by one. All details on Balagans Blog - How does “Coded UI test” finds a control?

ap--delete There is no option to customize the default generated SearchProperties

 

I would probably change that to

        public HtmlInputButton RegisterButton
        {
            get
            {
                if ((this.mRegisterButton == null))
                {
                    this.mRegisterButton = new HtmlInputButton(this);
                    #region Search Criteria

                    this.mRegisterButton.FilterProperties[HtmlProperties.Button.DisplayText] = "Register";
                    this.mRegisterButton.FilterProperties[HtmlProperties.Button.Type] = "submit";

                    #endregion
                }
                return this.mRegisterButton;
            }
        }

apcheck_thumb1 Better way to search for the Register button. Filter on DisplayText and type of the control.
Note: This would fail if there are 2 buttons with "Register" and of type "Submit" on the page. Which is excellent!

 

Can VS2010 simulate a FireFox?
See this image for details about the VS2010 platform support
image
Figure: VS2010 platform support from http://videos.visitmix.com/MIX09/T83M

 

 WebAII looks very promising. I will definitely have a closer look on that tool in the next weeks, months…

 

Conclusion: Please count the apcheck_thumb1 green ticks and  ap--delete red crosses

Other interesting opinions about Watin and Selenium on testdrivendeveloper

 

PERSONAL
I would not automate the UI too much because that makes your test very fragile for future changes. That you will have sooner or later!

ap--delete BAD EXAMPLE
Create a coded UI test for a whole user interaction with your web app 
e.g. Register, Login, Browse, Find, Add to Shopping cart, Update Billing Address, Update Shipping Address, Checkout, Pay, See Order successful

Makes your UI test very fragile!
But could be a “Done” criteria for your SCRUM team: "An acceptance UI test must be written for each user story"

 

apcheck_thumb1 GOOD EXAMPLE
1. Create a coded UI tests for single screens
e.g. Logon screen:
  Assert "Username", "Password" boxes and "Login" button are there

2. Create a functional test for testing the actual Login functionality.

Latest Posts

Popular Posts