Tool for Writing Automated Tests

13
Tool for Writing Automated Tests Office in Ukraine Phone: +380 (472) 5-61-6- 51 E-mail: contact (at) qa- testlab.com Address: 154a, Borschagivska str., Kiev,

Transcript of Tool for Writing Automated Tests

Page 1: Tool for Writing Automated Tests

Tool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

Page 2: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

It is necessary to prepare autotests for performing automated testing of applications.

One can utilize the framework TestNG, which has such options as a description of the autotests in annotations, use of xml for flexible tests configurations, multi-threaded testing, and things like that.

Page 3: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Example of Annotations:

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

dependsOnGroups – the input parameters are the names of the methods groups on which the annotated test depends;

dependsOnMethods – the input parameters are the names of the methods on which the annotated test depends;

Page 4: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Example of Annotations:

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

groups – defines the relationship of the test or class to a particular group;

priority – defines the method priority.

Page 5: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

One may utilize built-in TestNG generator in conjunction with ReportNG to document the statements. A sample report is below.

Page 6: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

The utility Apache Ant can be used for building and running the project. It is possible to manage the building process by means of XML-script, also known as Build-file.

Page 7: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

In the first place, this file contains the definition of the project, consisting of separate targets. The targets are comparable with procedures in programming languages and contain activations of tasks.

Page 8: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

Each task is an indivisible, atomic command that performs an elementary action. Certain dependencies can be between the targets - each target is performed only after all targets, on which it depends, had been performed (if they have already been performed previously, they are not performed again).

Page 9: Tool for Writing Automated Tests

LOGO

clean – removing of the temporary files;

compile – compilation of all the classes;

deploy - application deployment on the server.

Tool for Writing Automated Tests

Typical Examples of the Goals Are:

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

Page 10: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

A certain set of goals and their interrelation depend on the project specificity. Ant allows to define customized types of tasks by means of creation of Java-classes that implement certain interfaces.

One may create autotests utilizing the technology of Selenium 2 in order to automate functional testing or other type of tests.

Page 11: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

Selenium is a framework for performing web site testing, it implements a new approach to validation of web-based applications. Unlike most of the tools that are used during web site testing and that attempt to simulate HTTP requests, Selenium operates in course of web-based testing as if it were a browser.

Page 12: Tool for Writing Automated Tests

LOGOTool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/

When a Selenium automated test is launched, the frame starts a browser and makes the browser perform all the steps from the test, in the same way the user would do it interacting with the application.

Specialists in automated testing often utilize Selenium.

Page 13: Tool for Writing Automated Tests

Office in UkrainePhone: +380 (472) 5-61-6-51E-mail: contact (at) qa-testlab.comAddress: 154a, Borschagivska str., Kiev, Ukrainehttp://qatestlab.com/