CN117093491B - Automatic test method for simple programming of vehicle-mounted T-BOX - Google Patents

Automatic test method for simple programming of vehicle-mounted T-BOX Download PDF

Info

Publication number
CN117093491B
CN117093491B CN202311073470.6A CN202311073470A CN117093491B CN 117093491 B CN117093491 B CN 117093491B CN 202311073470 A CN202311073470 A CN 202311073470A CN 117093491 B CN117093491 B CN 117093491B
Authority
CN
China
Prior art keywords
test
case file
test case
execution
result
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
CN202311073470.6A
Other languages
Chinese (zh)
Other versions
CN117093491A (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.)
Yukuai Chuangling Intelligent Technology Nanjing Co ltd
Original Assignee
Yukuai Chuangling Intelligent Technology Nanjing 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 Yukuai Chuangling Intelligent Technology Nanjing Co ltd filed Critical Yukuai Chuangling Intelligent Technology Nanjing Co ltd
Priority to CN202311073470.6A priority Critical patent/CN117093491B/en
Publication of CN117093491A publication Critical patent/CN117093491A/en
Application granted granted Critical
Publication of CN117093491B publication Critical patent/CN117093491B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

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

Abstract

The invention provides an automatic test method for simple programming of an on-board T-BOX, which comprises the following steps: s1: building a T-BOX test environment; s2: importing a test case file; s3: carrying out executable analysis on the test case file; s4: executing a test case file; s5: analyzing the execution result of the test case file; s6: generating a test report; according to the automatic test method for the vehicle-mounted T-BOX simple programming, through building a T-BOX test environment, each test case file is imported into an automatic test system, the test case file is subjected to executable analysis, the test case file is executed, the execution result of the test case file is analyzed, and a test report is generated; the programming threshold of the T-BOX automatic test script is reduced, and different test case files are imported into the same automatic test system, so that the test of different test scenes is achieved, and the test efficiency and coverage rate are improved.

Description

Automatic test method for simple programming of vehicle-mounted T-BOX
Technical Field
The invention relates to the field of Internet of vehicles, in particular to an automatic test method for simple programming of a vehicle-mounted T-BOX.
Background
Along with the development of automobile industry and communication technology, the technology of the internet of vehicles has become the direction of future development of automobiles, and the Telematics BOX, a remote information processing terminal (T-BOX for short) is used as a core part of the internet of vehicles system, so that the stability is particularly important; T-BOX requires extensive testing to verify its stability; in the prior art, the test method for the T-BOX has the following defects:
1. in the T-BOX test process, some test cases are required to be executed by compiling automatic test scripts, the compiling threshold of the automatic test scripts is high, the difficulty of the upper hand is high, and the requirements on testers are high;
2. the T-BOX test system is built, a plurality of devices needing linkage are involved, the existing automatic test script can only execute the test aiming at a single scene, the automatic program needs to be rewritten in other scenes, the test is too limited, and the efficiency is low;
disclosure of Invention
The invention aims to solve the defects in the prior art, and provides an automatic test method for simple programming of an on-board T-BOX.
In order to achieve the above purpose, the invention adopts the following technical scheme:
an automated test method for simple programming of an on-board T-BOX, comprising the steps of:
s1: building a T-BOX test environment;
the engineer builds a test environment required by the vehicle-mounted T-BOX test;
the test environment comprises a hardware environment and a platform environment;
the hardware environment comprises a PC, a cloud platform, various controllers and the like:
the platform environment is an automatic test system and comprises a system initialization module, a use case file analysis module, a use case execution module, a result analysis module and a test report management module;
the system initialization module is used for detecting a test environment and importing test cases;
the use case file analysis module is used for analyzing the imported test use cases;
the case execution module sequentially executes the test cases according to the case step sequence;
the result analysis module is used for analyzing the execution result of the test case;
the test report management module is used for managing test reports;
the system initialization module detects a test environment built by an engineer, and prompts 'initialization is completed' if the built test environment is correct; if the built test environment is detected to be wrong, prompting an initialization failure, and after an engineer checks the error and modifies the error, detecting the built test environment again by the system initialization module until prompting the initialization completion;
s2: importing a test case file;
the engineer imports the test case file of the vehicle-mounted T-BOX into an automatic test system;
the test case file comprises a test step, test point control, test result assertion and overtime control detection;
each step in the testing steps comprises a corresponding step value, and the step value is a positive integer;
the test point control comprises specific test points in a test case file;
the test result assertion comprises expected results set for each test point;
the timeout control detection comprises a specified timeout duration of the test case file;
s3: carrying out executable analysis on the test case file;
selecting a specific controller to analyze the test case file;
the controller comprises a T-BOX controller, a power supply controller, a TSP controller, a CAN controller and the like;
the controller opens the test case file through the open function, reads and analyzes the content of the test case file, and extracts the step value, the specific test point, the expected result and the specified timeout duration of the test case file;
s4: executing a test case file;
the case execution module sequentially executes corresponding test steps in the test case file according to the step value descending order, and detects detection points contained in the case test file;
further, if there are a plurality of identical step values, the test steps with identical step values are executed in parallel;
when the test case file is executed, the case execution module records the execution time of the test case file through a duration function;
s5: analyzing the execution result of the test case file;
the execution result of the test case file is sent to a result analysis module through a send function;
the result analysis module analyzes the execution result of the test case file and judges whether the test case file passes or not, and the specific judging method is as follows:
s51: judging the execution result of the test point;
judging whether the execution result of each test point is consistent with the expected result or not through an assetequals function; if the execution result of the test point is inconsistent with the expected result, the test case file is not executed;
if the execution result of the test point is consistent with the expected result, the step S52 is entered;
s52: judging the execution time of the test case file;
comparing the execution time of the test case file with the specified timeout time through a compare function; if the execution time of the test case file exceeds the specified timeout time, the test case file fails;
if the execution time of the test case file does not exceed the specified timeout time, the test case file is executed;
s53: and (3) completing analysis;
after analysis is completed, sending the execution result of the test case file to a test report management module through a send function;
s6: generating a test report;
the test report management module generates a test case file execution report according to the test case file and the corresponding execution result;
the test report management module comprises a series of test case file execution reports;
generating each test case file execution report through the test report management module, and storing a series of test case file execution reports, so that a subsequent engineer can conveniently compare each test case file execution report, repeated execution of the same test case file is avoided, and the test efficiency is improved;
compared with the prior art, the invention has the beneficial effects that:
according to the automatic test method for the vehicle-mounted T-BOX simple programming, through building a T-BOX test environment, each test case file is imported into an automatic test system, the test case file is subjected to executable analysis, the test case file is executed, the execution result of the test case file is analyzed, and a test report is generated; the threshold for writing the T-BOX automatic test script is reduced, and the requirement on testers is low;
according to the invention, different test case files are imported into the same automatic test system, so that the test of different test scenes is achieved, the test efficiency and coverage rate are improved, the enterprise cost is reduced, the maintenance is flexible and simple, and the stability of the T-BOX system is ensured.
Drawings
FIG. 1 is a flow chart of the steps of an automated test method for simple programming of an on-board T-BOX of the present invention;
Detailed Description
For a further understanding of the objects, construction, features, and functions of the invention, reference should be made to the following detailed description of the preferred embodiments.
An automated test method for simple programming of an on-board T-BOX, comprising the steps of:
s1: building a T-BOX test environment;
the engineer builds a test environment required by the vehicle-mounted T-BOX test;
the test environment comprises a hardware environment and a platform environment;
the hardware environment comprises a PC, a cloud platform, various controllers and the like:
the concrete construction method is as follows:
the method comprises the steps that a T-BOX is connected with a PC through WIFI, the T-BOX is connected with CAN communication equipment through a CAN bus, the T-BOX is connected with a programmable power supply through a hard wire, the hard wire comprises a power supply anode, a power supply cathode and an IGN signal wire, the T-BOX is connected with a mobile phone through Bluetooth or WIFI, the T-BOX is connected with an IVI through USB, the T-BOX is connected with a platform through a cellular network, the PC is connected with the CAN communication equipment through USB, the PC is connected with the programmable power supply through a serial port, the PC is connected with the mobile phone through USB, the PC is connected with the IVI through USB, and the PC is connected with a cloud platform through an http interface, so that building is completed;
the platform environment is an automatic test system and comprises a system initialization module, a use case file analysis module, a use case execution module, a result analysis module and a test report management module;
the system initialization module is used for initializing an automatic test system, and is particularly used for detecting a test environment and importing test cases;
the use case file analysis module is used for analyzing the imported test use cases;
the case execution module sequentially executes the test cases according to the case step sequence;
the result analysis module is used for analyzing the execution result of the test case;
the test report management module is used for managing test reports;
the system initialization module detects a test environment built by an engineer, and prompts 'initialization is completed' if the built test environment is correct; if the built test environment is detected to be wrong, prompting an initialization failure, and after an engineer checks the error and modifies the error, detecting the built test environment again by the system initialization module until prompting the initialization completion;
s2: importing a test case file;
the engineer imports the test case file of the vehicle-mounted T-BOX into an automatic test system;
the test case file comprises a test step, test point control, test result assertion and overtime control detection;
each step in the testing steps comprises a corresponding step value, and the step value is a positive integer;
the test point control comprises specific test points in a test case file;
the test result assertion comprises expected results set for each test point;
the timeout control detection comprises a specified timeout duration of the test case file;
s3: carrying out executable analysis on the test case file;
selecting a specific controller to analyze the test case file;
the controller comprises a T-BOX controller, a power supply controller, a TSP controller, a CAN controller and the like;
the controller opens the test case file through the open function, reads and analyzes the content of the test case file, and extracts the step value, the specific test point, the expected result and the specified timeout duration of the test case file;
analyzing the test case file by selecting a specific controller, extracting the step value, specific test points and expected results in the test case file, the specified timeout duration of the test case file and the like, and preparing for executing the test file;
s4: executing a test case file;
the case execution module sequentially executes corresponding test steps in the test case file according to the step value descending order, and detects detection points contained in the case test file;
further, if there are a plurality of identical step values, the test steps with identical step values are executed in parallel;
when the test case file is executed, the case execution module records the execution time of the test case file through a duration function;
s5: analyzing the execution result of the test case file;
the execution result of the test case file is sent to a result analysis module through a send function;
the result analysis module analyzes the execution result of the test case file and judges whether the test case file passes or not, and the specific judging method is as follows:
s51: judging the execution result of the test point;
judging whether the execution result of each test point is consistent with the expected result or not through an assetequals function; if the execution result of the test point is inconsistent with the expected result, the test case file is not executed;
if the execution result of the test point is consistent with the expected result, the step S52 is entered;
s52: judging the execution time of the test case file;
comparing the execution time of the test case file with the specified timeout time through a compare function; if the execution time of the test case file exceeds the specified timeout time, the test case file fails;
if the execution time of the test case file does not exceed the specified timeout time, the test case file is executed;
s53: and (3) completing analysis;
after analysis is completed, sending the execution result of the test case file to a test report management module through a send function;
s6: generating a test report;
sending the test case file execution result to a test report management module through the send function, and generating a test case file execution report by the test report management module according to the test case file and the corresponding execution result;
the test report management module comprises a series of test case file execution reports;
generating each test case file execution report through the test report management module, and storing a series of test case file execution reports, so that a subsequent engineer can conveniently compare each test case file execution report, repeated execution of the same test case file is avoided, and the test efficiency is improved;
the invention has been described with respect to the above-described embodiments, however, the above-described embodiments are merely examples of practicing the invention. It should be noted that the disclosed embodiments do not limit the scope of the invention. On the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

Claims (6)

1. An automated test method for simple programming of an onboard T-BOX, characterized by: the method comprises the following steps:
s1: building a T-BOX test environment;
the engineer builds a test environment required by the vehicle-mounted T-BOX test;
the test environment comprises a hardware environment and a platform environment;
the hardware environment comprises a PC, a cloud platform and various controllers:
the platform environment is an automatic test system and comprises a system initialization module, a use case file analysis module, a use case execution module, a result analysis module and a test report management module;
the system initialization module is used for detecting a test environment and importing test cases;
the use case file analysis module is used for analyzing the imported test use cases;
the case execution module sequentially executes the test cases according to the case step sequence;
the result analysis module is used for analyzing the execution result of the test case;
the test report management module is used for managing test reports;
the system initialization module detects a test environment built by an engineer, and the step S2 is carried out after the test is completed;
s2: importing a test case file;
the engineer imports the test case file of the vehicle-mounted T-BOX into an automatic test system;
the test case file comprises a test step, test point control, test result assertion and overtime control detection;
each step in the testing steps comprises a corresponding step value, and the step value is a positive integer;
the test point control comprises specific test points in a test case file;
the test result assertion comprises expected results set for each test point;
the timeout control detection comprises a specified timeout duration of the test case file;
s3: carrying out executable analysis on the test case file;
selecting a specific controller to analyze the test case file;
the controller opens the test case file, reads and analyzes the content of the test case file, and extracts the step value, the specific test point, the expected result and the specified timeout period of the test case file;
s4: executing a test case file;
the case execution module sequentially executes corresponding test steps in the test case file according to the step value descending order, and detects detection points contained in the case test file;
when the test case file is executed, the case execution module records the execution time length of the test case file;
s5: analyzing the execution result of the test case file;
the execution result of the test case file is sent to a result analysis module;
the result analysis module analyzes the execution result of the test case file and sends the execution result of the test case file to the test report management module after the analysis is completed;
s6: generating a test report;
and the test report management module generates a test case file execution report according to the test case file and the corresponding execution result.
2. An automated test method for simple programming of an on-board T-BOX according to claim 1, wherein:
in step S1, a system initialization module detects a test environment built by an engineer, and if the built test environment is correct, the system initialization module prompts that the initialization is finished; if the built test environment is detected to be wrong, prompting an initialization failure, and after an engineer checks the error and modifies the error, detecting the built test environment again by the system initialization module until prompting the initialization completion.
3. An automated test method for simple programming of an on-board T-BOX according to claim 1, wherein:
in step S4, if there are a plurality of identical step values, the test steps of the step values being identical are executed in parallel.
4. An automated test method for simple programming of an on-board T-BOX according to claim 1, wherein:
in step S5, the specific analysis method includes the following sub-steps:
s51: judging the execution result of the test point;
judging whether the execution result of each test point is consistent with the expected result or not through an assetequals function; if the execution result of the test point is inconsistent with the expected result, the test case file is not executed;
if the execution result of the test point is consistent with the expected result, the step S52 is entered;
s52: judging the execution time of the test case file;
comparing the execution time of the test case file with the specified timeout time through a compare function; if the execution time of the test case file exceeds the specified timeout time, the test case file fails;
if the execution time of the test case file does not exceed the specified timeout time, the test case file is executed;
s53: the analysis is complete.
5. An automated test method for simple programming of an on-board T-BOX according to claim 1, wherein:
the controller comprises a T-BOX controller, a power supply controller, a TSP controller, a CAN controller, a mobile phone controller, an OTA controller and an IVI controller.
6. An automated test method for simple programming of an on-board T-BOX according to claim 1, wherein:
the test report management module includes a series of test case file execution reports.
CN202311073470.6A 2023-08-24 2023-08-24 Automatic test method for simple programming of vehicle-mounted T-BOX Active CN117093491B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311073470.6A CN117093491B (en) 2023-08-24 2023-08-24 Automatic test method for simple programming of vehicle-mounted T-BOX

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311073470.6A CN117093491B (en) 2023-08-24 2023-08-24 Automatic test method for simple programming of vehicle-mounted T-BOX

Publications (2)

Publication Number Publication Date
CN117093491A CN117093491A (en) 2023-11-21
CN117093491B true CN117093491B (en) 2024-04-16

Family

ID=88772941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311073470.6A Active CN117093491B (en) 2023-08-24 2023-08-24 Automatic test method for simple programming of vehicle-mounted T-BOX

Country Status (1)

Country Link
CN (1) CN117093491B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017053963A1 (en) * 2015-09-25 2017-03-30 Cedars-Sinal Medical Center A method effective to modulate expression of t-box protein 4 (tbx4) for reducing progression of lung fibrosis after a lung injury
CN206489226U (en) * 2016-12-16 2017-09-12 深圳市蓝希领地科技有限公司 Vehicle-mounted T BOX functional test stands
CN107562635A (en) * 2017-09-15 2018-01-09 西南电子技术研究所(中国电子科技集团公司第十研究所) Embedded software test accessory system
CN107704395A (en) * 2017-10-24 2018-02-16 武大吉奥信息技术有限公司 One kind is based on cloud platform automatic test implementation and system under Openstack
CN114153722A (en) * 2021-11-18 2022-03-08 南方电网数字电网研究院有限公司 System and method for testing functions based on data components
CN114416592A (en) * 2022-01-30 2022-04-29 重庆长安汽车股份有限公司 Automatic test script definition method, test system and method for vehicle-mounted terminal
CN114756465A (en) * 2022-04-18 2022-07-15 重庆长安汽车股份有限公司 Vehicle-mounted multimedia automatic test system and method
CN116224963A (en) * 2023-03-02 2023-06-06 重庆长安汽车股份有限公司 Automatic testing device of remote vehicle control system and construction method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8387021B2 (en) * 2008-09-26 2013-02-26 Microsoft Corporation Symbolic runtime checking of quantified contracts

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017053963A1 (en) * 2015-09-25 2017-03-30 Cedars-Sinal Medical Center A method effective to modulate expression of t-box protein 4 (tbx4) for reducing progression of lung fibrosis after a lung injury
CN206489226U (en) * 2016-12-16 2017-09-12 深圳市蓝希领地科技有限公司 Vehicle-mounted T BOX functional test stands
CN107562635A (en) * 2017-09-15 2018-01-09 西南电子技术研究所(中国电子科技集团公司第十研究所) Embedded software test accessory system
CN107704395A (en) * 2017-10-24 2018-02-16 武大吉奥信息技术有限公司 One kind is based on cloud platform automatic test implementation and system under Openstack
CN114153722A (en) * 2021-11-18 2022-03-08 南方电网数字电网研究院有限公司 System and method for testing functions based on data components
CN114416592A (en) * 2022-01-30 2022-04-29 重庆长安汽车股份有限公司 Automatic test script definition method, test system and method for vehicle-mounted terminal
CN114756465A (en) * 2022-04-18 2022-07-15 重庆长安汽车股份有限公司 Vehicle-mounted multimedia automatic test system and method
CN116224963A (en) * 2023-03-02 2023-06-06 重庆长安汽车股份有限公司 Automatic testing device of remote vehicle control system and construction method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Automatic extraction of assertions from execution traces of behavioural models;A. Danese 等;《2015 Design, Automation & Test in Europe Conference & Exhibition (DATE)》;20150423;67-72 *
软件测试技术在车载TBOX项目中的应用;王敬丽;《电脑知识与技术》;20210118;第16卷(第35期);69-70, 80 *

Also Published As

Publication number Publication date
CN117093491A (en) 2023-11-21

Similar Documents

Publication Publication Date Title
CN112596972A (en) Vehicle-mounted equipment testing method, device and system and computer equipment
CN108829608B (en) Simulator-based automatic test system and method for vehicle-mounted terminal equipment
CN110768863B (en) Scheme for simulating and testing AIOT equipment
CN104267715A (en) Vehicle-mounted electronic control unit LIN bus communication automatic testing device and system
CN113190454A (en) Real-vehicle test method and system for vehicle-mounted terminal software
CN111858336B (en) Automatic software testing method and system
CN117421217B (en) Automatic software function test method, system, terminal and medium
WO2021203604A1 (en) Update test method and apparatus for vehicle component, and computer device and storage medium
CN111026640A (en) Vehicle-mounted equipment testing method and system, mobile terminal and storage medium
CN113342643B (en) Automatic test method and system for vehicle FOTA function
CN113259409A (en) T-box simulation test system applied to scene test of Internet of vehicles
CN102707712A (en) Electronic equipment fault diagnosis method and system
CN117093491B (en) Automatic test method for simple programming of vehicle-mounted T-BOX
CN113064618B (en) System and method for simulating new energy vehicle conformance detection
CN115202388A (en) Control identification method, device, equipment and storage medium for unmanned aerial vehicle
CN211554929U (en) Human-computer interaction interface automatic identification system based on Android OS
CN116224963A (en) Automatic testing device of remote vehicle control system and construction method thereof
CN116800656B (en) CAN communication test method, system, device, electronic equipment and storage medium
CN114594754B (en) HIL automatic test method and system for Internet of vehicles controller
CN113672516B (en) Automatic testing method and system for virtual screen interconnection interface control
CN116340146A (en) Whole-vehicle OTA upgrading automatic test system and method
CN115981679A (en) Automobile controller writing method capable of editing burning process
CN115586019A (en) Automatic testing method, device, equipment and storage medium for vehicle
CN112860555A (en) Device and method for remote software upgrading, verifying and testing
CN108519939B (en) Module testing method, device and system

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