CN117130946B - Test scene generation method and device, electronic equipment and readable storage medium - Google Patents

Test scene generation method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN117130946B
CN117130946B CN202311409677.6A CN202311409677A CN117130946B CN 117130946 B CN117130946 B CN 117130946B CN 202311409677 A CN202311409677 A CN 202311409677A CN 117130946 B CN117130946 B CN 117130946B
Authority
CN
China
Prior art keywords
field
test
requirement
fields
corresponding relation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311409677.6A
Other languages
Chinese (zh)
Other versions
CN117130946A (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 Shi Guan Jin Yang Technology Development Co ltd
Original Assignee
Beijing Shi Guan Jin Yang Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shi Guan Jin Yang Technology Development Co ltd filed Critical Beijing Shi Guan Jin Yang Technology Development Co ltd
Priority to CN202311409677.6A priority Critical patent/CN117130946B/en
Publication of CN117130946A publication Critical patent/CN117130946A/en
Application granted granted Critical
Publication of CN117130946B publication Critical patent/CN117130946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • 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

Abstract

The application discloses a test scene generation method, a device, an electronic device and a readable storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining a requirement table, analyzing the requirement table to obtain field names of requirement fields in the requirement table, establishing a corresponding relation between the requirement fields and test fields according to the field names of the requirement fields and the field names of the test fields in the test scene, and generating the test scene containing a test case template and the corresponding relation. The method can generate the test scene containing the corresponding relation between the test case template and the field, and is convenient for technicians to directly write the test cases according to the corresponding relation between the test case template and the field in the test scene. The tester does not need to spend more time comparing the test field with the demand field, and the test case in the test scene is written on the test case template according to the corresponding relation, so that the writing time of the test case is reduced. Therefore, the method and the device can effectively improve the development efficiency of software.

Description

Test scene generation method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of software engineering, and more particularly, to a test scenario generating method, apparatus, electronic device, and readable storage medium.
Background
In the software development process, the following steps are needed: defining software requirements, writing software, testing software, and the like.
When testing software, it is often necessary to determine whether the software meets the previously defined software requirements. In order to determine whether software meets the software requirement defined previously, it is necessary to check a requirement table defined previously when testing the software, and write test cases in a test scenario according to the requirement table.
Because the test fields of the test scene are often inconsistent with the requirement fields of the requirement table, technicians need to spend more time comparing the test fields with the requirement fields, so that the test case writing takes longer time, and the software development efficiency is reduced.
Disclosure of Invention
In view of the foregoing, the present application provides a test scenario generating method, apparatus, electronic device, and readable storage medium, for solving the problem of low software development efficiency.
In order to achieve the above object, the following solutions have been proposed:
a test scenario generation method, the test scenario generation method comprising:
obtaining a requirement table, wherein the requirement table comprises a plurality of requirement fields;
analyzing the requirement table to obtain the field names of the requirement fields in the requirement table;
establishing a corresponding relation between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scene;
and generating a test scene containing the test case template and the corresponding relation.
Optionally, the establishing a correspondence between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scenario includes:
determining a field row from the requirement table;
extracting a plurality of requirement fields contained in the field lines;
and matching the field name of at least one of the plurality of requirement fields with the field name of the test field in the test scene, and establishing a corresponding relation between the requirement field and the test field with the same field name.
Optionally, the establishing a correspondence between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scenario further includes:
after the corresponding relation between the required fields and the test fields with the same field names is established, responding to the selection operation of a user on a field pair, and establishing the corresponding relation between two fields in the field pair, wherein the field pair comprises one test field and one required field.
Optionally, the test scene generating method further includes:
and responding to the test scene selection operation of the user, displaying the corresponding relation between the requirement field and the test field on a first display interface, and displaying the test case template on a second display interface, wherein the second display interface is different from the first display interface.
Optionally, before the responding to the selection operation of the field pair by the user and establishing the correspondence between the two fields in the field pair, the test scene generating method further includes:
and displaying the field name of the required field in a third display interface, and displaying the field name of the test field in a fourth display interface.
Optionally, the test scene generating method further includes:
and obtaining a required test result of the test case contained in the test scene, and guiding out a report of the required test result for display.
A test scenario generation system, the test scenario generation system comprising:
an obtaining unit, configured to obtain a requirement table, where the requirement table includes a plurality of requirement fields;
the analyzing unit is used for analyzing the requirement table and obtaining the field names of the requirement fields in the requirement table;
the establishing unit is used for establishing the corresponding relation between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scene;
and the generating unit is used for generating a test scene containing the test case template and the corresponding relation.
Optionally, the establishing unit includes:
a row determination subunit, configured to determine a field row from the requirement table;
a field extraction subunit, configured to extract a plurality of requirement fields included in the field line;
and the field matching subunit is used for matching the field name of at least one of the plurality of requirement fields with the field name of the test field in the test scene, and establishing the corresponding relation between the requirement field and the test field with the same field name.
An electronic device includes a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement each step of the test scenario generating method described in any one of the above.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the test scenario generation method of any one of the above.
The method can generate the test scene containing the corresponding relation between the test case template and the field, and is convenient for technicians to directly write the test cases according to the corresponding relation between the test case template and the field in the test scene. The tester does not need to spend more time comparing the test field with the demand field, and can directly write the test case under the test scene according to the corresponding relation between the demand field and the test field on the test case template, thereby reducing the time spent for writing the test case. Therefore, the method and the device can effectively improve the development efficiency of software.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a flow chart of a test scenario generation method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a dialog box for configuring test fields according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a demand table according to an embodiment of the present disclosure;
fig. 4 is an interface schematic diagram for establishing a corresponding relationship according to an embodiment of the present application;
fig. 5 is an interface schematic diagram of test scenario generation provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of a report of a requirement test result according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a test scenario generating system according to an embodiment of the present application;
fig. 8 is a block diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
As shown in fig. 1, an embodiment of the present application provides a test scenario generation method, which may include:
s10, acquiring a requirement table, wherein the requirement table comprises a plurality of requirement fields.
The requirement table may be a table containing requirements of software, and each line of data of the requirement table may represent a requirement of the software. The demand form may be generated autonomously or directly exported by a third party tool, which may optionally be demand management software, such as Buddhist, M-requirement, etc. The requirements field may be a field of interest in software requirements testing. The requirement table may include a field name and a field value of a requirement field, where the field name may be a title, a requirement ID, a requirement priority, a requirement state, and the field value may be a specific value of a field, for example, the field name may be a requirement field of the requirement state, and the value may be a value in implementation, planning, or the like.
S11, analyzing the requirement table to obtain the field names of the requirement fields in the requirement table.
In this embodiment, the requirement table may be imported into the TestManager system, and the TestManager system analyzes the requirement table to obtain the requirement field in the requirement table, and performs subsequent field matching. In this embodiment, the field in a line of data in the requirement table may be used as the requirement field by analyzing the requirement table, and the line of data may be the default first line of data in the requirement table, or the user may directly select a line of data in the requirement table.
S12, establishing a corresponding relation between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scene.
The test scenario may be a test condition generated by different requirements of the test software, and each line of specific data in the requirement table may correspond to a requirement of the software, and then each line of data in the requirement table may correspond to a test condition generated. For example, if a requirement of the software is a login function, a test condition corresponding to the login function can be set according to the requirement of the login function, so as to test whether the login function of the software can normally run under the test condition. A plurality of test fields may be included in the test scenario, wherein the test fields may be fields required in generating the test scenario, and optionally, field names of the test fields may include title, ID, priority, and creator. Of course, in this embodiment, the title and the ID may be fixed field names, and the user may change the field names of the test fields according to actual situations, and add or delete the test fields.
When generating the test scene of the software requirement, the corresponding relation between the requirement field and the test field can be established, so that the test scene can be generated conveniently according to the field value of the requirement field corresponding to the test field, and the test scene corresponds to the specific requirement of the software. Specifically, the embodiment can directly perform automatic matching according to the field names of the requirement field and the test field, and automatically establish a corresponding relationship. Of course, the embodiment may also determine the field name matching with the field value of the requirement table according to the field value of the requirement table, and then automatically match the requirement field with the test field according to the field name.
Further, if the field value of the requirement field in the requirement table is a website hyperlink, a corresponding relationship can be established between the website hyperlink and the test field, and when the corresponding relationship is subsequently displayed, the user can click the website hyperlink to open the requirement website. For example, a field name of a requirement field in the requirement table is ID, a field value is a website hyperlink, a field name of a test field is also ID, and then a corresponding relationship between the test field and the requirement field is established according to the same field name, so that when a test scene is generated, the test field can correspond to the website hyperlink, and a user can open a website by clicking the website hyperlink.
S13, generating a test scene containing a test case template and a corresponding relation.
The test case template can be a general framework for writing test cases, can be automatically carried when a test scene is generated, can be added into the test scene by a user, and further can be provided with one test case or a plurality of test cases under one test scene. The correspondence may include a correspondence between a requirement field and a test field, and may further include a correspondence between a test field and a field value of the requirement field.
The embodiment of the application provides a test scene generation method, which can generate a test scene containing a test case template and a field corresponding relation, and is convenient for technicians to directly write test cases according to the test case template and the field corresponding relation in the test scene. The tester does not need to spend more time comparing the test field with the demand field, and can directly write the test case under the test scene according to the corresponding relation between the demand field and the test field on the test case template, thereby reducing the time spent for writing the test case. Therefore, the method and the device can effectively improve the development efficiency of software.
In another test scenario generating method provided in an embodiment of the present application, S12 shown in fig. 1 may include steps one to three:
step one: determining field rows from the requirements table;
step two: extracting a plurality of requirement fields contained in a field row;
step three: and matching the field name of at least one of the plurality of requirement fields with the field name of the test field in the test scene, and establishing a corresponding relation between the requirement field and the test field with the same field name.
The field line may be a line data in the requirement table, the line data may be a first line of the requirement table, or may be other line data of the requirement table, specifically, a user may select which line data in the requirement table is used as the field line, or the system may perform autonomous data analysis to obtain the field line. Further, after determining the field line, the embodiment may extract a plurality of requirement fields included in the field line, and the user may select the requirement field to determine the requirement field for establishing the corresponding relationship with the test field. Specifically, in this embodiment, a corresponding relationship may be directly established between the test fields and the demand fields with the same field names, or the demand tables may be integrated first, and then a corresponding relationship may be established between the test fields and the demand fields in sequence directly according to the front-to-back ordering of the demand fields. Further, for a test field or a requirement field that does not have a corresponding relationship yet, after establishing a corresponding relationship between a requirement field and a test field with the same field name, the embodiment may respond to a selection operation of a user on a field pair to establish a corresponding relationship between two fields in the field pair, where the field pair includes a test field and a requirement field. Optionally, in this embodiment, the requirement field may be used as a main field, and the test field for which the corresponding relationship is established may be selected, or the test field may be used as a main field, and the requirement field for which the corresponding relationship is established may be selected.
Further, before establishing the correspondence between the two fields in the field pair in response to the user selection operation of the field pair, the embodiment may further include: and displaying the field name of the required field in a third display interface, and displaying the field name of the test field in a fourth display interface. Of course, the field name of the test field is displayed in the third display interface, and the field name of the required field is displayed in the fourth display interface. The test field and the demand field are displayed separately, so that a user can be helped to establish the corresponding relation between the test field and the demand field more quickly, the error rate is reduced, and the test field and the demand field can be displayed in one interface at the same time.
In another test scenario generation method provided according to an embodiment of the present application, the test scenario generation method may further include step four:
step four: responding to the test scene selection operation of the user, displaying the corresponding relation between the requirement field and the test field on a first display interface, and displaying the test case template on a second display interface, wherein the second display interface is different from the first display interface.
The first display interface can be displayed or closed according to the operation of the user, and can also be always displayed on the display interface of the user in a small window form, so that the user can conveniently refer to the corresponding relation between the requirement field and the test field in the first display interface in real time. Of course, in addition to displaying the corresponding relation between the requirement field and the test field in the first display interface, other contents of the requirement, such as detailed description of the requirement, specified content of the requirement, and the like, may also be displayed. The second display interface can be used for displaying the test case template, so that a user can write the test case directly on the second display interface.
In another test scenario generation method provided according to an embodiment of the present application, the test scenario generation method may further include step five:
step five: and obtaining a required test result of the test case contained in the test scene, and exporting a report of the required test result for display.
The required test result may be a passing result of a plurality of test conditions of the test case. The test condition may be multiple specific test states generated according to a test case written by a user, for example, a performance test requiring software, the test case may be a specific framework for implementing the test, and the test condition may be multiple specific running conditions of the software, for example, a high concurrency condition of the user, so that performances of the software under different specific test conditions are tested. In the report of the required test result, besides the test field of the test scene, the report can also comprise a test condition number field name, a test condition number field value, a passing rate field name and a passing rate field value, so that a user can intuitively know the test and the test result of the whole requirement.
Thus, taking the TestManager system as an example, a complete embodiment may be provided, the schematic diagram in this embodiment being merely an example. The TestManager system imports an object (software) to be tested, clicks on a required configuration button in the system, and a dialog box for configuring test fields as shown in fig. 2 may appear, in which a user may operate on the test fields, such as adding, deleting, and changing field names of the test fields. Wherein, two test fields with field names of title and ID can be necessary options, which have the characteristic of no modification. As shown in fig. 2, the user may increase the priority and field names of two test fields of the creator, indicating that the title, ID, priority, and creator specific information (field values of a requirement field corresponding to the test field) may be displayed in all test scenarios generated later.
After configuring the test fields, the user may select a requirement table (e.g., the content of the requirement table shown in fig. 2, the first row may be a requirement table description, the second row may be a requirement field of the requirement table, and the field name of the requirement field may include a title, a priority, a handler, a size, a Team, a version number, a creator, an iteration, and a detailed description) as shown in the 001 field of fig. 2. After the user selected requirements form is imported, a requirements form preview interface as shown in FIG. 4 may be displayed. The interface may include the contents of the requirement table shown in fig. 3, and may further include a 002 area, where a field line selection may be included, so that the user may freely select a field line in the requirement table, as shown in fig. 4. The requirement table shown in fig. 3 has three rows, and the requirement field required for the second behavior can be adjusted to be 2 for the start row.
After selecting the field line, the TestManager system automatically extracts the required field in the field line and matches the same field name with the test field, and further, the user can select whether to select the required field through a checkbox before the required field. The requirement field and the test field comprise an ID, a title, a priority and four field names of a creator, so that the TestManager system automatically performs matching, other not-matched requirement fields, a user can click a pull-down triangle symbol in the test field, and the test field matched with the requirement field can be selected independently. After the corresponding relation between the test field and the requirement field is established, the determination button in the 003 area shown in fig. 4 can be clicked, and the TestManager system automatically generates a test scene.
The TestManager system can automatically generate a plurality of test scenes according to the corresponding relation between the requirement field and the test field, and each test scene carries a test case template. As shown in fig. 5, according to one line of data in the requirement table of fig. 3, a test scenario (req_ [ store ] 1003173) is generated, in which a test template (test_case 1) is carried, and a user may select the scenario, click on the view in the 004 area shown in fig. 5, and may pop up a requirement details interface, which may include a field name of a test field and a field value of a requirement field corresponding to the test field. The user can directly write the test case according to the corresponding relation between the test case template and the field in the test scene.
If the user wants to export the report of the requirement test result, the user can click on the icon of the 005 area shown in fig. 5, click on the determination in the pop-up interface, and obtain the report of the requirement test result shown in fig. 6. In the report, a test condition number field name, a test condition number field value, a pass rate field name and a pass rate field value are additionally added, so that a user can intuitively know the test and the test result of the whole requirement.
Corresponding to the test scene generation method provided by the embodiment of the application, the embodiment of the application also provides a test scene generation system.
As shown in fig. 7, the embodiment of the present application further provides a test scenario generation system, where the test scenario generation system may include:
an obtaining unit 100, configured to obtain a requirement table, where the requirement table includes a plurality of requirement fields;
a parsing unit 110, configured to parse the requirement table to obtain a field name of a requirement field in the requirement table;
the establishing unit 120 is configured to establish a correspondence between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scenario;
the generating unit 130 is configured to generate a test scenario including a test case template and a correspondence.
In another test scenario generating system provided according to an embodiment of the present application, the establishing unit 120 may include:
a row determination subunit, configured to determine a field row from the requirement table;
a field extraction subunit, configured to extract a plurality of requirement fields included in a field line;
the field matching subunit is used for matching the field name of at least one of the plurality of requirement fields with the field name of the test field in the test scene, and establishing the corresponding relation between the requirement field and the test field with the same field name.
In another test scenario generating system provided according to an embodiment of the present application, the establishing unit 120 may further include:
and the relationship establishing subunit is used for responding to the selection operation of the user on the field pair after establishing the corresponding relationship between the requirement field and the test field with the same field name, and establishing the corresponding relationship between the two fields in the field pair, wherein the field pair comprises one test field and one requirement field.
In another test scenario generation system provided according to an embodiment of the present application, the test scenario generation system may further include:
and the relation display unit is used for responding to the test scene selection operation of the user, displaying the corresponding relation between the requirement field and the test field on a first display interface, and displaying the test case template on a second display interface, wherein the second display interface is different from the first display interface.
According to another test scenario generating system provided in an embodiment of the present application, before responding to a selection operation of a field pair by a user in the relationship establishing subunit and establishing a correspondence between two fields in the field pair, the test scenario generating system further includes:
and the field display unit is used for displaying the field name of the required field in the third display interface and displaying the field name of the test field in the fourth display interface.
In another test scenario generation system provided according to an embodiment of the present application, the test scenario generation system may further include:
and the test unit is used for acquiring the requirement test result of the test case contained in the test scene, and exporting and displaying a report of the requirement test result.
As shown in fig. 8, an embodiment of the present application provides an electronic device 70, including at least one processor 701, and at least one memory 702 and bus 703 connected to the processor 701; wherein, the processor 701 and the memory 702 complete communication with each other through the bus 703; the processor 701 is configured to call the program instructions in the memory 702 to perform the test scenario generation method described above. The electronic device 70 herein may be a server, a PC, or the like.
The embodiment of the application also provides a readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of any of the test scenario generation methods described above.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, 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 specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, the device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), in a computer readable storage medium, the memory including at least one memory chip. Memory is an example of a computer-readable medium.
Computer-readable storage media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (7)

1. The test scene generation method is characterized by comprising the following steps of:
obtaining a requirement table, wherein the requirement table comprises a plurality of requirement fields;
selecting a plurality of fields in one row of data in the requirement table as the plurality of requirement fields, and obtaining field names of the requirement fields in the requirement table;
establishing a corresponding relation between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scene;
generating a test scene comprising a test case template and the corresponding relation, so that technicians can write test cases according to the corresponding relation between the test case template and the field in the test scene, wherein the test case template is a universal frame for writing the test cases;
responding to a test scene selection operation of a user, displaying the corresponding relation between the requirement field and the test field on a first display interface, and displaying the test case template on a second display interface, wherein the second display interface is different from the first display interface;
the establishing a corresponding relation between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scene comprises the following steps:
determining a field row from the requirement table;
extracting a plurality of requirement fields contained in the field lines;
matching a field name of at least one requirement field in the plurality of requirement fields with a field name of a test field in the test scene, and establishing a corresponding relation between the requirement field and the test field, wherein the field names of the requirement field and the test field are the same;
the establishing a corresponding relation between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scene further comprises:
after the corresponding relation between the required fields and the test fields with the same field names is established, responding to the selection operation of a user on a field pair, and establishing the corresponding relation between two fields in the field pair, wherein the field pair comprises one test field and one required field.
2. The test scenario generation method according to claim 1, wherein before the correspondence of two fields in a field pair is established in response to a user selection operation of the field pair, the test scenario generation method further comprises:
and displaying the field name of the required field in a third display interface, and displaying the field name of the test field in a fourth display interface.
3. The test scenario generation method according to claim 1, wherein the test scenario generation method further comprises:
and obtaining a required test result of the test case contained in the test scene, and guiding out a report of the required test result for display.
4. A test scenario generation system, the test scenario generation system comprising:
an obtaining unit, configured to obtain a requirement table, where the requirement table includes a plurality of requirement fields;
the analyzing unit is used for selecting a plurality of fields in one line of data in the requirement table as the plurality of requirement fields and obtaining field names of the requirement fields in the requirement table;
the establishing unit is used for establishing the corresponding relation between the requirement field and the test field according to the field name of the requirement field and the field name of the test field in the test scene;
the generating unit is used for generating a test scene containing a test case template and the corresponding relation, so that technicians can write test cases conveniently according to the corresponding relation between the test case template and the field in the test scene, and the test case template is a universal frame for writing the test cases;
the relation display unit is used for responding to the test scene selection operation of a user, displaying the corresponding relation between the requirement field and the test field on a first display interface, and displaying the test case template on a second display interface, wherein the second display interface is different from the first display interface;
the establishing unit includes:
a row determination subunit, configured to determine a field row from the requirement table;
a field extraction subunit, configured to extract a plurality of requirement fields included in the field line;
a field matching subunit, configured to match a field name of at least one of the plurality of requirement fields with a field name of a test field in the test scenario, and establish a correspondence between the requirement field and the test field that are the same as each other in field name;
the setup unit further comprises:
and the relationship establishing subunit is used for responding to the selection operation of the user on the field pair after establishing the corresponding relationship between the requirement field and the test field with the same field name, and establishing the corresponding relationship between the two fields in the field pair, wherein the field pair comprises one test field and one requirement field.
5. The test scenario generation system of claim 4, wherein the setup unit comprises:
a row determination subunit, configured to determine a field row from the requirement table;
a field extraction subunit, configured to extract a plurality of requirement fields included in the field line;
and the field matching subunit is used for matching the field name of at least one of the plurality of requirement fields with the field name of the test field in the test scene, and establishing the corresponding relation between the requirement field and the test field with the same field name.
6. An electronic device comprising a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the respective steps of the test scenario generation method according to any one of claims 1 to 3.
7. A readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the steps of the test scenario generation method according to any one of claims 1-3.
CN202311409677.6A 2023-10-27 2023-10-27 Test scene generation method and device, electronic equipment and readable storage medium Active CN117130946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311409677.6A CN117130946B (en) 2023-10-27 2023-10-27 Test scene generation method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311409677.6A CN117130946B (en) 2023-10-27 2023-10-27 Test scene generation method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN117130946A CN117130946A (en) 2023-11-28
CN117130946B true CN117130946B (en) 2024-01-26

Family

ID=88853078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311409677.6A Active CN117130946B (en) 2023-10-27 2023-10-27 Test scene generation method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117130946B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763080A (en) * 2018-05-29 2018-11-06 平安普惠企业管理有限公司 Test data method for uploading, device, computer equipment and storage medium
CN108845926A (en) * 2018-04-27 2018-11-20 北京中创信测科技股份有限公司 A kind of BDR extension accuracy automated testing method and test macro
WO2020155778A1 (en) * 2019-02-03 2020-08-06 苏州市龙测智能科技有限公司 Interface automation test method, test apparatus, test device and storage medium
CN111506498A (en) * 2020-03-16 2020-08-07 平安科技(深圳)有限公司 Automatic generation method and device of test case, computer equipment and storage medium
CN112328489A (en) * 2020-11-11 2021-02-05 南京领行科技股份有限公司 Test case generation method and device, terminal equipment and storage medium
CN112579458A (en) * 2020-12-23 2021-03-30 平安普惠企业管理有限公司 Test method, device, equipment and storage medium of actuarial system
CN113220782A (en) * 2021-04-30 2021-08-06 土巴兔集团股份有限公司 Method, device, equipment and medium for generating multivariate test data source
CN113377653A (en) * 2021-06-10 2021-09-10 北京京东振世信息技术有限公司 Method and device for generating test case
CN114185791A (en) * 2021-12-13 2022-03-15 中国农业银行股份有限公司 Method, device and equipment for testing data mapping file and storage medium
CN114510425A (en) * 2022-02-18 2022-05-17 工银科技有限公司 Test case generation method and device
CN114896161A (en) * 2022-05-26 2022-08-12 平安银行股份有限公司 File construction method and device based on artificial intelligence, computer equipment and medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845926A (en) * 2018-04-27 2018-11-20 北京中创信测科技股份有限公司 A kind of BDR extension accuracy automated testing method and test macro
CN108763080A (en) * 2018-05-29 2018-11-06 平安普惠企业管理有限公司 Test data method for uploading, device, computer equipment and storage medium
WO2020155778A1 (en) * 2019-02-03 2020-08-06 苏州市龙测智能科技有限公司 Interface automation test method, test apparatus, test device and storage medium
CN111506498A (en) * 2020-03-16 2020-08-07 平安科技(深圳)有限公司 Automatic generation method and device of test case, computer equipment and storage medium
CN112328489A (en) * 2020-11-11 2021-02-05 南京领行科技股份有限公司 Test case generation method and device, terminal equipment and storage medium
CN112579458A (en) * 2020-12-23 2021-03-30 平安普惠企业管理有限公司 Test method, device, equipment and storage medium of actuarial system
CN113220782A (en) * 2021-04-30 2021-08-06 土巴兔集团股份有限公司 Method, device, equipment and medium for generating multivariate test data source
CN113377653A (en) * 2021-06-10 2021-09-10 北京京东振世信息技术有限公司 Method and device for generating test case
CN114185791A (en) * 2021-12-13 2022-03-15 中国农业银行股份有限公司 Method, device and equipment for testing data mapping file and storage medium
CN114510425A (en) * 2022-02-18 2022-05-17 工银科技有限公司 Test case generation method and device
CN114896161A (en) * 2022-05-26 2022-08-12 平安银行股份有限公司 File construction method and device based on artificial intelligence, computer equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Test Scenario Generation Method for High Requirement Coverage by using KAOS Method;Toshiyuki Fujikura 等;2019 IEEE 19th International Conference on Software Quality, Reliability and Security Companion (QRS-C);全文 *
基于UML活动图及混合遗传算法的测试场景生成;王馨樱 等;计算机工程与应用;全文 *

Also Published As

Publication number Publication date
CN117130946A (en) 2023-11-28

Similar Documents

Publication Publication Date Title
CN106874174B (en) Method and device for realizing interface test and function test
CN109783388B (en) UI (user interface) automatic testing method and device and electronic equipment
CN106657192B (en) Method and equipment for presenting service calling information
CN110597730B (en) Automatic test case generation method and system based on scene method
CN106354483B (en) Data processing method and device and electronic equipment
CN107092535B (en) Method and apparatus for data storage of test interface
CN110507986B (en) Animation information processing method and device
CN115080398A (en) Automatic interface test system and method
CN111259212B (en) Telemetering data interpretation method, device, equipment and storage medium
CN116107892A (en) Automatic test method, device, equipment and storage medium
CN116302930A (en) Application testing method and device
CN113485909B (en) Test method, test device, computing equipment and medium
CN112199261A (en) Application program performance analysis method and device and electronic equipment
CN113836014A (en) Interface testing method and device, electronic equipment and storage medium
CN117130946B (en) Test scene generation method and device, electronic equipment and readable storage medium
CN110968500A (en) Test case execution method and device
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN113238940A (en) Interface test result comparison method, device, equipment and storage medium
CN112363944A (en) Method and equipment for comparing return values of multiple environment interfaces
CN112564996A (en) Pressure test flow scheduling method, pressure test flow control device and computer readable medium
CN117573561B (en) Automatic test system, method, electronic equipment and storage medium
CN113741956B (en) Method and device for transplanting version management function, version management method and device
CN108804775B (en) Matlab-based high-speed signal scattering parameter calculation method and device
CN113448820B (en) Webpage testing method and device
CN114968795A (en) Test method, test device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant