Pain of testing legacy batch software

From CitconWiki
Revision as of 08:41, 22 October 2012 by Tamas.rev (talk | contribs) (Created page with " == Pain of batch testing legacy software == === Problem description === * You have a legacy software that takes a lot of time to test: ** 2.5 months manually ** hours autom...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Pain of batch testing legacy software

Problem description

  • You have a legacy software that takes a lot of time to test:
    • 2.5 months manually
    • hours automatically
  • Testing through UI
  • Preparing data for tests takes hours
  • Tests are grouped so preparing the environment takes less time. Downside: the tests in a group are depending in each other, hence a failure in the beginning of the group compromises the rest of the test results


Brainstorming

  • When writing the tests, focus on the core functionality; then go with tests from the inside to the outside
  • the need of tests: "do agile right"
  • small steps: refactoring / making tests
  • manual smoke tests are not good enough
  • Solution to a specific problem: test SQL stored procedures in SQL. A.k.a. keep your tests simple
  • Find independent test batches
  • Test application changes too: test the code without the migration script; then run the migration script and run the after-migration asserts. This way you can verify the correctness of:
    • the original systems (you might need to roll back to it)
    • the migration script (you'll need to run it on the productin database)
    • the state of the system after the migration

Maintaining automated tests

  • Maintaining automated tests is important - as maintaining code is important too. Do it by:
    • keep them maintainable (:
    • make them abstract: use acceptance test frameworks as FitNesse. So you can define the tests in a human-readable format in 1 place and add the glue in another

Too many broken legacy tests

  • You cannot have too much tests
  • In case of broken test hard to tell apart:
    • broken functionality
    • changed functionality
  • Canary tests: an old, 100% good branch with its tests. If it fails ==> the environment is failing
  • QA tends to write shallow tests: they cover every page but not every case
  • Dev tends to write whitebox tests