[go: up one dir, main page]

CN114691498A - Method for realizing synchronization of attributes of objects to be tested through automatic testing virtual machine technology - Google Patents

Method for realizing synchronization of attributes of objects to be tested through automatic testing virtual machine technology Download PDF

Info

Publication number
CN114691498A
CN114691498A CN202210221898.XA CN202210221898A CN114691498A CN 114691498 A CN114691498 A CN 114691498A CN 202210221898 A CN202210221898 A CN 202210221898A CN 114691498 A CN114691498 A CN 114691498A
Authority
CN
China
Prior art keywords
tested
virtual machine
detector
test
properties
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210221898.XA
Other languages
Chinese (zh)
Inventor
曹晔恢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Lidong Software Development Co ltd
Original Assignee
Hefei Lidong Software Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Lidong Software Development Co ltd filed Critical Hefei Lidong Software Development Co ltd
Priority to CN202210221898.XA priority Critical patent/CN114691498A/en
Publication of CN114691498A publication Critical patent/CN114691498A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明涉及自动化测试技术领域,且公开了一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,包括待测对象地址薄、待测对象探测器、待测对象收集器、自动化测试虚拟机、待测对象同步器与执行器,待测对象探测器单向连接有待测应用。该方法解决自动化测试待测对象识别的需求,能够监测和同步待测对象属性的变化,并将其显示在测试报告中。针对不同类型的待测应用,能够收集待测对象的属性并构建待测对象的定位器,待测对象的验证能够根据待测对象的属性及定位器查找,待测对象属性的同步能够在脚本执行过程中捕捉,帮助测试或开发人员捕捉待测对象属性的变化。

Figure 202210221898

The invention relates to the technical field of automated testing, and discloses a method for synchronizing the attributes of an object to be tested through an automated testing virtual machine technology, including an address book of the object to be tested, a detector of the object to be tested, a collector of the object to be tested, and an automated testing virtual machine. The unidirectional connection of the machine, the synchronizer and the actuator of the object to be tested, and the detector of the object to be tested has the application to be tested. The method solves the requirement of identifying the object to be tested in automated testing, can monitor and synchronize the change of the properties of the object to be tested, and display it in the test report. For different types of applications to be tested, the properties of the object to be tested can be collected and the locator of the object to be tested can be constructed. The verification of the object to be tested can be searched according to the properties of the object to be tested and the locator, and the synchronization of the properties of the object to be tested can be performed in the script Capture during execution to help the test or developer capture changes in the properties of the object under test.

Figure 202210221898

Description

Method for realizing synchronization of attributes of objects to be tested through automatic testing virtual machine technology
Technical Field
The invention relates to the technical field of automatic testing, in particular to a method for realizing synchronization of attributes of objects to be tested by an automatic testing virtual machine technology.
Background
The automated testing is used as an important component of software testing, a solid guarantee is provided for the quality of software products, but in the face of complex software application, the automated testing is often difficult and serious, and one of the problems to be solved urgently is that the attributes of various objects to be tested are identified, and usually along with the change of space and time, the attributes of the objects to be tested can also be changed, and the change can possibly cause that a test script cannot be repeatedly executed.
Disclosure of Invention
Technical problem to be solved
Aiming at the defects of the prior art, the invention provides a method for realizing the synchronization of the attributes of the objects to be tested by an automatic test virtual machine technology, and provides a method for synchronizing the attributes of the objects to be tested based on the automatic test virtual machine technology, so that the method has the advantages of helping a test or development personnel to capture the change of the attributes of the objects to be tested, and the problem that the change of the attributes of the objects to be tested is not displayed in the current automatic test operation result is solved.
(II) technical scheme
In order to achieve the purpose, the invention provides the following technical scheme: a method for achieving synchronization of attributes of objects to be tested through an automatic testing virtual machine technology comprises an address book of the objects to be tested, an object detector to be tested, an object collector to be tested, an automatic testing virtual machine, an object synchronizer to be tested and an actuator, wherein the object detector to be tested is connected with an application to be tested in a one-way mode, the object detector to be tested is connected with the object collector to be tested in a two-way mode, the address book of the objects to be tested is connected with a compiler in a one-way mode, the compiler is connected with a symbol table and three address codes in a one-way mode, and the actuator is connected with an application driver 1 to be tested, an application driver 2 to be tested and a result collector in a one-way mode.
Preferably, the address book of the object to be tested defines the type, the attribute and the construction method of the object to be tested, the object to be tested and the upper application layer thereof are organized in a tree-shaped hierarchical structure to construct the address book of the object to be tested, and the object to be tested is separated from the test script through the address book of the object to be tested.
Preferably, the object detector to be detected may capture various objects to be detected in the software application, for example, in a web page test, the object detector to be detected is opened, an object capture operation is started, after a target element is selected by a mouse or a keyboard, the detector captures an attribute and a hierarchical relationship of the element, and meanwhile, the detector automatically generates a locator of the object to be detected by an addressing algorithm.
Preferably, the object collector to be tested can show the object captured by the detector for a test or developer to check and modify the attribute of the object to be tested, and simultaneously, a verification function of the object to be tested is provided, after the collector sends a verification instruction to the detector, the detector searches for a corresponding element from an application to be tested, highlights the element by modifying the appearance attribute of the element or drawing an appearance outline, and can perform screenshot operation on the object to be tested, and the collector can store the verified object to be tested in an address book of the object to be tested.
Preferably, the compiler of the automated testing virtual machine converts the keyword automated testing script and the address book of the object to be tested into a three-address code and a symbol table.
Preferably, the executor reads the three-address instruction and the symbol table, calls the to-be-detected application driver to complete the operation on the to-be-detected object, relocates the to-be-detected object through an image recognition technology when the to-be-detected object cannot be recognized, collects the attribute of the to-be-detected object again after the recognition is successful, and sends the attribute to the synchronizer.
Preferably, the result collector: and collecting the test result and the attribute change condition of the object to be tested, and persisting the data in a uniform format.
Preferably, the object synchronizer synchronizes the attribute of the object to be tested to the address book of the object to be tested based on the set rule.
Compared with the prior art, the invention provides a method for realizing the synchronization of the attributes of the objects to be tested by the automatic testing virtual machine technology, which has the following beneficial effects:
1. the method for realizing the synchronization of the attributes of the objects to be tested through the automatic test virtual machine technology solves the requirement of automatic test object identification, can monitor and synchronize the change of the attributes of the objects to be tested, and displays the change in the test report. The collection of the object to be tested can collect the attribute of the object to be tested and construct the locator of the object to be tested aiming at different types of applications to be tested, can search according to the locator, can capture and synchronize the change of the attribute of the object to be tested in the script execution process, and helps a test or development staff to capture the change of the attribute of the object to be tested.
2. The method for realizing the synchronization of the attributes of the objects to be tested through the automatic test virtual machine technology is based on the automatic test virtual machine technology, captures the change of the attributes of the objects to be tested in the script execution process, synchronizes the change into the address book of the objects to be tested, can help the test cases to realize the self-healing function, and improves the stability of the automatic test.
Drawings
FIG. 1 is a schematic diagram of a script execution process according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a method for synchronizing attributes of an object to be tested through an automated testing virtual machine technology includes an address book of the object to be tested, an object detector to be tested, an object collector to be tested, an automated testing virtual machine, an object synchronizer to be tested, and an actuator, where the object detector to be tested is unidirectionally connected with an application to be tested, the object detector to be tested is bidirectionally connected with the object collector to be tested, the address book of the object to be tested is unidirectionally connected with a compiler, the compiler is unidirectionally connected with a symbol table and three address codes, and the actuator is unidirectionally connected with an application driver 1 to be tested, an application driver 2 to be tested, and a result collector.
Specifically, the address book of the object to be tested defines the type, the attribute and the construction method of the object to be tested, the object to be tested and the upper application layer thereof are organized in a tree-shaped hierarchical structure, the address book of the object to be tested is constructed, and the object to be tested is separated from the test script through the address book of the object to be tested.
Specifically, the object detector to be detected may capture various objects to be detected in the software application, for example, in a web page test, the object detector to be detected is turned on, an object capture operation is started, after a target element is selected through a mouse or a keyboard, the detector captures an attribute and a hierarchical relationship of the element, and meanwhile, the detector automatically generates a locator of the object to be detected through an addressing algorithm.
Specifically, the object collector to be tested can display the object captured by the detector for the test or development personnel to check and modify the attribute of the object to be tested. Meanwhile, a verification function of the object to be detected is provided, after the collector sends the verification instruction to the detector, the detector searches for the corresponding element from the application to be detected, the element can be highlighted by modifying the appearance attribute of the element or drawing the appearance outline, screenshot operation can be performed on the object to be detected, and the collector can store the verified object to be detected in an address book of the object to be detected.
Specifically, the compiler of the automated testing virtual machine converts the keyword automated testing script and the address book of the object to be tested into a three-address code and a symbol table.
Specifically, the executor reads the three-address instruction and the symbol table, calls the to-be-detected application driver to complete the operation on the to-be-detected object, relocates the to-be-detected object through an image recognition technology when the to-be-detected object cannot be recognized, collects the attribute of the to-be-detected object again after the recognition is successful, and sends the attribute to the synchronizer.
Specifically, the result collector: and collecting the test result and the attribute change condition of the object to be tested, and persisting the data in a uniform format.
Specifically, the object synchronizer synchronizes the attribute of the object to be tested to the address book of the object to be tested based on the set rule.
The working principle is as follows: when the method for realizing synchronization of the attributes of the objects to be tested through the automatic test virtual machine technology is used, the address book of the objects to be tested defines the types, the attributes and the construction method of the objects to be tested, the objects to be tested and the upper application of the objects to be tested are organized in a tree-shaped hierarchical structure to construct the address book of the objects to be tested, and the objects to be tested and the test scripts are separated through the address book of the objects to be tested. And opening the detector of the object to be detected, starting object capturing operation, selecting a target element through a mouse or a keyboard, capturing the attribute and the hierarchical relation of the element by the detector, and automatically generating the locator of the object to be detected by the detector through an addressing algorithm. The object collector to be tested can show the object captured by the detector, so that a test or development worker can check and modify the attribute of the object to be tested, and meanwhile, the verification function of the object to be tested is provided;
after the collector sends the verification instruction to the detector, the detector searches for corresponding elements from the application to be tested, highlighting the elements by modifying the appearance attributes or drawing the appearance outlines of the elements, and can also perform screen capture operation on the object to be tested. And when the object to be detected cannot be identified, the object to be detected is repositioned through an image identification technology, and after the object to be detected is successfully identified, the attribute of the object to be detected is collected again and sent to the synchronizer. The object synchronizer to be tested synchronizes the attribute of the object to be tested to the address book of the object to be tested based on the set rule, thereby solving the requirement of automatically testing the identification of the object to be tested, monitoring and synchronizing the change of the attribute of the object to be tested, and displaying the change in the test report. The test method can be used for constructing the locator of the object to be tested aiming at different types of applications to be tested, verifying the object to be tested, searching according to the attribute of the object to be tested and the locator, synchronizing the attribute of the object to be tested, capturing in the script execution process and helping a test or development staff to capture the change of the attribute of the object to be tested.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (8)

1.一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,其特征在于:包括待测对象地址薄、待测对象探测器、待测对象收集器、自动化测试虚拟机、待测对象同步器与执行器,所述待测对象探测器单向连接有待测应用,所述待测对象探测器与待测对象收集器双向连接,所述待测对象地址薄单向连接有编译器,所述编译器单向连接有符号表与三地址代码,所述执行器单向连接有待测应用驱动1、待测应用驱动2、结果收集器。1. a method for synchronizing the properties of the object to be tested by automated testing virtual machine technology, is characterized in that: comprising the address book of the object to be tested, the object to be tested detector, the object to be tested collector, the automated test virtual machine, the object to be tested A synchronizer and an actuator, the DUT detector is unidirectionally connected with the application to be tested, the DUT detector and the DUT collector are bidirectionally connected, and the DUT address book is unidirectionally connected with a compiler , the compiler is unidirectionally connected with the symbol table and the three-address code, and the executor is unidirectionally connected with the application driver 1 to be tested, the application driver 2 to be tested, and the result collector. 2.根据权利要求1所述的一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,其特征在于:所述待测对象地址薄定义待测对象的类型、属性以及构造方法,将待测对象及其上层应用以树状层级结构组织起来,构建待测对象地址薄,通过待测对象地址薄,将待测对象与测试脚本分离开来。2. a kind of method for synchronizing the properties of the object to be tested by automated testing virtual machine technology according to claim 1, is characterized in that: the address book of the object to be tested defines the type, the attribute and the construction method of the object to be tested, the The object to be tested and its upper-layer applications are organized in a tree-like hierarchical structure, and an address book of the object to be tested is constructed, and the object to be tested is separated from the test script through the address book of the object to be tested. 3.根据权利要求1所述的一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,其特征在于:所述待测对象探测器可以捕获软件应用中的各种待测对象,例如在网页测试中,打开待测对象探测器,启动对象捕获操作,通过鼠标或键盘选择目标元素后,探测器会抓取该元素的属性及层级关系,同时,探测器会通过寻址算法自动生成待测对象的定位器。3. a method for synchronizing properties of objects to be tested by automated testing virtual machine technology according to claim 1, is characterized in that: the object to be tested detector can capture various objects to be tested in software applications, such as In the web page test, open the object detector to be tested and start the object capture operation. After selecting the target element with the mouse or keyboard, the detector will capture the attributes and hierarchical relationship of the element, and at the same time, the detector will automatically generate through the addressing algorithm. The locator of the object to be measured. 4.根据权利要求1所述的一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,其特征在于:所述待测对象收集器可以将探测器捕获的对象展现出来,供测试或开发人员查看、修改待测对象的属性,同时,提供待测对象的验证功能,收集器将验证指令发送给探测器后,探测器从待测应用中查找对应的元素,并可以通过修改元素的外观属性或绘制外观轮廓来高亮显示元素,还可以对待测对象进行屏幕截图操作,收集器能够将经过验证的待测对象存储到待测对象地址薄中。4. the method for synchronizing the properties of the object to be tested by automated testing virtual machine technology according to claim 1, is characterized in that: the object to be tested collector can show the object captured by the detector for testing or Developers view and modify the properties of the object to be tested, and at the same time, provide the verification function of the object to be tested. After the collector sends the verification command to the detector, the detector searches for the corresponding element from the application to be tested, and can modify the element's Appearance attributes or outlines of appearances to highlight elements, screenshots of objects under test can also be performed, and the collector can store verified objects under test in the object address book. 5.根据权利要求1所述的一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,其特征在于:所述自动化测试虚拟机的编译器将关键字自动化测试脚本和待测对象地址薄转换成三地址代码和符号表。5. a kind of method that realizes synchronous test object attribute by automated test virtual machine technology according to claim 1, it is characterized in that: the compiler of described automated test virtual machine will keyword automated test script and test object address thin into a three-address code and symbol table. 6.根据权利要求1所述的一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,其特征在于:所述执行器读取三地址指令和符号表,调用待测应用驱动完成对待测对象的操作,当出现待测对象无法识别时,通过图像识别技术重新定位待测对象,识别成功后将再次收集待测对象的属性,并发送给同步器。6. a kind of method that realizes the attribute of synchronous object under test by automated testing virtual machine technology according to claim 1, it is characterized in that: described executor reads three-address instruction and symbol table, calls application under test to drive to finish treating The operation of the object to be measured, when the object to be measured cannot be recognized, the object to be measured is relocated by image recognition technology, and the properties of the object to be measured will be collected again after the recognition is successful, and sent to the synchronizer. 7.根据权利要求1所述的一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,其特征在于:结果收集器:收集测试结果、待测对象的属性变动情况,以统一格式持久化数据。7. a kind of method for synchronizing properties of object to be tested by automated testing virtual machine technology according to claim 1, is characterized in that: result collector: collects the property change situation of test result, object to be tested, persists in unified format data. 8.根据权利要求1所述的一种通过自动化测试虚拟机技术实现同步待测对象属性的方法,其特征在于:所述待测对象同步器基于设定的规则将待测对象的属性同步到待测对象地址薄中。8. the method for synchronizing the properties of the object to be tested by automated testing virtual machine technology according to claim 1, is characterized in that: the object to be tested synchronizer synchronizes the properties of the object to be tested to the The object to be tested is in the address book.
CN202210221898.XA 2022-03-09 2022-03-09 Method for realizing synchronization of attributes of objects to be tested through automatic testing virtual machine technology Pending CN114691498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210221898.XA CN114691498A (en) 2022-03-09 2022-03-09 Method for realizing synchronization of attributes of objects to be tested through automatic testing virtual machine technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210221898.XA CN114691498A (en) 2022-03-09 2022-03-09 Method for realizing synchronization of attributes of objects to be tested through automatic testing virtual machine technology

Publications (1)

Publication Number Publication Date
CN114691498A true CN114691498A (en) 2022-07-01

Family

ID=82137504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210221898.XA Pending CN114691498A (en) 2022-03-09 2022-03-09 Method for realizing synchronization of attributes of objects to be tested through automatic testing virtual machine technology

Country Status (1)

Country Link
CN (1) CN114691498A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016899A (en) * 2022-07-15 2022-09-06 合肥力动软件开发有限公司 Method for acquiring to-be-tested program image based on automatic testing virtual machine technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512044A (en) * 2015-12-25 2016-04-20 北京奇虎科技有限公司 Method and system for updating object base used for keyword drive test
CN106547689A (en) * 2016-10-20 2017-03-29 金航数码科技有限责任公司 A kind of automatic test cases development system and method based on web
US20180173606A1 (en) * 2016-12-15 2018-06-21 Syntel, Inc. Hybrid testing automation engine
CN109840197A (en) * 2018-05-04 2019-06-04 上海聆播信息科技有限公司 A kind of system and method for automatic test library of object

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512044A (en) * 2015-12-25 2016-04-20 北京奇虎科技有限公司 Method and system for updating object base used for keyword drive test
CN106547689A (en) * 2016-10-20 2017-03-29 金航数码科技有限责任公司 A kind of automatic test cases development system and method based on web
US20180173606A1 (en) * 2016-12-15 2018-06-21 Syntel, Inc. Hybrid testing automation engine
CN109840197A (en) * 2018-05-04 2019-06-04 上海聆播信息科技有限公司 A kind of system and method for automatic test library of object

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016899A (en) * 2022-07-15 2022-09-06 合肥力动软件开发有限公司 Method for acquiring to-be-tested program image based on automatic testing virtual machine technology

Similar Documents

Publication Publication Date Title
CN104794050B (en) The test method of application program, apparatus and system
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
US10698702B1 (en) Automating interactions with software user interface
US9448908B2 (en) System and method for model based session management
US9904517B2 (en) System and method for automatic modeling of an application
US10073766B2 (en) Building signatures of application flows
US10657036B2 (en) Determining visual testing coverages
US8832545B2 (en) Method and system for generating inspection data and using the inspection data for recording observations of an inspection site
JP5377534B2 (en) Method, apparatus and system for identifying GUI elements
CN108710571A (en) A kind of method and apparatus generating automatic test code
US9697107B2 (en) Testing applications
CN114691498A (en) Method for realizing synchronization of attributes of objects to be tested through automatic testing virtual machine technology
CN106095679B (en) Graphical interfaces method for generating test case based on Freehandhand-drawing identification
WO2007118271A1 (en) A method and system and product for conditioning software
Bao et al. scvRipper: video scraping tool for modeling developers' behavior using interaction data
JP2013077124A (en) Software test case generation device
JP4896909B2 (en) Scenario generation apparatus and program
CN112437348A (en) State information acquisition method, storage medium and smart television
Liang et al. RIDA: cross-app record and replay for Android
CN120011179A (en) Inspection method for multi-system operation and maintenance based on artificial intelligence RPA inspection robot
US20180365123A1 (en) Test execution comparisons
Ricca et al. Web testware evolution
CN116820996A (en) Automatic generation method and device for integrated test cases based on artificial intelligence
CN119917206B (en) A device-independent method for recording and replaying Android APP user operation traces
Sinaga Case Study on Testing of Web-Based Application: Del's Students Information System

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220701