The .NET 2.0 release
In V2.2 I have rebuilt the GUITesting framework using VS.Net 2005 ans 2008. No changes really, the built in converter from VS.Net 2003 to 2005 did the job with no errors. At this time I have not done any work to exploit the new features of .NET 2.0. Equally I have not retarget for the 3.5 framework as it provide no quick benefits.
However, what I have had a look at is integrating the new testing features of VS.Net 2005/8 Team Developer edition. So in this V2.x source release you will find a test project, sorry if you not have Team developer edition of VS.Net, just remove the test project when it fails to load!
So how did the integration with a Microsoft Test Project go? In the past I had my own test run EXE to do the testing, it looks for custom attributes that define the tests then runs them, this still work. However, as I wanted to use VS.NET to run the tests, I needed to run my declared tests via a
TestMethod in a test project. I have written a wrapper to do this which can be seen on the test project. Using this wrapper code in the
TestMethod the tests run fine, the problem is that all my defined tests appear as a single VS.Net test. Fine if they all pass, but not that helpful debugging. The only other option is to create a
TestMethod for each test a have in my application under test, not really an options as these tests are user defined and discovered via reflection.
The ClickTextTest attribute now has an optional extra boolean flag, this allows you to say if the text to match is a fixed string or a regular expression. The usage to check a textbox contains an email address:
[ClickTextTest("email test","textBoxRegularExpression",@"^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$",true)]
private Button btnRegularExpression;
private TextBox textBoxRegularExpression;
There is also a simple text field test that allow you to validate that a field matches a regular expression, this is used in the form:
[RegularExpressionTest("email test",@"^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$")]
private TextBox textBoxRegularExpression;