CN116383094A - Test case library construction method, device, equipment and storage medium - Google Patents

Test case library construction method, device, equipment and storage medium Download PDF

Info

Publication number
CN116383094A
CN116383094A CN202310654406.0A CN202310654406A CN116383094A CN 116383094 A CN116383094 A CN 116383094A CN 202310654406 A CN202310654406 A CN 202310654406A CN 116383094 A CN116383094 A CN 116383094A
Authority
CN
China
Prior art keywords
test case
test
software
model
case library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310654406.0A
Other languages
Chinese (zh)
Other versions
CN116383094B (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.)
Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Original Assignee
Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
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 Computational Aerodynamics Institute of China Aerodynamics Research and Development Center filed Critical Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Priority to CN202310654406.0A priority Critical patent/CN116383094B/en
Publication of CN116383094A publication Critical patent/CN116383094A/en
Application granted granted Critical
Publication of CN116383094B publication Critical patent/CN116383094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention discloses a method, a device, equipment and a storage medium for constructing a test case library, which are applied to the field of aerospace simulation software testing, wherein the method comprises the following steps: acquiring traditional test case elements, and adding a test script and a grid model into the traditional test case elements to form a test case template; performing conceptual model construction, logic model construction and physical model construction of a database according to the test case template to obtain test case library attributes; correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into the test case library. According to the invention, the test script and the grid model are added, so that the test case template is improved and unified, the test case library for automatic test is constructed, the test script and the grid model which can be automatically executed by the integrated automatic test platform for later storage are convenient, the sharing multiplexing function of the test cases in the test case library is realized, and the efficient management of the test cases is satisfied.

Description

Test case library construction method, device, equipment and storage medium
Technical Field
The invention relates to the field of aerospace simulation software testing, in particular to a method, a device, equipment and a storage medium for constructing a test case library.
Background
The software test is an effective means for ensuring the quality of the software as an important link in the software research and development process. In the long-term test activities of the aerospace simulation software, a large number of test cases are accumulated, the test cases not only cover the problems of basic flow, aerodynamic force/heat, aerodynamic force/structure, aerodynamic force/acoustics, aerodynamic force/two-phase flow and the like, but also cover typical equipment application scenes of fixed wing aircrafts, rotorcraft, supersonic/hypersonic aircrafts, aeroengines and the like, the professional barriers and the complexity are far higher than those of the traditional commercial software, and the sharing multiplexing difficulty of the test cases is increased due to the high requirement of testers on the knowledge across the professional field. Moreover, the sources and channels of the test cases are different, and the lack of a unified test case design template and a management mode of using documents also increases the difficulty of test case retrieval in the test practice process. Therefore, how to systematically manage test cases becomes one of the problems to be solved in the current aerospace simulation software test work.
The automatic test is an effective means for improving the software testing efficiency as an important component of the aerospace simulation software testing work. Since the development of the test work of the aerospace simulation software, the automatic test is mainly finished by manually executing a test script by using a test tool by testers in various fields, and the automation degree and the execution efficiency of the software test are difficult to meet the test requirement of the quick iteration of the software. Therefore, the software testing team builds an integrated automatic testing platform, and mainly aims to bring the testers in all fields into the platform for unified management, and the professional barriers are eliminated by enhancing the test cooperation of the testers in all fields, covering the software functional modules, standard model verification and the automatic test activities of the application scenes of the multi-field equipment, so that the software testing automation degree and the testing execution efficiency are improved. At present, how to realize efficient management and automatic execution of test cases in different fields is a first difficult problem faced by an integrated automatic test platform.
The traditional test case library lacks automatic execution test script options and cannot support automatic execution of test cases; in the field of aerospace simulation software, a test case library for the automatic test of the aerospace simulation software does not exist at present. Under the urgent demand background of the current aerospace simulation software automation test on the efficient management and automatic execution of test cases, a set of test case database meeting the automation test is established, unified management and sharing multiplexing of test cases with different sources and different types are realized, and the support integrated automatic test platform is used for calling the test cases, grid models and interfaces of test scripts, so that the support integrated automatic test platform has very important practical significance for improving the software test automation degree and realizing innovation surpassing of domestic autonomous industrial software.
Disclosure of Invention
In view of the above, the invention aims to provide a test case library construction method, a device, equipment and a storage medium, which solve the problem that the prior art lacks a test case library for the automatic test of aerospace simulation software.
In order to solve the technical problems, the invention provides a method for constructing a test case library, which comprises the following steps:
acquiring traditional test case elements, and adding a test script and a grid model into the traditional test case elements to form a test case template;
performing conceptual model construction, logic model construction and physical model construction of a database according to the test case template to obtain test case library attributes;
correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into a test case library.
Optionally, the constructing the conceptual model of the database according to the test case template includes:
carrying out abstract analysis on the aerospace simulation test software to obtain test software attributes, wherein the test software attributes comprise software codes, software names, software types and software versions;
Carrying out abstract analysis on the test case to obtain test case attributes, wherein the test case attributes comprise a case number, a test grade, a test type, a functional module, a case title, a test step, an expected result, an actual result and the test script;
carrying out abstract analysis on the simulation model to obtain simulation model attributes, wherein the simulation model attributes comprise grid codes, the grid model, grid names, grid types and grid dimensions;
processing the test case library by using an E-R method to obtain a global E-R diagram of the test case library;
each aerospace simulation test software comprises a plurality of test cases, and each test case comprises a plurality of simulation models.
Optionally, the processing the test case library by using an E-R method to obtain a global E-R diagram of the test case library includes:
describing the entity, attribute and relation of the test case library to obtain a global E-R diagram of the test case library;
the entity is the aerospace simulation test software, the test case and the simulation model, the attribute is the test software attribute, the test case attribute and the simulation model attribute, the connection comprises a first connection and a second connection, the first connection is the connection established between the aerospace simulation test software and the test case through the functional module, and the second connection is the connection established between the test case and the simulation model through grid coding.
Optionally, the constructing the logic model of the database according to the test case template includes:
and converting the global E-R diagram of the test case library into a relation mode according to the corresponding relation to obtain a logic model.
Optionally, the constructing the physical model of the database according to the test case template includes:
converting the logic model into a data table, wherein the name of the entity corresponds to the table name of the data table, and the attribute of the entity corresponds to the table field of the data table;
setting the relation among the data type, length and data stored by the attribute of the entity, and mapping the relation to a storage record;
the table field of the data table also includes a data operator and an operating time.
Optionally, after correcting the test cases according to the test case library attribute to obtain a unified test case and adding the unified test case to the test case library, the method further includes:
and dividing the test cases in the test case library according to the preset dimension and the preset level to obtain a corresponding test case set so as to obtain a software test case data model.
Optionally, the dividing the test cases in the test case library according to the preset dimension and the preset level to obtain a corresponding test case set includes:
Dividing the test cases in the test case library into a first-level test case set according to 3 dimensions, wherein the first-level test case set comprises a functional module, standard model verification and multi-field equipment application;
performing subdivision on the primary test case set to obtain a secondary test case set;
and carrying out subdivision on the secondary test case set to obtain a tertiary test case set.
The invention also provides a test case library construction device, which comprises:
the adding module is used for obtaining traditional test case elements, and adding a test script and a grid model into the traditional test case elements to form a test case template;
the construction module is used for carrying out conceptual model construction, logic model construction and physical model construction of the database according to the test case template to obtain test case library attributes;
and the correction module is used for correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into the test case library.
The invention also provides test case library construction equipment, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the test case library construction method when executing the computer program.
The invention also provides a readable storage medium, wherein the readable storage medium is stored with a computer program, and the computer program realizes the steps of the test case library construction method when being executed by a processor.
Therefore, the test case template is formed by acquiring the traditional test case elements and adding the test script and the grid model into the traditional test case elements; performing conceptual model construction, logic model construction and physical model construction of a database according to the test case template to obtain test case library attributes; correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into the test case library. According to the invention, the test case element test script and the grid model are added, so that the test case template is improved and unified, the test case library for automatic test is constructed, the test script and the grid model which can be automatically executed by the post-storage integrated automatic test platform are convenient, the sharing multiplexing function of the test cases in the test case library is realized, and the efficient management of the test cases is satisfied.
In addition, the invention also provides a test case library construction device, equipment and a storage medium, which have the same beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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 invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for constructing a test case library according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an improvement of test case elements according to an embodiment of the present invention;
FIG. 3 is a global E-R diagram of a test case library according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a relationship pattern of a test case library according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a physical model of a test case library according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a software test case data model according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a test case set partitioning diagram based on a functional module according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of partitioning a test case set based on standard mode verification according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a test case set partitioning based on a multi-domain equipment application according to an embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a test case library construction device according to an embodiment of the present invention;
FIG. 11 is a schematic structural diagram of a test case library construction apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The conventional test case database construction method is to implement the concept design, logic design, physical design and database implementation of the database by using test case elements such as "case number", "test grade", "test type", "functional module", "sub-module", "case title", "test step", "expected result", "actual result", "conclusion", "designer", "test executor" test date "and the like.
The existing database embodiments are as follows:
collecting test case data, analyzing and determining the test case data, and forming a unified test case template;
the method comprises the steps of conceptual design, namely abstracting test case data into an information structure, forming a conceptual model independent of a specific DBMS (Database Management System ), and obtaining an E-R diagram (E-R diagram is also called entity-contact diagram (Entity Relationship Diagram);
logic design, namely converting an E-R diagram designed in a conceptual design stage into a logic structure conforming to a data model supported by a database management system;
physical design, namely designing according to a conceptual structural design, a logic structural design and a computer system, and determining parameters of the physical structural design;
the implementation of the database, after the physical structure design of the database is completed, a specific database management system (such as MySQL (relational database management system)) is selected to be established, and according to the design content, the structure of the logic and physical design of the database is established in the database;
warehousing test case data;
and (3) the database is operated and maintained, and the database is continuously evaluated, adjusted and modified according to the actual situation in the operation process of the database system.
The conventional test case library lacks an option of a test script for automatic execution, and cannot support the automatic execution of the test case. In the field of aerospace simulation software, a test case library for the automatic test of the aerospace simulation software does not exist at present.
The invention provides a test case library construction method which can solve the problem of lack of a test case library for automatic test of aerospace simulation software. Referring to fig. 1 specifically, fig. 1 is a flowchart of a test case library construction method according to an embodiment of the present invention. The method may include:
s101: and obtaining the traditional test case elements, and adding a test script and a grid model into the traditional test case elements to form a test case template.
The execution body of the embodiment is a terminal. The present embodiment is not limited to the type of terminal, as long as the operation of the test construction can be completed. For example, the terminal may be a dedicated terminal; or the terminal may also be a general-purpose terminal. If a test case database capable of supporting the automatic execution of the test case is to be constructed, improvement and optimization are required for the existing test case, as shown in fig. 2, fig. 2 is an improved schematic diagram of test case elements provided by the embodiment of the present invention. The conventional test case elements may include "case number", "test level", "test type", "functional module", "sub-module", "case title", "test step", "expected result", "actual result", "conclusion", "designer", "test executor", "test date", and other test case elements. The test script element is added in the current test case, namely the traditional test case element, so that the test script which can be automatically executed by the integrated automatic test platform can be stored in a later period conveniently, and then the test script is coded by adopting the text description and is converted into the test script. A test case element of a grid model is added for later storage of the grid model necessary for aerospace simulation software test. A test case template is formed by adding a test script and a grid model to the conventional test case elements.
S102: and carrying out conceptual model construction, logic model construction and physical model construction of the database according to the test case template to obtain the test case library attribute.
The database is designed and implemented, and mainly comprises a conceptual design, a logic design and a physical design. In the embodiment, the conceptual model construction, the logic model construction and the physical model construction of the database are carried out according to the test case template to obtain the test case library attribute. The embodiment can be used for constructing a conceptual model of a database according to a test case template and performing abstract analysis on aerospace simulation test software to obtain test software attributes; carrying out abstract analysis on the test case to obtain test case attributes; the simulation model is subjected to abstract analysis to obtain simulation model attributes, the test case library is processed by using an E-R method to obtain a global E-R diagram (the E-R diagram is also called an entity-contact diagram (Entity Relationship Diagram)), and it can be understood that each aerospace simulation test software comprises a plurality of test cases, and each test case comprises a plurality of simulation models.
The present embodiment is not limited to test case attributes, simulation model attributes, and what the simulation model attributes contain. For example, test case attributes may include case numbers, test ranks, test types, functional modules, case titles, test steps, expected results, actual results, and test scripts; or may also include other test case attributes. The test case attributes may include case number, test level, test type, functional module, case title, test step, expected result, actual result, and test script; or may also include other test case attributes. Simulation model attributes may include grid coding, grid model, grid name, grid type, and grid dimensions; or may also include other simulation model attributes.
Further, in order to better construct an automated test case library, the above-mentioned concept model construction of the database according to the test case template may include the following steps:
step 21: carrying out abstract analysis on the aerospace simulation test software to obtain test software attributes, wherein the simulation software attributes comprise software codes, software names, software types and software versions;
step 22: carrying out abstract analysis on the test case to obtain test case attributes, wherein the test case attributes comprise a case number, a test grade, a test type, a functional module, a case title, a test step, an expected result, an actual result and a test script;
step 23: carrying out abstract analysis on the simulation model to obtain simulation model attributes, wherein the simulation model attributes comprise grid codes, grid models, grid names, grid types and grid dimensions;
step 24: processing the test case library by using an E-R method to obtain a global E-R diagram of the test case library; each aerospace simulation test software comprises a plurality of test cases, and each test case comprises a plurality of simulation models.
In this embodiment, reference may be made to fig. 3 for building a conceptual model of a database, and fig. 3 is a global E-R schematic diagram of a test case library according to an embodiment of the present invention.
The present embodiment is not limited to utilizing the contact content in the E-R method. For example, the aerospace simulation test software and the test cases can be connected through the functional module, and the test cases and the simulation model can be connected through grid coding; the aerospace simulation test software and the test cases can be connected through other attributes, and the test cases and the simulation model can be connected through other attributes.
Furthermore, in order to better embody the connection among the test software, the test cases and the simulation software, the method for processing the test case library by using the E-R method to obtain a global E-R diagram of the test case library may include the following steps:
step 31: describing the entity, attribute and relation of the tested case library to obtain a global E-R diagram of the tested case library; the entity is aerospace simulation test software, test cases and the simulation model, the attribute is test software attribute, test case attribute and simulation model attribute, the relation comprises a first relation and a second relation, the first relation is the relation established by the aerospace simulation test software and the test cases through the functional modules, and the second relation is the relation established by the test cases and the simulation model through grid coding.
Further, in order to determine a relationship mode of the automated test case library, after the above-mentioned construction of the conceptual model of the database is completed, the construction of the logical model of the database is performed according to the test case template, which may include the following steps:
step 41: and converting the global E-R diagram of the test case library into a relation mode according to the corresponding relation to obtain a logic model.
In this embodiment, on the basis of obtaining an E-R diagram of a global test case library, the E-R diagram is converted into a relationship mode one by one according to the name of a relationship mode corresponding to the name of an entity, and the manner of converting the attribute of the entity into the attribute of the relationship mode, so as to obtain a logic model, as shown in fig. 4, fig. 4 is a schematic diagram of the relationship mode of the test case library provided by the embodiment of the present invention, and each block diagram is an aerospace simulation test software and test software attribute, a test case and test case attribute, a simulation model and a simulation model attribute from left to right. The software_id# represents a software code, the software_name represents a software name, the software_type represents a software type, the software_version represents a software version, the software_module represents a function module, the testcase_id# represents a case number, the testcase_level represents a test level, the testcase_type represents a test type, the testcase_name represents a case title, the test_step represents a test step, the expected_results represent expected results, the test_results represent actual results, the test_descriptions represent a test script, the grid_id# represents a grid code, the grid_module represents a grid model, the grid_name represents a grid name, the grid_type represents a grid type, and the grid_dimensions represent grid dimensions.
Further, in order to better adapt to the requirements of practical applications, data operators and operation time are increased, the method is used for marking the source of each piece of data, after the logical model of the database is built, the physical model of the database is built according to the test case template, and the method can comprise the following steps:
step 51: converting the logic model into a data table, wherein the name of the entity corresponds to the table name of the data table, and the attribute of the entity corresponds to the table field of the data table;
step 52: setting the relation among the data type, length and data stored by the attribute of the entity, and mapping the relation to a storage record;
step 53: the table field of the data table also includes the data operator and the operating time.
The embodiment converts the logical model into the physical model based on the logical model construction. In designing the physical structure model, a specific DBMS (Database Management System ) needs to be selected, and for example, the DBMS may be any one of Mysql database, oracle database, DB2 database, microsoft SQL Server database, and Microsoft Access database, where the databases represent relational databases. In this embodiment, taking Mysql database as an example, a physical model is built, and the relationship mode is first converted into a data table, where the name of the entity corresponds to the table name, and the attribute of the entity corresponds to the table field. The relationship between the type, length and data of the stored data is then set for the attributes and the logical structure is mapped into the stored record, as shown in fig. 5. FIG. 5 is a schematic diagram of a physical model of a test case library according to an embodiment of the present invention. Wherein, data operators may include: creator_name, uploader_name; the operation time may include upload_time, update_time, update_name, remarks; create_time (creation time).
S103: correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into the test case library.
In the long-term software testing process of the aerospace simulation software, a large number of test cases oriented to different testing scenes are accumulated. Because the sources and channels of the test cases are different, the test types are different, so that the problems of incomplete test elements, non-uniform data, non-standard and the like of the original test cases exist, and the automatic test case database cannot be directly input. In the test case warehouse entry stage, the test cases can be changed according to the test case library attributes, the test cases are formed into unified and standardized test cases and then are input into the database, and each test case also needs to have a test script and a grid model which can be executed correctly.
Further, in order to improve the search efficiency of the test cases, after correcting the test cases according to the test case library attribute to obtain a unified test case and adding the unified test case to the test case library, the method may include the following steps:
step 61: and dividing the test cases in the test case library according to the preset dimension and the preset level to obtain a corresponding test case set so as to obtain a software test case data model.
In this embodiment, the preset dimension and the preset level are set according to the actual situation.
Further, in order to facilitate the retrieval of test cases, the method for dividing the test cases in the test case library into corresponding test case sets according to preset dimensions and preset levels may include the following steps:
step 71: dividing test cases in a test case library according to 3 dimensions to obtain a primary test case set, wherein the primary test case set comprises a functional module, standard model verification and multi-field equipment application;
step 72: performing fine division on the primary test case set to obtain a secondary test case set;
step 73: and carrying out subdivision on the secondary test case set to obtain a tertiary test case set.
According to the embodiment, the aerospace simulation software test cases can be divided according to the three dimensions of the functional module, the standard model verification and the multi-field equipment application, the dimension is identified as a primary test case set, then each dimension is subdivided respectively to obtain a secondary test case set, and then the secondary test case set is subdivided to obtain a tertiary test case set.
In order to facilitate understanding of the present invention, please refer to fig. 6 specifically, fig. 6 is a schematic diagram of a software test case data model according to an embodiment of the present invention. (1) The method comprises the steps of subdividing functional modules into 4 large modules of pretreatment, solver, view and post-treatment, marking the modules as secondary test case sets, and subdividing each module, wherein as shown in fig. 7, fig. 7 is a schematic diagram of test case set division based on the functional modules, provided by the embodiment of the invention, so as to obtain test case sets of each subdivision module, and marking the test case sets as tertiary test case sets; (2) the standard model class is divided into a 'speed domain', 'flow characteristic' and 'pneumatic characteristic' according to simulation characteristics, and is identified as a secondary test case set, then the simulation characteristics of the standard model are subdivided, as shown in fig. 8, and fig. 8 is a schematic diagram of test case set division based on standard model verification provided by the embodiment of the invention. Obtaining a subdivision test case set of each simulation characteristic, and marking the subdivision test case set as a three-level test case set; (3) the multi-field equipment application class can be divided into a fixed wing type aircraft, a rotor type aircraft, a hypersonic speed aircraft, an aeroengine and others, and is identified as a secondary test case set, then subdivided to obtain test case sets of specific models of various types, and identified as a tertiary test case set, as shown in fig. 9, and fig. 9 is a schematic diagram of test case set division based on multi-field equipment application provided by the embodiment of the invention.
After the construction of the aerospace simulation software multidimensional multi-level test case data model is completed, algorithm design can be carried out according to actual requirements, codes of the multidimensional multi-level test case set can be output, and for better understanding, the following is exemplified: for example, based on the aerospace simulation software test case data model, a relational expression is used for carrying out search algorithm design, and a data search algorithm independent of a relational database is designed. The design process can comprise the following steps: first, the table TEST_SOFTWARE, TEST_CASE, GRID (simulation model) is enteredThe line Cartesian product connection, the three tables are respectively abbreviated as S, C, G, and the relation algebra thereof can be expressed as
Figure SMS_1
Form table t after ligation. The test case attribute to be acquired is expressed by relational algebra, and the result R is #t) The method comprises the following steps:
Figure SMS_2
the search algorithm design is carried out according to multi-dimensional and multi-stage search conditions, the dimension and the level can determine a unique test case set, and according to the method, the test case data search algorithm of each stage of different dimensions of the test simulation test software can be deduced, as follows: by P 1 Representing its dimension, P 2 Indicating the level, P 3 Representing its test software, P 4 The software version is represented, and the test case set retrieval algorithm is obtained as follows:
Figure SMS_3
on the basis of the aerospace simulation software multidimensional multi-level test case set retrieval algorithm, the required test case information is output according to the test dimension and the test level, wherein the test case information comprises basic information (basic test case elements) of a test case set, scripts for executing automatic test and grid models required by simulation.
By applying the test case library construction method provided by the embodiment of the invention, the test case template is formed by acquiring the traditional test case elements and adding the test script and the grid model into the traditional test case elements; performing conceptual model construction, logic model construction and physical model construction of a database according to the test case template to obtain test case library attributes; correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into the test case library. According to the invention, the test case element test script and the grid model are added, so that the test case template is improved and unified, the test case library for automatic test is constructed, the test script and the grid model which can be automatically executed by the post-storage integrated automatic test platform are convenient, the sharing multiplexing function of the test cases in the test case library is realized, and the efficient management of the test cases is satisfied. Moreover, the test software, the test cases and the simulation model are respectively analyzed to obtain the attribute of each aspect, so that an automatic test case library can be better constructed; moreover, the functional module is used as the connection between the aerospace simulation test software and the test case, and the grid code is used as the connection between the test case and the simulation model, so that the connection among the test software, the test case and the simulation software can be better embodied; in addition, the sources of each piece of data are marked by adding data operators and operation time, so that the method is more suitable for the requirements of practical application; in addition, a multi-dimensional multi-level test case library is constructed, so that the search efficiency of test cases can be improved; and the test case library is divided into three-dimensional and three-level test cases according to the functional modules, standard model verification and multi-field equipment application, so that the retrieval of the later test cases can be facilitated, and the efficiency is improved.
The test case library construction device provided by the embodiment of the invention is introduced below, and the test case library construction device described below and the test case library construction method described above can be referred to correspondingly.
Referring specifically to fig. 10, fig. 10 is a schematic diagram of a relationship mode of a test case library according to an embodiment of the present invention, which may include:
the adding module 100 is configured to obtain a conventional test case element, and add a test script and a grid model to the conventional test case element to form a test case template;
the construction module 200 is configured to perform conceptual model construction, logic model construction and physical model construction of the database according to the test case template to obtain test case library attributes;
and the correction module 300 is used for correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into the test case library.
Based on the above embodiment, the constructing module 200 performs the conceptual model construction of the database according to the test case template, which may include:
the first analysis unit is used for carrying out abstract analysis on the aerospace simulation test software to obtain test software attributes, wherein the test software attributes comprise a software code, a software name, a software type and a software version;
The second analysis unit is used for carrying out abstract analysis on the test case to obtain test case attributes, wherein the test case attributes comprise a case number, a test grade, a test type, a functional module, a case title, a test step, an expected result, an actual result and the test script;
the third analysis unit is used for carrying out abstract analysis on the simulation model to obtain simulation model attributes, wherein the simulation model attributes comprise grid codes, the grid models, grid names, grid types and grid dimensions;
the first processing unit is used for processing the test case library by using an E-R method to obtain a global E-R diagram of the test case library; each aerospace simulation test software comprises a plurality of test cases, and each test case comprises a plurality of simulation models.
Based on the above embodiment, the first processing unit may include:
the description subunit is used for describing the entity, the attribute and the connection of the test case library to obtain a global E-R diagram of the test case library; the entity is the aerospace simulation test software, the test case and the simulation model, the attribute is the test software attribute, the test case attribute and the simulation model attribute, the connection comprises a first connection and a second connection, the first connection is the connection established between the aerospace simulation test software and the test case through the functional module, and the second connection is the connection established between the test case and the simulation model through grid coding.
Based on the above embodiment, the constructing module 200 performs logical model construction of the database according to the test case template, which may include:
the first conversion unit is used for converting the global E-R diagram of the test case library into a relation mode according to the corresponding relation to obtain a logic model.
Based on the above embodiment, the constructing module 200 performs physical model construction of the database according to the test case template, which may include:
the second conversion unit is used for converting the logic model into a data table, the name of the entity corresponds to the table name of the data table, and the attribute of the entity corresponds to the table field of the data table;
a setting unit, configured to set a relationship among a data type, a length and data stored by an attribute of the entity, and map the relationship into a storage record; the table field of the data table also includes a data operator and an operating time.
Based on the above embodiment, the test case library construction device may further include:
the division module is used for dividing the test cases in the test case library according to the preset dimension and the preset level to obtain a corresponding test case set so as to obtain a software test case data model.
Based on the above embodiment, the dividing module may include:
the first dividing unit is used for dividing the test cases in the test case library into first-level test case sets according to 3 dimensions, wherein the first-level test case sets comprise functional modules, standard model verification and multi-field equipment application;
the second dividing unit is used for finely dividing the primary test case set to obtain a secondary test case set;
and the third dividing unit is used for finely dividing the secondary test case set to obtain a tertiary test case set.
By applying the test case library construction device provided by the embodiment of the invention, the adding module 100 is used for obtaining the traditional test case elements, and the test script and the grid model are added into the traditional test case elements to form a test case template; the construction module 200 is used for carrying out conceptual model construction, logic model construction and physical model construction of the database according to the test case template to obtain the test case library attribute; the correction module 300 is configured to correct the test cases of the aerospace simulation test software according to the test case library attribute, obtain a unified test case, and add the unified test case into the test case library. According to the invention, the test case element test script and the grid model are added, so that the test case template is improved and unified, the test case library for automatic test is constructed, the test script and the grid model which can be automatically executed by the post-storage integrated automatic test platform are convenient, the sharing multiplexing function of the test cases in the test case library is realized, and the efficient management of the test cases is satisfied. Moreover, the test software, the test cases and the simulation model are respectively analyzed to obtain the attribute of each aspect, so that an automatic test case library can be better constructed; moreover, the functional module is used as the connection between the aerospace simulation test software and the test case, and the grid code is used as the connection between the test case and the simulation model, so that the connection among the test software, the test case and the simulation software can be better embodied; in addition, the sources of each piece of data are marked by adding data operators and operation time, so that the method is more suitable for the requirements of practical application; in addition, a multi-dimensional multi-level test case library is constructed, so that the search efficiency of test cases can be improved; and the test case library is divided into three-dimensional and three-level test cases according to the functional modules, standard model verification and multi-field equipment application, so that the retrieval of the later test cases can be facilitated, and the efficiency is improved.
The test case library construction device provided by the embodiment of the invention is introduced below, and the test case library construction device described below and the test case library construction method described above can be referred to correspondingly.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a test case library construction apparatus according to an embodiment of the present invention, which may include:
a memory 10 for storing a computer program;
and a processor 20 for executing a computer program to implement the test case library construction method described above.
Memory 10, processor 20, communication interface 31, and communication bus 32. The memory 10, the processor 20, and the communication interface 31 all communicate with each other via a communication bus 32.
In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the programs may include program codes, where the program codes include computer operation instructions, and in the embodiment of the present application, the memory 10 may store programs for implementing the following functions:
acquiring traditional test case elements, and adding a test script and a grid model into the traditional test case elements to form a test case template;
performing conceptual model construction, logic model construction and physical model construction of a database according to the test case template to obtain test case library attributes;
Correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into the test case library.
In one possible implementation, the memory 10 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, and at least one application program required for functions, etc.; the storage data area may store data created during use.
In addition, memory 10 may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic tasks as well as handling hardware-based tasks.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, a fpga or other programmable logic device, and the processor 20 may be a microprocessor or any conventional processor. The processor 20 may call a program stored in the memory 10.
The communication interface 31 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 11 does not limit the test case library construction device in the embodiment of the present application, and the test case library construction device may include more or fewer components than those shown in fig. 11 or may combine some components in practical applications.
The storage medium provided by the embodiment of the present invention is described below, and the storage medium described below and the test case library construction method described above may be referred to correspondingly.
The invention also provides a storage medium, and the storage medium stores a computer program which realizes the steps of the test case library construction method when being executed by a processor.
The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Finally, it is further noted that, in this document, 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. Moreover, 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.
The above description of the method, the device, the equipment and the storage medium for constructing the test case library provided by the invention applies specific examples to describe the principle and the implementation of the invention, and the description of the above examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. The method for constructing the test case library is characterized by comprising the following steps of:
acquiring traditional test case elements, and adding a test script and a grid model into the traditional test case elements to form a test case template;
performing conceptual model construction, logic model construction and physical model construction of a database according to the test case template to obtain test case library attributes;
correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into a test case library.
2. The method for constructing a test case library according to claim 1, wherein the constructing a conceptual model of a database according to the test case template comprises:
Carrying out abstract analysis on the aerospace simulation test software to obtain test software attributes, wherein the test software attributes comprise software codes, software names, software types and software versions;
carrying out abstract analysis on the test case to obtain test case attributes, wherein the test case attributes comprise a case number, a test grade, a test type, a functional module, a case title, a test step, an expected result, an actual result and the test script;
carrying out abstract analysis on the simulation model to obtain simulation model attributes, wherein the simulation model attributes comprise grid codes, the grid model, grid names, grid types and grid dimensions;
processing the test case library by using an E-R method to obtain a global E-R diagram of the test case library;
each aerospace simulation test software comprises a plurality of test cases, and each test case comprises a plurality of simulation models.
3. The test case library construction method according to claim 2, wherein the processing the test case library by using the E-R method to obtain a global E-R diagram of the test case library comprises:
describing the entity, attribute and relation of the test case library to obtain a global E-R diagram of the test case library;
The entity is the aerospace simulation test software, the test case and the simulation model, the attribute is the test software attribute, the test case attribute and the simulation model attribute, the connection comprises a first connection and a second connection, the first connection is the connection established between the aerospace simulation test software and the test case through the functional module, and the second connection is the connection established between the test case and the simulation model through grid coding.
4. The method for constructing a test case library according to claim 2, wherein the constructing a logical model of the database according to the test case template comprises:
and converting the global E-R diagram of the test case library into a relation mode according to the corresponding relation to obtain a logic model.
5. The method for constructing a test case library according to claim 4, wherein the constructing a physical model of the database according to the test case template comprises:
converting the logic model into a data table, wherein the name of the entity corresponds to the table name of the data table, and the attribute of the entity corresponds to the table field of the data table;
Setting the relation among the data type, length and data stored by the attribute of the entity, and mapping the relation to a storage record;
the table field of the data table also includes a data operator and an operating time.
6. The test case library construction method according to claim 1, wherein after correcting the test cases according to the test case library attribute to obtain unified test cases and adding the unified test cases to the test case library, further comprising:
and dividing the test cases in the test case library according to the preset dimension and the preset level to obtain a corresponding test case set so as to obtain a software test case data model.
7. The method for constructing a test case library according to claim 6, wherein the dividing the test cases in the test case library according to the preset dimensions and the preset levels to obtain the corresponding test case sets includes:
dividing the test cases in the test case library into a first-level test case set according to 3 dimensions, wherein the first-level test case set comprises a functional module, standard model verification and multi-field equipment application;
performing subdivision on the primary test case set to obtain a secondary test case set;
And carrying out subdivision on the secondary test case set to obtain a tertiary test case set.
8. A test case library construction apparatus, comprising:
the adding module is used for obtaining traditional test case elements, and adding a test script and a grid model into the traditional test case elements to form a test case template;
the construction module is used for carrying out conceptual model construction, logic model construction and physical model construction of the database according to the test case template to obtain test case library attributes;
and the correction module is used for correcting the test cases of the aerospace simulation test software according to the test case library attributes to obtain unified test cases, and adding the unified test cases into the test case library.
9. A test case library construction apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the test case library construction method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, wherein a computer program is stored on the readable storage medium, which when executed by a processor, implements the steps of the test case library construction method according to any one of claims 1 to 7.
CN202310654406.0A 2023-06-05 2023-06-05 Test case library construction method, device, equipment and storage medium Active CN116383094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310654406.0A CN116383094B (en) 2023-06-05 2023-06-05 Test case library construction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310654406.0A CN116383094B (en) 2023-06-05 2023-06-05 Test case library construction method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116383094A true CN116383094A (en) 2023-07-04
CN116383094B CN116383094B (en) 2023-08-25

Family

ID=86969749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310654406.0A Active CN116383094B (en) 2023-06-05 2023-06-05 Test case library construction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116383094B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040107415A1 (en) * 2002-12-03 2004-06-03 Konstantin Melamed Web-interactive software testing management method and computer system including an integrated test case authoring tool
US20040181713A1 (en) * 2003-03-10 2004-09-16 Lambert John Robert Automatic identification of input values that expose output failures in software object
US20050204201A1 (en) * 2004-03-15 2005-09-15 Ramco Systems Limited Method and system for testing software development activity
CN107908559A (en) * 2017-11-15 2018-04-13 中国农业银行股份有限公司 A kind of Test Case Design method and device
CN108197026A (en) * 2017-12-30 2018-06-22 北京金风科创风电设备有限公司 Method, device and equipment for testing simulation software of wind generating set and storage medium
CN108920382A (en) * 2018-07-31 2018-11-30 惠州市德赛西威汽车电子股份有限公司 Method for generating test case, device, storage medium and server
CN109901999A (en) * 2019-01-31 2019-06-18 国核自仪系统工程有限公司 The emulation mode and system of programmable logic based on UVM
CN114185781A (en) * 2021-12-07 2022-03-15 北京广利核系统工程有限公司 Logic test case automatic generation method and device based on control logic diagram

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040107415A1 (en) * 2002-12-03 2004-06-03 Konstantin Melamed Web-interactive software testing management method and computer system including an integrated test case authoring tool
US20040181713A1 (en) * 2003-03-10 2004-09-16 Lambert John Robert Automatic identification of input values that expose output failures in software object
US20050204201A1 (en) * 2004-03-15 2005-09-15 Ramco Systems Limited Method and system for testing software development activity
CN107908559A (en) * 2017-11-15 2018-04-13 中国农业银行股份有限公司 A kind of Test Case Design method and device
CN108197026A (en) * 2017-12-30 2018-06-22 北京金风科创风电设备有限公司 Method, device and equipment for testing simulation software of wind generating set and storage medium
CN108920382A (en) * 2018-07-31 2018-11-30 惠州市德赛西威汽车电子股份有限公司 Method for generating test case, device, storage medium and server
CN109901999A (en) * 2019-01-31 2019-06-18 国核自仪系统工程有限公司 The emulation mode and system of programmable logic based on UVM
CN114185781A (en) * 2021-12-07 2022-03-15 北京广利核系统工程有限公司 Logic test case automatic generation method and device based on control logic diagram

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
SILVIA THAL: "Generic Detection and Search-based Test Case Generation of Urban Scenarios based on Real Driving Data", 《2022 IEEE INTELLIGENT VEHICLES SYMPOSIUM (IV)》, pages 1 - 7 *
何磊: "国家数值风洞(NNW)软件自动化集成与测试平台设计与研发", 《空气动力学学报》, pages 1 - 5 *
方悦: "基于仪器软件平台的自动化测试工具研究", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, pages 138 - 806 *
林旻: "基于ASP.NET的高校实验室信息管理系统的设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, pages 138 - 3405 *
自动化测试君: "手把手带你设计接口自动化测试用例:建立数据库实例和测试用例表", pages 1 - 4, Retrieved from the Internet <URL:《https://blog.csdn.net/Yanan990830/article/details/122944849》> *

Also Published As

Publication number Publication date
CN116383094B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN111159191B (en) Data processing method, device and interface
CN111462327B (en) Unstructured data analysis method for three-dimensional inspection model of three-dimensional modeling software
US7139779B1 (en) Method and system for developing extract transform load systems for data warehouses
US20080168082A1 (en) Method and apparatus for modelling data exchange in a data flow of an extract, transform, and load (etl) process
WO2018051098A1 (en) System for data management in a large scale data repository
WO2018051097A1 (en) System for analysing data relationships to support query execution
US20100280990A1 (en) Etl for process data warehouse
CN104965735A (en) Apparatus for generating upgrade SQL script
US20170193036A1 (en) Framework for joining datasets
CN110874717B (en) Data management method
US20060136471A1 (en) Differential management of database schema changes
CN116070345A (en) Method and device for driving three-dimensional model modeling based on two-dimensional drawing and computer storage medium
CN115114146A (en) Interface test method, device, equipment and storage medium
CN111061733A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN116383094B (en) Test case library construction method, device, equipment and storage medium
CN115757174A (en) Database difference detection method and device
Reniers et al. Schema design support for semi-structured data: Finding the sweet spot between NF and De-NF
US9959295B1 (en) S-expression based computation of lineage and change impact analysis
CN114925054A (en) Meta-model-based metadata management system and method
CN116226788B (en) Modeling method integrating multiple data types and related equipment
CN116975116A (en) Data condition screening method of big data analysis system
Liu Oracle Database Performance and Scalability: a quantitative approach
KR100656559B1 (en) Program Automatic Generating Tools
Buda et al. PDM suitability study for CAE data management
Hendawi et al. EMD: entity mapping diagram for automated extraction, transformation, and loading processes in data warehousing

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