Thursday, January 21, 2010

Solutions for problems of automated testing Web applications through UI

Here is the list of general problems of testing Web applications through UI:

  • Maintainability
  • Hard to create for non-programmers
  • Hard to handle AJAX
  • Hard to handle persistence
  • Erratic tests
  • Testing takes too much time
  • Hard to understand test flow
  • Hard to understand why test failed

Project design-of-selenium-tests-for-asp-net was created to show how to create automated UI tests for ASP.NET application using Selenium and minify influence of these problems. Description of how each particular issue can be avoided:

Problem: Maintainability
Problem: Hard to create for non-programmers
Problem: Hard to handle AJAX
Problem: Hard to handle persistence
Problem: Erratic tests
Problem: Testing takes too much time
Problem: Hard to understand test flow
Problem: Hard to understand why test failed

3 comments:

IvoG said...

I love your posts about Selenium in combination with .Net!

Do you also know any patterns for setting up databases to a deterministic state before each test ( given the fact that selenium grid is running tests in parallel on SUT )

Yauheni Sivukha said...

1) use separate instance of database for each test. Pretty bad for tests scalability - max count of parallel tests = count of available databases.

2) Separate in-memory database (like SQL Lite) for each test. Uses too much resources and doesn't ensure that test will work on real database.

3) Using fakes instead of real databases - requres advanced coding in SUT and doesn't ensure that test will work on real database.

Personally I do not like each of mentioned methods due to its limitations and try to create independent tests.

binkenzou said...

Hope you could have more time to write more about the Selenium 2.0(webdriver) with C#.