Device testing method and device, equipment and storage medium
By controlling the interfaces of programmable AC power supplies, electronic loads, and oscilloscopes, setting functions for test instruments and equipment are constructed, realizing automated testing of power devices in power electronic products. This solves the problem of low efficiency in manual testing and improves testing efficiency and product development progress.
Patent Information
- Application Number
- CN202411073989.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2026-02-06
AI Technical Summary
In the existing technology, the electrical stress testing of power devices in power electronic products mainly relies on manual operation, which results in a large workload, many uncontrollable human factors, a cumbersome and inefficient testing process, and affects product development and testing progress.
By controlling the interfaces of programmable AC power supplies, electronic loads, and oscilloscopes, setting functions for test instruments and equipment are constructed to automatically execute power device tests in the power supply module and obtain test results.
It has automated the testing of power electronic products, improved testing efficiency, overcome the shortcomings of manual testing, and accelerated product development and testing progress.
Smart Images

Figure CN121476875A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic testing, in particular to a device testing method, device testing apparatus, device and storage medium. BACKGROUND
[0002] With the vigorous development of new energy industry, power electronics technology is applied more and more widely. As an important basic setting of network base station, communication power supply plays a very key role. The research and development of power electronic products is becoming faster and faster, and enterprises need to quickly meet market demand.
[0003] At present, most of the power electronic technology industry adopts manual testing for the electrical stress test of power devices in power supply. However, it has many uncontrollable factors and the testing process is complicated, so the efficiency is relatively low, which restricts the development and testing progress of products. SUMMARY
[0004] The present application provides a device testing method, device testing apparatus, device and storage medium, which is used to provide an automatic testing solution for power devices in power supply modules to overcome the defects of manual testing in the prior art.
[0005] In a first aspect, the present application provides a device testing method applied to an upper computer, comprising:
[0006] calling a main interface program block to select a first test item of a device under test, the device under test comprising a power device in a power supply module;
[0007] calling device parameters of the device under test, and configuring respective working parameters of instrument equipment according to the device parameters, the instrument equipment comprising an alternating current power supply, an electronic load and an oscilloscope, the alternating current power supply being used to power the power supply module, and the electronic load being a load of the power supply module;
[0008] reading a module state of the power supply module based on the respective working parameters of the instrument equipment, so as to acquire a test result of a second current sub-item under the first test item through the oscilloscope according to the module state.
[0009] In a possible design, the acquisition of the test result of the second current sub-item under the first test item through the oscilloscope according to the module state comprises:
[0010] acquiring test data through edge triggering based on a working parameter of the oscilloscope;
[0011] if it is determined that the test data meet a derating requirement, generating the test result of the current sub-item, the test result comprising the test data corresponding to the current sub-item, a waveform screenshot of the oscilloscope, a test conclusion and a test basis.
[0012] In a possible design, after the test result of the current sub-project is generated, the method further includes:
[0013] acquiring load data of the DUT, and turning off the AC power supply and the electronic load to test another secondary sub-project under the primary test project;
[0014] calling a test report module to generate a test report of the current sub-project according to the test report template and the test result of the current sub-project;
[0015] ending the primary test project after determining that all secondary sub-projects under the primary test project are tested.
[0016] In a possible design, the test data is acquired based on the working parameters of the oscilloscope through edge triggering, and the method includes:
[0017] controlling the oscilloscope to work according to the working parameters of the oscilloscope, and reading waveform data of the DUT;
[0018] configuring a trigger mode parameter according to the waveform data, and performing the edge triggering through the trigger mode parameter;
[0019] acquiring measurement values of a preset number of times, acquiring a maximum value in the measurement values of the preset number of times to obtain the test data corresponding to the current sub-project, and acquiring a waveform screenshot of the oscilloscope.
[0020] In a possible design, before the device parameters of the DUT are called, the method further includes:
[0021] performing self-checking on the instrument equipment and generating corresponding configuration parameters, the configuration parameters being used to initialize settings of the instrument equipment;
[0022] acquiring a secondary current sub-project under the primary test project.
[0023] In a possible design, the primary test project includes white-box stress testing of the DUT.
[0024] In a possible design, the primary test project further includes limit testing, and after the primary test project of the DUT is selected, the method further includes:
[0025] acquiring configuration parameters of the limit testing, performing self-checking on the instrument equipment, and calling a configuration library of the limit testing;
[0026] performing a limit test project according to the configuration parameters of the limit test and the configuration library, and acquiring a limit test result.
[0027] In a possible design, the AC power supply and the electronic load are connected to the host computer in communication through a first GPIB or a USB.
[0028] The oscilloscope is connected to the host computer in communication through a second GPIB or a network port LAN.
[0029] In a possible design, the communication addresses of the AC power supply, the electronic load, and the oscilloscope are defined through a yaml address file.
[0030] In a second aspect, the present application provides a device testing apparatus applied to a host computer, comprising:
[0031] A calling module configured to call a main interface program block to select a primary testing item of a device under test, the device under test comprising a power device in a power supply module;
[0032] A configuration module configured to call device parameters of the device under test, and configure respective working parameters of instrument devices according to the device parameters, the instrument devices comprising an AC power supply, an electronic load, and an oscilloscope, the AC power supply being configured to supply power to the power supply module, and the electronic load being configured to be a load of the power supply module;
[0033] A testing module configured to read a module state of the power supply module based on the respective working parameters of the instrument devices, so as to acquire a testing result of a secondary current sub-item under the primary testing item through the oscilloscope according to the module state.
[0034] In a possible design, the testing module is specifically configured to:
[0035] acquire testing data through edge triggering based on a working parameter of the oscilloscope;
[0036] if it is determined that the testing data meet a derating requirement, generate the testing result of the current sub-item, the testing result comprising the testing data corresponding to the current sub-item, a waveform screenshot of the oscilloscope, and a testing conclusion and a testing basis.
[0037] In a possible design, the testing module is further configured to:
[0038] acquire load data of the device under test, and turn off the AC power supply and the electronic load, so as to test another secondary sub-item under the primary testing item;
[0039] call a testing report module to generate a testing report of the current sub-item according to the testing report template and the testing result of the current sub-item;
[0040] end the primary test item after determining that all secondary sub-item tests under the primary test item are completed.
[0041] In a possible design, the test module is further configured to:
[0042] control the oscilloscope according to the working parameters of the oscilloscope, and read waveform data of the device under test;
[0043] configure a trigger mode parameter according to the waveform data, and perform the edge triggering through the trigger mode parameter;
[0044] obtain measurement values of a preset number of times, obtain a maximum value in the measurement values of the preset number of times to obtain the test data corresponding to the current sub-item, and obtain a waveform screenshot of the oscilloscope.
[0045] In a possible design, the device further includes a self-checking and obtaining module, where the self-checking and obtaining module is configured to:
[0046] perform self-checking on the instrument equipment and generate corresponding configuration parameters, and the configuration parameters are used to initialize settings of the instrument equipment;
[0047] obtain a secondary current sub-item under the primary test item.
[0048] In a possible design, the primary test item includes a white-box stress test of the device under test.
[0049] In a possible design, the primary test item further includes a limit test, and the device further includes a limit test module, where the limit test module is configured to:
[0050] obtain configuration parameters of the limit test, perform self-checking on the instrument equipment, and call a configuration library of the limit test;
[0051] perform a limit test item according to the configuration parameters of the limit test and the configuration library, and obtain a limit test result.
[0052] In a possible design, the AC power supply and the electronic load are in communication connection with the host computer through a first GPIB or a USB.
[0053] The oscilloscope is in communication connection with the host computer through a second GPIB or a network port LAN.
[0054] In a possible design, communication addresses of the AC power supply, the electronic load, and the oscilloscope are defined through a yaml address file.
[0055] In a third aspect, the present application provides an electronic device, comprising a processor and a memory connected to the processor in communication;
[0056] The memory stores computer-executable instructions.
[0057] The processor executes the computer-executable instructions stored in the memory to implement any one of the possible device testing methods provided in the first aspect.
[0058] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer-executable instructions for implementing any one of the possible device testing methods provided in the first aspect when executed by a processor.
[0059] In a fifth aspect, the present application provides a computer program product, which comprises computer-executable instructions for implementing any one of the possible device testing methods provided in the first aspect when executed by a processor.
[0060] The present application provides a device testing method, device, equipment and storage medium, which is applied to an upper computer, and the upper computer is connected to an AC power supply, an electronic load and an oscilloscope in an instrument in communication. First, a main interface program block is called to select a first-level test item of a device under test, the device under test comprising a power device in a power module, then device parameters of the device under test are called, and working parameters of the instrument are configured according to the device parameters, wherein the AC power supply is used to power the power module, and the electronic load is used to load the power module, and then a module state of the power module is read based on the working parameters of the instrument, so that the test result of a second-level current sub-item under the first-level test item is obtained through the oscilloscope according to the module state. Through the interface control of the programmable AC power supply, the electronic load and the oscilloscope, the working parameters of the instrument used for testing are constructed, and the automatic testing is performed based on the working parameters to obtain the test result corresponding to the test item, so that the defects existing in manual testing are overcome, and the testing efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0062] Figure 1 A system architecture schematic diagram of a device testing method provided by an embodiment of the present application;
[0063] Figure 2A schematic flowchart of a device testing method provided in an embodiment of this application;
[0064] Figure 3 A schematic flowchart of another device testing method provided in an embodiment of this application;
[0065] Figure 4 This is a schematic diagram of a process for obtaining test data provided in an embodiment of this application;
[0066] Figure 5 This is a schematic diagram of the structure of a device testing apparatus provided in an embodiment of this application;
[0067] Figure 6 This is a schematic diagram of another device testing apparatus provided in an embodiment of this application;
[0068] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0069] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and apparatus consistent with some aspects of this application as detailed in the appended claims.
[0070] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0071] Currently, the power electronics industry mostly uses manual testing for electrical stress testing of power devices in power supplies. However, this method is labor-intensive, involves many uncontrollable human factors, and is cumbersome and relatively inefficient, thus hindering product development and testing progress.
[0072] To address the aforementioned problems in the prior art, this application provides a device testing method, apparatus, equipment, and storage medium. The inventive concept of the device testing method provided in this application lies in: constructing setting functions for the test instruments and equipment through interface control of a programmable AC power supply, electronic load, and oscilloscope; passing the operating parameters of the instruments and equipment to the set functions; and achieving automated testing of the power devices in the power module (the object under test) by calling the corresponding functions, thereby obtaining the test results and overcoming the shortcomings of manual testing in the prior art, thus improving product testing efficiency.
[0073] Figure 1 This is a schematic diagram of the system architecture of a device testing method provided in an embodiment of this application, as shown below. Figure 1 As shown, the host computer 11 is configured to execute the device testing method provided in the embodiments of this application. The instruments and equipment used for automated testing include an AC power supply 12, an electronic load 13, and an oscilloscope 14. The device under test for device testing is, for example, a power device 15 in a power module, such as a metal-oxide-semiconductor field-effect transistor (MOSFET).
[0074] In some embodiments, the AC power supply 12 and the electronic load 13 can be connected to the host computer 11 via a first GPIB or USB, and the oscilloscope 14 can be connected to the host computer 11 via a second GPIB or a LAN port. The AC power supply 12 supplies power to the power module, and the electronic load 13 provides a load to the power module. The oscilloscope 14 is used to acquire waveform data of the device under test during the testing process. It should be noted that the terms "first" and "second" in this embodiment are used to distinguish similar objects, and both the first GPIB and the second GPIB refer to GPIB such as... Figure 1 As shown in the image.
[0075] For example, PyVisa can be used to control the interfaces of the programmable AC power supply 12, electronic load 13, and oscilloscope 14, construct setting functions for the test instruments and equipment, pass the working parameters of the instruments and equipment to the set functions, and realize automated testing of the test object, i.e., the power device 15 in the power module, by calling the corresponding functions, and obtain the test results of the test object, overcome the defects of manual testing in the existing technology, and improve the product testing efficiency.
[0076] It should be noted that the above architecture diagram is only for illustrative purposes, and the system architecture of the device testing method provided in this application includes, but is not limited to, the above embodiments.
[0077] Figure 2This is a schematic flowchart of a device testing method provided in an embodiment of this application, as shown below. Figure 2 As shown, the device testing method provided in this application includes:
[0078] S101: Call the main interface program block to select the first-level test item of the device under test.
[0079] The devices under test include power devices in the power supply module.
[0080] The host computer calls the main interface program block to select the test class of the device under test. The test class is a first-level test item, such as white-box stress test, limit test, etc.
[0081] In some embodiments, a test case library is created to store all test cases. Test case execution is achieved by scheduling the functional interface program of the instrumentation equipment within the test case program. Optionally, when designing the function for the test case, the function name can be defined using pytest, serving as the function's passing interface. Test case execution is completed by calling the named function authorized by pytest.
[0082] In some embodiments, the interface interaction for device testing can be created using a graphical interface tool library that includes buttons, text boxes, tab bars, toolbars, etc. In the early stages, the layout and process can be designed according to the basic functional requirements, basic windows can be created by classifying functions, and controls can be added to the windows according to the requirements using a layout manager. Event handling functions can be defined for the controls in the window, such as button clicks, button generation of test reports, etc. The QObject.connect() method can be used to connect events and handling functions, style sheets can be used to beautify controls and windows, and icons and images can be used to enhance the visual effects.
[0083] S102: Call the device parameters of the device under test and configure the operating parameters of the instruments and equipment according to the device parameters.
[0084] like Figure 1 As shown, the equipment includes an AC power supply, an electronic load, and an oscilloscope. The AC power supply powers the power module, the electronic load is the load on the power module, and the oscilloscope can read waveform data during testing. After selecting the primary test item, the device parameters of the test object, i.e., the device under test, can be retrieved to configure the corresponding operating parameters for the equipment such as the AC power supply, electronic load, and oscilloscope based on the device parameters of the device under test.
[0085] The electrical configuration file in the YAML module defines the overall electrical parameters of the power supply module, and the test conditions for the device under test (DUT) are determined by the parameters in this file. The DUT configuration file in the YAML module defines the electrical parameters of the DUT, such as the gate voltage (GS voltage) and drain voltage (DS voltage) levels. Based on the device parameters, the corresponding operating parameters of the instruments can be set, and the instruments may also include an oscilloscope. For example, if the maximum required GS voltage stress for a MOSFET is 30V, the oscilloscope pulse trigger can be set to adjust in steps from 30V downwards until the maximum peak value is triggered.
[0086] In some embodiments, oscilloscopes, electronic loads, and AC power supplies can each be configured with their own function program files. Within these function program files, instruction classes corresponding to each instrument / device are constructed according to their respective attributes. Furthermore, methods for setting the functions of each instrument / device can be defined within its respective folder. Further, function interface functions can be defined under each instrument / device class. These functions pass the instrument / device function setting methods and address parameters from the YAML module, thereby enabling the setting of instructions and parameters for the instrument / device.
[0087] In some embodiments, the communication addresses of instruments and equipment such as AC power supplies, electronic loads, and oscilloscopes can be defined using YAML address files, and the instruction sets and transmission parameters of the instruments and equipment can be defined in YAML instrument instruction definition files.
[0088] S103: Read the module status of the power supply module based on the operating parameters of each instrument and equipment, so as to obtain the test results of the current sub-item of the second-level test item under the first-level test item through the oscilloscope according to the module status.
[0089] For example, PyVisa can be used to control the interfaces of instruments and equipment such as programmable AC power supplies, electronic loads, and oscilloscopes, and corresponding functions for these instruments and equipment can be constructed. Then, by passing the corresponding working parameters of the instruments and equipment and assigning them to the constructed functions, the automated execution of tests on the device under test can be achieved by calling the functions and defining test cases. During the execution process, the module status of the power supply module can be read, that is, the module status of the power supply module can be read based on the working parameters of the AC power supply and the electronic load.
[0090] Then, the oscilloscope is used to obtain the corresponding test results of the current second-level test sub-item under the first-level test item according to the module status. For example, during the test execution, the oscilloscope's operating parameters are configured according to the device parameters of the device under test, and then edge triggering is performed based on the oscilloscope's operating parameters to obtain test data. The test data includes the corresponding waveform data of the device under test displayed on the oscilloscope, and screenshots of the waveform data are saved.
[0091] In one possible design, logging can be configured through a built-in logging module. During test execution, log records can be captured using code blocks such as try, except, and else. These log records can be parsed to identify errors and exceptions that occur during program execution, and then reported to the testing center based on the nature and severity of the errors. In some embodiments, non-critical errors during test execution can also be notified to the user via pop-ups or status messages within the application.
[0092] The device testing method provided in this application can be applied to a host computer. First, the main interface program block is called to select the primary test item for the device under test (DUT), which includes power devices in a power supply module. Then, the device parameters of the DUT are called, and the operating parameters of each instrument are configured according to these parameters. The AC power supply powers the power supply module, and the electronic load acts as the load for the power supply module. Next, the module status of the power supply module is read based on the operating parameters of each instrument, and the test results of the current secondary sub-item under the primary test item are obtained using an oscilloscope based on the module status. By controlling the interfaces of the programmable AC power supply, electronic load, and oscilloscope, the operating parameters of the instruments used for testing are constructed. Automated testing is performed based on these operating parameters to obtain the test results corresponding to the test items, overcoming the shortcomings of manual testing and improving testing efficiency.
[0093] exist Figure 2 On this basis, Figure 3 A schematic flowchart of another device testing method provided in this application embodiment is shown below. Figure 3 As shown, the embodiments of this application include:
[0094] S201: Call the main interface program block to select the first-level test item of the device under test.
[0095] The possible implementation methods, principles and technical effects of step S201 are similar to those of step S101. For details, please refer to the foregoing embodiments, which will not be repeated here.
[0096] S202: Perform a self-test on the instrument and generate the corresponding configuration parameters.
[0097] In one possible design, the primary test items may include white-box stress testing of the device under test. After selecting the primary test items, the instrument performs a self-test and configures the corresponding configuration parameters to initialize the instrument settings.
[0098] S203: Get the current sub-project of the second level under the first-level test project.
[0099] After initializing the instrument settings, further select the current sub-item under the primary test item, such as testing the gate voltage Vgs.
[0100] S204: Call the device parameters of the device under test and configure the operating parameters of the instruments and equipment according to the device parameters.
[0101] The possible implementation methods, principles and technical effects of step S204 are similar to those of step S102. For details, please refer to the foregoing embodiments, which will not be repeated here.
[0102] S205: Read the module status of the power supply module based on the operating parameters of each instrument and device.
[0103] For example, PyVisa can be used to interface control programs for instruments such as programmable AC power supplies, electronic loads, and oscilloscopes. Corresponding functions for these instruments can be constructed, and then the corresponding operating parameters of the instruments can be passed to these functions. By calling these functions and defining test cases, automated testing of the device under test (DUT) can be achieved. During execution, the module status of the power supply is read, specifically based on the operating parameters of the AC power supply and the electronic load. Reading the power supply module status can be achieved, for example, by setting the input voltage for the test and then determining the module status; similarly, by setting the corresponding parameters of the electronic load and closing the electronic load, the module status can be read and determined through the electronic load.
[0104] S206: Test data is acquired by edge triggering based on the oscilloscope's operating parameters.
[0105] After configuring the oscilloscope's operating parameters, the trigger mode parameters are set based on the oscilloscope's operating settings to trigger edge triggering, and the corresponding test data is acquired during this process.
[0106] In one possible design, step S206 could be implemented as follows: Figure 4 As shown, Figure 4 This is a schematic diagram of a process for obtaining test data provided in an embodiment of this application, such as... Figure 4 As shown, the embodiments of this application include:
[0107] S2061: Controls the operation of the oscilloscope according to its operating parameters and reads the waveform data of the device under test;
[0108] S2062: Configure trigger mode parameters according to waveform data, and perform edge triggering through trigger mode parameters;
[0109] S2063: Obtain the measurement value of a preset number of times, obtain the maximum value among the preset number of measurement values to obtain the test data corresponding to the current sub-item, and obtain the waveform screenshot of the oscilloscope.
[0110] The oscilloscope is controlled to operate according to its working parameters, thereby reading the waveform data of the device under test on the oscilloscope. Then, the trigger mode parameters are set according to the waveform data, and edge triggering is performed through the trigger mode parameters. The preset number of triggers is used to obtain the measurement value at each trigger, and each measurement value is compared to obtain the maximum value among multiple measurements. The maximum value is determined as the test data of the current sub-item of the secondary test, and a screenshot of the waveform data is captured, that is, a screenshot of the waveform of the oscilloscope is obtained. This realizes the acquisition of test data based on the oscilloscope's working parameters through edge triggering.
[0111] S207: Determine whether the test data meets the requirements for reducing the amount.
[0112] Derating requirements can be customized. In actual operating conditions, the device under test (DUT) is divided into three regions based on its operating conditions (operating voltage range, load conditions) and the severity of the actual application environment, such as ambient temperature: the typical operating region, the short-time steady-state region, and the extreme transient operating region. Each region corresponds to a specific voltage stress assessment requirement. For example, when testing the gate-source voltage stress of a certain MOSFET model, the maximum requirement is 30V. Therefore, in the typical operating region, the requirement can be assessed at 85% of the maximum specification; in the short-time steady-state region, at 90%; and in the extreme transient region, at 100%. It should be noted that the above derating requirements may have different assessment criteria depending on the operating specifications of different product models. Therefore, derating requirements can be customized according to the specific DUT.
[0113] Compare the test data with the reduction requirements to determine whether the test data meets the reduction requirements. If it does, output the test results of the current sub-project at the second level and execute step S208. If it does not meet the requirements, re-execute step S206.
[0114] S208: Generate test results for the current sub-project.
[0115] The test results include the test data corresponding to the current sub-project, waveform screenshots from the oscilloscope, test conclusions, and test basis.
[0116] When the derating requirement is met, the system outputs the test data corresponding to the current sub-item at level two, a waveform screenshot from the oscilloscope, along with the test conclusions and test basis. The output result is then recognized as the test result for the current sub-item at level two. The test conclusions include whether the test is qualified or unqualified, and the corresponding measured values for each qualification or unqualified test. The test basis may include the operating parameters of the instruments and equipment used during automated testing.
[0117] Steps S206 to S208 involve obtaining the test results of the current sub-item of the second-level test item under the first-level test item using an oscilloscope based on the module status.
[0118] Alternatively, the test results of the current sub-project can be stored as log records using a logger. This application embodiment does not limit the storage method.
[0119] In one possible design, after step S208, the embodiments of this application further include the following steps:
[0120] S209: Acquire the load data of the device under test and turn off the AC power and electronic load to test another secondary sub-item under the primary test item.
[0121] After outputting the test results, the load data is also output, and the AC power supply and electronic load are turned off. Then, another secondary sub-item under the primary test item is selected to begin testing the next secondary sub-item. The specific content of this other secondary sub-item is determined by the actual operating conditions, and this embodiment does not limit it.
[0122] S2010: Call the test report module to generate a test report for the current sub-project based on the test report template and the test results of the current sub-project.
[0123] During test case execution, the name of the current test project can be obtained using the `python(._name_)` method, and a corresponding folder for the test project can be created. This folder is used to store the test data captured by the test project during the test process. At the same time, the waveform screenshots captured by the oscilloscope during the test are named with the current name combined with the test conditions. After the test project is completed, the `logging` module is used to map the test data, waveform screenshots, test conclusions, test basis and test project to the corresponding test report template and insert them into the test report template to generate the test report for the current sub-project.
[0124] S2011: The first-level test project ends after all the second-level sub-projects under the first-level test project have been tested.
[0125] The query determines whether all secondary sub-projects under the primary test item have been completed. Once completed, if there are still other primary test items, the current primary test item is terminated, and the automated testing of the device under test is completed.
[0126] In one possible design, the primary test items may also include limit testing. After selecting the primary test items for the device under test, i.e., step S201, the embodiments of this application may further include the following steps:
[0127] S2012: Obtain the configuration parameters for the limit test, perform a self-test on the instrument and equipment, and call the configuration library for the limit test.
[0128] S2013: Execute the extreme test project according to the configuration parameters and configuration library of the extreme test, and obtain the extreme test results.
[0129] Obtain the corresponding configuration parameters for the preset limit test for the device under test, perform a self-test on the instrument and call the limit test configuration library, start the limit test project according to the limit test configuration parameters and configuration library, and obtain the corresponding limit test results.
[0130] For power modules, in some embodiments, extreme testing may include continuous and very short-term operating conditions such as power-on startup, input voltage jumps, load jumps, overvoltage protection, short-circuit operation, power grid distortion, and abnormal load simulation. The power module can be operated under these conditions by calling a configuration library and configuration parameters. The module status is then monitored in real time to determine whether the extreme testing requirements are met, yielding the corresponding extreme test results. Test cases are freely combined according to the extreme test range, and each test case is custom-named in its respective configuration library. Different power module models use their corresponding configuration libraries. Configuration parameters define the power module's maximum operating voltage range, load operating range, operating temperature range, duration, etc., with different power module models using their respective configuration parameters.
[0131] The device testing method provided in this application can perform automated white-box stress testing on power devices in a power module. It utilizes PyVisa to interface control programs for programmable instruments such as AC power supplies, electronic loads, and oscilloscopes, constructing instrument setup functions. By passing corresponding operating parameters and assigning them to defined functions, the method automates the testing of the device under test by calling these functions and defining test cases. This overcomes the shortcomings of manual testing and improves testing efficiency. Furthermore, the method allows real-time viewing of test logs during the testing process and automatic generation of a test report based on a test report template upon completion.
[0132] Figure 5 This is a schematic diagram of a device testing apparatus provided in an embodiment of this application. This device testing apparatus can be applied to a host computer. Figure 5 As shown, the device testing apparatus 400 provided in this application embodiment includes:
[0133] Module 401 is used to call the main interface program block to select the first-level test items of the device under test, which includes power devices in the power supply module.
[0134] The configuration module 402 is used to call the device parameters of the device under test and configure the operating parameters of the instruments and equipment according to the device parameters. The instruments and equipment include an AC power supply, an electronic load and an oscilloscope. The AC power supply is used to power the power module and the electronic load is the load of the power module.
[0135] Test module 403 is used to read the module status of the power supply module based on the operating parameters of each instrument and equipment, so as to obtain the test results of the current sub-item of the second-level test item under the first-level test item through the oscilloscope according to the module status.
[0136] In one possible design, test module 403 is specifically used for:
[0137] Test data is acquired by edge triggering based on the operating parameters of the oscilloscope;
[0138] If the test data is determined to meet the derating requirements, the test results for the current sub-project are generated. The test results include the test data corresponding to the current sub-project, waveform screenshots from the oscilloscope, test conclusions, and test basis.
[0139] In one possible design, test module 403 is also used for:
[0140] Acquire the load data of the device under test, and turn off the AC power and electronic load to test another sub-item under the first-level test item;
[0141] Call the test report module to generate a test report for the current sub-project based on the test report template and the test results of the current sub-project;
[0142] The first-level test project ends after all the second-level sub-projects under the first-level test project have been tested.
[0143] In one possible design, test module 403 is also used for:
[0144] Control the operation of the oscilloscope according to its operating parameters and read the waveform data of the device under test;
[0145] Configure the trigger mode parameters based on the waveform data, and perform edge triggering using the trigger mode parameters;
[0146] Obtain the measurement values for a preset number of times, obtain the maximum value among the preset number of measurement values to obtain the test data corresponding to the current sub-project, and obtain the waveform screenshot from the oscilloscope.
[0147] exist Figure 5 On this basis, Figure 6 This is a schematic diagram of another device testing apparatus provided in an embodiment of this application, as shown below. Figure 6As shown, the device testing apparatus 400 provided in this application embodiment further includes: a self-testing and acquisition module 404, which is used for:
[0148] The instrument performs a self-test and generates corresponding configuration parameters, which are used to initialize the instrument settings.
[0149] Get the current sub-project of the second level under the first-level test project.
[0150] In one possible design, the primary test items include white-box stress testing of the device under test.
[0151] In one possible design, the primary test item also includes limit testing. The device testing apparatus 400 provided in this application embodiment further includes: a limit testing module, which is used for:
[0152] Obtain the configuration parameters for the extreme test, perform a self-test on the instrument and equipment, and call the configuration library for the extreme test;
[0153] Execute the extreme test project according to the configuration parameters and configuration library of the extreme test, and obtain the extreme test results.
[0154] In one possible design, the AC power supply and electronic load are connected to the host computer via a first GPIB or USB.
[0155] The oscilloscope communicates with the host computer via a second GPIB or a LAN port.
[0156] In one possible design, the communication addresses of the AC power supply, electronic load, and oscilloscope are defined via a YAML address file.
[0157] The device testing apparatus provided in this application embodiment can execute the corresponding steps of the device testing method in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0158] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 500 may include a processor 501 and a memory 502 communicatively connected to the processor 501.
[0159] Memory 502 is used to store programs. Specifically, the program may include program code, which includes computer-executable instructions.
[0160] Memory 502 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0161] The processor 501 is used to execute computer execution instructions stored in the memory 502 to implement the above-mentioned device testing method.
[0162] The processor 501 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0163] Optionally, the memory 502 can be either standalone or integrated with the processor 501. When the memory 502 is a device independent of the processor 501, the electronic device 500 may further include:
[0164] Bus 503 is used to connect processor 501 and memory 502. The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not mean there is only one bus or one type of bus.
[0165] Optionally, in a specific implementation, if the memory 502 and the processor 501 are integrated on a single chip, the memory 502 and the processor 501 can communicate through an internal interface.
[0166] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores computer-executable instructions, which are used in the methods described in the above embodiments.
[0167] This application also provides a computer program product, including computer execution instructions that, when executed by a processor, implement the methods described above.
[0168] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0169] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A device testing method, characterized in that, Applications in host computers include: Call the main interface program block to select the first-level test item of the device under test, which includes power devices in the power supply module; The device parameters of the device under test are called, and the operating parameters of the instruments and equipment are configured according to the device parameters. The instruments and equipment include an AC power supply, an electronic load and an oscilloscope. The AC power supply is used to power the power module, and the electronic load is the load of the power module. Based on the operating parameters of each of the instruments and equipment, the module status of the power module is read, so as to obtain the test results of the current sub-item of the second-level test item under the first-level test item through the oscilloscope according to the module status.
2. The device testing method according to claim 1, characterized in that, The step of obtaining the test results of the current sub-item of the second-level test item under the first-level test item using an oscilloscope based on the module status includes: Test data is acquired via edge triggering based on the operating parameters of the oscilloscope. If the test data is determined to meet the derating requirements, the test results for the current sub-project are generated. The test results include the test data corresponding to the current sub-project, the waveform screenshot of the oscilloscope, the test conclusions, and the test basis.
3. The device testing method according to claim 2, characterized in that, After generating the test results for the current sub-project, the process further includes: Acquire the load data of the device under test, and turn off the AC power supply and the electronic load to test another secondary sub-item under the primary test item; Call the test report module to generate a test report for the current sub-project based on the test report template and the test results of the current sub-project; The first-level test project ends after all the second-level sub-projects under the first-level test project have been tested.
4. The device testing method according to claim 2, characterized in that, The method of acquiring test data based on the oscilloscope's operating parameters via edge triggering includes: The oscilloscope is controlled to operate according to its operating parameters, and the waveform data of the device under test is read. Configure trigger mode parameters according to the waveform data, and perform edge triggering through the trigger mode parameters; Obtain the measurement value for a preset number of times, obtain the maximum value among the preset number of measurement values to obtain the test data corresponding to the current sub-item, and obtain the waveform screenshot of the oscilloscope.
5. The device testing method according to claim 2, characterized in that, Before calling the device parameters of the device under test, the method further includes: The instrument performs a self-test and generates corresponding configuration parameters, which are used to initialize the settings of the instrument. Get the current sub-project of the second level under the first-level test project.
6. The device testing method according to any one of claims 1-5, characterized in that, The primary test items include the white-box stress test of the device under test.
7. The device testing method according to claim 6, characterized in that, The primary test items also include limit tests, and after selecting the primary test items for the device under test, the following are also included: Obtain the configuration parameters for the extreme test, perform a self-test on the instrument and equipment, and call the configuration library for the extreme test; Execute the extreme test project according to the configuration parameters of the extreme test and the configuration library, and obtain the extreme test results.
8. The device testing method according to claim 1, characterized in that, The AC power supply and the electronic load are connected to the host computer via a first GPIB or USB. The oscilloscope is connected to the host computer via a second GPIB or a LAN port.
9. The device testing method according to claim 1, characterized in that, The communication addresses of the AC power supply, the electronic load, and the oscilloscope are defined through a YAML address file.
10. A device testing apparatus, characterized in that, Applications in host computers include: The calling module is used to call the main interface program block to select the first-level test items of the device under test, which includes power devices in the power supply module. The configuration module is used to call the device parameters of the device under test and configure the operating parameters of the instruments and equipment according to the device parameters. The instruments and equipment include an AC power supply, an electronic load and an oscilloscope. The AC power supply is used to power the power module and the electronic load is the load of the power module. The test module is used to read the module status of the power module based on the operating parameters of each of the instruments and equipment, so as to obtain the test results of the current sub-item of the second-level test item under the first-level test item through the oscilloscope according to the module status.
11. The device testing apparatus according to claim 10, characterized in that, The test module is specifically used for: Test data is acquired via edge triggering based on the operating parameters of the oscilloscope. If the test data is determined to meet the derating requirements, the test results for the current sub-project are generated. The test results include the test data corresponding to the current sub-project, the waveform screenshot of the oscilloscope, the test conclusions, and the test basis.
12. The device testing apparatus according to claim 11, characterized in that, The test module is also used for: Acquire the load data of the device under test, and turn off the AC power supply and the electronic load to test another secondary sub-item under the primary test item; Call the test report module to generate a test report for the current sub-project based on the test report template and the test results of the current sub-project; The first-level test project ends after all the second-level sub-projects under the first-level test project have been tested.
13. The device testing apparatus according to claim 11, characterized in that, The test module is also used for: The oscilloscope is controlled to operate according to its operating parameters, and the waveform data of the device under test is read. Configure trigger mode parameters according to the waveform data, and perform edge triggering through the trigger mode parameters; Obtain the measurement value for a preset number of times, obtain the maximum value among the preset number of measurement values to obtain the test data corresponding to the current sub-item, and obtain the waveform screenshot of the oscilloscope.
14. The device testing apparatus according to claim 11, characterized in that, The device further includes: a self-testing and acquisition module; the self-testing and acquisition module is used for: The instrument performs a self-test and generates corresponding configuration parameters, which are used to initialize the settings of the instrument. Get the current sub-project of the second level under the first-level test project.
15. The device testing apparatus according to any one of claims 10-14, characterized in that, The primary test items include the white-box stress test of the device under test.
16. The device testing apparatus according to claim 15, characterized in that, The primary test item also includes extreme testing, and the device further includes: an extreme testing module; the extreme testing module is used for: Obtain the configuration parameters for the extreme test, perform a self-test on the instrument and equipment, and call the configuration library for the extreme test; Execute the extreme test project according to the configuration parameters of the extreme test and the configuration library, and obtain the extreme test results.
17. The device testing apparatus according to claim 10, characterized in that, The AC power supply and the electronic load are connected to the host computer via a first GPIB or USB. The oscilloscope is connected to the host computer via a second GPIB or a LAN port.
18. The device testing apparatus according to claim 10, characterized in that, The communication addresses of the AC power supply, the electronic load, and the oscilloscope are defined through a YAML address file.
19. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the device testing method as described in any one of claims 1-9.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the device testing method as described in any one of claims 1-9.
21. A computer program product comprising computer-executable instructions, which, when executed by a processor, are used to implement the device testing method as described in any one of claims 1-9.