CN114741292A - Test script management method and device, electronic equipment and storage medium - Google Patents

Test script management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114741292A
CN114741292A CN202210350693.1A CN202210350693A CN114741292A CN 114741292 A CN114741292 A CN 114741292A CN 202210350693 A CN202210350693 A CN 202210350693A CN 114741292 A CN114741292 A CN 114741292A
Authority
CN
China
Prior art keywords
test script
test
information
attribute
determining
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.)
Withdrawn
Application number
CN202210350693.1A
Other languages
Chinese (zh)
Inventor
郑振加
聂海斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sensetime Technology Co Ltd
Original Assignee
Shenzhen Sensetime 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 Shenzhen Sensetime Technology Co Ltd filed Critical Shenzhen Sensetime Technology Co Ltd
Priority to CN202210350693.1A priority Critical patent/CN114741292A/en
Publication of CN114741292A publication Critical patent/CN114741292A/en
Withdrawn legal-status Critical Current

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/3684Test management for test design, e.g. generating new test cases

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 disclosure relates to a test script management method and device, an electronic device and a storage medium, by acquiring a test script and developing basic information of the test script. And analyzing the test script according to the basic information to obtain at least one attribute information set, further determining at least one test case according to the at least one attribute information set, and storing the information of the test case. The embodiment of the invention can realize the unified management of the test scripts generated by different frames by analyzing the test scripts through the basic information, can screen the information of the test cases, realizes the synchronization and sharing of the test data of different test teams, and improves the efficiency of the product test process.

Description

Test script management method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a test script management method and apparatus, an electronic device, and a storage medium.
Background
In the field of software testing, the development of test scripts can be based on a variety of different open source test frameworks. For the test of the same product, different teams can test through different frames during the test, so that the test script and the test data are difficult to copy and share, and the efficiency of the product research and development process is directly influenced.
Disclosure of Invention
The disclosure provides a test script management method and device, electronic equipment and a storage medium, and aims to realize sharing and synchronization of test cases and improve efficiency of a product test process.
According to a first aspect of the present disclosure, there is provided a test script management method, including:
acquiring a test script;
determining basic information for developing the test script;
analyzing the test script according to the basic information to obtain at least one attribute information set contained in the test script;
and determining at least one test case according to the at least one attribute information set, and storing the information of the test case.
In one possible implementation manner, the obtaining the test script includes:
displaying a test script page corresponding to a test script storage platform, wherein the test script page comprises at least one test script and a download control of each test script;
responding to the trigger of the download control, and sending a download request comprising a test script identifier corresponding to the download control;
and receiving a test script returned according to the downloading request.
In one possible implementation, the determining basic information for developing the test script includes:
and determining the frame type, the case type and the version information of the test script.
In a possible implementation manner, the attribute information set includes a version attribute and a type attribute;
the determining at least one test case according to the at least one attribute information set, and the storing information of the test case includes:
determining that the included version attribute is matched with the version information, an attribute information set of which the included type attribute is matched with the case type is a target attribute information set, and determining that the attribute information included in the target attribute information set is information corresponding to the test case;
and storing the target attribute information set.
In a possible implementation manner, the determining the frame type, the use case type, and the version information of the test script includes:
displaying an information acquisition page comprising a frame type control, a use case type control and a version information control;
and determining the frame type, the use case type and the version information in response to the frame type control, the use case type control and the version information control being triggered.
In a possible implementation manner, the analyzing the test script according to the basic information to obtain at least one attribute information set included in the test script includes:
determining target characteristics in a test script developed according to the basic information;
and analyzing the test script according to the target characteristics to obtain the at least one attribute information set.
In one possible implementation, the determining target features in the test script developed according to the basic information includes:
and determining the target attribute of the target function of the test script as the target characteristic.
In one possible implementation, the determining target features in the test script developed according to the basic information includes:
and determining a preset regular expression or a preset json analysis strategy corresponding to the test script as the target characteristic.
In one possible implementation manner, at least one attribute information in the attribute information set includes an attribute name and an attribute content, and the method further includes:
and displaying the attribute name and the attribute content corresponding to the test case in a list form.
According to a second aspect of the present disclosure, there is provided a test script management apparatus, including:
the script determining module is used for acquiring a test script;
the information determining module is used for determining basic information for developing the test script;
the script analysis module is used for analyzing the test script according to the basic information to obtain at least one attribute information set contained in the test script;
and the information storage module is used for determining at least one test case according to the at least one attribute information set and storing the information of the test case.
In one possible implementation, the script determining module includes:
the page display submodule is used for displaying a test script page corresponding to the test script storage platform, and the test script page comprises at least one test script and a download control of each test script;
the request sending submodule is used for responding to the triggering of the downloading control and sending a downloading request comprising a test script mark corresponding to the downloading control;
and the script receiving submodule is used for receiving the test script returned according to the downloading request.
In one possible implementation, the information determining module includes:
and the information determination submodule is used for determining the frame type, the use case type and the version information of the test script.
In a possible implementation manner, the attribute information set includes a version attribute and a type attribute;
the information storage module includes:
the information matching submodule is used for determining that the included version attribute is matched with the version information, an attribute information set of which the type attribute is matched with the case type is a target attribute information set, and determining that the attribute information included in the target attribute information set is information corresponding to the test case;
and the information storage submodule is used for storing the target attribute information set.
In one possible implementation, the information determining sub-module includes:
the page display unit is used for displaying an information acquisition page comprising a frame type control, a use case type control and a version information control;
and the information determining unit is used for determining the frame type, the use case type and the version information in response to the triggering of the frame type control, the use case type control and the version information control.
In one possible implementation, the script parsing module includes:
the characteristic determination submodule is used for determining target characteristics in a test script developed according to the basic information;
and the set determining submodule is used for analyzing the test script according to the target characteristics to obtain the at least one attribute information set.
In one possible implementation, the feature determination sub-module includes:
a first feature determining unit, configured to determine a target attribute of an object function of the test script as the target feature.
In one possible implementation, the litigation-feature determination submodule includes:
and the second characteristic determining unit is used for determining a preset regular expression or a preset json analysis strategy corresponding to the test script as the target characteristic.
In one possible implementation manner, at least one attribute information in the attribute information set includes an attribute name and an attribute content, and the apparatus further includes:
and the list display module is used for displaying the attribute name and the attribute content corresponding to the test case in a list form.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
The embodiment of the invention can realize the unified management of the test scripts generated by different frames by analyzing the test scripts through the basic information, can screen the information of the test cases, realizes the synchronization and sharing of the test data of different test teams, and improves the efficiency of the product test process.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram of an application system of a test script management method according to an embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of a method of test script management in accordance with an embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of a test script page, in accordance with an embodiment of the present disclosure;
FIG. 4 shows a schematic view of a landing page in accordance with an embodiment of the present disclosure;
FIG. 5 shows a schematic diagram of an information collection page, in accordance with an embodiment of the present disclosure;
FIG. 6 illustrates a schematic diagram of determining a target set of attribute information in accordance with an embodiment of the disclosure;
FIG. 7 shows a schematic diagram of a target set of attribute information, in accordance with an embodiment of the present disclosure;
FIG. 8 shows a schematic diagram of a test script management apparatus, in accordance with an embodiment of the present disclosure;
FIG. 9 shows a schematic diagram of an electronic device in accordance with an embodiment of the disclosure;
FIG. 10 shows a schematic diagram of an electronic device in accordance with an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 is a schematic diagram of an application system of a test script management method according to an embodiment of the present disclosure. As shown in fig. 1, a system to which the test script management method of the embodiment of the present disclosure is applied may include a first electronic device 10 and a second electronic device 11 connected through a network. The first electronic device 10 is configured to obtain a test script from the second electronic device 11, obtain at least one attribute information set by determining a basic information analysis test script, further obtain at least one test case according to each attribute information set, and store information of the test case.
In one possible implementation, the first electronic device 10 may be a mobile electronic device capable of performing human-computer interaction with a User, and includes a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, and the like, and the first electronic device 10 may implement the test script management method according to the embodiment of the disclosure by a processor calling a computer readable instruction stored in a memory. The second electronic device 11 may be a server of a third-party test case storage platform storing a test script, and may be a single server or a server cluster formed by a plurality of servers.
The embodiment of the disclosure can be applied to a management scenario of any test script, for example, a scenario of classified storage management of test cases of different versions in a plurality of test scripts of the same product, or a scenario of searching a test case in at least one test script of a specific version of a specific product when the specific product needs to be tested.
FIG. 2 shows a flow chart of a test script management method according to an embodiment of the present disclosure. As shown in fig. 2, in one possible implementation manner, a test script management method according to an embodiment of the present disclosure may include the following steps:
and step S10, obtaining a test script.
In one possible implementation, the electronic device first obtains at least one test script, and each test script is used for automated testing of the software product. The test script may be code data written based on test data of the test case. The codes of the test scripts corresponding to different test cases can be the same or different, and when different test cases correspond to the same test script code, the test data included in the test script code is different.
Alternatively, the test script may be pre-stored in the electronic device executing the test script management method, that is, the determination manner may be to directly obtain the pre-stored test script. Further, the test script may also be transmitted by other electronic devices, and the determination may be received by the electronic device executing the test script management method.
In a possible implementation manner, the test script is stored in a third-party test script storage platform or a test script storage platform shared by other multiple users, and the test script of the test case may be downloaded from a server of the test script storage platform. In the application scenario, the process of determining the test script in a manner of interacting with other electronic device information according to the embodiment of the present disclosure may include: and displaying a test script page corresponding to the test script storage platform, wherein the test script page comprises at least one test script and a download control of each test script. And responding to the triggering of the downloading control, and sending a downloading request comprising a test script identifier corresponding to the downloading control. And receiving the test script returned according to the downloading request.
That is to say, a user may connect to a server of the use-case storage platform through the electronic device that executes the test script management method according to the embodiment of the present disclosure, and display a test script page corresponding to the test script storage platform on a display interface. The test script page displays a plurality of test scripts and a download control used for downloading each test script when being triggered. When a user needs to download a test script in a test script page, a download control corresponding to the test script is triggered by clicking or other modes, so that a download request of the test script is sent to a server of a test script storage platform. And further, receiving a mode that the server of the test script storage platform sends the test script.
FIG. 3 shows a schematic diagram of a test script page, according to an embodiment of the present disclosure. As shown in fig. 3, a test script page 30 is displayed by an electronic device executing the test script management method according to the embodiment of the present disclosure, where the test script page 30 includes a plurality of test scripts 31 and download controls 32 corresponding to the test scripts 31. When a user needs to execute the test script management method according to the embodiment of the present disclosure based on the test script 1, the download control 32 is triggered by clicking the download control 32 corresponding to the test script 1. When the user triggers the download control 32, the electronic device sends a download request of the test script 31 to the test script storage platform server, and receives the test script 1 sent by the server.
Furthermore, in order to ensure the storage safety of the test script, the data loss is avoided. The method and the device for testing the user identity can send the user identity to the server of the test script storage platform so as to carry out identity verification on the user accessing the case storage platform, establish connection with the electronic equipment under the condition that the identity verification is successful, and send the test script page. Optionally, the verification process may include displaying a login page corresponding to the test script storage platform, where the login page includes an information input control. And determining and sending user information to the test script storage platform in response to the information input control being triggered. And receiving a test script page returned by the test script storage platform under the condition that the user information meets the requirement.
That is, a landing page corresponding to the test script storage platform is displayed through the electronic device, and the user inputs user information through the landing page and sends the user information to the server of the test script storage platform in a manner of triggering the information input control. And after receiving the user information, the server judges the access authority of the user according to the user information, namely judges whether the user meets the access requirement, and returns a test script page to the electronic equipment under the condition that the user meets the access requirement so that the user can browse and download the test script.
FIG. 4 shows a schematic view of a landing page in accordance with an embodiment of the present disclosure. As shown in fig. 4, in a case where a test case set needs to be downloaded from the test case storage platform, the electronic device executing the test script management method first displays a login page 40 through a display device. The display login page 40 includes an information input control 41, and a user can input user information into a text box in the information input control 41, and trigger the information input control 41 by clicking a login button, so as to send the user information to the server through the electronic device. And the server returns the test script page to the electronic equipment when judging that the user information meets the access requirement.
Further, in order to further avoid the storage safety of the test script, the server of the test script storage platform may perform authentication on the user again when receiving the download request, so as to determine whether the user has the permission to download the test script corresponding to the download request.
Furthermore, because different test case generation frameworks are different, in order to facilitate isolation of code introduction relations and conflicts among versions, after the test script is determined, a project dependency package of the test script generation framework is further installed in a folder for storing the test script.
And step S20, determining basic information for developing the test script.
In one possible implementation, the basic information of the test script corresponding to the development test case is determined by the electronic device. Optionally, the basic information may include a framework type, and version information and a case type of the test case information that need to be obtained. Optionally, the determination manner of the frame type, the use case type and the version information in the basic information may be preset, or may be selected by a user in a human-computer interaction manner. The frame type may include multiple types, such as Python Pythest, Unitttes, Robot frame, HttpRunner, and Pytest-Bdd, and the version information may be represented by a predefined version number or the like.
Optionally, under the condition that the frame type, the use case type and the version information are selected by a user in a man-machine interaction mode, an information acquisition page comprising a frame type control, a use case type control and a version information control can be displayed firstly, and then the frame type and the version information are determined in response to the triggering of the frame type control, the use case type control and the version information control. The frame type control, the use case type control and the version information control can be text input boxes and are triggered when a user inputs corresponding content. Alternatively, a drop-down selection box including a plurality of contents may be triggered when a user selects one of the contents.
FIG. 5 shows a schematic diagram of an information collection page according to an embodiment of the disclosure. As shown in fig. 5, in the embodiment of the present disclosure, an information collection page 50 is implemented by a display device of an electronic device executing a test script management method, where the information collection page includes a frame type control 51, a use case type control 52, and a version information control 53. Optionally, the frame type control 51, the use case type control 52, and the version information control 53 may be pull-down selection boxes, each of which includes a plurality of frame types and version information, and a user may select a version type of a test case corresponding to a currently determined test case, a type of a test case corresponding to a test script, and version information of the test case.
And step S30, analyzing the test script according to the basic information to obtain at least one attribute information set.
In a possible implementation manner, the electronic device analyzes the test script according to the basic information determined by the user to obtain an attribute information set of the test data of at least one test case. Optionally, since the test script function generated by the type framework has a specific function feature, when the electronic device parses the test script, the electronic device may determine the test data in the test script by identifying the function feature in the test script, and parse the test data to obtain the attribute information set.
For example, function features are determined from the framework type, and the function features are used to characterize functions in a test script developed from the framework type. And analyzing the test case set according to the function characteristics to obtain at least one test function comprising test data. Optionally, the test function is script code of a test script. And performing text analysis on the test data in each test function to obtain at least one attribute information included in the test data. And determining an attribute information set according to at least one attribute information obtained by analyzing each test data. That is, the electronic device may determine a target feature in the test script developed according to the basic information, and then analyze the test script according to the target feature to obtain at least one attribute information set. The determination mode of the target feature may be to determine a target attribute of a target function of the test script as the target feature. Or determining a preset regular expression or a preset json analysis strategy corresponding to the test script as the target characteristic. For example, when the frame type is a Python Pytest frame, the target feature of the frame type is test, and according to a preset regular expression of the test script under the frame, a function at the beginning of the test can be directly determined to be a test function of the test script. When the frame type is a Python unintest frame, the target feature of the frame type is class and the base class is Testcase, and according to a preset regular expression or a preset json analysis strategy of a test script under the frame, a function under the class can be determined to be the test function of the test script.
Further, after the test function is determined, the content of the text attribute in the test function is identified as test data, and at least one attribute information included in the test data is obtained by performing text analysis on the test data. Alternatively, the attribute information may be the title, module, label, component, etc. attributes of the test data. Meanwhile, the attribute information also comprises a version attribute of the test data, and the version attribute represents the version of the test data.
And step S40, determining at least one test case according to the at least one attribute information set, and storing the information of the test case.
In a possible implementation manner, the version attribute and the type attribute of the test case in the attribute information set corresponding to the test case corresponding to the test script are obtained and compared with the version information and the case type determined by the user, so as to determine that the included version attribute is matched with the version information, the attribute information set of which the included type attribute is matched with the case type is a target attribute information set, and the attribute information included in the target attribute information set is determined to be the information corresponding to the test case. The target attribute information set is stored. Optionally, in the above process, when the version attribute is the same as the version information and the included type attribute is the same as the use case type, the test data including the version attribute and the type attribute is determined to be target test data, a target attribute information set corresponding to the target test data is stored, and the target test data may be one or more target test data.
That is to say, the version information and the case type are used as screening conditions, the target test data is screened from the plurality of test data obtained by analyzing the test script, and the target attribute information set corresponding to the target test data is stored as the information of the corresponding test case, so that the user can conveniently perform the test again based on the test case. Optionally, the target attribute information set may also be displayed for user viewing while being stored. For example, when the attribute information includes an attribute name and attribute content of a corresponding test case, a target attribute information set corresponding to target test data may be stored, and the attribute name and the attribute content of the test case may be displayed in a list form.
In an application scenario that information classification of different test cases in a test script needs to be stored and managed, the electronic device may execute the test script management method of the embodiment of the present disclosure multiple times, and determine and store attribute information sets of test data of different versions and different case types each time. Or, a plurality of different version information and use case types may be determined when the sequential test script management method is executed, so as to store attribute information sets of test data corresponding to the different version information and use case types, respectively.
In an application scenario that a user needs to query test data of a specific version, the electronic device may obtain a test case expected by the user by executing the test case method of the embodiment of the present disclosure, and store and display an attribute information set corresponding to the test case to the user.
FIG. 6 illustrates a schematic diagram of determining a target set of attribute information according to an embodiment of the present disclosure. As shown in fig. 6, after the electronic device determines the test script 60, the electronic device parses the test script 60 according to the basic information 61 input by the user to obtain a plurality of attribute information sets 62 of the test cases. Further, each attribute information set 62 is filtered according to version information input by a user and a use case type 63 to obtain and store a target attribute information set 64 corresponding to at least one test script.
FIG. 7 shows a schematic diagram of a target set of attribute information, according to an embodiment of the present disclosure. As shown in fig. 7, in a possible implementation manner, after determining at least one target attribute information set representing corresponding test case information, the electronic device further displays the target attribute information set to a user in a list manner. The attribute names 70 and the attribute contents 71 of the respective attribute information are included therein.
The embodiment of the invention can realize the unified management of the test scripts generated by different frames by analyzing the test scripts through the basic information, can screen the information of the test cases, realizes the synchronization and sharing of the test data of different test teams, and improves the efficiency of the product test process.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.
In addition, the present disclosure also provides a test data management apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the test data management methods provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the methods section are omitted for brevity.
Fig. 8 is a schematic diagram of a test script management device according to an embodiment of the present disclosure, and as shown in fig. 8, the test script management device according to the embodiment of the present disclosure may include:
a script determining module 80 for obtaining a test script;
an information determining module 81, configured to determine basic information for developing the test script;
the script analysis module 82 is configured to analyze the test script according to the basic information to obtain at least one attribute information set included in the test script;
and the information storage module 83 is configured to determine at least one test case according to the at least one attribute information set, and store information of the test case.
In one possible implementation, the script determining module 80 includes:
the page display submodule is used for displaying a test script page corresponding to the test script storage platform, and the test script page comprises at least one test script and a downloading control of each test script;
the request sending submodule is used for responding to the triggering of the downloading control and sending a downloading request comprising a test script mark corresponding to the downloading control;
and the script receiving submodule is used for receiving the test script returned according to the downloading request.
In one possible implementation manner, the information determining module 81 includes:
and the information determination submodule is used for determining the frame type, the use case type and the version information of the test script.
In a possible implementation manner, the attribute information set includes a version attribute and a type attribute;
the information storage module 83 includes:
the information matching submodule is used for determining that the included version attribute is matched with the version information, an attribute information set of which the type attribute is matched with the case type is a target attribute information set, and determining that the attribute information included in the target attribute information set is information corresponding to the test case;
and the information storage submodule is used for storing the target attribute information set.
In one possible implementation, the information determining sub-module includes:
the page display unit is used for displaying an information acquisition page comprising a frame type control, a use case type control and a version information control;
and the information determining unit is used for determining the frame type, the use case type and the version information in response to the triggering of the frame type control, the use case type control and the version information control.
In one possible implementation manner, the script parsing module 82 includes:
the characteristic determination submodule is used for determining target characteristics in a test script developed according to the basic information;
and the set determining submodule is used for analyzing the test script according to the target characteristics to obtain the at least one attribute information set.
In one possible implementation manner, the feature determination submodule includes:
a first feature determining unit, configured to determine a target attribute of an object function of the test script as the target feature.
In one possible implementation, the litigation-feature determination submodule includes:
and the second characteristic determining unit is used for determining a preset regular expression or a preset json analysis strategy corresponding to the test script as the target characteristic.
In one possible implementation manner, at least one attribute information in the attribute information set includes an attribute name and an attribute content, and the apparatus further includes:
and the list display module is used for displaying the attribute name and the attribute content corresponding to the test case in a list form.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a volatile or non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
The disclosed embodiments also provide a computer program product comprising computer readable code or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, the processor in the electronic device performs the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 9 shows a schematic diagram of an electronic device 800 according to an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 9, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile and non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (2G) or a third generation mobile communication technology (3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 10 shows a schematic diagram of an electronic device 1900 according to an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 10, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, that are executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as the Microsoft Server operating system (Windows Server), the graphical user interface based operating system (Mac OS XTM) available from apple Inc., the Multi-user Multi-Process computer operating system (Unix), the Unix-like operating system of free and open native code (LinuxTM), the Unix-like operating system of open native code (FreeBSDTM), or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be interpreted as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the disclosure are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (12)

1. A method for managing test scripts, the method comprising:
acquiring a test script;
determining basic information for developing the test script;
analyzing the test script according to the basic information to obtain at least one attribute information set contained in the test script;
and determining at least one test case according to the at least one attribute information set, and storing the information of the test case.
2. The method of claim 1, wherein obtaining the test script comprises:
displaying a test script page corresponding to a test script storage platform, wherein the test script page comprises at least one test script and a download control of each test script;
responding to the trigger of the download control, and sending a download request comprising a test script identifier corresponding to the download control;
and receiving a test script returned according to the downloading request.
3. The method of claim 1 or 2, wherein the determining the underlying information for developing the test script comprises:
and determining the frame type, the case type and the version information of the test script.
4. The method of claim 3, wherein the set of attribute information includes a version attribute and a type attribute;
the determining at least one test case according to the at least one attribute information set, and the storing information of the test case includes:
determining that the included version attribute is matched with the version information, and an attribute information set of which the included type attribute is matched with the case type is a target attribute information set, and determining that the attribute information included in the target attribute information set is information corresponding to the test case;
and storing the target attribute information set.
5. The method of claim 3 or 4, wherein the determining the frame type, use case type, and version information of the test script comprises:
displaying an information acquisition page comprising a frame type control, a use case type control and a version information control;
and determining the frame type, the use case type and the version information in response to the frame type control, the use case type control and the version information control being triggered.
6. The method according to any one of claims 1 to 5, wherein the parsing the test script according to the basic information to obtain at least one attribute information set included in the test script comprises:
determining target characteristics in a test script developed according to the basic information;
and analyzing the test script according to the target characteristics to obtain the at least one attribute information set.
7. The method of claim 6, wherein determining target features in a test script developed from the base information comprises:
and determining the target attribute of the target function of the test script as the target characteristic.
8. The method of claim 6, wherein determining target features in a test script developed from the base information comprises:
and determining a preset regular expression or a preset json analysis strategy corresponding to the test script as the target characteristic.
9. The method according to any one of claims 1-8, wherein at least one attribute information in the set of attribute information comprises an attribute name and an attribute content, the method further comprising:
and displaying the attribute name and the attribute content corresponding to the test case in a list form.
10. A test script management apparatus, the apparatus comprising:
the script determining module is used for acquiring a test script;
the information determining module is used for determining basic information for developing the test script;
the script analysis module is used for analyzing the test script according to the basic information to obtain at least one attribute information set contained in the test script;
and the information storage module is used for determining at least one test case according to the at least one attribute information set and storing the information of the test case.
11. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1 to 9.
12. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 9.
CN202210350693.1A 2022-04-02 2022-04-02 Test script management method and device, electronic equipment and storage medium Withdrawn CN114741292A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210350693.1A CN114741292A (en) 2022-04-02 2022-04-02 Test script management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210350693.1A CN114741292A (en) 2022-04-02 2022-04-02 Test script management method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114741292A true CN114741292A (en) 2022-07-12

Family

ID=82279753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210350693.1A Withdrawn CN114741292A (en) 2022-04-02 2022-04-02 Test script management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114741292A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069575A (en) * 2022-12-23 2023-05-05 摩尔线程智能科技(北京)有限责任公司 Adapter testing method and device, electronic equipment and storage medium
CN117112391A (en) * 2022-11-15 2023-11-24 领悦数字信息技术有限公司 Method and system for functional testing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112391A (en) * 2022-11-15 2023-11-24 领悦数字信息技术有限公司 Method and system for functional testing
CN116069575A (en) * 2022-12-23 2023-05-05 摩尔线程智能科技(北京)有限责任公司 Adapter testing method and device, electronic equipment and storage medium
CN116069575B (en) * 2022-12-23 2023-09-19 摩尔线程智能科技(北京)有限责任公司 Adapter testing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3065428A1 (en) Method and device for displaying wifi list
US20200007944A1 (en) Method and apparatus for displaying interactive attributes during multimedia playback
CN105930536B (en) Index establishing method, page jumping method and device
CN106547547B (en) data acquisition method and device
EP3147802B1 (en) Method and apparatus for processing information
CN114741292A (en) Test script management method and device, electronic equipment and storage medium
CN108495168B (en) Bullet screen information display method and device
EP3051772A1 (en) Method and apparatus for accessing network
EP3553672A1 (en) Information interaction method and device and computer readable storage medium thereof
US20160026719A1 (en) Methods and devices for sharing resources
CN112463418A (en) Cross-device information sharing method, device, medium and electronic device
CN111061452A (en) Voice control method and device of user interface
CN110221813B (en) Application data connection establishment method and device, storage medium and electronic equipment
CN106354595B (en) Mobile terminal, hardware component state detection method and device
CN111131000B (en) Information transmission method, device, server and terminal
CN113869295A (en) Object detection method and device, electronic equipment and storage medium
CN108549570B (en) User interface updating method and device
US20160119259A1 (en) Method, terminal device and server for pushing message through light application
CN107145441B (en) Page display method and device
CN112446366A (en) Image translation evaluating method and device for image translation evaluating
CN110347394B (en) Software code analysis method and device
CN110928621B (en) Information searching method and device, electronic equipment and storage medium
CN114554283B (en) Target object display method and device, electronic equipment and storage medium
CN115373763B (en) Plug-in loading method and device, electronic equipment and storage medium
CN111767249B (en) Method and device for determining self-running time of function

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20220712

WW01 Invention patent application withdrawn after publication