UI Automation - Do's & Don'ts

[Me]:- Guruji, I am planning to start some automation.

[Guruji]:- That’s very good.

[Me]:- Can you please help me with some Do’s and Don’ts of UI Automation?

[Guruji]:- Sure, check this out.

Do’s Don’ts
  • Explicitly set focus to the window on which the test Case is expected to input data.

  • Capture screen shots for failures. Helps in debugging.

  • Point to dev resource files for localized strings in a UI app. This would help a lot in pseudo loc testing.

  • Leave the UI in a known state after a test Case is done executing. E.g.: Close the wizard even if the test Case is to test the first screen of a wizard by canceling out of the wizard after the first screen.

  • Validate that the object being created using the UI with the one being stored in the backend system

  • Log every valid UI operation being performed in the test Case.

  • Use resource files for all data required to be entered in the UI.
  • Try to localize the usage of the UI automation tool as much as possible in order to avoid deep dependencies with one tool. E.g. Encapsulate the usage of the UI automation tool into a small framework for your UI automation. Use this framework to write test cases rather than the tool directly. This would decouple the tool from the test cases to a large extent. If the team decides to use a new tool, only the framework would need to rewritten using the new tool but the bulk of test code remains unchanged
  • Do not log multiple times.

  • Do not sleep after every UI operation.

  • Do not give unusually long timeouts for every major operation.

  • Fail immediately after an unexpected screen.

  • Do not re-launch the UI application for every test Case as it is a time consuming process

author

Vinay Jagtap

A hard core Technocrat with over a decade of extensive experience in heading complex test projects coupled with real time experience of project management and thought leadership. Extensive experience in Performance, Security and Automation Testing and development of automation frameworks and ability to setup and execute Global service centers and Center of Excellences for testing.

Get Free Email Updates to your Inbox!

www.CodeNirvana.in

Powered by Blogger.

Translate

Total Pageviews

Copyright © T R I A G E D T E S T E R