Web test advices

  1. Start your development cycle with use cases. Then use those use cases to create web tests. If you can't implement a web test from a use case, it probably wasn't a good use case neither.
  2. Prepare your html pages for testing. Give each field an id. Use the id to find the elements you want to verify.
  3. Do not use XPath or deeply cascaded structures to identify fields. Beliefe me, your layout will change.
  4. Group complicated steps in meaningful units.
  5. Describe what those units do.
  6. Keep your tests simple. If your test code gets more complicated than your program code, test manualy.
  7. Keep always all tests green. If you need to remember, which tests should be green and which ones fail, your test strategy is in troubles
  8. Run your tests often. Run them each time, you implement something. So you keep them in sync with your implementation. And you get the chance to detect errors before your clients do :-).