views:

444

answers:

9

We develop custom survey web sites and I am looking for a way to automate the pattern testing of these sites. Surveys often contain many complex rules and branches which are triggered on how items are responded too. All surveys are rigorously tested before being released to clients. This testing results in a lot of manual work. I would like to learn of some options I could use to automate these tests by responding to questions and verifying the results in the database. The survey sites are produced by an engine which creates and writes asp pages and receives the responses to process into a database. So the only way I can determine to test the site is to interact with the web pages themselves. I guess in a way I need to build some type of bot; I really don't know much about the design behind them.

Could someone please provide some suggestions on how to achieve this? Thank you for your time,

Brett

+10  A: 

Check out selenium: http://selenium.openqa.org/

Also, check out the answers to this other question: http://stackoverflow.com/questions/484/how-do-you-test-layout-design-across-multiple-browsersoss

+5  A: 

You could also check out WatiN.

Jon Limjap
A: 

Sounds like your engine could generate a test script using something like Test::WWW::Mechanize

zigdon
A: 

Usual test methodologies applies; white box and black box.

White box testing for you may mean instrumenting your application to be able to make it go into a particular state, then you can predict the the result you expect.

Black box may mean that you hit a page, then consider of the possible outcomes valid. Repeat and rinse till you get sufficient coverage.

Another thing we use is monitoring statistics for our service. Did we get the expected number of hits on this page. We routinely run a/b tests, and I have run a/b tests against refactored code to verify that nothing changed before rolling things out.

/Allan

Allan Wind
A: 

I can think of a couple of good web application testing suites that should get the job done - one free/open source and one commercial:

  1. Selenium (open source/cross platform)
  2. TestComplete (commercial/Windows-based)

Both will let you create test suites by verifying database records based on interactions with the web app.

The fact that you're Windows/ASP based might mean that TestComplete will get you up and running faster, as it's native to Windows and .NET. You can download a free trial to see if it'll work for you before making the investment.

berberich
A: 

Check out the unit testing framework 'lime' that comes with the Symfony framework. http://www.symfony-project.org/book/1_0/15-Unit-and-Functional-Testing. You didn't mention you language, lime is php.

Roel
A: 

I would suggest the mechanize gem,available for ruby . It's pretty intuitive to use .

Vhaerun
A: 

As I understand what you're trying to test, it seems that you could automate a process to check correct functionality of surveys. With some clever programming, you could even have a single test process that can run any survey you throw at it. That would be the goal. I have used WatiN, which is basically a library with functions that allow you to perform actions on page elements robotically, but you have to be willing to learn it. Setup is very easy, but it's a very manual process, a line-by-line procedural process, and there weren't a lot of validation options.

Selenium seemed a bit overwhelming to me, but I just wasn't willing to overcome my own ignorance of it. From what little I toyed with it, it seems to have a lot of nice features. How much time can you invest in an automation tool?

MrBoJangles
A: 

I use the QEngine(commerical) for the same purpose. I need to add a data and check the same in the UI. I write one script which does this and call that in a loop. the data can be passed via either csv or excel. check that www.qengine.com , you can try Watir also.