📜 ⬆️ ⬇️

Introduction to frameworks (Part 1)

Automated Testing
Automated testing (AT) is most effective when implemented using the framework. Despite the fact that in AT, the term framework is often used to describe the set of objects that forms the unit testing tool, this article will be mainly focused on other types of frameworks. We will discuss the types of frameworks that can be defined as a set of abstract concepts, processes, procedures, and environments through which automated tests are designed, created, and implemented. In addition, this definition of the framework includes physical objects used to create tests and their implementation, as well as to organize the logical interaction between components.
Automated testing (and, therefore, frameworks) has evolved over the years, evolving and becoming more complex with each new phase of evolution. These phases can be described in terms of three generations, each of which has a set of disadvantages and advantages, due to which each of them remains relevant, despite new developments. The concepts below are commonly used to automate functional testing, but in some cases they can be used to solve unit testing problems.

First generation frameworks

The first generation of frameworks in test automation is initially based on a linear approach to the development of automated tests. A linear approach usually results in a one-dimensional set of automated tests, in which each autotest is considered simply as the implementation of its “manual” equivalent. All components that are used by the autotest are generated for the most part using the “record-play” technique and are mainly located inside this autotest. At the same time, there is practically no modularity, code reuse, and other elements that determine software quality in scripts. The scope in which such tests can be useful is quite small.

Linear frameworks
An example of a small linear script is presented below. Please note that there are no calls to external modules and access to external data.
  1. Input “John” into Username textbox
  2. Input “JPass” into Password textbox
  3. Click Login button
  4. If “Welcome Screen” exists then
  5. Pass the test
  6. Else
  7. Fail the test
  8. End if
In most cases, the use of the “record-play” technique cannot be considered as a framework or a serious approach to automation. Nevertheless, many would agree that this technique may in some cases be useful.
')
Advantages of linear frameworks

Disadvantages of linear frameworks

Part 2.

Source: https://habr.com/ru/post/150508/


All Articles