C#

WatiN on VSTS

Yes - you can use WatiN and Visual Studio Team System!  Simply create a brand new Unit Test within your project and use WatiN within the test methods.  The only catch is if you get an error that looks like this : 

The location of the file or directory ___ is not trusted.  To resolve this I needed to right click on BOTH WatiN.Core.dll and Interop.SHDocVw.dll and click the "Unblock" button at the bottom.  After that I needed to rebuild my project before the tests would run.

 

Search and Replace in Multiple Files

with terms

Unfortunately I have a client who insists on using 1990's technology for their website and does not want to use a CMS.  This makes tiny little changes to the site take a very long time because every single html file has to be visited and changed.  When I went online to search for an existing search and replace program that would work on multiple files I came across a bunch of programs I either had to pay for or were too shady, so I decided to code up my own app real quick.  The resulting app is attached (source code too).

A helper tool for Visual Studio Team System webtests

with terms

I recently encountered one of those nasty web applications that can only be created with ColdFusion by ColdFusion developers.  Yikes!  Anyways, the only real way to be able to create web tests for this particular app turned out to be the following steps:
1) Record the test steps with fiddler
2) Re-record the exact same steps with fiddler
3) Use the differences between the two recordings to determine what data to parameterize and what data to get from extraction rules.
 

Creating a smart Extraction Rule for VSTS

In doing performance testing it is extremely common to encounter situations where your test scripts need to choose a specific link on the page based on some condition.  For example, consider the following table:

Testing Drupal with Watin : Watching For Errors

with terms

The following class can be used to override the standard IE object in WatiN to run specific tests after every page load.  For example, in Drupal this class can be used to make sure that no error messages appear on any page during the test run.
 

Browser based web testing with WatiN, Gallio, and MbUnit (Part 2)

with terms

In my previous post, I discussed the basics of using Gallio, MbUnit, and WatiN to test web applications.  In the previous example you could continue to add tests to the class by creating additional test methods and marking them with the test attribute.  However, you could not guarantee what kind of order those tests would run in.  Fortunately, MbUnit/Gallio is a flexible enough framework to allow you to create orderd test suites which is a common need for functional testing.
 

Browser based web testing with WatiN, Gallio, and MbUnit

with terms

This post is about three remarkable open source testing tools.  WatiN, a .NET based web application testing framework can be used to drive the Internet Explorer, Firefox, and even Chrome web browsers.

Controlling test flow in FitNesse (making it stop running rows)

with terms

This article applies directly to FitNesse .NET’s DoFixture, but can be adapted for use in other fixtures. One of FitNesse’s greatest weaknesses is the lack of flow control within tests. In everyday real world automated testing there are plenty of times where you will want a test to stop executing so that it does not waste time or cause damage. First create some variables to use to control test flow. 
 

Creating an lParam value for windows API function calls (C#)

with terms

I recently found a really neat way to create lParam parameters for the Window’s API SendMessage and PostMessage functions. This specifically applies to messages like WM_MOUSEMOVE that require both an x and a y coordinate to be encoded into that single parameter. I had been using code like this :

Syndicate content