CN103207338B - A kind of automotive electronics test platform based on Python script - Google Patents

A kind of automotive electronics test platform based on Python script Download PDF

Info

Publication number
CN103207338B
CN103207338B CN201310148811.1A CN201310148811A CN103207338B CN 103207338 B CN103207338 B CN 103207338B CN 201310148811 A CN201310148811 A CN 201310148811A CN 103207338 B CN103207338 B CN 103207338B
Authority
CN
China
Prior art keywords
test
script
key word
testing apparatus
python
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310148811.1A
Other languages
Chinese (zh)
Other versions
CN103207338A (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.)
Shanghai nan'en Automobile Technology Co.,Ltd.
Original Assignee
SHANGHAI NAEN AUTOMOBILE TECHNOLOGY 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 SHANGHAI NAEN AUTOMOBILE TECHNOLOGY Co Ltd filed Critical SHANGHAI NAEN AUTOMOBILE TECHNOLOGY Co Ltd
Priority to CN201310148811.1A priority Critical patent/CN103207338B/en
Publication of CN103207338A publication Critical patent/CN103207338A/en
Application granted granted Critical
Publication of CN103207338B publication Critical patent/CN103207338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Tests Of Electronic Circuits (AREA)

Abstract

The invention discloses a kind of automotive electronics test platform based on Python script, this test platform all adopts Python script to control from top to bottom.Having than general test platform more good characteristic, is a kind of test platform scheme of very applicable automobile electronics.

Description

A kind of automotive electronics test platform based on Python script
Technical field
The present invention relates to a kind of Electronic Testing Technology, be specifically related to a kind of automotive electronics measuring technology.
Background technology
Automobile electronics have input, output signal miscellaneous feature, and the software logic of product is complicated, and to real-time, reliability requirement is very high.
Automotive electronics test platform is the software and hardware system ensemble of automobile electronics being carried out to integration test, for the automatic regression test of product development stage, thus finds product software and hardware defect.Automotive electronics test platform takes on key player in product development process, is significant.
Outstanding automotive electronics test platform at least needs to possess following features
1. can facilitate, control multiple external test facility quickly, as various digital quantity, analog acquisition equipment, radio frequency signal transceiver, the simulated-bus equipment such as CAN, LIN, MOST, FLEXRAY, and oscillograph, power supply, AWG (Arbitrary Waveform Generator) etc.
2. can development and testing use-case quickly and easily, carry out automatically performing of test case, and can test report be produced.
3. there is the feature of software modularity, can integrated new testing apparatus drive easily.
4. system has very high reliability.
Traditional automotive electronics test platform generally uses the language such as LABVIEW, C++, VB, C# as the software language of automotive electronics test platform, that carries out the development& testing script of Test driver writes language, then when compiling is run by function software, is responsible for execution.But due to above these language exploitation itself, debug more difficult, so generally expand difficulty based on the test platform of these language, test case exploitation is very inconvenient, performs and needs compiling, inefficiency.
Summary of the invention
The present invention is directed to the problem existing for existing automotive electronics test platform, and a kind of automotive electronics test platform based on Python script is provided.This platform can overcome the shortcoming existing for prior art, realizes efficient, test efficiently automobile electronics.
In order to achieve the above object, the present invention adopts following technical scheme:
Based on an automotive electronics test platform for Python script, described test platform adopts Python script to control.
In preferred embodiment of the present invention, described test platform comprises:
Some testing apparatus driver modules, the DLL that described testing apparatus driver module uses related libraries in Python to encapsulate product to be tested drives or utilizes VISA to carry out equipment control, thus provides the hardware driving interface based on Python for upper strata test frame;
Test library, described test library is RoboFramework test library, and the testing apparatus driver of the hardware driving interface based on Python provided by testing apparatus driver module carries out step encapsulation, and being formed can the test key word of tested framework identification;
Test script, described test script drives based on the key word formed in test library and sets up formation;
Test frame, described test frame is the RobotFramework test frame based on python, described test frame resolves test script content, go out in test library to encapsulate the test key word of formation according to key word content recognition in the test script parsed, then the testing apparatus driver corresponding according to this test key word carrys out drived control product to be tested; Described test frame testing results script, completes test operation according to the content-control of test script product to be tested.
Further, the whole test process of described test frame record, and form journal file, test result record is formed the report of XML format.
According to the automotive electronics test platform that such scheme is formed, there is following useful effect:
1. the encapsulation of test products driving is very simple, utilizes the ctype storehouse of python can to encapsulate the DLL that general device provides, if VISA equipment, the pyvisa storehouse that python has simply can realize equipment and control.
2. test frame is also the RobotFramework based on python, and it is simple that this framework has introduction, system stability, the feature that real-time is good.
3. the exploitation of test script and simple, compare with traditional test platform, efficiency improves more than at least 30%, and this is because it drives based on key word, namely without the need to understanding any programming language, only need based on the key word formed in test frame.
4. the form of development and testing script is various, can use TXT file layout, also can use EXCEL formatted file, and test script is without the need to compiling, and exploitation, execution efficiency is high.
5. system can produce very exquisite test report, test macro daily record.Test report adopts XML format, can produce multiple format, as html, pdf, word etc. by XLST.Compare general test report, more flexibly, easy to understand.
Accompanying drawing explanation
The present invention is further illustrated below in conjunction with the drawings and specific embodiments.
Fig. 1 is principle of the invention block diagram.
Embodiment
The technological means realized to make the present invention, creation characteristic, reaching object and effect is easy to understand, below in conjunction with concrete diagram, setting forth the present invention further.
See Fig. 1, it is depicted as the automotive electronics test platform based on Python script provided by the invention.As seen from the figure, this test platform 100 mainly comprises these four parts of testing apparatus driver module 101, test library 102, test frame 103 and test script 104.
Testing apparatus driver module 101 in platform provides the driver of corresponding product to be tested 200, and its DLL using related libraries in Python to encapsulate product to be tested drives; If VISA equipment, utilize VISA to carry out equipment control, thus provide the hardware driving interface based on Python for upper strata test frame.
In the specific implementation, this module utilizes the storehouses such as pyVisa, pySerial, ctyp of Python, for the driver that the exploitation of different test products (equipment) 200 is corresponding.Generally need exploitation with device Driver for automobile electronics:
1.CANCaseXL drives: use ctype to encapsulate the driving of the DLL that CANCaseXL provides, thus control CAN, the bus that the automotive electronics such as LIN are conventional;
2. AWG (Arbitrary Waveform Generator) drives: use pyVisa to carry out the access of AWG (Arbitrary Waveform Generator);
3. programmable power supply drives: use pyVisa to carry out control programmable power supply;
4. analog quantity, number connect test board: use ctype to encapsulate dll form and drive;
5. wireless signal generator and radiofrequency signal resolver: use pyVisa to control;
6. relay matrix board: use ctype to encapsulate dll form and drive;
7. multimeter able to programme: use pyVisa to control
8. universal serial port equipment: use pySerial to carry out serial ports control.
Test library 102 in platform is RoboFramework test library, for the test frame on upper strata, is formed and tests key word accordingly.It connects with testing apparatus driver module data, and the testing apparatus driver of the hardware driving interface based on Python provided by testing apparatus driver module carries out step encapsulation, and being formed can the test key word of tested framework identification.
This test key word is realized by Python.
Test frame 103 in platform adopts RobotFramework test frame, because RobotFramework is the test frame of increasing income, specifically can reduce this framework, make it more be adapted to the test of automobile electronics.
This test frame 103 will provide running environment for test script 104, and its scheduling and controlling test script runs, and form corresponding test products test operation according to the content of test script; Simultaneously test frame 103 controls concrete test products by the testing apparatus program of encapsulation in test library 102, thus carries out encouraging product to be measured, and the test operation formed according to test script completes test and the measurement of product to be measured.
For all processes in test run, this test frame 103 will carry out record, form journal file, and test result will be recorded the report forming XML format.This report can use XLST to carry out the form of the forms such as format conversion formation html, pdf, word.
Test script 104 in platform drives based on the key word formed in test library and develops formation.Its method adopting key word to drive, can provide the form of multiple test script such as TXT, Excel.This test script is without the need to compiling, and exploitation, execution efficiency is high.The step of test is defined in test script 104, by condition, test data, variable etc., and the statement in test script can be resolved by tested framework 103, and run by framework.
The hardware driving interface data that product 200 to be tested and testing apparatus driver module 101 provide, when carrying out automobile electronics test, connects by the test platform formed thus.
Testing apparatus driver module 101 forms corresponding testing apparatus driver for the exploitation of required product 200 to be measured, thus provides the hardware driving interface based on Python for upper strata test frame.
Now, the testing apparatus driver of the hardware driving interface based on Python that testing apparatus driver module provides by RoboFramework test library carries out step encapsulation, and being formed can the test key word of tested framework identification.
Meanwhile, the test script developed formation and meet test request (as the step of test, by condition, test data, variable etc.) is driven based on the key word formed in test library.
After completing test script, scheduling and controlling test script runs by test frame, completes test to product to be measured.Concrete, test frame resolves the content of the test script transferred, thus parse corresponding key word, go out in test library to encapsulate the test key word of formation according to key word content recognition in the test script parsed, then the testing apparatus driver corresponding according to this test key word carrys out drived control product to be tested.This test frame reruns test script, forms corresponding test operation, utilize these test operations to control product to be tested and complete corresponding test process according to the content of test script.
Whole platform all adopts Python script to control from bottom to up, and having than general test platform more good characteristic, is a kind of test platform scheme of very applicable automobile electronics.
More than show and describe ultimate principle of the present invention, principal character and advantage of the present invention.The technician of the industry should understand; the present invention is not restricted to the described embodiments; what describe in above-described embodiment and instructions just illustrates principle of the present invention; without departing from the spirit and scope of the present invention; the present invention also has various changes and modifications, and these changes and improvements all fall in the claimed scope of the invention.Application claims protection domain is defined by appending claims and equivalent thereof.

Claims (2)

1. based on an automotive electronics test platform for Python script, it is characterized in that, described test platform adopts Python script to control; Described test platform comprises:
Some testing apparatus driver modules, the DLL that described testing apparatus driver module uses related libraries in Python to encapsulate product to be tested drives or utilizes VISA to carry out equipment control, thus provides the hardware driving interface based on Python for upper strata test frame;
Test library, described test library is RoboFramework test library, and the testing apparatus driver of the hardware driving interface based on Python provided by testing apparatus driver module carries out step encapsulation, and being formed can the test key word of tested framework identification;
Test script, described test script drives based on the key word formed in test library and sets up formation, and the step of the corresponding test of definition, by condition, test data, variable;
Test frame, described test frame is the RobotFramework test frame based on python, described test frame resolves test script content, go out in test library to encapsulate the test key word of formation according to key word content recognition in the test script parsed, then the testing apparatus driver corresponding according to this test key word carrys out drived control product to be tested; Described test frame testing results script, forms corresponding test operation according to the content of test script, recycles this test operation and controls product to be tested and complete test operation;
The hardware driving interface data that product to be tested and testing apparatus driver module provide, when carrying out automobile electronics test, first connects by this test platform;
Testing apparatus driver module forms corresponding testing apparatus driver for required product development to be measured, thus provides the hardware driving interface based on Python for upper strata test frame;
Now, the testing apparatus driver of the hardware driving interface based on Python that testing apparatus driver module provides by RoboFramework test library carries out step encapsulation, forms the test key word of tested framework identification;
Meanwhile, the test script developed and formed and meet test request is driven based on the key word formed in test library;
After completing test script, scheduling and controlling test script runs by test frame, test is completed to product to be measured, first test frame resolves the content of the test script transferred, thus parse corresponding key word, go out in test library to encapsulate the test key word of formation according to key word content recognition in the test script parsed, then the testing apparatus driver corresponding according to this test key word carrys out drived control product to be tested; This test frame reruns test script, forms corresponding test operation, utilize these test operations to control product to be tested and complete corresponding test process according to the content of test script.
2. a kind of automotive electronics test platform based on Python script according to claim 1, is characterized in that, the whole test process of described test frame record, and forms journal file, test result record is formed the report of XML format.
CN201310148811.1A 2013-04-25 2013-04-25 A kind of automotive electronics test platform based on Python script Active CN103207338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310148811.1A CN103207338B (en) 2013-04-25 2013-04-25 A kind of automotive electronics test platform based on Python script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310148811.1A CN103207338B (en) 2013-04-25 2013-04-25 A kind of automotive electronics test platform based on Python script

Publications (2)

Publication Number Publication Date
CN103207338A CN103207338A (en) 2013-07-17
CN103207338B true CN103207338B (en) 2016-03-30

Family

ID=48754621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310148811.1A Active CN103207338B (en) 2013-04-25 2013-04-25 A kind of automotive electronics test platform based on Python script

Country Status (1)

Country Link
CN (1) CN103207338B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105758648B (en) * 2014-12-19 2018-08-28 北京宝沃汽车有限公司 The test method and device of vehicle performance
CN104615541B (en) * 2015-02-10 2018-01-23 上海创景信息科技有限公司 Emulation testing modeling and method based on flow chart
CN107992428A (en) * 2018-01-03 2018-05-04 成都能通科技有限公司 The automatic test platform that a kind of Python is realized
CN109115463A (en) * 2018-06-28 2019-01-01 昂纳信息技术(深圳)有限公司 A kind of image intensifer method for testing pressure and system
CN111175632A (en) * 2018-11-13 2020-05-19 南京南瑞继保电气有限公司 Single board testing system based on python
CN109885902B (en) * 2019-01-29 2020-09-22 华南理工大学 Python language-based EDA (electronic design automation) development platform system and using method thereof
CN111773692A (en) * 2020-07-02 2020-10-16 北京思明启创科技有限公司 MicroPython-based hardware driving method, equipment and storage medium
CN111858336B (en) * 2020-07-20 2024-03-15 深圳市筑泰防务智能科技有限公司 Automatic software testing method and system
CN112433955A (en) * 2020-12-30 2021-03-02 伟创力电子技术(苏州)有限公司 Python-based general software test system
CN114487553A (en) * 2022-01-29 2022-05-13 重庆长安汽车股份有限公司 Vehicle-mounted entertainment system monomer dark current testing method based on python development

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5065090A (en) * 1988-07-13 1991-11-12 Cross-Check Technology, Inc. Method for testing integrated circuits having a grid-based, "cross-check" te
CN101551778A (en) * 2009-05-08 2009-10-07 刘志方 Test method supporting Python extension
CN102902540A (en) * 2012-09-25 2013-01-30 浙江创佳数字技术有限公司 Embedded automation development method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5065090A (en) * 1988-07-13 1991-11-12 Cross-Check Technology, Inc. Method for testing integrated circuits having a grid-based, "cross-check" te
CN101551778A (en) * 2009-05-08 2009-10-07 刘志方 Test method supporting Python extension
CN102902540A (en) * 2012-09-25 2013-01-30 浙江创佳数字技术有限公司 Embedded automation development method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
python脚本在整车控制系统HIL测试中的应用;吴超等;《上海汽车》;20120229(第2期);第37-40页 *
Softcar测试软件包与Python语言的集成;邹轩等;《微计算机信息》;20061231;第22卷(第10-2期);第296-298页 *
面向嵌入式通信设备的Ch自动化测试框架设计;毛玉书等;《计算机系统应用》;20111231;第20卷(第2期);第31-34页 *

Also Published As

Publication number Publication date
CN103207338A (en) 2013-07-17

Similar Documents

Publication Publication Date Title
CN103207338B (en) A kind of automotive electronics test platform based on Python script
CN102749604B (en) Testing apparatus automatic calibrator, calibration system and calibration steps
CN103308846B (en) Method and device for detecting functional performance of integrated chip based on model identification
CN103631255B (en) For the Fault Insertion Equipment of avionics system Gernral Check-up
CN101501517A (en) Test module with blocks of universal and specific resources
CN102402628A (en) Method and system for generating systems-on-a-chip (SoC) verification platform
CN101509948A (en) Automobile electronic test system and test method thereof
CN202794491U (en) Test equipment automatic calibration instrument and calibration system
CN105070321B (en) The quick test circuit and method of memory device
CN102346234B (en) Functional test method of I2S (Inter-IC Sound Bus) interface
CN102788951B (en) Automatic test equipment (ATE) test result judging method and ATE test method
CN108958225B (en) Nuclear power plant safety level DCS platform integration testing device
CN104461812A (en) Method for constructing UVM verification component by utilizing existing Verilog BFM
CN105182212A (en) Circuit board carry-in repair detection and identification system and method
CN105092992A (en) Method and device for conducting vector-controlled test on ATE (automatic test equipment)
CN101373493A (en) SOC chip logical verification method special for multimedia storage gateway
CN101377793A (en) SOC chip logic verification method for server safe monitoring management
CN102565683B (en) Generation and verification method of test vector
CN103713627A (en) Function node test system
CN107728045A (en) FPGA method of testings based on Ultra Flex
CN202815170U (en) Chip test system
CN104714787A (en) Method and device for generating files of MDF format
CN105740579A (en) Building method for connecting UVM verification platform
CN104835435B (en) The method of testing and test device of a kind of Liquid Crystal Module
CN105446844A (en) Read-only register verification test platform and verification method based on UVM (Universal Verification Methodology Manual)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: Room 101, building 44, No. 258, shenzhuan Road, Songjiang hi tech park, Caohejing Development Zone, Songjiang District, Shanghai, 201612

Patentee after: Shanghai nan'en Automobile Technology Co.,Ltd.

Address before: Room 302, building 13, No. 518, Xinzhuan Road, Songjiang high tech park, Caohejing Development Zone, Songjiang District, Shanghai, 201612

Patentee before: SHANGHAI NAEN AUTOMOTIVE TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: An automobile electronic test platform based on Python script

Effective date of registration: 20211217

Granted publication date: 20160330

Pledgee: Industrial Bank Co.,Ltd. Shanghai Branch

Pledgor: Shanghai nan'en Automobile Technology Co.,Ltd.

Registration number: Y2021310000135

PE01 Entry into force of the registration of the contract for pledge of patent right