CN111190802A - Method for automatically generating performance test configuration - Google Patents

Method for automatically generating performance test configuration Download PDF

Info

Publication number
CN111190802A
CN111190802A CN201911332483.4A CN201911332483A CN111190802A CN 111190802 A CN111190802 A CN 111190802A CN 201911332483 A CN201911332483 A CN 201911332483A CN 111190802 A CN111190802 A CN 111190802A
Authority
CN
China
Prior art keywords
mapping table
protocol
fields
rule
configuration
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
CN201911332483.4A
Other languages
Chinese (zh)
Other versions
CN111190802B (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.)
Casco Signal Ltd
Original Assignee
Casco Signal 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 Casco Signal Ltd filed Critical Casco Signal Ltd
Priority to CN201911332483.4A priority Critical patent/CN111190802B/en
Publication of CN111190802A publication Critical patent/CN111190802A/en
Application granted granted Critical
Publication of CN111190802B publication Critical patent/CN111190802B/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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3414Workload generation, e.g. scripts, playback

Landscapes

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

Abstract

The invention relates to a method for automatically generating performance test configuration, which comprises the following steps: step 1, preprocessing configuration data; and 2, automatically generating the target file. Compared with the prior art, the invention has the following advantages: the problem of upper and lower computer configuration file mismatching that manual configuration leads to has been solved, the development flexibility ratio and the free space of software have been improved simultaneously.

Description

Method for automatically generating performance test configuration
Technical Field
The invention relates to embedded computer software testing, in particular to a method for automatically generating performance test configuration.
Background
Generally, the traditional embedded computer software test is based on various general instruments or special equipment, various instruments and equipment are adopted to monitor the operation of a tested system, the development period of the test receipt is long, the cost is high, the reusability is poor, the test receipt cannot be reused in other embedded systems, and the test method adopts a mainstream upper computer mode and a mainstream lower computer mode; the upper computer is responsible for peripheral input information simulation, and the lower computer, namely the object to be tested, is responsible for processing received information and feedback.
The upper computer test platform runs on a windows operating system and has the main functions of managing an automatic test tool and testing activity management; the tested object of the lower computer is composed of an industrial personal computer, a mainboard, a display and the like, the real-time operating system is operated to perform data communication receiving between the tested equipment and the real-time host computer through IO and buses provided by the network, the RS232, the RS422, the RS483, the CAN and other systems, the configuration file and the script of the testing host computer are analyzed and executed, real-time communication is performed, and data are controlled or collected.
The test activities comprise test data preparation, test environment construction, test execution and test result analysis; in the aspect of embedded software testing, joint debugging of upper and lower computers is a time-consuming and labor-consuming work, configuration files of the upper and lower computers are not matched due to the fact that most debugging is not smooth, and more fatal, the problem that the configuration files of the upper and lower computers are not matched is aggravated by adopting manual configuration, so that the problem that the configuration of the upper and lower computers is not matched needs to be solved urgently, the joint debugging cost is reduced, the testing efficiency is improved, the research and development testing is promoted, the progress of projects is guaranteed, and meanwhile high-quality delivery is guaranteed.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provide a method for automatically generating performance test configuration, which solves the problem of unmatched configuration files of an upper computer and a lower computer caused by manual configuration.
The purpose of the invention can be realized by the following technical scheme:
a method of automatically generating a performance test configuration, the method comprising the steps of:
step 1, preprocessing configuration data;
and 2, automatically generating the target file.
Preferably, the step 1 specifically comprises the following steps:
step 1.1, inputting a source configuration file;
and step 1.2, scanning all fields in all files, and creating a mapping table according to the file content.
Preferably, the mapping table in step 1.2 specifically includes an index mapping table, a key field mapping table, an equipment protocol mapping table, and a protocol rule mapping table.
Preferably, the specific content of the created index mapping table includes:
firstly, extracting information dispersed in a plurality of source configuration files into a plurality of tables by adopting a database technology;
secondly, selecting a main key and an external key according to an index rule during protocol configuration;
and finally, creating a data relation table, and uniquely indexing the mapping relation of the multiple tables to the target value through the data relation table.
Preferably, the specific content of creating the key field mapping table includes:
and scanning all fields of the lower computer configuration file and the target source file, checking whether the fields are mixed in case and case, and if so, keeping the original field format and adding the original field format into a field mapping table.
Preferably, the specific content of creating the device protocol mapping table includes:
the protocol itself has set configuration rule constraints, the constraints are converted into functions to realize, fields needing to be processed in the protocol are gathered together through creating an index table in the processing process, and the fields are processed according to the protocol rule functions when being read.
Preferably, the specific content of the protocol rule mapping table includes: and converting the manually appointed rules in the configuration files of the upper computer and the lower computer into functions for realization.
Preferably, the specific content of step 2 includes the following steps:
step 2.1, scanning all fields of the target file, checking whether the fields are in a key field mapping table, and if the fields exist in the key field mapping table, adopting values stored in the mapping table to carry out replacement operation; if not, continuing to execute downwards;
step 2.2, checking whether the field exists in the protocol mapping table of the equipment, if so, processing according to the protocol rule, and if not, continuing to process downwards;
step 2.3, caching the information into tempOut;
step 2.4, scanning protocol rule mapping table fields, searching corresponding data index information from the data relation table according to the convention rule, and processing according to the convention rule; and finally processing the output data according to the self-defined rule.
Compared with the prior art, the invention has the following advantages:
1. the method comprises the steps of extracting source file information into a data table, creating a data relation table and creating a special processing information mapping table, wherein the tables have the function of quick indexing in application and have strong expandability, the information filtering function is also realized when a main key and an external key are selected, the influence of fields with small influence factors in the tables is reduced, the fields without the main key and the external key can be arbitrarily increased and deleted without influencing other tables and the whole software, the coupling is reduced, and the development flexibility and the free space of the software are improved.
2. The three-layer data relation design greatly enhances the expandability of the configuration tool and enhances the expandability of the configuration tool. When a new protocol is added into the configuration file of the lower computer, a user can put the new protocol into the configuration generation tool to automatically generate a target file matched with the source file only by giving the source file format of the protocol, and other protocols are not affected, so that the expandability of the configuration tool and the stability of a software architecture are enhanced.
Drawings
FIG. 1 is a diagram of the data generation process of the present invention;
FIG. 2 is a data relationship diagram of the present invention;
FIG. 3 is a flow chart of the present invention for creating a key field mapping table;
FIG. 4 is a flow chart of the present invention for checking whether a field is in a field mapping table;
FIG. 5 is a flow chart of the present invention for checking whether a field is in the protocol rule mapping table.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
The principle of the invention is as follows:
the invention relates to a method for automatically generating performance test configuration, which solves the problem of unmatched configuration files of an upper computer and a lower computer through software design and comprises the following steps:
step 1, preprocessing configuration data;
and 2, generating a target file.
The step 1 specifically comprises the following steps: step 1.1, inputting a source configuration file; and step 1.2, scanning all fields in all files, and creating a mapping table according to the file content.
The mapping table in step 1.2 specifically includes an index mapping table, a key field mapping table, an equipment protocol mapping table, and a protocol rule mapping table.
The specific contents of the created index mapping table include: the information dispersed in the multiple source configuration files is extracted into multiple tables by adopting a database technology, the main key and the external key are selected according to an index rule during protocol configuration, in addition, a data relation table is created, and the mapping relation of the multiple tables can be uniquely indexed to a target value through the data relation table.
The specific content of creating the key field mapping table comprises: irregular names such as case and case mixed use exist in the source configuration file, and the target file needs to be consistent with the source file, so that the original field format needs to be reserved in the processing process, and the original field is output and adopted after the processing.
The specific content of creating the device protocol mapping table comprises: the protocol itself has certain configuration rule constraints, the constraints need to be converted into functions for realization, an index table needs to be created in the processing process, fields needing to be processed in the protocol are gathered, and when the fields are read, the fields are processed according to the protocol rule functions.
The specific contents of the protocol rule mapping table are as follows: the configuration files of the upper computer and the lower computer are provided with a plurality of artificial agreement rules, the artificial agreement rules are converted into functions to be realized, and the functions are processed according to artificial constraint functions when the artificial agreement rules are required to be processed.
The specific content of the step 2 comprises the following steps:
step 2.1, scanning all fields of the target file, checking whether the fields are in a key field mapping table, and if the fields exist in the key field mapping table, adopting values stored in the mapping table to carry out replacement operation; if not, continuing to execute downwards;
step 2.2, checking whether the field exists in the protocol mapping table of the equipment, if so, processing according to the protocol rule, and if not, continuing to process downwards;
step 2.3, caching the information into tempOut;
step 2.4, scanning protocol rule mapping table fields, searching corresponding data index information from the data relation table according to the convention rule, and processing according to the convention rule; and finally processing the output data according to the self-defined rule.
As shown in fig. 1, the present embodiment is used to complete the work of automatically generating the upper computer configuration file matched with the given lower computer configuration file, and the main work of the present embodiment is divided into two parts, the first part is the configuration data preprocessing work, and the second part is the target file generating work. The configuration data preprocessing operation steps are as follows:
1. reading the lower computer configuration file, scanning all fields in all files, creating a data table according to the file content, and creating a lower computer information storage table as shown in fig. 2;
2. through analysis of the configuration process, selecting a primary key and a foreign key, creating a data relation table, as shown in fig. 2, and creating a device protocol mapping table;
3. as shown in fig. 3, the scanning lower computer configures all fields of the file and the target source file, checks whether the fields are mixed in case and case, and if so, adds a field mapping table;
generating an object file:
4. as shown in fig. 4, scanning all fields of the target file, checking whether the field is in the field mapping table, and if yes, performing a replacement operation using the value stored in the mapping table; if not, continuing to execute downwards;
5. as shown in fig. 5, checking whether the field exists in the protocol rule mapping table, if so, processing according to the protocol rule, and if not, continuing to process downwards;
6. caching the information into tempOut;
7. scanning the fields of the agreed rule mapping table of the upper computer and the lower computer, searching corresponding data index information from the data relation table according to the agreed rule, and processing according to the agreed rule; and finally processing the output data according to the self-defined rule.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for automatically generating a performance test configuration, the method comprising the steps of:
step 1, preprocessing configuration data;
and 2, automatically generating the target file.
2. The method for automatically generating a performance test configuration according to claim 1, wherein the step 1 specifically comprises the following steps:
step 1.1, inputting a source configuration file;
and step 1.2, scanning all fields in all files, and creating a mapping table according to the file content.
3. The method according to claim 2, wherein the mapping table in step 1.2 specifically includes an index mapping table, a key field mapping table, a device protocol mapping table, and a protocol rule mapping table.
4. The method of claim 3, wherein the specific contents of the index mapping table creation include:
firstly, extracting information dispersed in a plurality of source configuration files into a plurality of tables by adopting a database technology;
secondly, selecting a main key and an external key according to an index rule during protocol configuration;
and finally, creating a data relation table, and uniquely indexing the mapping relation of the multiple tables to the target value through the data relation table.
5. The method of claim 3, wherein the creating the key field mapping table specifically comprises:
and scanning all fields of the lower computer configuration file and the target source file, checking whether the fields are mixed in case and case, and if so, keeping the original field format and adding the original field format into a field mapping table.
6. The method of claim 3, wherein the creating of the device protocol mapping table specifically comprises:
the protocol itself has set configuration rule constraints, the constraints are converted into functions to realize, fields needing to be processed in the protocol are gathered together through creating an index table in the processing process, and the fields are processed according to the protocol rule functions when being read.
7. The method of claim 3, wherein the creating of the specific contents of the protocol rule mapping table comprises: and converting the manually appointed rules in the configuration files of the upper computer and the lower computer into functions for realization.
8. The method of claim 1, wherein the step 2 comprises the following steps:
step 2.1, scanning all fields of the target file, checking whether the fields are in a key field mapping table, and if the fields exist in the key field mapping table, adopting values stored in the mapping table to carry out replacement operation; if not, continuing to execute downwards;
step 2.2, checking whether the field exists in the protocol mapping table of the equipment, if so, processing according to the protocol rule, and if not, continuing to process downwards;
step 2.3, caching the information into tempOut;
step 2.4, scanning protocol rule mapping table fields, searching corresponding data index information from the data relation table according to the convention rule, and processing according to the convention rule; and finally processing the output data according to the self-defined rule.
CN201911332483.4A 2019-12-22 2019-12-22 Method for automatically generating performance test configuration Active CN111190802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911332483.4A CN111190802B (en) 2019-12-22 2019-12-22 Method for automatically generating performance test configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911332483.4A CN111190802B (en) 2019-12-22 2019-12-22 Method for automatically generating performance test configuration

Publications (2)

Publication Number Publication Date
CN111190802A true CN111190802A (en) 2020-05-22
CN111190802B CN111190802B (en) 2022-09-30

Family

ID=70709251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911332483.4A Active CN111190802B (en) 2019-12-22 2019-12-22 Method for automatically generating performance test configuration

Country Status (1)

Country Link
CN (1) CN111190802B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7653847B1 (en) * 2005-05-05 2010-01-26 Seagate Technology Llc Methods and structure for field flawscan in a dynamically mapped mass storage device
CN105262644A (en) * 2015-11-03 2016-01-20 株洲南车时代电气股份有限公司 General test system based on protocol configuration and method
CN105512042A (en) * 2015-12-22 2016-04-20 广东金赋信息科技有限公司 Automatic generation method and device for testing data of database and testing system
CN105912469A (en) * 2016-04-11 2016-08-31 卡斯柯信号有限公司 Automatic detection method of testing scripts for rail transit vehicle-mounted controller software
CN109558525A (en) * 2018-12-12 2019-04-02 北京锐安科技有限公司 A kind of generation method of test data set, device, equipment and storage medium
CN109901888A (en) * 2019-02-01 2019-06-18 卡斯柯信号有限公司 A kind of design method of configuration file Auto-Generation Tool

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7653847B1 (en) * 2005-05-05 2010-01-26 Seagate Technology Llc Methods and structure for field flawscan in a dynamically mapped mass storage device
CN105262644A (en) * 2015-11-03 2016-01-20 株洲南车时代电气股份有限公司 General test system based on protocol configuration and method
CN105512042A (en) * 2015-12-22 2016-04-20 广东金赋信息科技有限公司 Automatic generation method and device for testing data of database and testing system
CN105912469A (en) * 2016-04-11 2016-08-31 卡斯柯信号有限公司 Automatic detection method of testing scripts for rail transit vehicle-mounted controller software
CN109558525A (en) * 2018-12-12 2019-04-02 北京锐安科技有限公司 A kind of generation method of test data set, device, equipment and storage medium
CN109901888A (en) * 2019-02-01 2019-06-18 卡斯柯信号有限公司 A kind of design method of configuration file Auto-Generation Tool

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SNEŽANA P.等: "Orthogonal Array and Virtualization as a Method for Configuration Testing Improvement", 《2009 FIRST IEEE EASTERN EUROPEAN CONFERENCE ON THE ENGINEERING OF COMPUTER BASED SYSTEMS》 *
乔艳茹 等: "基于Robot框架的自动化测试平台设计与实现", 《铁路计算机应用》 *

Also Published As

Publication number Publication date
CN111190802B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
CN102693183B (en) Method and system for realizing automatic software testing
CN109739855B (en) Method and system for realizing data sheet splicing and automatically training machine learning model
US20140006085A1 (en) System and method for visualizing trace of costs across a graph of financial allocation rules
US11681685B1 (en) System for uploading information into a metadata repository
CN103092761A (en) Method and device of recognizing and checking modifying code blocks based on difference information file
CN111158656B (en) Test code generation method and device based on fruit tree method
US20140101097A1 (en) Template based database analyzer
WO2022267310A1 (en) Auxiliary processing method and device for software development, storage medium and program product
WO2021068692A1 (en) Method, apparatus and device for workflow migration, and computer-readable storage medium
US8296723B2 (en) Configurable unified modeling language building blocks
CN114270313A (en) Computer-implemented method, computer program and physical computing environment
JP2003114813A (en) Analysis server, program analysis network system and program analysis method
CN110889013A (en) Data association method, device, server and storage medium based on XML
CN111190802B (en) Method for automatically generating performance test configuration
CN109616215B (en) Medical data extraction method, device, storage medium and electronic equipment
Rashid et al. Visual requirement specification in end-user participation
CN113986380A (en) Data processing method, device and system, electronic equipment and storage medium
CN106874014A (en) The three layer identification code generation methods based on model and framework
JP4683535B2 (en) Job net management system
CN117311675B (en) Service configuration method and device related to distributed system and electronic equipment
US20100145747A1 (en) Automated enterprise architecture assessment
Saito Digital TwinCity: a holistic approach towards comparative analysis of business processes
CN114004553B (en) System, server and client for generating plans in visual mode
WO2024009496A1 (en) Construction management device and construction management method
Onnasch et al. Break it down! a Practitioners’ software tool for human factors task analysis and human error identification

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