[go: up one dir, main page]

CN113971126A - Test case generation method and system based on automobile instrument test - Google Patents

Test case generation method and system based on automobile instrument test Download PDF

Info

Publication number
CN113971126A
CN113971126A CN202111076782.3A CN202111076782A CN113971126A CN 113971126 A CN113971126 A CN 113971126A CN 202111076782 A CN202111076782 A CN 202111076782A CN 113971126 A CN113971126 A CN 113971126A
Authority
CN
China
Prior art keywords
test
points
display
conditions
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111076782.3A
Other languages
Chinese (zh)
Inventor
朱敦尧
代山山
叶蕾
吴狄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Kotei Informatics Co Ltd
Original Assignee
Wuhan Kotei Informatics 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 Wuhan Kotei Informatics Co Ltd filed Critical Wuhan Kotei Informatics Co Ltd
Priority to CN202111076782.3A priority Critical patent/CN113971126A/en
Publication of CN113971126A publication Critical patent/CN113971126A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • 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/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis

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)
  • Combined Controls Of Internal Combustion Engines (AREA)

Abstract

The invention provides a test case generation method and a system based on automobile instrument test, wherein the method comprises the following steps: performing demand analysis on the Xmind file to obtain a plurality of test conditions of an object to be tested; automatically arranging and combining a plurality of test conditions to generate corresponding test points; and storing the test case consisting of the plurality of test points in the excel. The invention carries out automatic demand analysis on the Xmind file, generates the full-coverage test points according to the analysis result, further generates the test cases, can automatically generate the test cases, enables the design cases to be simple and quick, and achieves the purposes of full coverage of the test viewpoint and no error of the test cases.

Description

Test case generation method and system based on automobile instrument test
Technical Field
The invention relates to the field of software testing, in particular to a test case generation method and system based on automobile instrument testing.
Background
The design of the test case of the current vehicle-mounted instrument is mainly divided into the following steps: 1. analyzing the test requirement; 2. analyzing a business process; 3. designing a test case; 4. evaluating test cases; 5. and updating the test cases.
Wherein, the test case design also comprises a function test; b. testing the boundary; c. performing an exception test; d. testing the performance; e. and (4) testing the pressure, converting the test points into an Excel format according to the test points, and providing the Excel format for other testers or automatic test tools to execute.
At present, when a test case is designed, test conditions are designed manually, and then test points and the test case are designed manually according to the test conditions, the traditional mode causes great workload of testers, and meanwhile, some test points are easy to miss, so that all test points cannot be covered comprehensively.
Disclosure of Invention
Aiming at the technical problems in the prior art, the invention provides a test case generation method and system based on automobile instrument test.
According to a first aspect of the present invention, a test case generation method based on an automobile instrument test is provided, including: performing demand analysis on the Xmind file to obtain a plurality of test conditions of an object to be tested; automatically arranging and combining a plurality of test conditions to generate corresponding test points; and storing the test case consisting of the plurality of test points in the excel.
On the basis of the technical scheme, the invention can be improved as follows.
Optionally, the performing requirement analysis on the xmnd file to obtain a plurality of test conditions of the object to be tested includes: performing demand analysis on the Xmind file to obtain message information and test object information of an item to be tested; and determining a plurality of test conditions of the object to be tested according to the message information and the test object information.
Optionally, the message information at least includes a CAN signal name, a CAN signal ID, and a downloadable content DLC, and the test object information at least includes a Warning display timing, a display duration, a priority, and a picture alternate display sequence.
Optionally, the automatically arranging and combining the plurality of test conditions to generate corresponding test points includes: and automatically arranging and combining a plurality of test conditions according to different test viewpoints to generate corresponding test points, wherein the test viewpoint at least comprises a boundary value method and an equivalence class division method.
Optionally, the test viewpoint includes a display condition when a signal of the warming test in the test instrument changes, a display condition when a power state changes, a duration of the warming display, a switching action of the current warming and other warming display at the same time, and a priority.
Optionally, the automatically arranging and combining the plurality of test conditions to generate corresponding test points includes: and automatically arranging and combining the display content arrangement under the same signal and different signals, the display priority arrangement when a plurality of pictures are displayed, the alternate action when the pictures are alternately displayed and the picture display duration to generate corresponding test points.
Optionally, the storing the test case composed of the multiple test points in the excel includes: and storing the test data corresponding to each test point in an excel table, wherein the test data corresponding to one test point is correspondingly stored in a row of cells.
Optionally, the storing the test case composed of the multiple test points in the excel includes: and storing test cases generated by different objects to be tested in different sheets of the excel table.
According to a second aspect of the present invention, there is provided a test case generation system based on an automobile instrument test, including: the acquisition module is used for carrying out demand analysis on the Xmind file and acquiring a plurality of test conditions of the object to be tested; the generating module is used for automatically arranging and combining the plurality of test conditions to generate corresponding test points; and the storage module is used for storing the test case formed by the plurality of test points in the excel.
According to a third aspect of the present invention, there is provided an electronic device, comprising a memory, and a processor, wherein the processor is configured to implement the steps of the test case generation method based on the automobile instrument test when executing the computer management class program stored in the memory.
According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer management-like program stored thereon, the computer management-like program, when executed by a processor, implementing the steps of a test case generation method based on motormeter testing.
The test case generation method and system based on the automobile instrument test, provided by the invention, are used for carrying out demand analysis on an Xmind file and obtaining a plurality of test conditions of an object to be tested; automatically arranging and combining a plurality of test conditions to generate corresponding test points; and storing the test case consisting of the plurality of test points in the excel. The invention carries out automatic demand analysis on the Xmind file, generates the full-coverage test points according to the analysis result, further generates the test cases, can automatically generate the test cases, enables the design cases to be simple and quick, and achieves the purposes of full coverage of the test viewpoint and no error of the test cases.
Drawings
FIG. 1 is a flow chart of a test case generation method based on motormeter testing according to the present invention;
FIG. 2 is a schematic structural diagram of a test case generation system based on automobile instrument testing according to the present invention;
FIG. 3 is a schematic diagram of a hardware structure of a possible electronic device provided in the present invention;
fig. 4 is a schematic diagram of a hardware structure of a possible computer-readable storage medium according to the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Aiming at the defects in the background art, the main technical difficulty of the invention is to formulate the general test viewpoints in the design of the test case of the automobile instrument, such as a boundary value test method, an equivalence class division method and the like, and to formulate some viewpoints special for the automobile instrument test, such as the image display priority and the like. The design case is simply and quickly changed, and the purposes of full coverage of test viewpoints and no error of the test case are achieved.
Based on this, referring to fig. 1, a flowchart of a test case generation method based on an automobile instrument test is provided, and as shown in fig. 1, the method includes: 101. performing demand analysis on the Xmind file to obtain a plurality of test conditions of an object to be tested; 102. automatically arranging and combining a plurality of test conditions to generate corresponding test points; 103. and storing the test case consisting of the plurality of test points in the excel.
It can be understood that the embodiment of the invention provides a test case generation method based on automobile instrument testing, which can automatically generate a test case capable of fully covering all test points. Specifically, demand analysis is carried out on the Xmind file, each test condition of an object to be tested is obtained, each test condition is arranged and combined by a certain method, a plurality of test points are generated, one test case is composed of a plurality of test points, and test data corresponding to the plurality of test points are stored in an excel table.
The invention carries out requirement analysis based on Xmind software, automatically generates a corresponding automatic test case according to an analysis result, and solves the problems that a test case is insufficient to fully cover a test point in the process of designing the case by a test engineer, the format or condition is wrong due to error input, and a lot of pain points which are repeatedly worked are required to be designed.
In a possible embodiment, the performing requirement analysis on the xmnd file to obtain a plurality of test conditions of the object to be tested includes: performing demand analysis on the Xmind file to obtain message information and test object information of an item to be tested; and determining a plurality of test conditions of the object to be tested according to the message information and the test object information.
The message information at least comprises a CAN signal name, a CAN signal ID and downloadable content DLC, and the test object information at least comprises the time of Warning display, the display duration, the priority and the picture alternate display sequence.
It is understood that the first step is to analyze the testing requirements of the xmnd file and extract the trigger conditions (which may also be understood as testing conditions) of the object to be tested, such as CAN signal name, data length, power state, and trigger object type.
In a possible embodiment, the automatically arranging and combining the plurality of test conditions to generate corresponding test points includes: and automatically arranging and combining a plurality of test conditions according to different test viewpoints to generate corresponding test points, wherein the test viewpoint at least comprises a boundary value method and an equivalence class division method.
It can be understood that, after the test conditions of the object to be tested are extracted from the Xmind file in the above steps, all the test conditions are automatically arranged and combined according to the test viewpoint to generate different test points, and the test data corresponding to each test point is written into the josn format of excel.
The test viewpoint includes, for example, a boundary value method or an equivalence class division method, that is, test conditions may be arranged and combined by the boundary value method and the equivalence class division method to generate corresponding different test points, and the obtained test data is written into an excel table.
More specifically, in the vehicle-mounted instrument test, the test viewpoint may include a display condition when a signal of the warming test in the test instrument changes, a display condition when a power state changes, a duration of the warming display, a switching action of the current warming and other warming simultaneously displayed, and a priority, the test conditions are arranged and combined according to the test viewpoints to generate corresponding different test points, and test data corresponding to each test point is stored in an excel table, wherein the generated test data of the plurality of test points constitute a test case, and a josn format of the to-be-generated automatic test case is automatically written into the excel according to a test template required by an automatic test tool.
For different test objects, corresponding test case data is stored in different sheets of the excel table, and for each test point of one test case, the test data of one test point is stored in one row of cells of the sheet table.
The following describes in detail a test case generation method based on an automobile instrument test according to an embodiment of the present invention with a specific example, which mainly includes the following steps:
s1, reading message information and test object information of items to be tested in Xmind file demand analysis, and sending the message information and the test object information to the signal analysis module to form a signal resource library.
Wherein, the message information of the item to be tested at least comprises: CAN signal name, ID, DLC, used to accurately analyze message information; the test object information includes at least: the timing, the display duration, the priority, the alternate display sequence of the pictures and the like of the Warning display.
S2, arranging and combining the information (message information and test object information) acquired in S1 according to the test viewpoint, for example, arranging the display contents of the same signal and different signal values, preferentially displaying and arranging when a plurality of pictures are displayed, alternately acting when the pictures are alternately displayed, confirming the display time length of the pictures and the like, and generating the josn format of the test case of the corresponding function point;
s3, acquiring and analyzing the plurality of josn formats generated in S2, and writing the josn formats into an excel table. And storing the test case data corresponding to different test objects in different sheets according to the difference of the test objects. For example, No. sequencing, power state writing, key action writing, signal name and value writing, waiting duration writing, mask state writing or expected result writing, and test cases corresponding to these different test items are written into different sheets.
And S4, repeating the same steps from S1 to S3, completing the requirement analysis of a plurality of Xmind files, and generating a plurality of corresponding automatic test cases.
Fig. 2 is a structural diagram of a test case generation system based on an automobile instrument test, as shown in fig. 2, the system includes an obtaining module 201, a generating module 202, and a storing module 203, where:
an obtaining module 201, configured to perform requirement analysis on the xmnd file, and obtain a plurality of test conditions of an object to be tested; the generating module 202 is configured to automatically arrange and combine the multiple test conditions to generate corresponding test points; the storage module 203 is configured to store a test case composed of a plurality of test points in an excel.
It should be noted that the test case generation system based on the automobile instrument test provided by the embodiment of the present invention is developed and implemented based on a Python platform, and includes a PC control end. The host control end is an integral control center, adopts a Win 764-bit Chinese operating system, has an internal memory above 8G, and is provided with a Win32 control library. The test case generation part is based on the xlwings open source library of the python platform for secondary packaging.
It can be understood that the test case generation system based on the automobile instrument test provided by the present invention corresponds to the test case generation method based on the automobile instrument test provided by the foregoing embodiments, and the relevant technical features of the test case generation system based on the automobile instrument test may refer to the relevant technical features of the test case generation method based on the automobile instrument test, and are not described herein again.
Referring to fig. 3, fig. 3 is a schematic diagram of an embodiment of an electronic device according to an embodiment of the invention. As shown in fig. 3, an embodiment of the present invention provides an electronic device 300, which includes a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320, wherein the processor 320 executes the computer program 311 to implement the following steps: performing demand analysis on the Xmind file to obtain a plurality of test conditions of an object to be tested; automatically arranging and combining a plurality of test conditions to generate corresponding test points; and storing the test case consisting of the plurality of test points in the excel.
Referring to fig. 4, fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium according to the present invention. As shown in fig. 4, the present embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored, the computer program 411 implementing the following steps when executed by a processor: performing demand analysis on the Xmind file to obtain a plurality of test conditions of an object to be tested; automatically arranging and combining a plurality of test conditions to generate corresponding test points; and storing the test case consisting of the plurality of test points in the excel.
According to the test case generation method and system based on the automobile instrument test, provided by the embodiment of the invention, testers do not need to engage in single, repeated and boring test work, and only need to perform corresponding requirement analysis on the responsible modules, generate the xmnd requirement analysis document in a required format, execute the software and automatically generate the corresponding test case. Therefore, the manufacturing efficiency of the test case is greatly improved, the labor cost is saved, the development period is shortened, unnecessary human errors are avoided, and the test accuracy is improved.
It should be noted that, in the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to relevant descriptions of other embodiments for parts that are not described in detail in a certain embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A test case generation method based on automobile instrument test is characterized by comprising the following steps:
performing demand analysis on the Xmind file to obtain a plurality of test conditions of an object to be tested;
automatically arranging and combining a plurality of test conditions to generate corresponding test points;
and storing the test case consisting of the plurality of test points in the excel.
2. The method for generating test cases according to claim 1, wherein the performing requirement analysis on the xmnd file to obtain a plurality of test conditions of the object to be tested includes:
performing demand analysis on the Xmind file to obtain message information and test object information of an item to be tested;
and determining a plurality of test conditions of the object to be tested according to the message information and the test object information.
3. The method for generating test cases according to claim 2, wherein the message information at least includes CAN signal names, CAN signal IDs, and downloadable content DLC, and the test object information at least includes timing of Warning display, display duration, priority, and a screen alternation display order.
4. The method for generating test cases according to claim 2 or 3, wherein the automatically arranging and combining the plurality of test conditions to generate corresponding test points comprises:
and automatically arranging and combining a plurality of test conditions according to different test viewpoints to generate corresponding test points, wherein the test viewpoint at least comprises a boundary value method and an equivalence class division method.
5. The test case generation method according to claim 4, wherein the test viewpoint includes a display condition when a signal of the warning test in the test meter changes, a display condition when a power state changes, a duration of the warning display, a switching action of a current warning display and other warning display at the same time, and a priority.
6. The method for generating test cases according to claim 4, wherein the automatically arranging and combining the plurality of test conditions to generate corresponding test points comprises:
and automatically arranging and combining the display content arrangement under the same signal and different signals, the display priority arrangement when a plurality of pictures are displayed, the alternate action when the pictures are alternately displayed and the picture display duration to generate corresponding test points.
7. The method according to claim 6, wherein the storing the test case composed of the plurality of test points in excel comprises:
and storing the test data corresponding to each test point in an excel table, wherein the test data corresponding to one test point is correspondingly stored in a row of cells.
8. The method according to claim 7, wherein the storing the test case composed of the plurality of test points in excel comprises:
and storing test cases generated by different objects to be tested in different sheets of the excel table.
9. A test case generation system based on motormeter test is characterized by comprising:
the acquisition module is used for carrying out demand analysis on the Xmind file and acquiring a plurality of test conditions of the object to be tested;
the generating module is used for automatically arranging and combining the plurality of test conditions to generate corresponding test points;
and the storage module is used for storing the test case formed by the plurality of test points in the excel.
10. A computer-readable storage medium, having stored thereon a computer management-like program which, when executed by a processor, implements the steps of the method for generating test cases based on motormeter testing according to any one of claims 1 to 8.
CN202111076782.3A 2021-09-14 2021-09-14 Test case generation method and system based on automobile instrument test Withdrawn CN113971126A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111076782.3A CN113971126A (en) 2021-09-14 2021-09-14 Test case generation method and system based on automobile instrument test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111076782.3A CN113971126A (en) 2021-09-14 2021-09-14 Test case generation method and system based on automobile instrument test

Publications (1)

Publication Number Publication Date
CN113971126A true CN113971126A (en) 2022-01-25

Family

ID=79586565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111076782.3A Withdrawn CN113971126A (en) 2021-09-14 2021-09-14 Test case generation method and system based on automobile instrument test

Country Status (1)

Country Link
CN (1) CN113971126A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115047836A (en) * 2022-06-27 2022-09-13 中国核动力研究设计院 Test case generation and loading method and system based on DCS system periodic test

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115047836A (en) * 2022-06-27 2022-09-13 中国核动力研究设计院 Test case generation and loading method and system based on DCS system periodic test

Similar Documents

Publication Publication Date Title
CN106951364B (en) Test method and device
US20150370685A1 (en) Defect localization in software integration tests
EP2963546A1 (en) Method for achieving software development transaction and electronic device
CN104252481A (en) Dynamic check method and device for consistency of main and salve databases
CN112597028A (en) Method and device for displaying case test result and readable storage medium
CN106557419B (en) Program testing method and device
CN111143228B (en) Test code generation method and device based on decision table method
CN102798833B (en) Automatic test system and method for diagnosis instrument
CN111309586B (en) Command testing method and device and storage medium thereof
CN113971126A (en) Test case generation method and system based on automobile instrument test
CN114141302A (en) Test method of solid state disk and electronic equipment
CN112306495A (en) Picture verification method and device, computer equipment and computer-readable storage medium
CN108776632B (en) Signal-oriented self-checking flow automatic generation method, device, equipment and readable storage medium
JPH10275093A (en) Program test support device
CN106294109A (en) Obtain the method and device of defect code
CN114692383A (en) Modeling method and device for full-range analog machine simulation object and computer equipment
CN111897737A (en) Omission detection method and device for program test of micro-service system
CN113326206B (en) Test method, apparatus, storage medium and program product for data processing system
CN112346994B (en) Test information association method, device, computer equipment and storage medium
CN112597040B (en) Interface automatic testing method and device and electronic equipment
CN112612702B (en) Automatic testing method and device based on web
CN110704252A (en) Automatic testing device and testing method based on cloud dynamic management
CN111400245B (en) Art resource migration method and device
CN111143221B (en) Test method and device
CN111104328B (en) Use case generation method and device, computer equipment and readable 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20220125

WW01 Invention patent application withdrawn after publication