views:

44

answers:

2

Hey guys,

For our webapp testing environment we're currently using watin with a bunch of unit tests, and we're looking to move to selenium and use more frameworks.

We're currently looking at Selenium2 + Gallio + Xunit.net,

However one of the things we're really looking to get around is compiled testcases. Ideally we want testcases that can be edited in VS with intellisense, but don't require re-compilling the assembly every single time we make a small change,

Are there any frameworks likely to help with this issue? Are there any nice UI tools to help manage massive ammount of testcases?

Ideally we want the testcase writing process to be simple so that more testers can aid in writing them.

cheers

A: 

You wont get around compiling test frameworks if you add new tests..

However there are a few possibilities.

First:

You could develop a native language like i did in xml or similar format. It would look something like this:

[code] action name="OpenProfile" parameter name="Username" value="TestUser" [/code]

After you have this your could simply take an interpreter and serialize this xml into an object. Then with reflection you could call the appropriate function in the corresponding class. After you have a lot of actions implemented of course perfectly moduled and carefully designed structure ( like every page has its own object and a base object that every page inherits from ), you will be able to add xml based tests on your own without the need of rebuilding the framework it self.

You see you have actions like, login, go to profile, go to edit profile, change password, save, check email etcetc. Then you could have tests like: login change password, login edit profile username... and so on and so fort. And you only would be creating new xmls.

You could look for frameworks supporting similar behavior and there are a few out there. The best of them are cucumber and fitnesse. These all support high level test case writing and low level functionality building.

So basically once you have your framework ready all your have to do is writing tests.

Hope that helped.

Gergely.

Hannibal
A: 

You can write them in a language like ruby (e.g., IronRuby) or python which doesnt have an explicit compile step of such a manner.

If you're using a compiled a compiled language, it needs to be compiled. Make the assemblies a reasonable size and a quick Shift F6 (I rewire it to shift Ins) will compile your current project. (Shift Ctrl-B will typically do lots of redundant stuff). Then get NUnit to auto-re-run the tests when it detects the assembly change (or go vote on http://xunit.codeplex.com/workitem/8832 and get it into the xunit GUI runner).

You may also find that CR, R# and/or TD.NET have stuff to offer you in speeding up your flow. e.g., I believe CR detects which tests have changed and does stuff around that (at the moment it doesnt support the more advanced xunit.net testing styles so I dont use it day to day)

Ruben Bartelink