Lecture
Automated Testing Software ( Automation Testing )
- is the process of software verification, in which the basic functions and steps of the test, such as running, initializing, executing, analyzing and issuing the result, are performed automatically with the help of tools for automated testing.
Automated Functional Testing Software ( Functional Automation Testing )
- This is the process of verifying the functional requirements and features of the application under test, using the tools for automated testing. (see also Functional Testing)
We offer your attention to the following topics, which give answers to the most common questions that arise during the implementation of automated testing :
We also recommend reading the articles of automated testing specialists :
A lot of misconceptions are associated with the automation of testing, as well as with many of the narrowly focused IT disciplines. In order to avoid inefficient use of automation, it is necessary to bypass its disadvantages and maximize the benefits. Next, we will list and give a brief description for the main nuances of automation and give an answer to the main question of this article - when automation should be used.
In order to decide whether to automate an application, you need to answer the question “do the benefits in our case outweigh the benefits?” - at least for some of the functionality of our application. If you cannot find such parts, or defects in your case are unacceptable - you should refrain from automation.
When making a decision, it is worth remembering that the alternative is manual testing, which has its drawbacks.
In the search for effective places to automate you can help the chapter "What you need to automate."
Asking: “ What to automate? ", You must first answer the question:" Is it expedient to automate testing under project conditions? " If the answer is "YES", then it is necessary, based on the requirements for the test object, to create a plan according to which automated tests will be developed. When creating such a document, you must clearly understand “ what to automate? ”, “How to automate?” and "how to automate?". We will not go into details on how and how to test this or that function, we simply list the places where , in our opinion, automation should be used :
And also, much more, depending on the requirements for the system under test and the capabilities of the chosen tool for testing.
For more efficient use of test automation, it is better to develop separate test cases checking:
Example : creating, deleting, viewing and changing user data.
Example : a user visits a mailing site, scrolls through letters, browses new ones, writes and sends an email, leaves the site. This is the so-called end-to-end script that tests a set of actions. We suggest that you use just such scenarios, since they allow you to return the system to the state as close as possible to the original one, which means that it has a minimal effect on other tests.
Example : the system creates some xml file whose structure needs to be checked.
This is the functionality, from the automation of testing which, you can get the greatest return.
In this section, we consider the aspects that influence the choice of a test automation tool.
First , you should note how well the automation tool recognizes the controls in your application. In the case when the elements are not recognized, it is worth looking for a plugin, or a corresponding module. If there is none, it is better to give up the tool. The more elements a tool can recognize, the more time you will save on writing and script support!
Secondly , you need to pay attention to how long it takes to support scripts written using the selected tool. To do this, write down a simple script that selects a menu item, and then imagine that the menu item you want to select has changed. If you have to overwrite the entire script to restore the script to its working capacity, the tool is not optimal, since real scenarios are much more complicated. Best of all is the tool that allows you to bring the name of the button to a variable at the beginning of the script and quickly replace its value. Ideally, describe the menu as a class.
And the last point to which you need to pay attention - how convenient is the tool for writing new scripts . How much time is required for this, how much can the code be structured (OOP support), how read is the code, how comfortable is the development environment for refactoring (processing the code), etc.
It is best to answer the questions “Why? What? How? ” In that order. This will help avoid wasting time spent on nerves and finances. On the other hand, you can get reliability, speed and quality !!!
The choice of instrument often depends on the test object and requirements for test scenarios , since Testing tools cannot support absolutely all technologies used in application development. That is, the choice of the tool comes down to the banal method of trial and error. As a result, often we choose several tools to test the functions of the application. For example, we check GUI using Mercury WinRunner , backend processes using “java based test tools” or other tools. The main aspects of choosing a test automation tool are discussed in the "How to automate?" Section.
Consider the tools for automated functional testing from different manufacturers:
Company | Tool |
Hewlett-Packard (Mercury Interactive) | QuickTest Professional, WinRunner |
IBM Rational | Rational Robot, Rational Functional Tester |
Borland (Segue) | Silktest |
AutomatedQA Corp | Testcomplete |
Microsoft | Microsoft VS 2005 |
Seleniumhq | Selenium |
I would also like to highlight a separate Java library for automated testing ( java based test tools and libraries ):
Tool | Description |
Selenium | It is a set of different software tools. |
Watij | Watij (pronounced wattage) stands for Web Application Testing in Java. Watij is a pure Java API. This is a real browser. Currently Watij supports automating Internet Explorer on Windows only. Future plans to support others like Mozilla. |
HtmlUnit | HtmlUnit is a "browser for Java programs". It makes it possible for you to invoke pages, fill out forms, click links, etc ... It is quite a good javascript support (it’s really a good javascript) and it’s easy to use. It is typically used for testing purposes or to retrieve information from web sites. HtmlUnit is not a generic unit testing framework. It is specifically for the purposes of the testing framework such as JUnit or TestNG. |
HttpUnit | Writes in Java, emulates the browser, emulates javascript, basic JavaScript authentication, cookies and automatic page redirection, and allows you to emulate , tables, and links. When combined with a framework such as JUnit, it is easy to verify the functioning of a web site. |
Jamaleon | It can be easily used for technical and non-technical users alike. This is a group of keywords. It can be defined in Java and mapped to these keywords. It can be organized as a script. The test scripts are then used to test case documentation. |
Junit | JUnit is a simple framework to write repeatable tests. It is an architecture of unit testing framework. |
Abbot | Abbot is a simple framework for Java and GUIs. Facilitates generating user actions and examining component state. Supports recording and playback on any Java application. |
Marathon | You need to take care of your needs. The generated raw script can be re-factored for modules for efficient reuse and maintainability. Replay the scripts into the test suites. |
There are also a huge number of frameworks and tools focused not only on Java, but also on other programming languages, such as: ruby, php, C #, javascript, python, perl, etc. We will review them in the near future.
Conventionally, the application under test can be divided into 3 levels:
To ensure the best quality of the product, it is recommended to automate all 3 levels. Let us consider in more detail the testing automation strategy based on a three-tier model:
Automated tests at this level are understood as Component or Unit tests written by developers. Testers no one forbids writing such tests that will check the code, of course, if their qualifications allow it. The presence of such tests in the early stages of the project, as well as their constant replenishment with new tests that check "bug fixes", will save the project from many serious problems.
As a rule, not all the business logic of an application can be tested through the GUI layer. This may be an implementation feature that hides business logic from users. For this reason, by agreement with the developers, for the testing team, access can be directly provided to the functional layer, which makes it possible to test the business logic of the application directly, bypassing the user interface.
At this level, it is possible to test not only the user interface, but also the functionality, performing operations that invoke the business logic of the application. From our point of view, this kind of end-to-end tests give a greater effect than just testing the functional layer, as we test the functionality, emulating the actions of the end user, through a graphical interface.
For the convenience of imposing automated tests on existing test cases, the structure of the test scripts should be similar to the structure of the test case - Precondition, Steps & Post Condition.
We get the rule that every test script should have:
We list the main functions of the script:
It is also recommended to create a common library for handling errors and exceptions. For example:
As a result, taking advantage of the above recommendations, you will have a common architecture for test scripts and scripts. Having reviewed the articles on the use of the PageObject pattern in the section "Articles and Practical Tips for Test Automation," you can implement your own framework for test automation via the GUI.
To test automation gave the desired results, namely, reduced the time for software testing, the following is proposed:
Writing and approach to test automation depends on the application development process. Taking the RUP (Rational Unified Process), described on the pages of the blog "ProTesting", I can offer the following procedure, divided into phases:
A more detailed overview of the use of RUP in software development can be found in the following document: RUP_bestpractices_TP026B.pdf
Comments
To leave a comment
Quality Assurance
Terms: Quality Assurance