CN111813387A - Testing device, construction method thereof and automatic testing method - Google Patents

Testing device, construction method thereof and automatic testing method Download PDF

Info

Publication number
CN111813387A
CN111813387A CN202010660170.8A CN202010660170A CN111813387A CN 111813387 A CN111813387 A CN 111813387A CN 202010660170 A CN202010660170 A CN 202010660170A CN 111813387 A CN111813387 A CN 111813387A
Authority
CN
China
Prior art keywords
test
python
diagnosis
robotframe
library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010660170.8A
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.)
Zebra Network Technology Co Ltd
Original Assignee
Zebra Network 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 Zebra Network Technology Co Ltd filed Critical Zebra Network Technology Co Ltd
Priority to CN202010660170.8A priority Critical patent/CN111813387A/en
Publication of CN111813387A publication Critical patent/CN111813387A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to a testing device, a construction method thereof and an automatic testing method, wherein the testing device comprises: the Robotframe test framework is used for executing the test cases and generating test reports; the Robotframe test framework can call the diagnosis interface to send a diagnosis request and obtain/verify a diagnosis return when executing a test case based on a python diagnosis interface; based on a python test library, the Robotframe test framework can call the test library to verify the response of the vehicle machine function when executing the test case. The testing device of the embodiment of the invention realizes the automation of the diagnostic test defined by the UDS diagnostic protocol and greatly improves the testing efficiency.

Description

Testing device, construction method thereof and automatic testing method
Technical Field
The invention relates to the technical field of computers, in particular to a testing device, a construction method thereof and an automatic testing method.
Background
The UDS diagnostic protocol is a diagnostic protocol commonly used in automobiles, and has many defined diagnostic application functions, many diagnostic application functions that need to be implemented by general test items, and a huge test workload, so that implementing automated testing becomes an urgent problem to be solved.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a testing apparatus, which implements automation of a diagnostic test defined by a UDS diagnostic protocol, and greatly improves testing efficiency.
Another object of the present invention is to provide a method for constructing the above test apparatus.
Still another object of the present invention is to provide an automatic testing method using the above testing apparatus.
In order to achieve the purpose, the invention adopts the following technical scheme:
a test apparatus according to an embodiment of the first aspect of the present invention includes:
the Robotframe test framework is used for executing the test cases and generating test reports;
the Robotframe test framework can call the diagnosis interface to send a diagnosis request and obtain/verify a diagnosis return when executing a test case based on a python diagnosis interface;
based on a python test library, the Robotframe test framework can call the test library to verify the response of the vehicle machine function when executing the test case.
Preferably, the python-based diagnostic interface is a diagnostic interface obtained from python-based secondary development of PCAN-ISO-tp.dll.
Preferably, the python-based test library comprises an adb module for realizing automatic execution of system shell commands.
Preferably, the python-based test library further comprises uiautomation, PowerControl, and audioRecognize modules.
The method for constructing the test device according to the embodiment of the second aspect of the invention comprises the following steps:
integrating a python-based diagnostic interface and a python-based test library into a Robotframe test framework, constructed as the test device,
the Robotframework test framework is used for executing a test case and generating a test report, and when the test case is executed, the test framework can call a diagnosis interface to send a diagnosis request and obtain/verify a diagnosis return, and can call the test library to verify the response of the vehicle machine function.
Preferably, the python-based diagnostic interface is obtained by python-based secondary development of PCAN-ISO-TP.dll.
Preferably, the python-based test library comprises an adb module for realizing automatic execution of system shell commands.
Preferably, the python-based test library further comprises uiautomation, PowerControl, and audioRecognize modules.
An automated testing method according to an embodiment of the third aspect of the invention comprises:
step S1, the Robotframe test framework starts to execute the test case;
step S2, the Robotframe test framework calls a diagnosis interface based on python to send a diagnosis request and obtain/verify a diagnosis return;
step S3, the Robotframe test framework calls a python-based test library to verify the response of the car machine function;
and step S4, repeating the operation of the step S2 and the operation of the step S3 for n times, wherein n is a natural number which is more than or equal to 0, and generating a test report until the test case is completely executed.
Preferably, the python-based diagnostic interface is a diagnostic interface obtained from python-based secondary development of PCAN-ISO-tp.dll.
Preferably, the python-based test library comprises an adb module for realizing automatic execution of system shell commands.
Preferably, the python-based test library further comprises uiautomation, PowerControl, and audioRecognize modules.
The invention has the beneficial effects that:
the test device comprises a Robotframe test framework, a diagnosis interface based on python and a test library based on python, the Robotframe test framework can call the diagnosis interface and the test library to verify the response of the car machine function when a test case is executed, the test device realizes the automation of the diagnosis test defined by the UDS diagnosis protocol, greatly improves the test efficiency, further saves the human resources and improves the working efficiency.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood and to implement them in accordance with the contents of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings.
Drawings
FIG. 1 is a schematic diagram of an automated test using a test apparatus according to an embodiment of the present invention;
FIG. 2 is a flowchart of an automated testing method according to an embodiment of 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.
It will be appreciated that as used herein, the term module may refer to or include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and/or memory that executes one or more software or firmware programs, a combinational logic circuit, and/or other suitable hardware components that provide the described functionality, or may be part of such hardware components.
It will be appreciated that in embodiments of the invention, the processor may be a microprocessor, a digital signal processor, a microcontroller, the like, and/or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, the like, and/or any combination thereof.
As shown in fig. 1, the test apparatus according to the embodiment of the present invention includes a robotframe test framework, a python-based diagnostic interface, and a python-based test library, where the robotframe test framework is configured to execute a test case and generate a test report, the robotframe test framework can call the python-based diagnostic interface to send a diagnostic request and obtain/verify a diagnostic return when executing the test case, and the robotframe test framework can call the test library to verify a response of a car machine function when executing the test case.
The Robotframe test framework is a python-based extensible keyword-driven automated test framework, is open-source, and can conveniently integrate a python-based test library and a python-based diagnostic interface.
Specifically, when the test device of the embodiment of the invention is used for automatic test, the robotframe test framework executes test cases one by one after the test is started, automatically calls the corresponding modules, calls the python-based diagnostic interface to send a diagnostic request and obtain/verify a diagnostic return, calls the test modules in the python-based test library to verify the response of the vehicle machine function, and if all the modules are normally executed and have no error, the whole test case is executed completely, otherwise the test case is failed to be executed, and after all the test cases are tested, the robotframe test framework automatically generates a test report.
The test device comprises a Robotframe test framework, a diagnosis interface based on python and a test library based on python, the Robotframe test framework can call the diagnosis interface and the test library to verify the response of the car machine function when a test case is executed, the test device realizes the automation of the diagnosis test defined by the UDS diagnosis protocol, greatly improves the test efficiency, further saves the human resources and improves the working efficiency.
Preferably, the python-based diagnostic interface is a diagnostic interface obtained from python-based secondary development of PCAN-ISO-tp.dll.
Specifically, a diagnosis interface which is based on python and can realize the UDS diagnosis protocol can be obtained by carrying out secondary development on a PCAN-ISO-TP.dll interface library provided by an open source tool by python, and the diagnosis interface can send a diagnosis request and obtain a diagnosis return or send the diagnosis request and verify a desired diagnosis return. Therefore, the diagnosis interface based on python not only can realize the UDS diagnosis protocol, but also can be obtained conveniently.
Preferably, the python-based test library comprises an adb module for realizing automatic execution of system shell commands.
Preferably, the python-based test library further comprises uiautomation, PowerControl, and audioRecognize modules.
Specifically, python has a mature extension library for the adb module, the uiautomation module, the PowerControl module and the audioRecognize module, so that the integration of the various modules can be conveniently realized. From this, be convenient for realize carrying out automated test to the response of car machine function.
The method for constructing the testing device of the embodiment of the invention comprises the following steps:
the diagnosis interface based on python and the test library based on python are integrated in a Robotframe test framework to be constructed into a test device,
the Robotframe test framework is used for executing a test case and generating a test report, and when the test case is executed, the test framework can call a diagnosis interface to send a diagnosis request and obtain/verify a diagnosis return, and can call a test library to verify the response of the vehicle machine function.
Specifically, the robotframe is a testing framework developed based on python, and a python-based diagnostic interface and a python-based testing library can be conveniently integrated to form a testing device. Therefore, the diagnosis interface based on python and the test library based on python are integrated in the Robotframe test frame structure to be built into the test device, the test device building method provided by the embodiment of the invention can be conveniently built into the test device, and the test device realizes the automation of the diagnosis test defined by the UDS diagnosis protocol, so that the test efficiency is greatly improved, the human resources are saved, and the working efficiency is improved.
Preferably, the python-based diagnostic interface is obtained by python-based secondary development of PCAN-ISO-TP.dll.
Preferably, the python-based test library comprises an adb module for realizing automatic execution of system shell commands.
Preferably, the python-based test library further comprises uiautomation, PowerControl, and audioRecognize modules.
As shown in fig. 2, the automated testing method implemented by the testing apparatus according to the embodiment of the present invention includes:
in step S1, the Robotframe test framework begins executing test cases.
In step S2, the Robotframe test framework calls a python-based diagnostic interface to send a diagnostic request and get/validate a diagnostic return.
Preferably, the python-based diagnostic interface is a diagnostic interface obtained from python-based secondary development of PCAN-ISO-tp.dll.
Step S3, the Robotframe test framework calls a python-based test library to verify the response of the car machine function.
Preferably, the python-based test library comprises an adb module for realizing automatic execution of system shell commands.
Preferably, the python-based test library further comprises uiautomation, PowerControl, and audioRecognize modules.
And step S4, repeating the operation of the step S2 and the operation of the step S3 for n times, wherein n is a natural number which is more than or equal to 0, and generating a test report until the test case is completely executed.
The diagnosis interface based on python is called by the Robotframe test framework to send the diagnosis request and obtain/verify the diagnosis return, and the test library based on python is called to verify the response of the vehicle machine function.
The automated testing method of the present invention is described below by way of specific embodiments.
The automatic testing method for the diagnosis multimedia playing in the Routine Control service in the UDS diagnosis protocol comprises the following steps: a. the method comprises the steps that a Robotframe test framework starts to execute a test case, a diagnosis interface obtained by secondary development based on python of PCAN-ISO-TP.dll is called to send a diagnosis request and verify a diagnosis return, and the diagnosis request is used for requesting a vehicle-mounted computer to set multimedia to be in a playing state; b. the method comprises the following steps that a robot testing framework calls a uiautomation module in a python-based testing library to verify that a multimedia display interface of the vehicle-mounted computer is in a playing state; c. calling an audioRecognize module to verify that the multimedia sound of the vehicle-mounted computer is correctly played; d. calling a diagnosis interface obtained by python-based secondary development of PCAN-ISO-TP.dll to send a diagnosis request and verify a diagnosis return, wherein the diagnosis request is used for requesting a vehicle-mounted computer to set multimedia in a pause state; e. calling a uiautomation module in a python-based test library to verify that a multimedia display interface of the vehicle-mounted computer is in a play pause state; f. and calling an audioRecognize module to verify that the vehicle-mounted computer has no multimedia sound for broadcasting, completing the execution of the test case and generating a test report.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A test apparatus, comprising:
the Robotframe test framework is used for executing the test cases and generating test reports;
the Robotframe test framework can call the diagnosis interface to send a diagnosis request and obtain/verify a diagnosis return when executing a test case based on a python diagnosis interface;
based on a python test library, the Robotframe test framework can call the test library to verify the response of the vehicle machine function when executing the test case.
2. The test device of claim 1,
the python-based diagnostic interface is obtained by python-based secondary development of PCAN-ISO-TP.
3. The test device of claim 1,
the python-based test library comprises an adb module for realizing automatic execution of system shell commands.
4. The test device of claim 3,
the python-based test library also includes uiautomation, PowerControl, and an audioRecognize module.
5. A method of constructing a test apparatus, comprising:
integrating a python-based diagnostic interface and a python-based test library into a Robotframe test framework, constructed as the test device,
the Robotframework test framework is used for executing a test case and generating a test report, and when the test case is executed, the test framework can call a diagnosis interface to send a diagnosis request and obtain/verify a diagnosis return, and can call the test library to verify the response of the vehicle machine function.
6. The method of claim 5, wherein the python-based diagnostic interface is obtained by python-based secondary development of PCAN-ISO-TP.dll.
7. The method of claim 5, wherein the python-based test library comprises an adb module that implements automated execution of system shell commands.
8. The method of claim 7, wherein the python-based test library further comprises uiautomation, PowerControl, and audioRecognize modules.
9. An automated testing method, comprising:
step S1, the Robotframe test framework starts to execute the test case;
step S2, the Robotframe test framework calls a diagnosis interface based on python to send a diagnosis request and obtain/verify a diagnosis return;
step S3, the Robotframe test framework calls a python-based test library to verify the response of the car machine function;
and step S4, repeating the operation of the step S2 and the operation of the step S3 for n times, wherein n is a natural number which is more than or equal to 0, and generating a test report until the test case is completely executed.
10. The automated testing method of claim 9,
the python-based diagnostic interface is obtained by python-based secondary development of PCAN-ISO-TP.
11. The automated testing method of claim 9,
the python-based test library comprises an adb module for realizing automatic execution of system shell commands.
12. The automated testing method of claim 11,
the python-based test library also includes uiautomation, PowerControl, and an audioRecognize module.
CN202010660170.8A 2020-07-10 2020-07-10 Testing device, construction method thereof and automatic testing method Pending CN111813387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010660170.8A CN111813387A (en) 2020-07-10 2020-07-10 Testing device, construction method thereof and automatic testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010660170.8A CN111813387A (en) 2020-07-10 2020-07-10 Testing device, construction method thereof and automatic testing method

Publications (1)

Publication Number Publication Date
CN111813387A true CN111813387A (en) 2020-10-23

Family

ID=72843329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010660170.8A Pending CN111813387A (en) 2020-07-10 2020-07-10 Testing device, construction method thereof and automatic testing method

Country Status (1)

Country Link
CN (1) CN111813387A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535591A (en) * 2021-09-13 2021-10-22 季华实验室 Robot program verification method, device, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007070414A2 (en) * 2005-12-12 2007-06-21 Archivas, Inc. Automated software testing framework
CN106339318A (en) * 2016-08-29 2017-01-18 上海斐讯数据通信技术有限公司 Automatic testing device and establishment method thereof
CN110825647A (en) * 2019-11-14 2020-02-21 广东华晟数据固态存储有限公司 Test method for automatically testing logical equipment interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007070414A2 (en) * 2005-12-12 2007-06-21 Archivas, Inc. Automated software testing framework
CN106339318A (en) * 2016-08-29 2017-01-18 上海斐讯数据通信技术有限公司 Automatic testing device and establishment method thereof
CN110825647A (en) * 2019-11-14 2020-02-21 广东华晟数据固态存储有限公司 Test method for automatically testing logical equipment interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄得女;刘敬彪;嵇斌;: "基于Robot测试框架的关键字驱动的研究与应用", 计算机系统应用, no. 04, pages 162 - 165 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535591A (en) * 2021-09-13 2021-10-22 季华实验室 Robot program verification method, device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN101382915B (en) Software debugging system and debugging method
CN108319549B (en) Test system and test method
CN104483959A (en) Fault simulation and test system
US11061665B2 (en) System for online cascaded loading firmware based on boundary scan and method thereof
CN113434355B (en) Module verification method, UVM verification platform, electronic device and storage medium
CN110659198A (en) Application program test case execution method and device and software test system
CN112362360A (en) Vehicle component testing method, device and system, test board card and storage medium
CN111782530B (en) Remote debugging method, device, system, electronic equipment and storage medium
CN111813387A (en) Testing device, construction method thereof and automatic testing method
CN117131834A (en) Chip design reorganization method, electronic equipment and medium
CN114706768A (en) I3C bus verification method and verification system
CN115202949B (en) Chip signal monitoring device and method, computer equipment and storage medium
CN110988662A (en) Signal debugging system and method based on FPGA prototype verification development board
CN115048308A (en) Chip simulation method and system based on automobile software test
CN111770074B (en) Data path test message generation device and method
CN111240972B (en) Model verification device based on source code
CN113947047A (en) Interface connection method for verifying design to be tested and related equipment
CN114328045A (en) I2C debugging method, system and device for BMC and computer readable storage medium
CN112699648A (en) Data processing method and device
CN111400872A (en) Model-based avionics system virtual integration test method and system
TWI699101B (en) System and method for online cascaded loading firmware based on boundary scan
CN113760235B (en) BLE development and debugging system and method
CN110794282B (en) dSPACE-HIL system based method and apparatus for communicating with electronic devices
CN214042112U (en) Upgrade test system
CN113608935B (en) Method, system, equipment and medium for testing network card

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