CN117573567B - Method and related device for automatically generating UI (user interface) automation test cases - Google Patents

Method and related device for automatically generating UI (user interface) automation test cases Download PDF

Info

Publication number
CN117573567B
CN117573567B CN202410067561.7A CN202410067561A CN117573567B CN 117573567 B CN117573567 B CN 117573567B CN 202410067561 A CN202410067561 A CN 202410067561A CN 117573567 B CN117573567 B CN 117573567B
Authority
CN
China
Prior art keywords
use case
function
step data
platform
superui
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.)
Active
Application number
CN202410067561.7A
Other languages
Chinese (zh)
Other versions
CN117573567A (en
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.)
Yifang Information Technology Co ltd
Original Assignee
Yifang Information Technology 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 Yifang Information Technology Co ltd filed Critical Yifang Information Technology Co ltd
Priority to CN202410067561.7A priority Critical patent/CN117573567B/en
Publication of CN117573567A publication Critical patent/CN117573567A/en
Application granted granted Critical
Publication of CN117573567B publication Critical patent/CN117573567B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses a method and a related device for automatically generating UI (user interface) automation test cases, wherein the method comprises the following steps: reading AgileX the step data of the function use cases in the use case management platform based on the automatic conversion program; the automatic conversion program calls SuperUI a platform to obtain keywords corresponding to the step data of the function use case; packaging keywords corresponding to the function case step data and the function case step data into prompt words, and requesting an API (application program interface) from an AI (advanced technology) service manufacturer based on the prompt words, wherein the format of the prompt words is json array format; and assembling the results returned by the AI service manufacturer into the use case data format of the SuperUI platform to generate a UI automation test use case. In the embodiment of the invention, the code program does not need to be written manually, so that the test time is greatly shortened, and the test efficiency is improved.

Description

Method and related device for automatically generating UI (user interface) automation test cases
Technical Field
The invention relates to the technical field of internet software, in particular to a method and a related device for automatically generating UI (user interface) automatic test cases.
Background
In daily test work, a large number of manual test cases are accumulated; with the release and iteration of the requirements, many functional related test cases need to be added to the regression test; a UI automatic test method is generally adopted, and the manual test case is converted into a UI automatic test case; however, the conventional conversion method requires a specialized automated tester to manually write codes according to descriptions of the function use cases, which is time-consuming and laborious.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a method and a related device for automatically generating UI automatic test cases, which do not need to write code programs manually, greatly reduce test time and improve test efficiency.
In order to solve the technical problems, an embodiment of the present invention provides a method for automatically generating a UI automation test case, the method including:
reading AgileX the step data of the function use cases in the use case management platform based on the automatic conversion program;
The automatic conversion program calls SuperUI a platform to obtain keywords corresponding to the step data of the function use case;
packaging keywords corresponding to the function case step data and the function case step data into prompt words, and requesting an API (application program interface) from an AI (advanced technology) service manufacturer based on the prompt words, wherein the format of the prompt words is json array format;
And assembling the results returned by the AI service manufacturer into the use case data format of the SuperUI platform to generate a UI automation test use case.
Optionally, the reading AgileX the function use case step data in the use case management platform based on the automatic conversion program includes:
the automatic conversion program calls an OpenAPI of the AgileX use case management platform, wherein the OpenAPI is used for accessing the AgileX use case management platform;
The automatic conversion program obtains function use case step data in the AgileX use case management platform based on the OpenAPI.
Optionally, after the function use case step data in the use case management platform is read AgileX based on the automatic conversion program, the method further includes:
the automatic conversion program represents the read function case step data in a natural language mode.
Optionally, the automatic conversion program calling SuperUI platform obtains a keyword corresponding to the function use case step data, including:
the automatic conversion program accesses the SuperUI platform, a keyword library is arranged in the SuperUI platform, the keyword library provides access to the outside in an interface mode, and the keywords are packaged by UI operation steps;
And the automatic conversion program utilizes the function case step data to carry out keyword matching in the keyword library in the SuperUI platform so as to obtain keywords corresponding to the function case step data.
Optionally, the packaging the keywords corresponding to the function case step data and the function case step data as the prompt words includes:
and carrying out mapping encapsulation processing on the case steps by combining the function case step data with the keywords corresponding to the function case step data, and generating a step object in a json array format.
Optionally, the requesting the API from the AI service vendor based on the prompt word includes:
and generating an API request instruction for accessing the AI service manufacturer based on the prompt word, and requesting an API of the AI service manufacturer based on the API request instruction.
Optionally, the assembling the results returned by the AI service manufacturer into the use case data format of the SuperUI platform to generate a UI automation test use case includes:
obtaining a return result returned by the AI service manufacturer, and carrying out assembly processing on the return result in a use case data format of the SuperUI platform to generate a UI automation test use case;
and storing the UI automation test cases to a UI automation case library in the SuperUI platform.
In addition, the embodiment of the invention also provides a device for automatically generating the UI automation test case, which comprises:
and a reading module: the function use case step data in the use case management platform is read AgileX based on the automatic conversion program;
and (3) a calling module: the automatic conversion program call SuperUI platform is used for obtaining keywords corresponding to the step data of the function use cases;
And (3) packaging a module: the method comprises the steps that keywords corresponding to the function case step data and the function case step data are packaged into prompt words, and an API is requested to an AI service manufacturer based on the prompt words, wherein the format of the prompt words is json array format;
the generation module is used for: and the method is used for assembling the results returned by the AI service manufacturer into the use case data format of the SuperUI platform to generate the UI automation test use case.
In addition, the embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, the program being executed by a processor to implement a method according to any one of the above.
In addition, the embodiment of the invention also provides electronic equipment, which comprises:
one or more processors;
A memory;
One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to: a method according to any of the preceding claims.
In the embodiment of the invention, the traditional process of manually writing codes can be avoided by automatically converting the functional test cases, so that the time and resource cost of a test team are greatly reduced; the automatic conversion program can accurately map the testing steps described by the natural language to the UI automatic test case, so that the risk of human errors is reduced, and the reliability of the test case is improved; through automatic conversion, a large number of manual test cases can be integrated into UI automatic test more easily, the test coverage is improved, and the stability of the system is ensured; traditional manual writing of UI automation test cases typically requires specialized automation testers, and this approach makes test conversion easier and reduces reliance on specialized knowledge.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings which are required in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of a method for automatically generating UI automation test cases in an embodiment of the invention;
FIG. 2 is a schematic diagram showing the structural components of an apparatus for automatically generating UI automation test cases in accordance with an embodiment of the present invention;
fig. 3 is a schematic structural composition diagram of an electronic device in an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for automatically generating UI automation test cases according to an embodiment of the present invention.
As shown in fig. 1, a method for automatically generating UI automation test cases, the method comprising:
S11: reading AgileX the step data of the function use cases in the use case management platform based on the automatic conversion program;
In the implementation process of the present invention, the reading AgileX of the function use case step data in the use case management platform based on the automatic conversion program includes: the automatic conversion program calls an OpenAPI of the AgileX use case management platform, wherein the OpenAPI is used for accessing the AgileX use case management platform; the automatic conversion program obtains function use case step data in the AgileX use case management platform based on the OpenAPI.
Further, after the function use case step data in the use case management platform is read AgileX based on the automatic conversion program, the method further includes: the automatic conversion program represents the read function case step data in a natural language mode.
Specifically, agileX use case management platform is test use case management platform in Baoliwei for writing and maintaining daily function manual test use cases; the automatic conversion program calls AgileX an OpenAPI of the use case management platform, the OpenAPI being used to access AgileX the use case management platform; then the automatic conversion program obtains the step data of the function use case in AgileX use case management platform through OpenAPI; the automatic conversion program then expresses the read function case step data in a natural language manner.
Wherein the functional use case step data are described in natural language, for example: 1. the lecturer opens a lecturer website; 2. the audience accesses the audience web site; 3. the guest accesses a guest website; 4. opening a teaching aid website for teaching aid; 5. the lecturer clicks the check-in button; 6. the lecturer judges whether a check-in popup exists or not; 7. the lecturer clicks a start check-in button to issue a check-in; 8. the lecturer judges that the check-in popup window has a check-in ending button; 9. the audience judges that a sign-in popup exists; 10. the viewer clicks the immediate check-in button; 11. the lecturer judges that the number of the current attendance is 1; 12. the lecturer clicks to end the check-in.
S12: the automatic conversion program calls SuperUI a platform to obtain keywords corresponding to the step data of the function use case;
In the implementation process of the present invention, the automatic conversion program calling SuperUI platform obtains the keywords corresponding to the step data of the function use case, including: the automatic conversion program accesses the SuperUI platform, a keyword library is arranged in the SuperUI platform, the keyword library provides access to the outside in an interface mode, and the keywords are packaged by UI operation steps; and the automatic conversion program utilizes the function case step data to carry out keyword matching in the keyword library in the SuperUI platform so as to obtain keywords corresponding to the function case step data.
Specifically, superUI platform: the UI automation test platform in the Baoliwei supports the use of keyword assembly to write UI automation test cases; the automatic conversion program is provided with a keyword library in the SuperUI platform through an access SuperUI platform, the keyword library provides access to the outside in an interface mode, and keywords are packaged by UI operation steps; the automatic conversion program uses the function case step data to match keywords in a keyword library in the SuperUI platform, so that keywords corresponding to the function case step data can be obtained.
Wherein all UI manipulation steps are encapsulated in these keywords, for example:
keyword = {
"click": click ",
Input ",
"Select": select ",
Wait,
"Open url": "open web site",
"Close": off ",
"Asserteleexist",
"Asserteletext",
...
}。
S13: packaging keywords corresponding to the function case step data and the function case step data into prompt words, and requesting an API (application program interface) from an AI (advanced technology) service manufacturer based on the prompt words, wherein the format of the prompt words is json array format;
in the implementation process of the present invention, the step data of the function case and the keywords corresponding to the step data of the function case are packaged as prompt words, including: and carrying out mapping encapsulation processing on the case steps by combining the function case step data with the keywords corresponding to the function case step data, and generating a step object in a json array format.
Further, the request API from the AI service vendor based on the hint word includes: and generating an API request instruction for accessing the AI service manufacturer based on the prompt word, and requesting an API of the AI service manufacturer based on the API request instruction.
Specifically, mapping and packaging the function use case step data and the key words corresponding to the function use case step data to generate a step object in json array format; and then generating an API request instruction for accessing the AI service manufacturer according to the prompt word, and requesting the API of the AI service manufacturer through the API request instruction.
Some functional test case steps described by natural reservation are combined with the following action word library to map the steps and generate step objects in json array format:
action word library: [ open_url, clck, ascert_ele_exist, asser _count, inpu … ].
S14: and assembling the results returned by the AI service manufacturer into the use case data format of the SuperUI platform to generate a UI automation test use case.
In the implementation process of the present invention, the step of assembling the results returned by the AI service manufacturer into the use case data format of the SuperUI platform to generate the UI automation test use case includes: obtaining a return result returned by the AI service manufacturer, and carrying out assembly processing on the return result in a use case data format of the SuperUI platform to generate a UI automation test use case; and storing the UI automation test cases to a UI automation case library in the SuperUI platform.
Specifically, a return result returned by an AI service manufacturer is obtained, and is assembled in a use case data format of a SuperUI platform, so that a UI automatic test use case can be generated; and finally, storing the UI automation test cases into a UI automation case library in the SuperUI platform.
In the embodiment of the invention, the traditional process of manually writing codes can be avoided by automatically converting the functional test cases, so that the time and resource cost of a test team are greatly reduced; the automatic conversion program can accurately map the testing steps described by the natural language to the UI automatic test case, so that the risk of human errors is reduced, and the reliability of the test case is improved; through automatic conversion, a large number of manual test cases can be integrated into UI automatic test more easily, the test coverage is improved, and the stability of the system is ensured; traditional manual writing of UI automation test cases typically requires specialized automation testers, and this approach makes test conversion easier and reduces reliance on specialized knowledge.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an apparatus for automatically generating UI automation test cases according to an embodiment of the present invention.
As shown in fig. 2, an apparatus for automatically generating UI automation test cases, the apparatus comprising:
The reading module 21: the function use case step data in the use case management platform is read AgileX based on the automatic conversion program;
In the implementation process of the present invention, the reading AgileX of the function use case step data in the use case management platform based on the automatic conversion program includes: the automatic conversion program calls an OpenAPI of the AgileX use case management platform, wherein the OpenAPI is used for accessing the AgileX use case management platform; the automatic conversion program obtains function use case step data in the AgileX use case management platform based on the OpenAPI.
Further, after the function use case step data in the use case management platform is read AgileX based on the automatic conversion program, the method further includes: the automatic conversion program represents the read function case step data in a natural language mode.
Specifically, agileX use case management platform is test use case management platform in Baoliwei for writing and maintaining daily function manual test use cases; the automatic conversion program calls AgileX an OpenAPI of the use case management platform, the OpenAPI being used to access AgileX the use case management platform; then the automatic conversion program obtains the step data of the function use case in AgileX use case management platform through OpenAPI; the automatic conversion program then expresses the read function case step data in a natural language manner.
Wherein the functional use case step data are described in natural language, for example: 1. the lecturer opens a lecturer website; 2. the audience accesses the audience web site; 3. the guest accesses a guest website; 4. opening a teaching aid website for teaching aid; 5. the lecturer clicks the check-in button; 6. the lecturer judges whether a check-in popup exists or not; 7. the lecturer clicks a start check-in button to issue a check-in; 8. the lecturer judges that the check-in popup window has a check-in ending button; 9. the audience judges that a sign-in popup exists; 10. the viewer clicks the immediate check-in button; 11. the lecturer judges that the number of the current attendance is 1; 12. the lecturer clicks to end the check-in.
Call module 22: the automatic conversion program call SuperUI platform is used for obtaining keywords corresponding to the step data of the function use cases;
In the implementation process of the present invention, the automatic conversion program calling SuperUI platform obtains the keywords corresponding to the step data of the function use case, including: the automatic conversion program accesses the SuperUI platform, a keyword library is arranged in the SuperUI platform, the keyword library provides access to the outside in an interface mode, and the keywords are packaged by UI operation steps; and the automatic conversion program utilizes the function case step data to carry out keyword matching in the keyword library in the SuperUI platform so as to obtain keywords corresponding to the function case step data.
Specifically, superUI platform: the UI automation test platform in the Baoliwei supports the use of keyword assembly to write UI automation test cases; the automatic conversion program is provided with a keyword library in the SuperUI platform through an access SuperUI platform, the keyword library provides access to the outside in an interface mode, and keywords are packaged by UI operation steps; the automatic conversion program uses the function case step data to match keywords in a keyword library in the SuperUI platform, so that keywords corresponding to the function case step data can be obtained.
Wherein all UI manipulation steps are encapsulated in these keywords, for example:
keyword = {
"click": click ",
Input ",
"Select": select ",
Wait,
"Open url": "open web site",
"Close": off ",
"Asserteleexist",
"Asserteletext",
...
}。
Packaging module 23: the method comprises the steps that keywords corresponding to the function case step data and the function case step data are packaged into prompt words, and an API is requested to an AI service manufacturer based on the prompt words, wherein the format of the prompt words is json array format;
in the implementation process of the present invention, the step data of the function case and the keywords corresponding to the step data of the function case are packaged as prompt words, including: and carrying out mapping encapsulation processing on the case steps by combining the function case step data with the keywords corresponding to the function case step data, and generating a step object in a json array format.
Further, the request API from the AI service vendor based on the hint word includes: and generating an API request instruction for accessing the AI service manufacturer based on the prompt word, and requesting an API of the AI service manufacturer based on the API request instruction.
Specifically, mapping and packaging the function use case step data and the key words corresponding to the function use case step data to generate a step object in json array format; and then generating an API request instruction for accessing the AI service manufacturer according to the prompt word, and requesting the API of the AI service manufacturer through the API request instruction.
Some functional test case steps described by natural reservation are combined with the following action word library to map the steps and generate step objects in json array format:
action word library: [ open_url, clck, ascert_ele_exist, asser _count, inpu … ].
Generation module 24: and the method is used for assembling the results returned by the AI service manufacturer into the use case data format of the SuperUI platform to generate the UI automation test use case.
In the implementation process of the present invention, the step of assembling the results returned by the AI service manufacturer into the use case data format of the SuperUI platform to generate the UI automation test use case includes: obtaining a return result returned by the AI service manufacturer, and carrying out assembly processing on the return result in a use case data format of the SuperUI platform to generate a UI automation test use case; and storing the UI automation test cases to a UI automation case library in the SuperUI platform.
Specifically, a return result returned by an AI service manufacturer is obtained, and is assembled in a use case data format of a SuperUI platform, so that a UI automatic test use case can be generated; and finally, storing the UI automation test cases into a UI automation case library in the SuperUI platform.
In the embodiment of the invention, the traditional process of manually writing codes can be avoided by automatically converting the functional test cases, so that the time and resource cost of a test team are greatly reduced; the automatic conversion program can accurately map the testing steps described by the natural language to the UI automatic test case, so that the risk of human errors is reduced, and the reliability of the test case is improved; through automatic conversion, a large number of manual test cases can be integrated into UI automatic test more easily, the test coverage is improved, and the stability of the system is ensured; traditional manual writing of UI automation test cases typically requires specialized automation testers, and this approach makes test conversion easier and reduces reliance on specialized knowledge.
An embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of the above embodiments. The computer readable storage medium includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random AcceSS Memory, random access memories), EPROMs (EraSable Programmable Read-Only memories), EEPROMs (ELECTRICALLY ERASABLE PROGRAMMABLEREAD-Only memories), flash memories, magnetic cards, or optical cards. That is, a storage device includes any medium that stores or transmits information in a form readable by a device (e.g., computer, cell phone), and may be read-only memory, magnetic or optical disk, etc.
The embodiment of the invention also provides a computer application program which runs on a computer and is used for executing the method of any embodiment.
In addition, fig. 3 is a schematic structural composition diagram of the electronic device in the embodiment of the present invention.
The embodiment of the invention also provides electronic equipment, as shown in fig. 3. The electronic device includes a processor 302, a memory 303, an input unit 304, a display unit 305, and the like. Those skilled in the art will appreciate that the electronic device structural elements shown in fig. 3 do not constitute a limitation of all devices and may include more or fewer components than shown, or may combine certain components. The memory 303 may be used to store an application 301 and various functional modules, and the processor 302 runs the application 301 stored in the memory 303, thereby performing various functional applications of the device and data processing. The memory may be internal memory or external memory, or include both internal memory and external memory. The internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, floppy disk, ZIP disk, U-disk, tape, etc. The disclosed memory includes, but is not limited to, these types of memory. The memory disclosed herein is by way of example only and not by way of limitation.
The input unit 304 is used for receiving input of a signal and receiving keywords input by a user. The input unit 304 may include a touch panel and other input devices. The touch panel may collect touch operations on or near the user (e.g., the user's operation on or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a preset program; other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., play control keys, switch keys, etc.), a trackball, mouse, joystick, etc. The display unit 305 may be used to display information input by a user or information provided to the user and various menus of the terminal device. The display unit 305 may take the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 302 is a control center of the terminal device, connects various parts of the entire device using various interfaces and lines, performs various functions and processes data by running or executing software programs and/or modules stored in the memory 303, and invoking data stored in the memory.
As one embodiment, the electronic device includes: the system comprises one or more processors 302, a memory 303, one or more application programs 301, wherein the one or more application programs 301 are stored in the memory 303 and configured to be executed by the one or more processors 302, and the one or more application programs 301 are configured to perform the method of any of the above embodiments.
In the embodiment of the invention, the traditional process of manually writing codes can be avoided by automatically converting the functional test cases, so that the time and resource cost of a test team are greatly reduced; the automatic conversion program can accurately map the testing steps described by the natural language to the UI automatic test case, so that the risk of human errors is reduced, and the reliability of the test case is improved; through automatic conversion, a large number of manual test cases can be integrated into UI automatic test more easily, the test coverage is improved, and the stability of the system is ensured; traditional manual writing of UI automation test cases typically requires specialized automation testers, and this approach makes test conversion easier and reduces reliance on specialized knowledge.
In addition, the method for automatically generating the UI automation test case and the related device provided by the embodiments of the present invention are described in detail, and specific examples should be adopted to illustrate the principles and embodiments of the present invention, and the description of the above embodiments is only used to help understand the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (6)

1. A method for automatically generating UI automation test cases, the method comprising:
reading AgileX the function use case step data in the use case management platform based on an automatic conversion program, wherein the automatic conversion program represents the read function use case step data in a natural language mode;
The automatic conversion program calls SuperUI a platform to obtain keywords corresponding to the step data of the function use case;
packaging keywords corresponding to the function case step data and the function case step data into prompt words, and requesting an API (application program interface) from an AI (advanced technology) service manufacturer based on the prompt words, wherein the format of the prompt words is json array format;
Assembling the returned result of the AI service manufacturer into the use case data format of the SuperUI platform to generate a UI automation test use case;
The reading AgileX of the function use case step data in the use case management platform based on the automatic conversion program includes:
the automatic conversion program calls an OpenAPI of the AgileX use case management platform, wherein the OpenAPI is used for accessing the AgileX use case management platform;
the automatic conversion program obtains function use case step data in the AgileX use case management platform based on the OpenAPI;
The automatic conversion program calling SuperUI platform obtains keywords corresponding to the function use case step data, including:
the automatic conversion program accesses the SuperUI platform, a keyword library is arranged in the SuperUI platform, the keyword library provides access to the outside in an interface mode, and the keywords are packaged by UI operation steps;
The automatic conversion program utilizes the function case step data to carry out keyword matching in the keyword library in the SuperUI platform to obtain keywords corresponding to the function case step data;
the step of packaging the keywords corresponding to the function case step data and the function case step data as prompt words comprises the steps of:
Mapping and packaging the function use case step data and the key words corresponding to the function use case step data to generate a step object in json array format; the method comprises the steps of using a natural language to describe a functional test case, and mapping the steps by combining an action word library to generate a step object in json array format, wherein the action word library is as follows: [ open_url, clck, ascert_ele_exist, asser _count, inpu ].
2. The method of claim 1, wherein requesting an API from an AI service vendor based on the hint word comprises:
and generating an API request instruction for accessing the AI service manufacturer based on the prompt word, and requesting an API of the AI service manufacturer based on the API request instruction.
3. The method of claim 1, wherein assembling the results returned by the AI service vendor into the use case data format of the SuperUI platform to generate a UI automation test case comprises:
obtaining a return result returned by the AI service manufacturer, and carrying out assembly processing on the return result in a use case data format of the SuperUI platform to generate a UI automation test use case;
and storing the UI automation test cases to a UI automation case library in the SuperUI platform.
4. An apparatus for automatically generating UI automation test cases, the apparatus comprising:
And a reading module: the method is used for reading AgileX the function use case step data in the use case management platform based on an automatic conversion program, wherein the automatic conversion program represents the read function use case step data in a natural language mode;
and (3) a calling module: the automatic conversion program call SuperUI platform is used for obtaining keywords corresponding to the step data of the function use cases;
And (3) packaging a module: the method comprises the steps that keywords corresponding to the function case step data and the function case step data are packaged into prompt words, and an API is requested to an AI service manufacturer based on the prompt words, wherein the format of the prompt words is json array format;
The generation module is used for: the method comprises the steps of assembling a result returned by an AI service manufacturer into a use case data format of the SuperUI platform to generate a UI automatic test use case;
The reading AgileX of the function use case step data in the use case management platform based on the automatic conversion program includes:
the automatic conversion program calls an OpenAPI of the AgileX use case management platform, wherein the OpenAPI is used for accessing the AgileX use case management platform;
the automatic conversion program obtains function use case step data in the AgileX use case management platform based on the OpenAPI;
The automatic conversion program calling SuperUI platform obtains keywords corresponding to the function use case step data, including:
the automatic conversion program accesses the SuperUI platform, a keyword library is arranged in the SuperUI platform, the keyword library provides access to the outside in an interface mode, and the keywords are packaged by UI operation steps;
The automatic conversion program utilizes the function case step data to carry out keyword matching in the keyword library in the SuperUI platform to obtain keywords corresponding to the function case step data;
the step of packaging the keywords corresponding to the function case step data and the function case step data as prompt words comprises the steps of:
Mapping and packaging the function use case step data and the key words corresponding to the function use case step data to generate a step object in json array format; the method comprises the steps of using a natural language to describe a functional test case, and mapping the steps by combining an action word library to generate a step object in json array format, wherein the action word library is as follows: [ open_url, clck, ascert_ele_exist, asser _count, inpu ].
5. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-3.
6. An electronic device, the electronic device comprising:
one or more processors;
A memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to: a method according to any one of claims 1 to 3.
CN202410067561.7A 2024-01-17 2024-01-17 Method and related device for automatically generating UI (user interface) automation test cases Active CN117573567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410067561.7A CN117573567B (en) 2024-01-17 2024-01-17 Method and related device for automatically generating UI (user interface) automation test cases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410067561.7A CN117573567B (en) 2024-01-17 2024-01-17 Method and related device for automatically generating UI (user interface) automation test cases

Publications (2)

Publication Number Publication Date
CN117573567A CN117573567A (en) 2024-02-20
CN117573567B true CN117573567B (en) 2024-05-17

Family

ID=89886767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410067561.7A Active CN117573567B (en) 2024-01-17 2024-01-17 Method and related device for automatically generating UI (user interface) automation test cases

Country Status (1)

Country Link
CN (1) CN117573567B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187894A (en) * 2006-11-15 2008-05-28 中兴通讯股份有限公司 Automatic test method based on key word drive and its test system
CN111488275A (en) * 2020-04-03 2020-08-04 携程旅游网络技术(上海)有限公司 UI automation test method and device, storage medium and electronic equipment
CN112597034A (en) * 2020-12-25 2021-04-02 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN115827499A (en) * 2023-02-22 2023-03-21 江苏北弓智能科技有限公司 UI automation test method
CN116150020A (en) * 2023-02-28 2023-05-23 上海上湖信息技术有限公司 Test case conversion method and device
CN116719735A (en) * 2023-06-20 2023-09-08 天津汇商共达科技有限责任公司 Test case generation method and device
CN117112408A (en) * 2023-08-07 2023-11-24 一汽奔腾轿车有限公司 Method, device and medium for generating automatic test case script
CN117312148A (en) * 2023-09-26 2023-12-29 济南浪潮数据技术有限公司 Automatic interface testing method and device, computer equipment and storage medium
CN117312140A (en) * 2023-09-19 2023-12-29 百度(中国)有限公司 Method and device for generating test case, electronic equipment and storage medium
CN117332758A (en) * 2023-09-07 2024-01-02 北京奇艺世纪科技有限公司 Data processing method, device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9038026B2 (en) * 2011-10-17 2015-05-19 International Business Machines Corporation System and method for automating test automation
US9396098B2 (en) * 2014-03-26 2016-07-19 Mckesson Financial Holdings Apparatuses, methods, and computer program products for conducting automated tests
US10467130B2 (en) * 2017-01-20 2019-11-05 Wipro Limited Method of generating and transforming test data and a system therefor
US10831640B2 (en) * 2018-11-14 2020-11-10 Webomates LLC Method and system for testing an application using multiple test case execution channels

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187894A (en) * 2006-11-15 2008-05-28 中兴通讯股份有限公司 Automatic test method based on key word drive and its test system
CN111488275A (en) * 2020-04-03 2020-08-04 携程旅游网络技术(上海)有限公司 UI automation test method and device, storage medium and electronic equipment
CN112597034A (en) * 2020-12-25 2021-04-02 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN115827499A (en) * 2023-02-22 2023-03-21 江苏北弓智能科技有限公司 UI automation test method
CN116150020A (en) * 2023-02-28 2023-05-23 上海上湖信息技术有限公司 Test case conversion method and device
CN116719735A (en) * 2023-06-20 2023-09-08 天津汇商共达科技有限责任公司 Test case generation method and device
CN117112408A (en) * 2023-08-07 2023-11-24 一汽奔腾轿车有限公司 Method, device and medium for generating automatic test case script
CN117332758A (en) * 2023-09-07 2024-01-02 北京奇艺世纪科技有限公司 Data processing method, device, computer equipment and storage medium
CN117312140A (en) * 2023-09-19 2023-12-29 百度(中国)有限公司 Method and device for generating test case, electronic equipment and storage medium
CN117312148A (en) * 2023-09-26 2023-12-29 济南浪潮数据技术有限公司 Automatic interface testing method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于XML描述校验规则的数据输入测试用例自动生成方法;姚庚梅 等;科技信息;20100725(第21期);第14-16页 *

Also Published As

Publication number Publication date
CN117573567A (en) 2024-02-20

Similar Documents

Publication Publication Date Title
KR101076867B1 (en) Automatic image capture for generating content
US8352908B2 (en) Multi-modal conversion tool for form-type applications
CN101339534B (en) Software test apparatus and test method
KR101087312B1 (en) Importation of automatically generated content
US10515001B2 (en) System and method for automating testing of software applications
US20060230319A1 (en) Automated migration of software instructions
CN110968305A (en) Applet visualization generation method, device, equipment and storage medium
CN111385633B (en) Resource searching method based on voice, intelligent terminal and storage medium
CN108920382B (en) Test case generation method and device, storage medium and server
CN112083919B (en) Target service code generation method and device based on YAML template
CN115658529A (en) Automatic testing method for user page and related equipment
CN114253537A (en) Form generation method and device, electronic equipment and storage medium
CN113032273A (en) Application program debugging method and device, computer equipment and storage medium
CN117033249B (en) Test case generation method and device, computer equipment and storage medium
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN117573567B (en) Method and related device for automatically generating UI (user interface) automation test cases
CN112230904A (en) Code generation method and device based on interface document, storage medium and server
CN117149209A (en) Code increment compiling method and device, computer equipment and storage medium
CN111061522A (en) Method, device, equipment and storage medium for generating front-end card assembly based on back end
CN111767111B (en) Page data processing method and device, electronic equipment and storage medium
CN113761402A (en) Link debugging method, device, equipment and storage medium
CN117591438B (en) Automatic testing method and related device for UI component atomization
CN114115835B (en) Automatic coding execution flow construction method and device, storage medium and intelligent terminal
CN112181809B (en) Graphic user interface automatic test method based on multiple positioning methods
CN112416324B (en) Script function implementation method based on python language, terminal equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant