CN105718617A - Bus structural body reverse automatic modeling method for automatic tests of Matlab - Google Patents
Bus structural body reverse automatic modeling method for automatic tests of Matlab Download PDFInfo
- Publication number
- CN105718617A CN105718617A CN201410733779.8A CN201410733779A CN105718617A CN 105718617 A CN105718617 A CN 105718617A CN 201410733779 A CN201410733779 A CN 201410733779A CN 105718617 A CN105718617 A CN 105718617A
- Authority
- CN
- China
- Prior art keywords
- bus structure
- input
- layer
- automatic
- model
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 27
- 238000000034 method Methods 0.000 title claims abstract description 13
- 238000005538 encapsulation Methods 0.000 claims 1
- 238000012795 verification Methods 0.000 description 4
- 238000004088 simulation Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Landscapes
- Tests Of Electronic Circuits (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明属于航空发动机控制律模型自动测试领域,提供一种用于Matlab自动测试的Bus结构体反向自动建模方法。包括:1)自动采集EXCEL文件中的测试用例数据;2)自动读入被测模型,查找被测模型中所有的输入与输出端,辨析哪些输入输出端包含BUS结构体,哪些输入输出端不包含BUS结构体;3)针对包含BUS结构体的输入输出端,读入其包含的BUS结构体,采用多叉树前序遍历算法,层层解析每个Bus结构体的个数与名称,同时记录每个BUS结构体中叶子节点的路径与名称存放在缓存数组中;4)根据缓存数组中的路径与名称,从根节点开始,层层反向自动建模,直到所有的叶子结点。
The invention belongs to the field of automatic testing of aero-engine control law models, and provides a reverse automatic modeling method for a Bus structure used in Matlab automatic testing. Including: 1) Automatically collect test case data in EXCEL files; 2) Automatically read in the model under test, find all input and output terminals in the model under test, and identify which input and output terminals contain BUS structures and which input and output terminals do not Contains the BUS structure; 3) For the input and output terminals containing the BUS structure, read the BUS structure contained in it, and use the multi-fork tree preorder traversal algorithm to analyze the number and name of each Bus structure layer by layer, and at the same time Record the path and name of the leaf nodes in each BUS structure and store them in the cache array; 4) According to the path and name in the cache array, start from the root node and automatically model in reverse layer by layer until all leaf nodes.
Description
技术领域: Technical field:
本发明属于航空发动机控制律模型自动测试领域。 The invention belongs to the field of automatic testing of aeroengine control law models.
背景技术: Background technique:
目前,基于Matlab的模型自动测试应用越来越多,模型自动仿真测试在V流程开发验证中起到了非常重要的作用,任何开发(包括模型开发)过程,只要有人的介入,都必然存在各种各样的错误,因此,仿真与测试的作用非常重要,起到了最后把关的作用,V&V是指Validation和Verification,首先要正确的做事,然后验证是否做了正确的事情。 At present, there are more and more automatic model testing applications based on Matlab. Model automatic simulation testing plays a very important role in the development and verification of the V process. Any development (including model development) process, as long as someone intervenes, there must be various All kinds of mistakes, therefore, the role of simulation and testing is very important, and it plays the role of the final check. V&V refers to Validation and Verification. First, we must do things correctly, and then verify whether we have done the right thing.
在模型自动测试与验证过程中,非常重要的一环就是需要生成被测Harness模型,由于模型本身各种各样,如何解析所有的模型,然后自动生成被测模型是非常重要的。在顶层模型和中间各层的模型中都必然用到Bus结构体,因此,解析模型就会遇到对Bus结构体的解析,由于Bus结构体也是复杂多变、千差万别的。而且最为重要的是Matlab市面上所有的版本对含有Bus结构体的识别不是很好,在生成被测模型Harness的时候,无法自动解析、生成包含Bus结构体的输入端和输出端信号,只能通过修改模型,去掉Bus结构体,或者对Bus结构体简化后才可以生成Harness模型。因此,对与Bus结构体的解析与反向自动建模的技术关系着自动测试的成败。如果解决了对所有Bus结构体的解析与反向自动建模技术,那么模型自动测试才会真正得到应用。 In the process of model automatic testing and verification, a very important part is to generate the tested Harness model. Since the models themselves are various, how to analyze all the models and then automatically generate the tested model is very important. Both the top-level model and the models in the middle layers must use the Bus structure. Therefore, the analytical model will encounter the analysis of the Bus structure, because the Bus structure is also complex and varied. And the most important thing is that all versions of Matlab on the market are not very good at identifying the Bus structure. When generating the tested model Harness, it cannot automatically analyze and generate the input and output signals containing the Bus structure. By modifying the model, removing the Bus structure, or simplifying the Bus structure, the Harness model can be generated. Therefore, the technology of analysis and reverse automatic modeling of the Bus structure is related to the success or failure of automatic testing. If the analysis and reverse automatic modeling technology for all Bus structures is solved, then the model automatic testing will be really applied.
发明内容: Invention content:
发明目的:本发明提供一种用于Matlab自动测试的Bus结构体反向自动建模方法。 Purpose of the invention: the present invention provides a kind of Bus structure reverse automatic modeling method that is used for Matlab automatic test.
技术方案: Technical solutions:
一种用于Matlab自动测试的Bus结构体反向自动建模方法。包括: A reverse automatic modeling method of Bus structure for Matlab automatic testing. include:
1)自动采集EXCEL文件中的测试用例数据; 1) Automatically collect test case data in EXCEL files;
2)自动读入被测模型,查找被测模型中所有的输入与输出端,辨析哪些输入输出端包含BUS结构体,哪些输入输出端不包含BUS结构体; 2) Automatically read the model under test, find all the input and output terminals in the model under test, and distinguish which input and output terminals contain BUS structures and which input and output terminals do not contain BUS structures;
3)针对包含BUS结构体的输入输出端,读入其包含的BUS结构体,采用多叉树前序遍历算法,层层解析每个Bus结构体的个数与名称,同时记录每个BUS结构体中叶子节点的路径与名称存放在缓存数组中; 3) For the input and output terminals containing the BUS structure, read the BUS structure contained in it, use the multi-fork tree preorder traversal algorithm, analyze the number and name of each Bus structure layer by layer, and record each BUS structure at the same time The path and name of the leaf nodes in the body are stored in the cache array;
4)根据缓存数组中的路径与名称,从根节点开始,层层反向自动建模,直到所有的叶子结点; 4) According to the path and name in the cache array, starting from the root node, reverse automatic modeling layer by layer, until all the leaf nodes;
5)封装自动反向建模后的模型,输出为可以在Matlab环境下自动测试的Harness模型。 5) Encapsulate the model after automatic reverse modeling, and output it as a Harness model that can be automatically tested in the Matlab environment.
有益效果: Beneficial effect:
采用本发明后,可以全自动识别各种复杂的Bus结构体,通过大量的测试和验证,可以完全正确的按照Bus结构体层级结构的反向自动建立模型,并且连线关系正确,编译通过,满足自动测试的一切要求。解放了人力,解决了在使用matlab工具进行测试时必须人工建立被测Harness模型的缺陷。 After adopting the present invention, various complex Bus structures can be fully automatically identified. Through a large number of tests and verifications, the model can be completely and automatically established according to the reverse of the Bus structure hierarchy, and the connection relationship is correct, and the compilation is passed. Meet all the requirements of automatic testing. The manpower is liberated, and the defect that the Harness model to be tested must be manually established when using the matlab tool for testing is solved.
附图说明 Description of drawings
图1为本发明方法流程图。 Fig. 1 is a flow chart of the method of the present invention.
具体实施方式 detailed description
一种用于Matlab自动测试的Bus结构体反向自动建模方法。如图1所示,包括: A reverse automatic modeling method of Bus structure for Matlab automatic testing. As shown in Figure 1, including:
1)测试用例读入:自动采集EXCEL文件中的测试用例数据; 1) Test case reading: automatically collect test case data in EXCEL files;
2)模型读入:自动读入被测模型,查找被测模型中所有的输入与输出端,辨析哪些输入输出端包含BUS结构体,哪些输入输出端不包含BUS结构体; 2) Model reading: automatically read in the model under test, search for all input and output terminals in the model under test, and identify which input and output terminals contain BUS structures and which input and output terminals do not contain BUS structures;
3)遍历解析BUS结构体:针对包含BUS结构体的输入输出端,读入其包含的BUS结构体,采用多叉树前序遍历算法,层层解析每个Bus结构体的个数与名称,同时记录每个BUS结构体中叶子节点的路径与名称存放在缓存数组中; 3) Traversing and analyzing the BUS structure: For the input and output terminals containing the BUS structure, read in the BUS structure contained in it, and use the multi-fork tree preorder traversal algorithm to analyze the number and name of each Bus structure layer by layer, At the same time, record the path and name of the leaf nodes in each BUS structure and store them in the cache array;
4)自动反向建模:根据缓存数组中的路径与名称,从根节点开始,层层反向自动建模,直到所有的叶子结点; 4) Automatic reverse modeling: According to the path and name in the cache array, starting from the root node, reverse automatic modeling layer by layer until all leaf nodes;
5)自动封装Harness模型:封装自动反向建模后的模型,自动设置所有输入与输出端的相关属性,最终输出为可以在Matlab环境下自动测试的Harness模型。 5) Automatically encapsulate the Harness model: encapsulate the model after the automatic reverse modeling, automatically set the relevant attributes of all input and output terminals, and finally output the Harness model that can be automatically tested in the Matlab environment.
本发明方法的软件部分的编译流程如下: The compilation process of the software part of the inventive method is as follows:
。 .
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410733779.8A CN105718617B (en) | 2014-12-05 | 2014-12-05 | The reversed method for automatic modeling of Bus structural body tested automatically for Matlab |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410733779.8A CN105718617B (en) | 2014-12-05 | 2014-12-05 | The reversed method for automatic modeling of Bus structural body tested automatically for Matlab |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105718617A true CN105718617A (en) | 2016-06-29 |
CN105718617B CN105718617B (en) | 2019-03-29 |
Family
ID=56143942
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410733779.8A Active CN105718617B (en) | 2014-12-05 | 2014-12-05 | The reversed method for automatic modeling of Bus structural body tested automatically for Matlab |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105718617B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107451064A (en) * | 2017-08-16 | 2017-12-08 | 北京车和家信息技术有限责任公司 | Automatic test approach, device, computer equipment and readable storage medium storing program for executing |
CN109614329A (en) * | 2018-12-06 | 2019-04-12 | 中国航空工业集团公司洛阳电光设备研究所 | A kind of software test case auxiliary design method based on Interface Control File |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070282556A1 (en) * | 2004-03-05 | 2007-12-06 | Hani Achkar | Testing of Embedded Systems |
CN102508692A (en) * | 2011-09-28 | 2012-06-20 | 天津大学 | Simulation and verification method of control method of near space aircraft |
CN103970591A (en) * | 2014-05-28 | 2014-08-06 | 山东大学 | Matlab-ATP (Matrix Laboratory-Array Transform Processor) integrated automation calling method |
CN104155596A (en) * | 2014-08-12 | 2014-11-19 | 北京航空航天大学 | Artificial circuit fault diagnosis system based on random forest |
-
2014
- 2014-12-05 CN CN201410733779.8A patent/CN105718617B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070282556A1 (en) * | 2004-03-05 | 2007-12-06 | Hani Achkar | Testing of Embedded Systems |
CN102508692A (en) * | 2011-09-28 | 2012-06-20 | 天津大学 | Simulation and verification method of control method of near space aircraft |
CN103970591A (en) * | 2014-05-28 | 2014-08-06 | 山东大学 | Matlab-ATP (Matrix Laboratory-Array Transform Processor) integrated automation calling method |
CN104155596A (en) * | 2014-08-12 | 2014-11-19 | 北京航空航天大学 | Artificial circuit fault diagnosis system based on random forest |
Non-Patent Citations (4)
Title |
---|
叶海明 等: "自动化测试设备模型化研究", 《电子测量技术》 * |
戴阳 等: "基于Simulink和C++混合编程的测试系统建模技术研究", 《计算机测量与控制》 * |
汪金波: "SmartSAR SWA-基于Artop的汽车电子软件架构工具的设计与实现", 《中国优秀硕士学位论文全文数据库-信息科技辑》 * |
肖丹: "基于模型驱动的嵌入式软件自动化测试平台实现", 《中国优秀硕士学位论文全文数据库-信息科技辑》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107451064A (en) * | 2017-08-16 | 2017-12-08 | 北京车和家信息技术有限责任公司 | Automatic test approach, device, computer equipment and readable storage medium storing program for executing |
CN107451064B (en) * | 2017-08-16 | 2020-08-18 | 北京车和家信息技术有限责任公司 | Automatic test method, device, computer equipment and readable storage medium |
CN109614329A (en) * | 2018-12-06 | 2019-04-12 | 中国航空工业集团公司洛阳电光设备研究所 | A kind of software test case auxiliary design method based on Interface Control File |
Also Published As
Publication number | Publication date |
---|---|
CN105718617B (en) | 2019-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109271326B (en) | Cloud database testing method and device, equipment and storage medium thereof | |
CN105955889B (en) | A kind of graphical interfaces automated testing method | |
US9804946B2 (en) | System and method for providing automated computer language translation and verification | |
US8819642B2 (en) | Method and system for generating and processing black box test cases | |
CN103425584B (en) | Based on the large-scale application regression test information processing method of Java bytecode | |
CN109871326A (en) | Method and device for recording a script | |
FR3044126A1 (en) | SYSTEM AND METHOD FOR AUTOMATICALLY CREATING TEST CASES BASED ON REQUIREMENTS RELATING TO CRITICAL SOFTWARE | |
CN108572911A (en) | Automate safety detecting method, device, electronic equipment and readable storage medium storing program for executing | |
CN114817015A (en) | Test case coverage rate statistical method and device, electronic equipment and storage medium | |
US20200074040A1 (en) | Hierarchical expression coverage clustering for design verification | |
CN113821200A (en) | Drag-and-drop modeling methods, systems, storage media and terminals for big data tasks | |
CN102968515B (en) | For calculating the method and apparatus of the checking coverage rate of integrated circuit model | |
CN105183641B (en) | The data consistency verification method and system of a kind of kernel module | |
CN104572443A (en) | Mobile terminal testing method and device | |
CN104063307A (en) | Software testing method and system | |
CN105718617A (en) | Bus structural body reverse automatic modeling method for automatic tests of Matlab | |
CN108287788A (en) | A kind of use-case step matching method based on test case, system | |
CN106845228A (en) | A kind of method and apparatus for detecting rogue program | |
CN118838818A (en) | Vehicle testing method and device, electronic equipment and readable medium | |
CN110309064B (en) | Unit test method, device, equipment and storage medium based on log record | |
CN103593285B (en) | A kind of image class software unit testing method based on judging to identify | |
US9495489B2 (en) | Correlation of test results and test coverage for an electronic device design | |
CN108363567B (en) | Database-based verification platform exciter automatic generation method | |
CN110618932A (en) | Input box testing method based on Web automatic test and readable storage medium | |
CN102799521B (en) | Hierarchical timed automata flattening algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: No. 104, Liangxi Road, Binhu District, Wuxi City, Jiangsu Province Patentee after: AECC AERO ENGINE CONTROL SYSTEM INSTITUTE Address before: 214063 Jiangsu city of Wuxi province Liangxi Road No. 792 Patentee before: AVIC AVIATION MOTOR CONTROL SYSTEM INSTITUTE |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20250228 Address after: No. 33 Liu Lu Road, Hudai Town, Binhu District, Wuxi City, Jiangsu Province, China 214161 Patentee after: Wuxi Dynamic Control Technology Co.,Ltd. Country or region after: China Address before: No. 104 Liangxi Road, Binhu District, Wuxi City, Jiangsu Province 214063 Patentee before: AECC AERO ENGINE CONTROL SYSTEM INSTITUTE Country or region before: China |