Test object framework-qtestware

Source: Internet
Author: User
What is qtestware?

Qtestware is a toolkit designed and developed for qtp automation testing engineers. It is the basic framework of qtp automation testing. qtestware solves many control recognition and recording problems, in addition, the interface for testing many controls is enhanced, making GUI Control Testing simpler and more convenient, making the qtp test script more stable, with more maintainability and reusability.

Qtestware solves the control recording Problem

Qtestware helps you solve the recording problems of many controls. For example, for the. NET control trackbar, the normal recording will get the following script:

Swfwindow ("form1"). swfobject ("trackbar1"). Drag 13, 12

Swfwindow ("form1"). swfobject ("trackbar1"). Drop 32, 10

Recorded is the drag and drop action of the mouse on the trackbar control. These scripts are not only readable, but also easy to play back and fail, and are not easy to understand and maintain the script.

After qtestware is used, the same operation will be recorded as the following script:

Swfwindow ("form1"). swfobject ("trackbar1"). setvalue 6

The recorded script is used to set the position value of the trackbar control. This makes the script easier to understand, and the playback can accurately locate the specified trackbar position, enhancing the maintainability of the script, such scripts are easier to modify and parameterize than the preceding scripts.

Qtestware solves control recognition problems

Qtestware helps you solve many control identification problems. For example, for the. NET control propertygrid, the normal recording will get the following script:

Swfwindow ("form1"). swfobject ("propertygridview"). Click 76,11

The script cannot identify each item in propertygrid and can only record it by coordinate position. This method is very unstable and cannot read or set each attribute value in propertygrid.

Using qtestware, you can use findpropertybylabel to read each attribute value in propertygrid:

Saveonclose = swfwindow ("form1"). swfobject ("propertygrid"). findpropertybylabel ("saveonclose ")

Maxrepeatrate = swfwindow ("form1"). swfobject ("propertygrid"). findpropertybylabel ("maxrepeatrate ")

Appversion = swfwindow ("form1"). swfobject ("propertygrid"). findpropertybylabel ("appversion ")

You can use setpropertygridvalue to set each attribute value in propertygrid:

Swfwindow ("form1"). swfobject ("propertygrid"). setpropertygridvalue "saveonclose", "true"

Swfwindow ("form1"). swfobject ("propertygrid"). setpropertygridvalue "maxrepeatrate", "3"

Swfwindow ("form1"). swfobject ("propertygrid"). setpropertygridvalue "appversion", "1.0"

Qtestware simplifies your script

Using qtestware can help you shorten the number of script lines and make your automated test scripts more concise. For example,. net Control menustrip. A normal recording menu item selects a script that contains at least two rows:

Swfwindow ("form1"). swftoolbar ("menustrip1"). showdropdown "file"

Swfwindow ("form1"). swftoolbar ("menustrip1"). Select "file; open; recent ...20.a.doc"

If you click the mouse on each cascade menu during recording, you may get a longer recording script:

Swfwindow ("form1"). swftoolbar ("menustrip1"). showdropdown "file"

Swfwindow ("form1"). swftoolbar ("menustrip1"). Select "file; open"

Swfwindow ("form1"). swftoolbar ("menustrip1"). Select "file; open; recent ..."

Swfwindow ("form1"). swftoolbar ("menustrip1"). Select "file; open; recent ...20. B .doc"

Using qtestware, you can use the selectmenu method of qtestware to compress the script to one line:

Swfwindow ("form1"). swftoolbar ("menustrip1"). selectmenu "file; open; recent ...20.c.doc"

We can get a shorter test script and a script that is easier to understand and maintain.

Qtestware encapsulates highly reusable scripts for you

From the perspective of test Script Development, qtestware encapsulates a variety of highly reusable scripts for you, summarizes the best practices in the industry, and extracts the control test logic to become the core test method, it saves you a lot of script development time. For example. net Control datagridview, qtp through swftable to support control testing, but the provided test operation is too basic, such as selecting a cell, swftable only provides selectcell (row, column) this test method:

Swfwindow ("form1"). swftable ("maid"). selectcell 0, "orderid"

Automated Testing engineers often need to write further test script extensions to meet the implementation needs of test cases. All of these are well designed for you, for example, using selectcellbytext of qtestware, you can select the cell of the specified content in the datagridview:

Swfwindow ("form1"). swftable ("datagridview1"). findcellbytext "107"

Through selectrowbyfield of qtestware, you can find the row where the cell in a column is the cell of the specified content, and set the row to the selected status:

Swfwindow ("form1"). swftable ("datagridview1"). selectrowbyfield "orderid", "10031"

Qtestware technology and principles

Qtestware adopts best practices in the field of automated testing, integrates industry-leading framework design ideas, and adopts advanced and mature qtp core technologies, such as qtp plug-in extension technology.

The cost of automated testing includes the development and maintenance costs of scripts. The core infrastructure framework with high reusability and maintainability is the best way to reduce development costs and maintenance costs. Qtestware encapsulates a large number of control recording, recognition, and test operation functions. It is the best choice for you to build an automated testing framework.

Controls supported by qtestware

Vs. net

Checkedlistbox, contexmenustrip, datagridview, domainupdown, listview, maskedtextbox, menustrip, propertygrid, statusstrip, toolstrip, trackbar, Treeview

Componentone

FlexGrid, mainmenu, toolbar, truedbgrid

Devcomponents. dotnetbar

Advtree, datagridviewx, itempanel, checkboxx, ribbonbar, supertabstrip, siderbarpanel, tabstrip, bar, vscrollbaradv, hscrollbaradv, expandablepanel

Web

Browser, page, weblist, webtable, webcheckbox, webedit

Yui

Calendar, able, Slider, Treeview

Extjs

Checktree, ComboBox, form, grid, menu

VB & ActiveX

Msflexgrid, vblabel, vblistview, and DataGrid

Codejock Xtreme suite

Datepicker, propertygrid, taskpanel, shortcutbar, and reportcontrol

XP suite
Flex 

Flextextarea, flexcheckbox

 

 

(More controls support ongoing development and updates ...)

Product Consulting and Training: testing_is_believing@126.com

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.