Automatic testing method and system for chip module

Through automated testing methods and systems, the problem of chip module testing relies on manual operations is solved, and the full process automation verification is realized, testing efficiency and accuracy are improved, and labor costs are reduced.

CN119088669APending Publication Date: 2024-12-06ZHEJIANG SINKERIOT TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410821839.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing chip module testing relies on manual operation, resulting in high cost and low efficiency, and cannot meet the efficient, accurate and stable testing needs.

Method used

Automatic testing methods and systems are adopted, including demand confirmation, use case acquisition, environment configuration, tool acquisition, automated testing and report generation, covering all test requirements through automated processes, improving testing efficiency and saving labor costs.

Benefits of technology

It realizes the full process automation verification of chip modules, improves testing efficiency, ensures the accuracy and reliability of test results, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088669A_ABST
    Figure CN119088669A_ABST
Patent Text Reader

Abstract

The invention provides an automatic test method and system for a chip module, and relates to the technical field of chip test.The method comprises the steps that the test requirement of a to-be-tested chip module is confirmed; obtaining a calibration comprehensive test case according to a test requirement; performing test environment configuration on the to-be-tested chip module; automatically acquiring a test tool according to a test requirement; executing an automatic test on the calibration comprehensive test case by using a test tool; and automatically generating a test report. According to the method, verification and testing of the whole process are achieved in an automatic mode, the testing log and the report are generated, automatic verification of the whole process and coverage of all testing requirements of chip module calibration comprehensive testing are achieved, the testing efficiency is greatly improved, and the labor cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip testing technology, and in particular to an automatic testing method and system for a chip module. Background Art

[0002] A chip module is a smart device that integrates multiple electronic components. It is usually composed of components such as chips, antennas, sensors, memory, and communication interfaces. In the design and manufacturing process of chip modules, in order to ensure product quality and reliability, they need to be verified and tested throughout the entire process.

[0003] In recent years, with the continuous improvement of chip module complexity and integration, frequent version upgrades of test software and continuous updates of related test tools, the workload of chip module testing has increased dramatically, and the difficulty of testing has also increased significantly. However, the current testing of chip modules mainly relies on manual operation, which is not only costly, but also has low test efficiency and cannot meet the needs of efficient, accurate and stable testing. Summary of the invention

[0004] The embodiment of the present invention provides an automated testing method and system for a chip module, which can overcome the technical problems existing in the above-mentioned prior art, and can realize automated verification of the entire process and coverage of various test requirements for chip module calibration and comprehensive testing, greatly improving test efficiency and saving labor costs.

[0005] To achieve the above object, the technical solution adopted by the present invention is as follows: an automated testing method for a chip module, characterized in that it includes:

[0006] Confirm the test requirements of the chip module to be tested;

[0007] Obtain calibration comprehensive test cases according to the test requirements;

[0008] Performing test environment configuration on the chip module to be tested;

[0009] Automatically obtain test tools according to the test requirements;

[0010] Using the test tool to perform automated testing on the calibration comprehensive test case;

[0011] Automatically generate test reports.

[0012] The present invention also provides an automated testing system for a chip module, characterized in that it comprises: a requirement confirmation unit, a use case acquisition unit, an environment configuration unit, a tool acquisition unit, a testing unit, and a report generation unit;

[0013] Wherein, the requirement confirmation unit is used to confirm the test requirements of the chip module to be tested;

[0014] A case acquisition unit, used to acquire a calibration comprehensive test case according to the test requirements;

[0015] An environment configuration unit, used to configure the test environment for the chip module to be tested;

[0016] A tool acquisition unit, used to automatically acquire a test tool according to the test requirements;

[0017] A testing unit, used to perform automated testing on the calibration comprehensive test case using the testing tool;

[0018] Report generation unit, used to automatically generate test reports.

[0019] The automated testing method and system for chip modules provided in the embodiments of the present invention realize the verification and testing of the entire process in an automated manner, and generate test logs and reports, thereby realizing the automated verification of the entire process and the coverage of various test requirements for the calibration and comprehensive testing of the chip module, greatly improving the testing efficiency and saving labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0021] Figure 1 A flow chart of an automated testing method for a chip module provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of a process for adding, removing and modifying calibration comprehensive test use cases provided in an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of the user interface of the visual use case editor provided by an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of the structure of an automated testing system for a chip module provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0027] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. To make the technical solution of the present invention clearer, the embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0028] Figure 1 A flow chart of an automated testing method for a chip module provided by an embodiment of the present invention. Figure 1 As shown, the specific steps of an automated testing method for a chip module provided by an embodiment of the present invention are as follows:

[0029] S1001: Confirm the test requirements of the chip module to be tested.

[0030] Specifically, the test requirements of the chip module to be tested provided by the embodiment of the present invention include: writing serial numbers (such as writing MEI codes and SN codes), pre-calibration, AFC crystal oscillator calibration, AGC reception calibration, APC transmission calibration, FinalTest comprehensive test, Current_Test current test and DeepSleepCheck deep sleep test.

[0031] These testing requirements cover all aspects of chip module design, development, production and application, and can ensure that the chip module can achieve the expected performance and reliability in actual use. These tests usually require professional testing equipment, software tools and special test cases. However, with the advancement of technology, test software is frequently upgraded and related test tools are continuously updated, which adds a certain degree of difficulty to efficient testing. In addition, due to the lack of unified standards and processes for the management of test cases, the management of test cases is chaotic and missed tests occur from time to time, which seriously affects the accuracy and reliability of the test results. The embodiments of the present invention solve the above problems by automating the entire process, and the specific contents are described in detail below.

[0032] S1002: Obtain calibration comprehensive test cases according to test requirements.

[0033] Calibration test cases refer to a series of test cases used to verify whether a chip module or system can achieve the expected performance and accuracy after calibration during the test process. These cases usually include steps for calibrating the equipment and comprehensive tests to ensure the effectiveness of the calibration.

[0034] In order to ensure that the calibration comprehensive test cases can be correctly understood and executed, and to further improve the accuracy and reliability of the test, after obtaining the calibration comprehensive test cases according to the test requirements, the obtained calibration comprehensive test cases need to be parsed to obtain the parsed cases.

[0035] Parsing the obtained calibration comprehensive test case is a process of documenting it and converting it into executable test steps. Specifically, the embodiment of the present invention parses the calibration comprehensive test case into a format that can be processed by Python (such as a dictionary list).

[0036] S1003: Configure the test environment for the chip module to be tested.

[0037] Environmental configuration is an important part of the test life cycle, which directly affects the effectiveness of the test and the credibility of the test results. The specific steps of configuring the test environment for the chip module to be tested in the embodiment of the present invention include:

[0038] Use Pytest to read the config.yaml general configuration file to obtain configuration information;

[0039] Configure the test environment according to the obtained configuration information;

[0040] Specifically, the above configuration information includes: download information (such as burning image path, download EXE path and download port, etc.), use case path, socket information SOCKET (such as OCKET port and SOCKET address, etc.), checkout information check_out (such as code storage path, whether to skip compilation and directly obtain the specified version and specified version number from the server), universal asynchronous receiver and transmitter parameters UART (such as port and baud rate, etc.), instrument information (instrument type, instrument address and instrument port number, etc.) and email information (such as email address, authorization code, host, recipient address and report title, etc.).

[0041] S1004: Automatically obtain test tools according to test requirements.

[0042] The automatic acquisition of test tools in the embodiment of the present invention greatly improves the test efficiency compared with the manual acquisition of test tools in the prior art. As mentioned above, with the advancement of technology, test software is frequently upgraded and related test tools are also continuously updated, which adds a certain degree of difficulty to efficient testing. In order to ensure that the acquired test tools are the latest version or the specified version, the embodiment of the present invention first performs version judgment when acquiring the test tools. The specific process of this step includes:

[0043] Determine whether the version of the test tool is the specified version;

[0044] If yes, obtain the corresponding version of the test tool;

[0045] If not, get the latest version of the test tool;

[0046] Or download the latest code from SVN, compile and package it to generate the test tool. The above compilation and packaging is realized by calling the bat script to complete the compilation of all vs project engineering .sln and QT project engineering .pro, generate the version number of the specified version according to the input requirements, and package the final toolkit into a compressed file.

[0047] S1005: Use the test tool to perform automated testing on the calibration comprehensive test case.

[0048] The embodiment of the present invention uses the above-obtained test tool to perform automated testing on the parsed use cases one by one according to the Pytest use case execution specification. Specifically, the pytest.mark.parametrize of Pytest can be used to generate tests according to the parsed use case data.

[0049] S1006: Automatically generate a test report.

[0050] Specifically, the embodiment of the present invention collects the execution results of all use cases, including passed use cases, failed use cases, and exception information, generates logs and reports, generates test reports through Allure based on the above logs and reports, and starts a web server for remote viewing of test results.

[0051] In order to comprehensively obtain the overall performance data of the chip module and further ensure product quality, the test report generated by the embodiment of the present invention includes the total number of use cases, the number of passed use cases, the number of abnormal use cases, the number of failed use cases, the number of skipped use cases, the execution time of the use case, the success rate of the use case, as well as the use case configuration information and failure printing information.

[0052] Furthermore, in order to improve the accuracy and reliability of the test results and to uniformly manage the test cases, the embodiment of the present invention stores the calibration comprehensive test cases in an Excel file in a dictionary format, so that the Python script can read and parse the case, and the file structure is clear. At the same time, the calibration comprehensive test cases in the Excel file can be edited by adding, deleting, modifying, etc., through a visual case editor, and can conveniently control whether the case is executed, the number of executions, and the judgment conditions.

[0053] Figure 2 A flow chart of adding, removing and modifying calibration comprehensive test cases provided by an embodiment of the present invention. Figure 2 As shown in the figure, the editing operations of adding, deleting, modifying and other use cases of calibration comprehensive test in the Excel file are as follows:

[0054] New calibration test cases include: project path selection, Excel file selection, case information addition, parameter configuration, difference comparison, dictionary generation and writing to Excel;

[0055] Deleting calibration test cases includes: project path selection, Excel file selection, case selection, case information deletion, dictionary update and Excel update;

[0056] Modifying the calibration comprehensive test use case includes: project path selection, Excel file selection, use case selection, parameter modification, dictionary update and Excel update.

[0057] The embodiment of the present invention maintains calibration comprehensive test use cases through Excel, realizes the increase, decrease and modification of calibration comprehensive test use cases by writing a use case editor, realizes the scheduling and management of calibration comprehensive test use cases and other use cases based on the Pytest+Allure architecture, integrates the whole process of software version download, SVN acquisition code compilation and packaging to generate calibration comprehensive test tools, and calibration comprehensive test testing into Pytest, realizes the verification of the whole process in an automated way, and finally generates a detailed test report through Allure, which is convenient for users to view the test results, thereby realizing the automated verification of the whole process and the coverage of various test requirements of chip module calibration comprehensive testing.

[0058] Figure 3 A schematic diagram of the user interface of the visual use case editor provided by an embodiment of the present invention. Figure 3As shown, a graphical user interface (GUI) is created to allow users to edit test cases in a visual way. This interface can be a desktop application or integrated in a Web application. Users can add, modify or delete test items and their execution times through the interface, and the interface provides a save function. After the user completes the modification, click the Save button to write the updated test case information back to the Excel file. The user does not directly edit the test case information in Excel, but uses the test case editor to modify the test case in a visual way, which simplifies the test case editing process, helps improve the management of the test case, and reduces the occurrence of missed tests.

[0059] Figure 4 A schematic diagram of the structure of an automated testing system for a chip module provided by an embodiment of the present invention. Figure 4 As shown, the system includes: a requirement confirmation unit 4001, a use case acquisition unit 4002, an environment configuration unit 4003, a tool acquisition unit 4004, a test unit 4005, and a report generation unit 4006;

[0060] The requirement confirmation unit 4001 is used to confirm the test requirements of the chip module to be tested;

[0061] The use case acquisition unit 4002 is used to acquire the calibration comprehensive test use case according to the test requirements;

[0062] The environment configuration unit 4003 is used to configure the test environment for the chip module to be tested;

[0063] The tool acquisition unit 4004 is used to automatically acquire the test tool according to the test requirements;

[0064] The test unit 4005 is used to perform automated testing on the calibration comprehensive test case using a test tool;

[0065] The report generating unit 4006 is used to automatically generate a test report.

[0066] The automated testing system for the chip module provided in the embodiment of the present invention realizes the verification and testing of the entire process in an automated manner, and generates test logs and reports, thereby realizing the automated verification of the entire process and the coverage of various test requirements for the calibration and comprehensive testing of the chip module, greatly improving the testing efficiency and saving labor costs.

[0067] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention is indicated by the following claims.

[0068] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. An automated testing method for a chip module, characterized in that: include: Confirm the test requirements of the chip module to be tested; Obtain calibration comprehensive test cases according to the test requirements; Performing test environment configuration on the chip module to be tested; Automatically obtain test tools according to the test requirements; Using the test tool to perform automated testing on the calibration comprehensive test case; Automatically generate test reports.

2. The method according to claim 1, characterized in that: The automatically acquiring the test tool according to the test requirement specifically includes: Determine whether the version of the test tool is a specified version; If yes, obtaining the test tool; If not, get the latest version of the test tool; Alternatively, download the latest code from SVN, compile and package it to generate the test tool.

3. The method according to claim 1, characterized in that Before obtaining the calibration comprehensive test case according to the test requirement, the method further includes: The calibration comprehensive test cases are stored in an Excel file in a dictionary format.

4. The method according to claim 3, characterized in that Also includes: The calibration comprehensive test case in the Excel file is edited through a visual case editor.

5. The method according to claim 4, characterized in that The editing of the calibration comprehensive test case in the Excel file by the visual case editor specifically includes: adding a calibration comprehensive test case, deleting a calibration comprehensive test case, and modifying a calibration comprehensive test case; The newly added calibration comprehensive test case includes: project path selection, Excel file selection, case information addition, parameter configuration, difference comparison, dictionary generation and writing to Excel; The deletion of calibration comprehensive test cases includes: project path selection, Excel file selection, case selection, case information deletion, dictionary update and Excel update; The modification of the calibration comprehensive test use case includes: project path selection, Excel file selection, use case selection, parameter modification, dictionary update and Excel update.

6. The method according to claim 1, characterized in that The configuring of the test environment for the chip module to be tested specifically includes: Use Pytest to read the general configuration file and obtain configuration information; Perform test environment configuration according to the configuration information; The configuration information includes: download information, use case path, socket information, detection information, universal asynchronous receiver and transmitter parameters, instrument information and email information.

7. The method according to claim 1, characterized in that After obtaining the calibration comprehensive test case according to the test requirement, the method further includes: The calibration comprehensive test case is parsed to obtain a parsed case.

8. The method according to claim 7, characterized in that The execution of automated testing specifically includes: According to the Pytest test case execution specification, automated testing is performed on the parsed test cases one by one.

9. The method according to claim 1, characterized in that: The automatic generation of the test report specifically includes: Collecting the execution results of the automated test; Generate logs and reports; Generate a test report through Allure based on the logs and reports.

10. The method according to claim 9, characterized in that The test report includes: the total number of use cases, the number of passed use cases, the number of abnormal use cases, the number of failed use cases, the number of skipped use cases, the execution time of the use cases, the success rate of the use cases, the use case configuration information and the failure printing information.

11. The method according to claim 10, characterized in that After the test report is automatically generated, the method further includes: starting a web server to remotely view the test result.

12. The method according to claim 1, characterized in that The test requirements of the chip module to be tested specifically include: writing serial number, pre-calibration, crystal calibration, receiving calibration, transmitting calibration, comprehensive test, current test and deep sleep test.

13. An automated testing system for a chip module, characterized in that: include: Requirements confirmation unit, use case acquisition unit, environment configuration unit, tool acquisition unit, testing unit and report generation unit; Wherein, the requirement confirmation unit is used to confirm the test requirements of the chip module to be tested; A case acquisition unit, used to acquire a calibration comprehensive test case according to the test requirements; An environment configuration unit, used to configure the test environment for the chip module to be tested; A tool acquisition unit, used to automatically acquire a test tool according to the test requirements; A testing unit, used to perform automated testing on the calibration comprehensive test case using the testing tool; Report generation unit, used to automatically generate test reports.