Wednesday, 9 October 2013

Automation Framework

Selenium for beginners:

Automation framework nothing but a set of rules or guidelines and standards defined to follow, by following these rules and standards we can achieve beneficial results
A set of guidelines like coding standards, test-data handling, object repository treatment etc... Which when followed during automation scripting produces beneficial outcomes like increase code re-usage, higher portability, reduced script maintenance cost etc.
There are 5 different types of automation frameworks

1.     Linear Framework: It is script generated by tool when user records the particular scenario. If required can be changed to some extent to make it easily understandable.
2.     Structured or Modular Framework: The script uses control structures - like ‘if-else’,‘switch’, ‘for’, ‘while’. Reusable functionalities will be identified here and divide them as small methods which can be called anywhere within the test case independently whenever required.
3.     Data driven Framework: When the requirement is something like want to execute a particular functionality for the different set of data, changing the hardcoded values or variable values again and again it’s a tough work. Here where the concept of external files comes in to picture, we can easily maintain the set of data outside the test and can interact with those files through scripts. The data can be stored in a excel sheets, CSV files or data base.
4.     Keyword driven Framework: The Keyword-driven tests look very similar to manual test cases. In a keyword-driven test, the functionality of the application-under-test is documented in a table as well as in step-by-step instructions for each test. The main difference of Data driven and Keyword driven is, in Keyword driven we can have control over the execution of the test scripts whereas in data driven we don’t have control over the script execution outside the tests.
5.     Hybrid Framework:The combination of above any two frameworks makes the hybrid framework.
 
Understanding of each automation frameworks, by automating the google log in scenario. Using selenium 2 and TestNG with ant build. The below is the step by step representation of developing a automation framework.

2 comments:

  1. Thanks for sharing valuable information and it is useful for Sun it labs provides the best Selenium Testing Online Training classes.

    ReplyDelete