Web test advices
- 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.
- Prepare your html pages for testing. Give each field an id. Use the
id to find the elements you want to verify.
- Do not use XPath or deeply cascaded structures to identify fields.
Beliefe me, your layout will change.
- Group complicated steps in meaningful units.
- Describe what those units do.
- Keep your tests simple. If your test code gets more complicated than
your program code, test manualy.
- 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
- 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 :-).