CN110908902A - Method and device for editing test steps and electronic equipment - Google Patents

Method and device for editing test steps and electronic equipment Download PDF

Info

Publication number
CN110908902A
CN110908902A CN201911099845.XA CN201911099845A CN110908902A CN 110908902 A CN110908902 A CN 110908902A CN 201911099845 A CN201911099845 A CN 201911099845A CN 110908902 A CN110908902 A CN 110908902A
Authority
CN
China
Prior art keywords
target
information
keyword
test object
sub
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.)
Granted
Application number
CN201911099845.XA
Other languages
Chinese (zh)
Other versions
CN110908902B (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 problems that in the prior art, the association function provided for a tester to edit the test step is not accurate enough, so that the efficiency of the tester to edit the test step is low. 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.

Description

Method and device for editing test steps and electronic equipment
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method and a device for editing test steps and electronic equipment.
Background
When editing the automatic test script, a tester often needs to input some test steps, such as clicking the xx object, pressing the xx object for a long time, double clicking the xx object, and/or waiting for a preset time length. When a tester inputs a certain test step in an edit box of an automatic test script, such as inputting a click, the existing association function can only perform fuzzy search based on the input click to obtain some test steps associated with the click. However, the result range obtained by the fuzzy search is too wide, and the accurate search cannot be performed for the input test 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 lot of time to select the related content meeting the requirement, and the efficiency of the tester in editing the testing step is reduced.
Therefore, there is still a need for further solutions to provide a more accurate associative function, thereby increasing the editing efficiency of the tester.
Disclosure of Invention
The embodiment of the invention provides a method and a device for editing a test step and electronic equipment, and aims to solve the problem that in the prior art, when a tester edits the test step, the association function is not accurate enough, so that the efficiency of the tester for editing the test step is low.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for editing 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.
In a second aspect, an embodiment of the present invention further provides an editing apparatus for testing steps, including:
the first acquisition unit is used for acquiring an input target keyword, wherein the target keyword is a keyword 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 related to 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform operations 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.
The embodiment of the application can at least achieve the following technical effects by adopting the technical scheme:
according to the editing method for the test steps, the input target keywords can be obtained, and the target keywords are the keywords in the test steps 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object. Therefore, when the testing personnel edits the testing steps, the testing objects in the testing steps selected by the testing personnel and the sub-information corresponding to the testing objects are provided for the testing personnel, and are determined step by step based on the keywords in the testing steps to be edited input by the testing personnel, so that the testing personnel can associate and provide more accurate testing steps, the testing personnel is prevented from wasting energy to select the testing steps meeting the requirements of the testing personnel, and the efficiency of editing the testing steps by the testing personnel is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic flow chart illustrating an implementation of an editing method for testing steps according to an embodiment of the present invention;
FIG. 2 is a schematic interface diagram of an editing method for testing steps provided by the embodiment of the present invention, when the interface is not input;
FIG. 3 is a schematic interface diagram of an editing method for testing steps during input according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of an editing method for testing steps 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 technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
In order to solve the problem that the association function provided for the tester to edit the test step is not accurate enough in the prior art, so that the efficiency of the tester to edit the test step is low, the invention provides an editing method of the test step.
For convenience of description, the following description will be made on embodiments of the method, taking an execution subject of the method as an example of an electronic device capable of executing the method. It is to be understood that the implementation of the method as an electronic device is merely an exemplary illustration and should not be construed as a limitation of the method.
Specifically, the editing method of the testing 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.
According to the editing method for the test steps, the input target keywords can be obtained, and the target keywords are the keywords in the test steps 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object. Therefore, when the testing personnel edits the testing steps, the testing objects in the testing steps selected by the testing personnel and the sub-information corresponding to the testing objects are provided for the testing personnel, and are determined step by step based on the keywords in the testing steps to be edited input by the testing personnel, so that the testing personnel can associate and provide more accurate testing steps, the testing personnel is prevented from wasting energy to select the testing steps meeting the requirements of the testing personnel, and the efficiency of editing the testing steps by the testing personnel is improved.
The following describes in detail an implementation process of the method with reference to an implementation flow diagram of the editing method of the test steps 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 test steps, the target keywords may include click, long press, double click, slide, and the like.
Specifically, as shown in fig. 2, a schematic diagram of an input interface in the editing method for testing steps provided by the embodiment of the present invention is shown. In fig. 2, a region 201 is a display region of a test step for which editing has been completed, a region 202 is an edit input box of the test step, and a region 203 is a pull-down display region of the edit input box of the test step, the pull-down display region being used to display the test step associated with a target keyword input by a tester.
In the area 202 in fig. 2, when the tester is ready to edit the test procedure in the edit input box, but also inputs any content in the edit input box, the edit input box may display a word "the natural language script recording in the beginning of which click, wait, input, etc. can be input" to remind the tester of the possibility of inputting the test procedure to be edited in the edit input box. In addition, when the tester positions the cursor in the editing input box, the area 203 is also displayed, and the achievable test step names, such as the names of the test steps of clicking, double clicking, long pressing, waiting and the like, are displayed in the area 203 for the tester to refer to or select the corresponding test step.
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 may be monitored in real time. Specifically, in the embodiment of the present invention, acquiring an input target keyword includes:
monitoring input content in the input box;
and if the input content in the input box is monitored to be changed, acquiring the target keywords in the input content.
102, acquiring a target test object matched with the target keyword and sub-information corresponding to the target test object;
optionally, in order to more accurately match the information content associated with the target keyword according to the input content, in the embodiment of the present invention, a regular expression is used to perform accurate matching screening, so as to avoid that the associated content displayed to the tester does not meet the actual requirement of the tester. Specifically, in the embodiment of the present invention, acquiring a target test object matched with a target keyword and sub-information corresponding to the target test object includes:
if the target keyword is matched with the first layer 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 regular information matched with the target keyword from a plurality of second layer regular information of the target preset regular expression; 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.
Acquiring sub-information corresponding to the third layer of regular information matched with the target keyword as sub-information corresponding to the target test object based on a plurality of third layer of regular information of the second layer of regular information matched with the target keyword; the second layer regular information comprises a plurality of third layer regular information, and one third layer regular information corresponds to one piece of sub information.
Specifically, as shown in fig. 3, an interface diagram of an editing input box during input is provided for the editing method of the test step according to the embodiment of the present invention. Take the target keyword as "click" and the target test object as "my" as an example. 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 to obtain the first-layer regular information of the target preset regular expression matched with the target keyword click.
Then, comparing the target test object 'my' behind the target keyword with a plurality of second layers of regular information corresponding to the target regular expression one by one to obtain a second layer of regular information matched with the target test object 'my', and using the test object corresponding to the second layer of 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 the click words, comparing the content input by the tester with a plurality of third layer regular information corresponding to the second layer regular information, and acquiring sub information matched with the click words and the target test objects as sub information corresponding to the target test objects.
The sub information corresponding to the target test object "my" may be shown in the area 203 in fig. 3: and a test step of words such as 'click target object up/down/left/right element'.
Optionally, in order to facilitate a tester to obtain a referential or selectable test step example from an editing interface of a test step, the embodiment of the present invention may 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 acquiring 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 present invention further includes:
associating the target keyword, the target object 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 the information content displayed in a pull-down display area of the input box.
Optionally, in order to distinguish the target keyword from the target test object, so that a tester can clearly obtain the structure of the test step example, in the embodiment of the present invention, the target keyword may be displayed in a bold manner. As in fig. 3, an example of the word "click target object up/down/left/right element" in which "click" and "up/down/left/right element" are bolded.
103, generating and displaying a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object;
it should be understood that after the tester finishes editing each testing step, the tester can perform a confirmation operation on the testing step to send the testing step to the front end for verification, so as to avoid that the testing process cannot be performed due to editing errors of the testing step. Specifically, in the embodiment of the present invention, the generating of the test step associated with the target keyword based on the target keyword, the target test object, and the sub-information corresponding to the target test object includes:
receiving a confirmation operation aiming at the target keyword, the target test object and the combined information of 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 combination information as "click my" and the confirmation operation as pressing the enter key as an example, if the tester presses the enter key for the input "click my", the combination information of "click my" is verified; if the click my can be executed after the front end and the back end are verified, a test step of click my can be generated.
Optionally, in order to more accurately judge whether the test steps edited by the tester can be implemented, whether the test steps conform to the grammar rules and whether they can be executed can be progressively judged in steps. Specifically, in the embodiment of the present invention, verifying the combined information in response to the confirmation operation includes:
responding to the confirmation operation, and checking whether the combined information conforms to a grammar rule in a preset semantic library through a front end;
if the combined information accords with grammar rules in a preset semantic library, the combined information is sent to the back end through the front end;
and verifying whether the test step corresponding to the combined information can be executed or not through the back end.
Optionally, a preset semantic library may be constructed in advance, and the preset semantic library may include all grammar rules that can be used for executing the test steps, so that the front end can check 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 reason that the grammar rule does not accord is fed back to the tester through the front end, for example, prompt information containing characters such as 'key words do not accord with the grammar rule' is included.
TABLE 1 test step grammar rules in semantic library
Figure RE-GDA0002312678840000081
Figure RE-GDA0002312678840000091
As shown in table 1, for a syntax rule of a test step in a semantic library in the editing method of a test step provided in the embodiment of the present invention, the syntax rule of the test step may not be limited to the contents shown in table 1.
For example, when the test step input by the tester is "click my", and the target test object of "my" is not available in the test interface, at this time, because the grammatical rule of "click my" conforming to the target object of click "is satisfied, the front end can only verify that the grammatical rule of" click my "is correct, and cannot verify that the test step cannot be executed.
Therefore, the testing step meeting the grammar rule needs to be sent to the back end for further verification, at this time, the back end can verify the performability of the testing step, that is, the back end can verify that the testing step of 'click my' cannot be executed when 'my' does not exist.
Optionally, when the verification confirms that the testing step inputted by the tester conforms to the grammar rule and can be executed, the testing 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 actual requirement is met.
Further, in order to enable the tester to easily recognize each keyword of the generated test step so as to determine whether the actual test requirement of the tester is met, the embodiment of the invention can display the generated test step in the area 201 as shown in fig. 3, and mark the target keyword with a color.
On one hand, in the embodiment of the present invention, the step of displaying the test associated with the keyword based on the target keyword, the target test object, and the sub-information corresponding to the target test object includes:
if the testing step corresponding to the combined information can be executed through the back end verification, respectively determining a target keyword and a color value corresponding to the sub-information corresponding to the target test object through the back end based on the corresponding relation between the preset keyword and the color value;
sending the target key words, the target test objects and the color values corresponding to the sub-information corresponding to the target test objects, and the target key words, the target test objects and the sub-information corresponding to the target test objects to the front end through the back end;
and displaying the testing steps related to the keywords through color values corresponding to the target keywords, the target testing objects and the sub information corresponding to the target testing 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 corresponding relationship between a keyword and a color value and a corresponding relationship between sub information and a color value corresponding to a test object, where one keyword may correspond to one color value, one sub information and a color value corresponding to one test object, and one color value may correspond to a specific color. When the back end verifies and confirms that the testing step can be executed, the back end can send the verification result, the testing step and the color values corresponding to all the parts in the testing step to the front end, and the generated testing step with different colors of all the parts is displayed by the front end according to the color values corresponding to all the parts and the corresponding relation of the colors and the color values.
As in step 04 in "area 201" of fig. 3, "double-click on target object" may be displayed as dark gray and "right side" may be displayed as light gray.
Fig. 4 is a schematic flow chart of an editing method for testing steps in practical application according to an embodiment of the present invention. An implementation manner in the embodiment of the present invention is described below 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 the confirmation operation of the tester for the input content;
step 404, checking whether the input content conforms to a grammar rule in a semantic library through a 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 error check to the tester;
step 406, if the input content conforms to the grammar rule in the semantic library, sending the input content to the back end, and checking whether the input content can be executed through the back end;
step 407, if the input content can not be executed, feeding back the reason why the input content can not be executed to the tester;
step 408, if the input content can be executed, generating and displaying a test step corresponding to the input content.
According to the editing method for the test steps, the input target keywords can be obtained, and the target keywords are the keywords in the test steps 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object. Therefore, when the testing personnel edits the testing steps, the testing objects in the testing steps selected by the testing personnel and the sub-information corresponding to the testing objects are provided for the testing personnel, and are determined step by step based on the keywords in the testing steps to be edited input by the testing personnel, so that the testing personnel can associate and provide more accurate testing steps, the testing personnel is prevented from wasting energy to select the testing steps meeting the requirements of the testing personnel, and the efficiency of editing the testing steps by the testing personnel is improved.
An embodiment of the present invention further provides an editing apparatus 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;
a generating unit 503, configured to generate and display a test procedure 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 the input box;
and if the input content in the input box is monitored to be changed, 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 a first layer of regular information of a target preset regular expression in a plurality of preset regular expressions, acquiring a target test object corresponding to a second layer of regular information matched with the target keyword from a plurality of second layers of regular information of the target preset regular expression; the method comprises the steps that a 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 layers of regular information correspond to a test object;
acquiring sub-information corresponding to the third layer of regular information matched with the target keyword as sub-information corresponding to the target test object based on a plurality of third layer of regular information of the second layer of regular information matched with the target keyword; the second layer regular information comprises a plurality of third layer regular information, and one third layer regular information corresponds to one piece of sub information.
Optionally, in an embodiment, after acquiring the target object matching 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, target object, and sub-information to an information display library, where the information display library is used to store information content displayed in a pull-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 target keyword, the target test object and the combined information of 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 conforms to grammar rules in a preset semantic library or not through a front end;
if the combined information accords with grammar rules in the preset semantic library, the combined information is sent to a back end through the front end;
and verifying whether the testing 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 testing step corresponding to the combined information is verified through the back end to be executable, respectively determining the color values corresponding to the target keyword, the target test object and the sub information corresponding to the target test object through the corresponding relation between the preset keyword and the color values of the back end;
sending 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 back end;
and displaying the testing steps related to the keywords through the color values corresponding to the front end based on the target keywords, the target testing object and the sub information corresponding to the target testing object.
The electronic device 500 can implement the method of the method embodiments in fig. 1 to fig. 4, and specifically refer to the editing method of the test steps in the embodiments shown in fig. 1 to fig. 4, which is not described again.
Fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification. Referring to fig. 6, at a hardware level, the electronic device includes a processor, and optionally further includes 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, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 6, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides 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, and the generating device of the testing step is formed on the logic level. The processor is used for executing the program 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.
The editing method of the test procedure disclosed in the embodiments of fig. 1 to fig. 4 in this specification can be applied to a processor, or can be 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 instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) 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 specification 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 hardware, in a software module executed by a hardware decoding processor, or in a combination of the hardware and software modules executed by a hardware decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may also perform the methods of fig. 1-4, which are not described herein again.
Of course, besides the software implementation, the electronic device in this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present disclosure should be included in the scope of protection of one or more embodiments of the present disclosure.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, 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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (10)

1. A method for editing 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;
and generating and displaying a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.
2. The method of claim 1, wherein the obtaining the input target keyword comprises:
monitoring input content in the input box;
and if the input content in the input box is monitored to be changed, acquiring the target keyword in the input content.
3. The method of claim 2, wherein the obtaining of the target test object matched with the target keyword and the sub-information corresponding to the target test object comprises:
if the target keyword is matched with a first layer of regular information of a target preset regular expression in a plurality of preset regular expressions, acquiring a target test object corresponding to a second layer of regular information matched with the target keyword from a plurality of second layers of regular information of the target preset regular expression; the method comprises the steps that a 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 layers of regular information correspond to a test object;
acquiring sub-information corresponding to the third layer of regular information matched with the target keyword as sub-information corresponding to the target test object based on a plurality of third layer of regular information of the second layer of regular information matched with the target keyword; the second layer regular information comprises a plurality of third layer regular information, and one third layer regular information corresponds to one piece of sub information.
4. The method of claim 3, wherein after obtaining a target object matching the target keyword and 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 contents displayed in a pull-down display area of the input box.
5. The method of claim 1, wherein the step of 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 target keyword, the target test object and the combined information of 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.
6. The method of claim 5, wherein verifying the combined information in response to the validation operation comprises:
responding to the confirmation operation, and checking whether the combined information conforms to grammar rules in a preset semantic library or not through a front end;
if the combined information accords with grammar rules in the preset semantic library, the combined information is sent to a back end through the front end;
and verifying whether the testing step corresponding to the combined information can be executed or not through the back end.
7. The method of claim 6, wherein displaying the test 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 testing step corresponding to the combined information is verified through the back end to be executable, respectively determining the color values corresponding to the target keyword, the target test object and the sub information corresponding to the target test object through the corresponding relation between the preset keyword and the color values of the back end;
sending 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 back end;
and displaying the testing steps related to the keywords through the color values corresponding to the front end based on the target keywords, the target testing object and the sub information corresponding to the target testing object.
8. An editing apparatus for testing steps, comprising:
the first acquisition unit is used for acquiring an input target keyword, wherein the target keyword is a keyword 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 related to the target keywords based on the target keywords, the target test objects and the sub information corresponding to the target test objects.
9. 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;
and generating and displaying a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.
10. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including 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 a test step associated with the target keyword based on the target keyword, the target test object and the sub-information corresponding to the target test object.
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 true CN110908902A (en) 2020-03-24
CN110908902B 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 (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170075791A1 (en) * 2015-09-14 2017-03-16 Salesforce.Com, Inc. Methods and systems for executing tests using grouped/filtered test classes during testing of an application
US20170329821A1 (en) * 2016-05-12 2017-11-16 International Business Machines Corporation Signature detection
US20180011780A1 (en) * 2016-07-08 2018-01-11 Accenture Global Solutions Limited Web application test script generation to test software functionality
CN107844417A (en) * 2017-10-20 2018-03-27 东软集团股份有限公司 Method for generating test case and device
CN108459964A (en) * 2018-03-06 2018-08-28 平安科技(深圳)有限公司 Test cases selection method, apparatus, equipment and computer readable storage medium
CN108459957A (en) * 2017-11-29 2018-08-28 平安科技(深圳)有限公司 Test method, device, equipment and the storage medium of fund system test case
CN108647355A (en) * 2018-05-16 2018-10-12 平安普惠企业管理有限公司 Methods of exhibiting, device, equipment and the storage medium of test case
CN108763093A (en) * 2018-06-01 2018-11-06 政采云有限公司 A kind of automated testing method and system
CN109344060A (en) * 2018-09-20 2019-02-15 迈普通信技术股份有限公司 A kind of analysis method and device of automatic test
CN109783346A (en) * 2018-12-05 2019-05-21 深圳怡化电脑股份有限公司 Keyword-driven automatic testing method and device and terminal equipment
CN109840192A (en) * 2017-11-27 2019-06-04 北京京东尚科信息技术有限公司 The method and apparatus of automatic test

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170075791A1 (en) * 2015-09-14 2017-03-16 Salesforce.Com, Inc. Methods and systems for executing tests using grouped/filtered test classes during testing of an application
US20170329821A1 (en) * 2016-05-12 2017-11-16 International Business Machines Corporation Signature detection
US20180011780A1 (en) * 2016-07-08 2018-01-11 Accenture Global Solutions Limited Web application test script generation to test software functionality
CN107844417A (en) * 2017-10-20 2018-03-27 东软集团股份有限公司 Method for generating test case and device
CN109840192A (en) * 2017-11-27 2019-06-04 北京京东尚科信息技术有限公司 The method and apparatus of automatic test
CN108459957A (en) * 2017-11-29 2018-08-28 平安科技(深圳)有限公司 Test method, device, equipment and the storage medium of fund system test case
CN108459964A (en) * 2018-03-06 2018-08-28 平安科技(深圳)有限公司 Test cases selection method, apparatus, equipment and computer readable storage medium
CN108647355A (en) * 2018-05-16 2018-10-12 平安普惠企业管理有限公司 Methods of exhibiting, device, equipment and the storage medium of test case
CN108763093A (en) * 2018-06-01 2018-11-06 政采云有限公司 A kind of automated testing method and system
CN109344060A (en) * 2018-09-20 2019-02-15 迈普通信技术股份有限公司 A kind of analysis method and device of automatic test
CN109783346A (en) * 2018-12-05 2019-05-21 深圳怡化电脑股份有限公司 Keyword-driven automatic testing method and device and terminal equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
PAN LIU等: "An Approach to Automatic Test Case Generation for Unit Testing", 《2018 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY COMPANION (QRS-C)》 *
沈宇桔: "正则表达式复杂度攻击自动化检测技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
郝忠虎: "基于正则表达式扩展的Web服务测试用例自动生成方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN110908902B (en) 2023-04-21

Similar Documents

Publication Publication Date Title
US10915702B2 (en) Methods and systems for validating multiple methods of input using a unified rule set
CN109871326B (en) Script recording method and device
CN110956016A (en) Document content format adjusting method and device and electronic equipment
CN113535817B (en) Feature broad table generation and service processing model training method and device
WO2020237508A1 (en) Assertion validation code binding method and apparatus
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN112233669A (en) Speech content prompting method and system
CN112215230A (en) Information auditing method and device and electronic equipment
CN109189688B (en) Test case script generation method and device and electronic equipment
CN114282586A (en) Data annotation method, system and electronic equipment
CN115292197A (en) Software testing method and device, electronic equipment and storage medium
CN109542785B (en) Invalid bug determination method and device
CN111488095A (en) User login management method and device
CN110428156B (en) Method and device for checking service data and electronic equipment
CN110908902B (en) Editing method and device for testing steps and electronic equipment
CN116756037A (en) Abnormal code positioning system, method, equipment and computer readable storage medium
CN110018844B (en) Management method and device of decision triggering scheme and electronic equipment
CN112183951B (en) Supervision processing method and device based on audit quality evaluation
CN114355171A (en) Reconfigurable chip performance bottleneck detection platform, detection method and electronic equipment
US9305117B2 (en) String generation tool
CN112182502A (en) Compliance auditing method, device and equipment
CN112835903A (en) Sensitive data identification method and equipment
CN113220382A (en) Anomaly detection method and device for application language package
CN110688144B (en) Method and device for optimizing service interface configuration and electronic equipment
CN111427870B (en) Resource management method, device and equipment

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