Summary: It is important to avoid falling into the trap of believing that some magical tool is going to eliminate the need for thinking and planning, because automated testing is most effective when planned and implemented within a framework. The term framework is often thought of as the collective structures that compose a unit testing tool. In this article, however, frameworks will be discussed in a different context; one where it is defined as a set of abstract concepts, processes, procedures and environment in which automated tests will be designed, created and implemented. In addition, this framework definition includes the physical structures used for test creation and implementation, as well as the logical interactions among those components. The creation of a well thought out framework, customized to your environment can be challenging, so this article identifies 5 simple steps that will help serve as your blueprint for getting it done.
Designing an automated test framework involves first identifying the type of framework that will be developed. This typically requires researching and understanding your software development environment as well as the application(s) under test (AUTs), and determining which framework will work best. When in doubt about the framework that will work best in your environment, the safest choice is a functional decomposition framework. Functional decomposition frameworks can be as simple or as complex as deemed necessary in order to handle the demands of the automation scope. Once a decision has been made about the framework type, it is imperative to identify the basic components that will compose the framework, and have a high-level picture of how these components interact with one another. Figure 1 presents a basic design example that you may decide to use or build upon in your automation efforts. There are four main segments in this framework design:
Driver Segment Test Segment Function Segment Parameter Segment
The Driver Segment, represented by a script or tool, reads from the Execution Level File, which stores execution level information for each test script (test name, test priority, etc). Next, the Driver Segment calls upon the Parameter Segment to initialize the environment, and set parameters necessary for the test run. After calling the Parameter Segment, the Driver Segment calls and executes tests based on the associated priority. Control is then yielded to the test scripts in the Test Segment for AUT verification. The Test Segment frequently calls functions from the Function Segment for performing succinct test case actions that collectively compose a test case. In addition, the tests in the Test Segment may call upon Data Files to obtain the data necessary for test execution |