CN110908902B - Editing method and device for testing steps and electronic equipment - Google Patents

Editing method and device for testing steps and electronic equipment Download PDF

Info

Publication number
CN110908902B
CN110908902B CN201911099845.XA CN201911099845A CN110908902B CN 110908902 B CN110908902 B CN 110908902B CN 201911099845 A CN201911099845 A CN 201911099845A CN 110908902 B CN110908902 B CN 110908902B
Authority
CN
China
Prior art keywords
target
information
regular
test object
keyword
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
CN201911099845.XA
Other languages
Chinese (zh)
Other versions
CN110908902A (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.)
Beijing Testin Information Technology Co Ltd
Original Assignee
Beijing Testin 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 Beijing Testin Information Technology Co Ltd filed Critical Beijing Testin Information Technology Co Ltd
Priority to CN201911099845.XA priority Critical patent/CN110908902B/en
Publication of CN110908902A publication Critical patent/CN110908902A/en
Application granted granted Critical
Publication of CN110908902B publication Critical patent/CN110908902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/3688Test management for test execution, e.g. scheduling of test suites
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

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)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for editing a test step and electronic equipment, which are used for solving the problem that the efficiency of editing the test step by a tester is lower because the associative function provided for the tester to edit the test step is not accurate enough in the prior art. The method comprises the following steps: acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited; acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object; and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects.

Description

Editing method and device for testing steps and electronic equipment
Technical Field
The present invention relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for editing a test procedure, and an electronic device.
Background
When editing an automated test script, a tester often needs to input some test steps, such as clicking on an xx object, pressing the xx object for a long time, double clicking on the xx object, and/or waiting for a preset time period. When a tester inputs a certain testing step in an edit box of an automatic testing script, such as inputting a 'click', the existing association function can only perform fuzzy search based on the input 'click', so as to obtain a plurality of testing steps associated with the 'click'. However, the range of results obtained by the fuzzy search is too wide to accurately search for the input testing steps.
That is, the related content provided by the existing association function to the tester is messy and does not meet the actual requirement of the tester, so that the tester needs to spend a great deal of time to select the related content meeting the requirement, and the efficiency of editing the testing step by the tester is reduced.
Thus, there is still a need for further solutions how to provide a more accurate associative function, thereby improving the efficiency of editing by the testers.
Disclosure of Invention
The embodiment of the invention provides a method and a device for editing a test step and electronic equipment, which are used for solving the problem that the efficiency of editing the test step by a tester is lower because the associative function of the tester is not accurate enough when the tester edits the test step in the prior art.
In order to solve the technical problems, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an editing method for a test step, including:
acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited;
acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects.
In a second aspect, an embodiment of the present invention further provides an editing apparatus for a testing step, including:
the first acquisition unit is used for acquiring input target keywords, wherein the target keywords are keywords in a test step to be edited;
the second acquisition unit is used for acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
and the generating unit is used for generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited;
acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to:
acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited;
acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects.
The embodiment of the application adopts the technical scheme at least to achieve the following technical effects:
the editing method of the testing step provided by the embodiment of the invention can acquire the input target keywords, wherein the target keywords are keywords in the testing step to be edited; acquiring a target test object matched with the target keyword and sub information corresponding to the target test object; and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects. Therefore, when the tester edits the testing steps, the testing objects and the sub information corresponding to the testing objects in the testing steps selected by the tester are determined step by step based on the keywords in the testing steps to be edited input by the tester, so that more accurate testing steps can be associated and provided for the tester, the tester is prevented from wasting energy to select the testing steps meeting the requirements of the tester, and the efficiency of editing the testing steps by the tester is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present 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 schematic implementation flow chart of an editing method of a test procedure according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of an interface of the editing method of the test procedure according to the embodiment of the present invention when the editing method is not input;
FIG. 3 is a schematic view of an interface of an editing method of a test procedure according to an embodiment of the present invention during input;
fig. 4 is a schematic flow chart of an editing method of a test step in practical application according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an editing apparatus for testing steps according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. 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.
The following describes in detail the technical solutions provided by the embodiments of the present invention with reference to the accompanying drawings.
In order to solve the problem that the efficiency of editing the test steps by the test staff is low due to inaccurate association function provided for the test staff in the prior art, the invention provides an editing method of the test steps, wherein an execution subject of the method can be, but not limited to, a mobile phone, a tablet computer, a wearable device and the like, or can be a client itself capable of executing the method.
For convenience of description, hereinafter, embodiments of the method will be described taking an execution subject of the method as an electronic device capable of executing the method as an example. It will be appreciated that the subject of execution of the method is an exemplary illustration of an electronic device and should not be construed as limiting the method.
Specifically, the editing method of the test step provided by the invention comprises the following steps: acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited; acquiring a target test object matched with the target keyword and sub information corresponding to the target test object; and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects.
The editing method of the testing step provided by the embodiment of the invention can acquire the input target keywords, wherein the target keywords are keywords in the testing step to be edited; acquiring a target test object matched with the target keyword and sub information corresponding to the target test object; and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects. Therefore, when the tester edits the testing steps, the testing objects and the sub information corresponding to the testing objects in the testing steps selected by the tester are determined step by step based on the keywords in the testing steps to be edited input by the tester, so that more accurate testing steps can be associated and provided for the tester, the tester is prevented from wasting energy to select the testing steps meeting the requirements of the tester, and the efficiency of editing the testing steps by the tester is improved.
The implementation process of the method is described in detail below with reference to the implementation flow diagram of the editing method of the test step shown in fig. 1, and includes:
step 101, acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited;
It should be understood that, in practical applications, in order to be able to test the implementation process of multiple functions, and ensure the comprehensiveness of the testing steps, the target keywords may include clicking, long pressing, double clicking, sliding, and the like.
Specifically, as shown in fig. 2, an input interface schematic diagram in the editing method of the test procedure provided in the embodiment of the present invention is shown. In fig. 2, an area 201 is a display area of the test step for which editing has been completed, an area 202 is an edit input box of the test step, and an area 203 is a drop-down display area of the edit input box of the test step for displaying the test step associated with the target keyword input by the tester.
In the area 202 in fig. 2, when the tester prepares to edit the test procedure in the edit input box, but any content is also input in the edit input box, a word "can input the initial natural language such as click, wait, input, etc. for script recording" can be displayed in the edit input box to remind the tester to input the test procedure to be edited in the edit input box. In addition, when the tester positions the cursor in the edit input box, the area 203 is also displayed, and the names of the achievable test steps, such as the names of the test steps of clicking, double clicking, long pressing, waiting and the like, are displayed in the area 203, so that the tester can refer to or select the corresponding test steps.
Optionally, in order to accurately obtain the target keyword according to the input content in the input box and display the matched information content associated with the target keyword to the tester, whether the input content in the input box changes or not can be monitored in real time. Specifically, in the embodiment of the present invention, obtaining an input target keyword includes:
monitoring input content in an input box;
and if the input content in the input box is monitored to change, acquiring target keywords in the input content.
102, acquiring a target test object matched with a target keyword and sub-information corresponding to the target test object;
optionally, in order to more accurately match information content associated with a target keyword according to input content, in the embodiment of the invention, a regular expression is adopted to perform accurate matching screening, so that the associated content displayed to a tester is prevented from not meeting the actual requirement of the tester. Specifically, in the embodiment of the present invention, obtaining the target test object matched with the target keyword and sub information corresponding to the target test object includes:
if the target keyword is matched with the first layer of regular information of the target preset regular expression in the plurality of preset regular expressions, acquiring a target test object corresponding to the second layer of regular information matched with the target keyword from the plurality of second layers of regular information of the target preset regular expression; the method comprises the steps of determining a preset regular expression, wherein the preset regular expression comprises a first layer of regular information, the first layer of regular information comprises a plurality of second layers of regular information, and the second layer of regular information corresponds to a test object.
Based on a plurality of third-layer regular information of the second-layer regular information matched with the target keyword, sub-information corresponding to the third-layer regular information matched with the target keyword is obtained and used as sub-information corresponding to the target test object; wherein a second layer of regular information includes a plurality of third layers of regular information, one third layer of regular information corresponding to one sub-information.
Specifically, as shown in fig. 3, an interface diagram of an edit input box during input is provided for an edit method of a test procedure according to an embodiment of the present invention. Taking the target keyword as "click" and the target test object as "my" as examples. Firstly, when a target keyword 'click' is acquired, the 'click' is compared with first-layer regular information in a plurality of preset regular expressions one by one, and the first-layer regular information of the target preset regular expression matched with the target keyword 'click' is obtained.
And then comparing the second-layer regular information corresponding to the target regular expression of the 'my' target test object behind the target keyword one by one to obtain second-layer regular information matched with the 'my' target test object, and taking the test object corresponding to the second-layer regular information as the target test object. The plurality of test objects corresponding to the plurality of second-layer regular information may include application names, names of function buttons in the application, and the like.
And finally, based on the second-layer regular information gradually matched by clicking My, comparing the content input by the tester and a plurality of third-layer regular information corresponding to the second-layer regular information, and acquiring sub-information matched with the target keyword clicking My and the target test object My as sub-information corresponding to the target test object My.
The sub-information corresponding to the target test object "my" may be shown in the area 203 in fig. 3: and testing the word patterns such as 'clicking on the upper/lower/left/right elements of the target object'.
Optionally, in order to facilitate a tester to obtain a test step example that can be referred to or selected from an editing interface of a test step, the embodiment of the present invention can obtain sub-information corresponding to a target keyword and a target object, and display the target keyword, the target object, and the corresponding sub-information in the area 203. Specifically, after obtaining the target object matched with the target keyword and the sub information corresponding to the target object, the method provided by the embodiment of the invention further includes:
correlating the target keywords, the target objects and the sub-information;
And adding the associated target keywords, target objects and sub-information into an information display library, wherein the information display library is used for storing information content displayed in a drop-down display area of the input box.
Optionally, in order to distinguish the target keyword from the target test object, so that the tester can obtain the structure of the test step example at a glance, in the embodiment of the present invention, the target keyword may be displayed in a bolded manner. As in fig. 3, an example of a "click on a target object up/down/left/right element" word is illustrated in which "click" and "up/down/left/right element" are bolded.
Step 103, generating and displaying a test step associated with the target keyword based on the target keyword, the target test object and sub-information corresponding to the target test object;
it should be understood that after each time the tester completes editing of one test step, the test step may be confirmed, so as to send the test step to the front end for verification, so as to avoid that the test process cannot be performed due to the editing error of the test step. Specifically, in the embodiment of the present invention, based on the target keyword, the target test object, and the sub information corresponding to the target test object, the test step associated with the target keyword is generated, including:
Receiving a confirmation operation aiming at the combined information of the target keyword, the target test object and the sub-information corresponding to the target test object;
verifying the combined information in response to the confirmation operation;
and if the combined information passes the verification, generating a test step associated with the target keyword based on the combined information.
For example, taking the combined information as "click my", confirming that the operation is to press the enter key as an example, if the tester presses the enter key against the input "click my", checking the combined information of "click my"; if the "click my" can be performed through the front-end and back-end checks, a "click my" test step may be generated.
Alternatively, in order to more accurately determine whether the test step edited by the tester can be implemented, it may be determined whether the test step conforms to the grammar rule and whether it can be executed in steps. Specifically, in the embodiment of the present invention, in response to the confirmation operation, verifying the combined information includes:
responding to the confirmation operation, and checking whether the combined information accords with grammar rules in a preset semantic library through the front end;
if the combined information accords with the grammar rule in the preset semantic library, the combined information is sent to the rear end through the front end;
And checking whether the testing step corresponding to the combined information can be executed through the back end.
Optionally, a preset semantic library may be pre-built, where the preset semantic library may include all grammar rules that may be executed with the test steps, so that the front end checks all grammar rules with the test steps input by the tester one by one. If the input content does not accord with the grammar rule in the semantic library, the front end can feed back the reason of not accord with the grammar rule, such as prompt information containing words such as 'keyword does not accord with the grammar rule'.
TABLE 1 test step grammar rules in semantic library
Figure RE-GDA0002312678840000081
Figure RE-GDA0002312678840000091
As shown in table 1, the grammar rule of the test step in the semantic library in the editing method of the test step provided in the embodiment of the present invention may not be limited to the content shown in table 1.
For example, when the test step input by the tester is "clicking my", and the test interface does not have the target test object "my", at this time, since "clicking my" accords with the grammar rule "clicking the target object", the front end only can check that the grammar rule "clicking my" is correct, and cannot check that the test step cannot be executed.
Therefore, the testing step conforming to the grammar rule needs to be sent to the back end for further verification, at this time, the back end can verify the executability of the testing step, that is, the back end can verify that the testing step of clicking my cannot be executed when my does not exist.
Optionally, when the test step entered by the tester is verified to be in compliance with the grammar rules and can be executed, the test step can be generated and displayed in the area 201 as shown in fig. 3 for the tester to refer to and further confirm whether the test step meets the actual requirement.
Further, in order to enable the tester to easily identify each keyword of the generated test step so as to confirm whether the actual test requirement of the tester is met, the embodiment of the present invention can display the generated test step in the area 201 as shown in fig. 3, and mark the target keyword with a color.
In one aspect, in an embodiment of the present invention, based on a target keyword, a target test object, and sub-information corresponding to the target test object, a test step associated with the keyword is displayed, including:
if the testing step corresponding to the combined information can be executed through the back end verification, respectively determining the color values corresponding to the target keywords and the sub-information corresponding to the target test object through the corresponding relation between the back end based on the preset keywords and the color values;
The method comprises the steps that a target keyword, a target test object and a color value corresponding to sub-information corresponding to the target test object, and the target keyword, the target test object and the sub-information corresponding to the target test object are sent to a front end through a rear end;
and displaying the testing steps associated with the keywords through the color values corresponding to the front end based on the target keywords, the target test objects and the sub-information corresponding to the target test objects.
On the other hand, if the input content cannot be executed, the back end may send a specific reason that cannot be executed, such as "the target object does not exist", to the front end, so that the tester can modify according to the specific reason.
Specifically, the back end may store a correspondence between a keyword and a color value, and a correspondence between sub-information corresponding to a test object and a color value, where one keyword may correspond to one color value, one sub-information corresponding to a test object may correspond to one color value, and one color value may correspond to one specific color. When the back end checks and confirms that the test step can be executed, the back end can send the check result, the test step and the color value corresponding to each part in the test step to the front end, and the front end displays the generated test step with different colors of each part according to the color value corresponding to each part and the corresponding relation between the color and the color value.
As in step 04 in "region 201" of fig. 3, "double click target object" may be displayed in dark gray and "right side" may be displayed in light gray.
Fig. 4 is a schematic flow chart of the editing method of the test procedure in practical application according to the embodiment of the present invention. One of the embodiments of the present invention will be described with reference to fig. 4, which specifically includes:
step 401, detecting that input content input by a tester changes;
step 402, acquiring and displaying sub-information corresponding to a target keyword and a target test object based on a regular expression, the target keyword and the target test object;
step 403, detecting a confirmation operation of a tester for input content;
step 404, checking whether the input content accords with the grammar rule in the semantic library through the front end;
step 405, if the input content does not conform to the grammar rule in the semantic library, feeding back the reason of the verification error to the tester;
step 406, if the input content accords with the grammar rule in the semantic library, the input content is sent to the back end, and whether the input content can be executed is checked by the back end;
step 407, if the input content cannot be executed, feeding back the reason why the input content cannot be executed to the tester;
If the input content can be executed, a test step corresponding to the input content is generated and displayed in step 408.
The editing method of the testing step provided by the embodiment of the invention can acquire the input target keywords, wherein the target keywords are keywords in the testing step to be edited; acquiring a target test object matched with the target keyword and sub information corresponding to the target test object; and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects. Therefore, when the tester edits the testing steps, the testing objects and the sub information corresponding to the testing objects in the testing steps selected by the tester are determined step by step based on the keywords in the testing steps to be edited input by the tester, so that more accurate testing steps can be associated and provided for the tester, the tester is prevented from wasting energy to select the testing steps meeting the requirements of the tester, and the efficiency of editing the testing steps by the tester is improved.
The embodiment of the invention also provides an editing device 500 for testing steps, as shown in fig. 5, including:
a first obtaining unit 501, configured to obtain an input target keyword, where the target keyword is a keyword in a test step to be edited;
A second obtaining unit 502, configured to obtain a target test object matched with the target keyword and sub information corresponding to the target test object;
and the generating unit 503 is configured to generate and display a test step associated with the target keyword based on the target keyword, the target test object, and sub-information corresponding to the target test object.
Optionally, in an embodiment, the first obtaining unit 501 is configured to:
monitoring input content in an input box;
and if the input content in the input box is monitored to change, acquiring the target keyword in the input content.
Optionally, in an embodiment, the second obtaining unit 501 is configured to:
if the target keyword is matched with the first layer of regular information of the target preset regular expression in the plurality of preset regular expressions, acquiring a target test object corresponding to the second layer of regular information matched with the target keyword from the plurality of second layers of regular information of the target preset regular expression; the method comprises the steps that a preset regular expression comprises first-layer regular information, the first-layer regular information comprises a plurality of second-layer regular information, and the second-layer regular information corresponds to a test object;
Based on a plurality of third-layer regular information of the second-layer regular information matched with the target keyword, sub-information corresponding to the third-layer regular information matched with the target keyword is obtained and used as sub-information corresponding to the target test object; wherein a second layer of regular information includes a plurality of third layers of regular information, one third layer of regular information corresponding to one sub-information.
Optionally, in an embodiment, after obtaining the target object matched with the target keyword and the sub information corresponding to the target object, the apparatus further includes:
an associating unit 504, configured to associate the target keyword, the target object, and the sub information;
an adding unit 505, configured to add the associated target keyword, the target object, and the sub information to an information display library, where the information display library is used to store information content displayed in a drop-down display area of the input box.
Optionally, in an embodiment, the generating unit 503 is configured to:
receiving a confirmation operation aiming at the combined information of the target keyword, the target test object and the sub-information corresponding to the target test object;
Verifying the combined information in response to the confirmation operation;
and if the combined information passes the verification, generating a test step associated with the target keyword based on the combined information.
Optionally, in an embodiment, the generating unit 503 is configured to:
responding to the confirmation operation, and checking whether the combined information accords with grammar rules in a preset semantic library through a front end;
if the combined information accords with the grammar rule in the preset semantic library, the combined information is sent to a rear end through the front end;
and checking whether the test step corresponding to the combined information can be executed or not through the back end.
Optionally, in an embodiment, the generating unit 503 is configured to:
if the test step corresponding to the combined information can be executed through the rear end, respectively determining the target keyword, the target test object and the color value corresponding to the sub-information corresponding to the target test object through the corresponding relation between the preset keyword and the color value of the rear end;
transmitting the target keyword, the target test object and the color value corresponding to the sub-information corresponding to the target test object, and the target keyword, the target test object and the sub-information corresponding to the target test object to the front end through the rear end;
And displaying the testing steps associated with the keywords by the front end based on the target keywords, the target test objects and the color values corresponding to the sub-information corresponding to the target test objects.
The electronic device 500 can implement the method of the method embodiment of fig. 1 to 4, and specifically refer to the editing method of the test step of the embodiment shown in fig. 1 to 4, which is not repeated.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. Referring to fig. 6, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 6, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the generating device of the testing step on the logic level. The processor is used for executing the programs stored in the memory and is specifically used for executing the following operations:
acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited;
acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
and generating and displaying the test steps associated with the target keywords based on the target keywords, the target test objects and the sub-information corresponding to the target test objects.
The above-described editing method of the test steps disclosed in the embodiments shown in fig. 1 to 4 of the present specification may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in one or more embodiments of the present description may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with one or more embodiments of the present disclosure may be embodied directly in a hardware decoding processor or in a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The electronic device may also perform the methods of fig. 1 to 4, which are not described in detail herein.
Of course, in addition to the software implementation, the electronic device in this specification does not exclude other implementations, such as a logic device or a combination of software and hardware, that is, the execution subject of the following process is not limited to each logic unit, but may also be hardware or a logic device.
In summary, the foregoing description is only a preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present disclosure, is intended to be included within the scope of one or more embodiments of the present disclosure.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.

Claims (8)

1. An editing method of a test procedure, comprising:
acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited;
acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
generating and displaying a test step associated with the target keyword based on the target keyword, the target test object and sub-information corresponding to the target test object;
the obtaining the input target keyword includes:
monitoring input content in an input box;
if the input content in the input box is monitored to change, acquiring the target keyword in the input content;
The obtaining the target test object matched with the target keyword and the sub information corresponding to the target test object includes:
if the target keyword is matched with the first layer of regular information of the target preset regular expression in the plurality of preset regular expressions, acquiring a target test object corresponding to the second layer of regular information matched with the target keyword from the plurality of second layers of regular information of the target preset regular expression; the method comprises the steps that a preset regular expression comprises first-layer regular information, the first-layer regular information comprises a plurality of second-layer regular information, and the second-layer regular information corresponds to a test object;
based on a plurality of third-layer regular information of the second-layer regular information matched with the target keyword, sub-information corresponding to the third-layer regular information matched with the target keyword is obtained and used as sub-information corresponding to the target test object; wherein a second layer of regular information includes a plurality of third layers of regular information, one third layer of regular information corresponding to one sub-information.
2. The method of claim 1, wherein after acquiring the target object matching the target keyword and the sub information corresponding to the target object, the method further comprises:
Associating the target keyword, the target object and the sub information;
and adding the associated target keywords, the target objects and the sub information into an information display library, wherein the information display library is used for storing information content displayed in a drop-down display area of the input box.
3. The method of claim 1, wherein the generating a test associated with the target keyword based on the target keyword, the target test object, and sub-information corresponding to the target test object comprises:
receiving a confirmation operation aiming at the combined information of the target keyword, the target test object and the sub-information corresponding to the target test object;
verifying the combined information in response to the confirmation operation;
and if the combined information passes the verification, generating a test step associated with the target keyword based on the combined information.
4. The method of claim 3, wherein verifying the combined information in response to the validation operation comprises:
responding to the confirmation operation, and checking whether the combined information accords with grammar rules in a preset semantic library through a front end;
If the combined information accords with the grammar rule in the preset semantic library, the combined information is sent to a rear end through the front end;
and checking whether the test step corresponding to the combined information can be executed or not through the back end.
5. The method of claim 4, wherein displaying the test step associated with the keyword based on the target keyword, the target test object, and sub-information corresponding to the target test object, comprises:
if the test step corresponding to the combined information can be executed through the rear end, respectively determining the target keyword, the target test object and the color value corresponding to the sub-information corresponding to the target test object through the corresponding relation between the preset keyword and the color value of the rear end;
transmitting the target keyword, the target test object and the color value corresponding to the sub-information corresponding to the target test object, and the target keyword, the target test object and the sub-information corresponding to the target test object to the front end through the rear end;
and displaying the testing steps associated with the keywords by the front end based on the target keywords, the target test objects and the color values corresponding to the sub-information corresponding to the target test objects.
6. An editing apparatus for testing steps, comprising:
the first acquisition unit is used for acquiring input target keywords, wherein the target keywords are keywords in a test step to be edited;
the second acquisition unit is used for acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
the generating unit is used for generating and displaying test steps associated with the target keywords based on the target keywords, the target test objects and sub-information corresponding to the target test objects;
wherein the first acquisition unit is configured to:
monitoring input content in an input box;
if the input content in the input box is monitored to change, acquiring the target keyword in the input content;
the second acquisition unit is configured to:
if the target keyword is matched with the first layer of regular information of the target preset regular expression in the plurality of preset regular expressions, acquiring a target test object corresponding to the second layer of regular information matched with the target keyword from the plurality of second layers of regular information of the target preset regular expression; the method comprises the steps that a preset regular expression comprises first-layer regular information, the first-layer regular information comprises a plurality of second-layer regular information, and the second-layer regular information corresponds to a test object;
Based on a plurality of third-layer regular information of the second-layer regular information matched with the target keyword, sub-information corresponding to the third-layer regular information matched with the target keyword is obtained and used as sub-information corresponding to the target test object; wherein a second layer of regular information includes a plurality of third layers of regular information, one third layer of regular information corresponding to one sub-information.
7. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited;
acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
generating and displaying a test step associated with the target keyword based on the target keyword, the target test object and sub-information corresponding to the target test object;
the obtaining the input target keyword includes:
monitoring input content in an input box;
if the input content in the input box is monitored to change, acquiring the target keyword in the input content;
The obtaining the target test object matched with the target keyword and the sub information corresponding to the target test object includes:
if the target keyword is matched with the first layer of regular information of the target preset regular expression in the plurality of preset regular expressions, acquiring a target test object corresponding to the second layer of regular information matched with the target keyword from the plurality of second layers of regular information of the target preset regular expression; the method comprises the steps that a preset regular expression comprises first-layer regular information, the first-layer regular information comprises a plurality of second-layer regular information, and the second-layer regular information corresponds to a test object;
based on a plurality of third-layer regular information of the second-layer regular information matched with the target keyword, sub-information corresponding to the third-layer regular information matched with the target keyword is obtained and used as sub-information corresponding to the target test object; wherein a second layer of regular information includes a plurality of third layers of regular information, one third layer of regular information corresponding to one sub-information.
8. A computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to:
Acquiring an input target keyword, wherein the target keyword is a keyword in a test step to be edited;
acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
generating and displaying a test step associated with the target keyword based on the target keyword, the target test object and sub-information corresponding to the target test object; the obtaining the input target keyword includes:
monitoring input content in an input box;
if the input content in the input box is monitored to change, acquiring the target keyword in the input content;
the obtaining the target test object matched with the target keyword and the sub information corresponding to the target test object includes:
if the target keyword is matched with the first layer of regular information of the target preset regular expression in the plurality of preset regular expressions, acquiring a target test object corresponding to the second layer of regular information matched with the target keyword from the plurality of second layers of regular information of the target preset regular expression; the method comprises the steps that a preset regular expression comprises first-layer regular information, the first-layer regular information comprises a plurality of second-layer regular information, and the second-layer regular information corresponds to a test object;
Based on a plurality of third-layer regular information of the second-layer regular information matched with the target keyword, sub-information corresponding to the third-layer regular information matched with the target keyword is obtained and used as sub-information corresponding to the target test object; wherein a second layer of regular information includes a plurality of third layers of regular information, one third layer of regular information corresponding to one sub-information.
CN201911099845.XA 2019-11-12 2019-11-12 Editing method and device for testing steps and electronic equipment Active CN110908902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911099845.XA CN110908902B (en) 2019-11-12 2019-11-12 Editing method and device for testing steps and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911099845.XA CN110908902B (en) 2019-11-12 2019-11-12 Editing method and device for testing steps and electronic equipment

Publications (2)

Publication Number Publication Date
CN110908902A CN110908902A (en) 2020-03-24
CN110908902B true CN110908902B (en) 2023-04-21

Family

ID=69817292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911099845.XA Active CN110908902B (en) 2019-11-12 2019-11-12 Editing method and device for testing steps and electronic equipment

Country Status (1)

Country Link
CN (1) CN110908902B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647355A (en) * 2018-05-16 2018-10-12 平安普惠企业管理有限公司 Methods of exhibiting, device, equipment and the storage medium of test case
CN109344060A (en) * 2018-09-20 2019-02-15 迈普通信技术股份有限公司 A kind of analysis method and device of automatic test

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10261890B2 (en) * 2015-09-14 2019-04-16 Salesforce.Com, Inc. Methods and systems for executing tests using grouped/filtered test classes during testing of an application
US10635662B2 (en) * 2016-05-12 2020-04-28 International Business Machines Corporation Signature detection
US10108535B2 (en) * 2016-07-08 2018-10-23 Accenture Global Solutions Limited Web application test script generation to test software functionality
CN107844417B (en) * 2017-10-20 2020-06-16 东软集团股份有限公司 Test case generation method and device
CN109840192B (en) * 2017-11-27 2022-06-07 北京京东尚科信息技术有限公司 Method and device for automatic testing
CN108459957A (en) * 2017-11-29 2018-08-28 平安科技(深圳)有限公司 Test method, device, equipment and the storage medium of fund system test case
CN108459964B (en) * 2018-03-06 2021-05-04 平安科技(深圳)有限公司 Test case selection method, device, equipment and computer readable storage medium
CN108763093A (en) * 2018-06-01 2018-11-06 政采云有限公司 A kind of automated testing method and system
CN109783346B (en) * 2018-12-05 2022-05-13 深圳怡化电脑股份有限公司 Keyword-driven automatic testing method and device and terminal equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647355A (en) * 2018-05-16 2018-10-12 平安普惠企业管理有限公司 Methods of exhibiting, device, equipment and the storage medium of test case
CN109344060A (en) * 2018-09-20 2019-02-15 迈普通信技术股份有限公司 A kind of analysis method and device of automatic test

Also Published As

Publication number Publication date
CN110908902A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
CN113535817B (en) Feature broad table generation and service processing model training method and device
CN110956016A (en) Document content format adjusting method and device and electronic equipment
WO2020237508A1 (en) Assertion validation code binding method and apparatus
CN110221959B (en) Application program testing method, device and computer readable medium
CN107239403A (en) A kind of positioning problems method and apparatus
CN110990274A (en) Data processing method, device and system for generating test case
CN110795464A (en) Method, device, terminal and storage medium for checking field of object marker data
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN105989066A (en) Information processing method and device
CN109189688A (en) A kind of generation method, generating means and the electronic equipment of test case script
CN115292197A (en) Software testing method and device, electronic equipment and storage medium
CN115509904A (en) Assertion generation method and device of interface test case
CN111258905A (en) Defect positioning method and device, electronic equipment and computer readable storage medium
CN106250755A (en) For generating the method and device of identifying code
CN110428156B (en) Method and device for checking service data and electronic equipment
CN110908902B (en) Editing method and device for testing steps and electronic equipment
CN110335628B (en) Voice test method and device of intelligent equipment and electronic equipment
CN114355171B (en) Reconfigurable chip performance bottleneck detection platform, detection method and electronic equipment
CN110209572A (en) Ui testing method, ui testing system and terminal
CN110018844B (en) Management method and device of decision triggering scheme and electronic equipment
CN115129590A (en) Test case generation method and device, electronic equipment and storage medium
CN112183951B (en) Supervision processing method and device based on audit quality evaluation
CN116340127A (en) Interface testing method and device
CN110032624B (en) Sample screening method and device
CN112559331A (en) Test method and device

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