CN111398703B - Automatic test method and device for voltage analog-to-digital converter and storage medium - Google Patents

Automatic test method and device for voltage analog-to-digital converter and storage medium Download PDF

Info

Publication number
CN111398703B
CN111398703B CN202010126363.5A CN202010126363A CN111398703B CN 111398703 B CN111398703 B CN 111398703B CN 202010126363 A CN202010126363 A CN 202010126363A CN 111398703 B CN111398703 B CN 111398703B
Authority
CN
China
Prior art keywords
test
voltage
digital converter
input file
voltage threshold
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
CN202010126363.5A
Other languages
Chinese (zh)
Other versions
CN111398703A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010126363.5A priority Critical patent/CN111398703B/en
Publication of CN111398703A publication Critical patent/CN111398703A/en
Application granted granted Critical
Publication of CN111398703B publication Critical patent/CN111398703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

The application discloses an automatic testing method and device of a voltage analog-to-digital converter and a computer readable storage medium. The method comprises the steps of firstly, obtaining a test input file of the voltage analog-to-digital converter, wherein the test input file is generated based on a high-voltage threshold and a low-voltage threshold of each channel of the voltage analog-to-digital converter; and then, based on the data driving and test input files, calling a pre-programmed test script to automatically test the voltage analog-to-digital converter and generating a test result. The voltage analog-digital converter testing method and device solve the problems that in the related technology, the voltage analog-digital converter is tested by pure hands, the efficiency is low, and mistakes are easy to make, and the voltage analog-digital converter can be tested efficiently, quickly and accurately.

Description

Automatic test method and device for voltage analog-to-digital converter and storage medium
Technical Field
The present disclosure relates to the field of testing technologies of voltage analog-to-digital converters, and in particular, to an automated testing method and apparatus for a voltage analog-to-digital converter, and a computer readable storage medium.
Background
The server motherboard has a voltage ADC (Analog-to-Digital Converter or Analog/Digital Converter) module to convert a continuous variable voltage Analog signal into a discrete Digital signal. The normal working state of the voltage ADC module is crucial to the stable and reliable operation of the server, and whether the voltage of a corresponding point on the mainboard is within a normal range or not can be monitored in real time in order to guarantee the normal operation of the server.
In the related art, when testing the voltage ADC, a test engineer usually executes a corresponding test command for each channel of the ADC module to read a channel value, calculates a voltage value by formula conversion of the read channel value, and then determines whether the voltage value is within a normal range.
However, this manual testing method is not only cumbersome, inefficient, but also prone to errors. Therefore, how to test the voltage ADC efficiently, quickly, and accurately is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The application provides an automatic testing method and device of a voltage analog-to-digital converter and a computer readable storage medium, solves the problems of low pure manual testing efficiency and easy error in the related technology, and can test a voltage ADC efficiently, quickly and accurately.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
an embodiment of the present invention provides an automated testing method for a voltage analog-to-digital converter, including:
acquiring a test input file of a voltage analog-to-digital converter, wherein the test input file is generated based on a high-voltage threshold and a low-voltage threshold of each channel of the voltage analog-to-digital converter;
and calling a test script to automatically test the voltage analog-to-digital converter based on the data drive and the test input file, and generating a test result.
Optionally, the calling a test script to perform an automatic test on the voltage analog-to-digital converter based on the data driving and the test input file, and generating a test result includes:
the test input file comprises a plurality of lines of test data, and each line of test data comprises a channel number, a high-voltage threshold and a low-voltage threshold;
reading the output value of the channel corresponding to the target test row;
converting the output value into a voltage value of a channel corresponding to the target test row by using a voltage conversion relation;
generating a test result item of the target test line according to the voltage value, a high voltage threshold and a low voltage threshold of the target test line;
and generating a test result document according to the test result items corresponding to each row of test data of the test input file.
Optionally, the generating a test result item of the target test line according to the voltage value and the high voltage threshold and the low voltage threshold of the target test line includes:
if the voltage value is not less than the low-voltage threshold value of the target test line and not more than the high-voltage threshold value of the target test line, recording the voltage value and setting a test result item of the target test line as successful;
if the voltage value is smaller than the low-voltage threshold value of the target test line or larger than the high-voltage threshold value of the target test line, recording the voltage value and setting a test result item of the target test line as failure.
Optionally, after the generating the test result, the method further includes:
acquiring the total number of test data in the test input file and the total number of failures in the test result file;
judging whether the ratio of the total number of the test data to the total number of the failures is greater than a preset alarm threshold value or not;
if yes, alarming and prompting are carried out.
Optionally, before acquiring the test input file of the voltage analog-to-digital converter, the method further includes:
acquiring a preset test input file generation template, wherein the test input file generation template is a table file of which the table head consists of a channel number, a high-pressure threshold and a low-pressure threshold;
acquiring the items to be tested, wherein the items to be tested comprise testing times, testing channel information of the voltage analog-to-digital converter, and a high-voltage threshold and a low-voltage threshold of each testing channel;
and calling the test input file generation template to automatically generate the test input file based on the item to be tested, wherein the line number in the test input file generation template is equal to the test times, and the test times are not less than the total number of the test channels.
Another aspect of the embodiments of the present invention provides an automatic testing apparatus for a voltage adc, including:
the test input file acquisition module is used for acquiring a test input file of the voltage analog-to-digital converter, wherein the test input file is generated based on a high-voltage threshold and a low-voltage threshold of each channel of the voltage analog-to-digital converter;
and the automatic test module is used for calling a test script to carry out automatic test on the voltage analog-to-digital converter based on the data drive and the test input file and generating a test result.
Optionally, the automated testing module includes:
the output value reading submodule is used for reading the output value of the channel corresponding to the target test row; the test input file comprises a plurality of lines of test data, and each line of test data comprises a channel number, a high-voltage threshold and a low-voltage threshold;
the voltage value conversion submodule is used for converting the output value into a voltage value of a channel corresponding to the target test row by using a voltage conversion relational expression;
the test result generation submodule is used for generating a test result item of the target test line according to the voltage value, the high-voltage threshold and the low-voltage threshold of the target test line;
and the test result document generating submodule is used for generating a test result document according to the test result items corresponding to each line of test data of the test input file.
Optionally, the system further comprises a test input file generation module; the test input file generation module comprises:
the template acquisition submodule is used for acquiring a preset test input file generation template, and the test input file generation template is a table file of which the header consists of a channel number, a high-pressure threshold and a low-pressure threshold;
the test information acquisition submodule is used for acquiring the items to be tested, and the items to be tested comprise the test times, the test channel information of the voltage analog-to-digital converter, and the high-voltage threshold and the low-voltage threshold of each test channel;
and the generation submodule is used for calling the test input file generation template to automatically generate the test input file based on the item to be tested, the number of lines in the test input file generation template is equal to the number of testing times, and the number of testing times is not less than the total number of the testing channels.
The embodiment of the present invention further provides an automatic testing apparatus for a voltage analog-to-digital converter, which includes a processor, and the processor is configured to implement the steps of the automatic testing method for a voltage analog-to-digital converter as described in any one of the preceding items when executing a computer program stored in a memory.
Finally, an embodiment of the present invention provides a computer-readable storage medium, where an automatic test program of a voltage analog-to-digital converter is stored on the computer-readable storage medium, and when the automatic test program of the voltage analog-to-digital converter is executed by a processor, the steps of the automatic test method of the voltage analog-to-digital converter are implemented as in any one of the foregoing.
The technical scheme provided by the application has the advantages that when different projects are tested, the ADC channels are different, the threshold values are different, only the test input file is required to be modified, and the test script is not required to be modified, so that the automatic test of the voltage analog-to-digital converter is realized, the test of the voltage ADC of different projects can be quickly adapted, and the quick transplantation of different projects is facilitated; the script is used for realizing the automatic test of the voltage ADC, the problems of low efficiency and easy error of pure manual test in the related technology are solved, and the voltage analog-to-digital converter can be tested efficiently, quickly and accurately.
In addition, the embodiment of the invention also provides a corresponding implementation device and a computer readable storage medium for the automatic test method of the voltage analog-to-digital converter, so that the method has higher practicability, and the device and the computer readable storage medium have corresponding advantages.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the related arts, the drawings used in the description of the embodiments or the related arts will be briefly described below, it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of an automated testing method for a voltage analog-to-digital converter according to an embodiment of the present invention;
fig. 2 is a structural diagram of an embodiment of an automatic testing apparatus for a voltage analog-to-digital converter according to an embodiment of the present invention;
fig. 3 is a block diagram of another embodiment of an automatic testing apparatus for a voltage analog-to-digital converter according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It should be apparent that the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
Having described the technical solutions of the embodiments of the present invention, various non-limiting embodiments of the present application are described in detail below.
Referring to fig. 1, fig. 1 is a schematic flow chart of an automated testing method for a voltage analog-to-digital converter according to an embodiment of the present invention, where the embodiment of the present invention includes the following steps:
s101: and acquiring a test input file of the voltage analog-to-digital converter.
In the present application, the test input file is a test file generated based on the item to be tested, the high voltage threshold value and the low voltage threshold value of each channel of the voltage analog-to-digital converter. The items to be tested are test contents for testing the voltage analog-to-digital converter according to specific application scenes or test requirements, different test items are provided, the number of ADC channels is different, the high-voltage threshold value and the low-voltage threshold value of each channel are also different, and the test times are different. The low voltage threshold and the high voltage threshold of each channel of the ADC device may be written according to a hardware design, and the test input file may be, for example, a file in ADC _ input.csv format, and may be a table file in the following format:
table 1 voltage ADC test input file ADC _ input.csv
channel low_limit(mv) high_limit(mv)
0 0 10
1 10 30
2 0 1300
15 20 1500
Wherein, channel is the channel number of the ADC device, low _ limit (mv) is the low voltage threshold in millivolts, and high _ limit (mv) is the high voltage threshold in millivolts. The ADC _ input.csv file as a test input file may describe the channel number of the ADC device, and the low voltage threshold and the high voltage threshold for each channel.
S102: and calling a test script to automatically test the voltage analog-to-digital converter based on the data driving and test input file, and generating a test result.
In the present application, data driving means that when a test script is fixed, the number of times the script is run is determined according to the number of data, that is, there are several sets of data, and the script is run for several times. And the test of different projects can be realized only by modifying the data and not modifying the script. The test script is pre-programmed and fixed, based on the test input file ADC _ input.csv, the test script is called to automatically test line by line, each line of test data corresponds to one test result, and after the test is finished, a total test result can be generated. Of course, the test result may also include information such as test time, test technician, ADC model, etc.
In the technical scheme provided by the embodiment of the invention, when different projects are tested, the ADC channels are different, the threshold values are different, only the test input file is required to be modified, and the test script is not required to be modified, so that the automatic test of the voltage analog-to-digital converter is realized, the test of the voltage ADC of different projects can be quickly adapted, and the quick transplantation of different projects is facilitated; the script is used for realizing the automatic test of the voltage ADC, the problems of low efficiency and easy error of pure manual test in the related technology are solved, and the voltage analog-to-digital converter can be tested efficiently, quickly and accurately.
In the foregoing embodiment, how to perform step S102 is not limited, and the test input file includes a plurality of lines of test data, where each line of test data includes a channel number, a high voltage threshold, and a low voltage threshold, and an implementation method in an implementation manner in this embodiment may include the following steps:
the test script may be:
reading out the output value of the corresponding channel;
calculating the voltage value of the corresponding channel by using a conversion formula;
if (voltage value > = $ { low _ limit }) & (voltage value < = $ { high _ limit })
{
Recording the voltage test value of the channel when the voltage value is in a normal range;
recording the test result as pass;
}
else
{
if the voltage value is not in the normal range, recording the voltage test value of the channel;
recording the test result as fail;
}
based on the test script, S102 may include:
reading the output value of the channel corresponding to the target test row;
converting the output value into a voltage value of a channel corresponding to the target test row by using a voltage conversion relation;
generating a test result item of the target test line according to the voltage value, the high voltage threshold and the low voltage threshold of the target test line;
and generating a test result document according to the test result items corresponding to each row of test data of the test input file.
If the voltage value is not less than the low-voltage threshold value of the target test line and not more than the high-voltage threshold value of the target test line, recording the voltage value and setting a test result item of the target test line as success; and if the voltage value is smaller than the low-voltage threshold value of the target test line or larger than the high-voltage threshold value of the target test line, recording the voltage value and setting a test result item of the target test line as failure.
In the embodiment of the present invention, for example, an addapp-read-ADC $ { channel } command may be used to read the values of the channels of the ADC; the voltage value of the corresponding channel may then be calculated using a voltage conversion formula, which may be any one of the formulas that can convert the value of the ADC channel into the voltage value in the related art, which is not limited in this application. The test results may be recorded in tabular form, such as may be shown in table 2.
TABLE 2 test results record table
channel low_limit(mv) high_limit(mv) actual_value(mv) result
0 0 10 1640 fail
1 10 30 1374 fail
2 0 1300 1263 pass
15 20 1500 1058 pass
Wherein actual _ value (mv) is the actual value tested, and the unit is millivolt; result is the test result: pass, fail. For example, the data in the 2 nd row in table 2 shows channel 1 of the ADC device, the low voltage threshold is 10mv, the high voltage threshold is 30mv, and the actually tested voltage value is 1374, which is fail because the value has exceeded the high voltage threshold by 30 mv.
It can be understood that if a large number of fail exist in the test result, it indicates that the working state of the tested voltage analog-to-digital converter is abnormal, and a hardware fault or a software fault exists, in order to ensure the normal operation of the server, an alarm threshold value can be preset, and the alarm threshold value indicates that the voltage analog-to-digital converter needs to be maintained or replaced, so as to avoid affecting the normal operation of the server; of course, a plurality of different alarm thresholds may be set, and the different alarm thresholds correspond to different degrees of abnormal states of the voltage analog-to-digital converter, which does not affect the implementation of the present application. In one embodiment, the total number of test data in the test input file and the total number of failures in the test result file can be obtained; judging whether the ratio of the total number of the test data to the total number of the failure times is greater than a preset alarm threshold value or not; if yes, alarming and prompting are carried out. Or, the alarm threshold value of the corresponding level is matched based on the ratio of the total number of the test data to the total number of the failure times, so as to carry out the alarm prompt of the corresponding level.
As another alternative, in order to improve the automation degree of the voltage ADC, the test input file may be automatically generated, and may include:
and acquiring a preset test input file generation template. The test input file generation template is a table file with a table header consisting of a channel number, a high-pressure threshold and a low-pressure threshold; the table line number of the test input file generation template is variable and can be determined according to the test times, wherein the test times refer to the times of calling the test script. Then acquiring items to be tested, wherein the items to be tested comprise testing times, testing channel information of the voltage analog-digital converter, and a high-voltage threshold and a low-voltage threshold of each testing channel; based on the item to be tested, the test input file generation template is called to automatically generate a test input file, and the content in the item to be tested can be matched and filled in the corresponding position of the test input file generation template. The number of lines in the test input file generation template is equal to the number of testing times, the number of testing times is not less than the total number of testing channels, each testing channel tests once, the total number of testing channels is the same as the number of testing times and the number of lines in the test input file generation template, and if the same testing channel tests for multiple times, the number of lines in the test input file generation template is larger than the total number of testing channels.
It should be noted that, in the present application, there is no strict sequential execution order among the steps, and as long as the logical order is met, the steps may be executed simultaneously or according to a certain preset order, and fig. 1 is only an exemplary manner, and does not represent that only the execution order is the order.
The embodiment of the invention also provides a corresponding device for the automatic test method of the voltage analog-to-digital converter, so that the method has higher practicability. Wherein the means may be described separately from a functional block point of view and a hardware point of view. In the following, the automated testing apparatus for a voltage adc according to the embodiments of the present invention is introduced, and the automated testing apparatus for a voltage adc described below and the automated testing method for a voltage adc described above may be referred to correspondingly.
Based on the angle of the function module, referring to fig. 2, fig. 2 is a structural diagram of an automatic testing apparatus of a voltage analog-to-digital converter according to an embodiment of the present invention, in a specific implementation, the apparatus may include:
the test input file acquiring module 201 is configured to acquire a test input file of the voltage analog-to-digital converter, where the test input file is a test file generated based on a high voltage threshold and a low voltage threshold of each channel of the voltage analog-to-digital converter.
And the automatic test module 202 is configured to invoke a test script to perform automatic test on the voltage analog-to-digital converter based on the data driving and test input file, and generate a test result.
Optionally, in some embodiments of this embodiment, the automated testing module 202 may include:
the output value reading submodule is used for reading the output value of the channel corresponding to the target test line; the test input file comprises a plurality of lines of test data, and each line of test data comprises a channel number, a high-voltage threshold and a low-voltage threshold;
the voltage value conversion submodule is used for converting the output value into a voltage value of a channel corresponding to the target test row by using a voltage conversion relational expression;
the test result generation submodule is used for generating a test result item of the target test line according to the voltage value, the high-voltage threshold value and the low-voltage threshold value of the target test line;
and the test result document generation submodule is used for generating a test result document according to the test result items corresponding to each row of test data of the test input file.
In some implementations of the embodiments of the present invention, the test result generation sub-module may be specifically configured to record the voltage value and set the test result item of the target test line as successful if the voltage value is not less than the low-voltage threshold of the target test line and not greater than the high-voltage threshold of the target test line; and if the voltage value is smaller than the low-voltage threshold value of the target test line or larger than the high-voltage threshold value of the target test line, recording the voltage value and setting a test result item of the target test line as failure.
In other embodiments of the present invention, the automated testing module 202 may further include an alarm processing sub-module, for example, configured to perform an alarm prompt if a ratio of the total number of test data in the test input file to the total number of failures in the test result document is greater than a preset alarm threshold.
Optionally, in other embodiments of this embodiment, the apparatus may further include, for example, a test input file generation module; the test input file generation module comprises:
the template acquisition submodule is used for acquiring a preset test input file generation template, and the test input file generation template is a table file of which the header consists of a channel number, a high-voltage threshold and a low-voltage threshold;
the test information acquisition submodule is used for acquiring items to be tested, and the items to be tested comprise test times, test channel information of the voltage analog-to-digital converter, and a high-voltage threshold and a low-voltage threshold of each test channel;
and the generation submodule is used for calling a test input file generation template to automatically generate a test input file based on the item to be tested, wherein the line number in the test input file generation template is equal to the test times, and the test times are not less than the total number of the test channels.
The functions of the functional modules of the automatic testing device of the voltage analog-to-digital converter according to the embodiments of the present invention can be specifically implemented according to the method in the embodiments of the method, and the specific implementation process may refer to the description related to the embodiments of the method, which is not described herein again.
Therefore, the voltage ADC testing method and device solve the problems that in the related technology, pure manual testing is low in efficiency and prone to errors, and can test the voltage ADC efficiently, quickly and accurately.
The above mentioned automatic testing device for voltage analog-to-digital converter is described from the perspective of functional module, and further, the present application also provides an automatic testing device for voltage analog-to-digital converter, which is described from the perspective of hardware. Fig. 3 is a block diagram of another apparatus for automatically testing a voltage analog-to-digital converter according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus comprises a memory 30 for storing a computer program;
the processor 31, when executing the computer program, is configured to implement the steps of the method for automatically testing the voltage analog-to-digital converter according to the above-mentioned embodiments.
The processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 31 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 31 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in a wake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 31 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 31 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
Memory 30 may include one or more computer-readable storage media, which may be non-transitory. Memory 30 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used for storing the following computer program 301, wherein after being loaded and executed by the processor 31, the computer program can implement the relevant steps of the method for automatically testing a voltage analog-to-digital converter disclosed in any one of the foregoing embodiments. In addition, the resources stored by the memory 30 may also include an operating system 302, data 303, and the like, and the storage may be transient storage or permanent storage. Operating system 302 may include Windows, unix, linux, etc. Data 303 may include, but is not limited to, data corresponding to test results, and the like.
In some embodiments, the device for automatically testing the voltage analog-to-digital converter may further include a display screen 32, an input/output interface 33, a communication interface 34, a power supply 35, and a communication bus 36.
Those skilled in the art will appreciate that the configuration shown in fig. 3 does not constitute a limitation of an automated testing apparatus for voltage analog to digital converters and may include more or fewer components than those shown, such as sensor 37.
The functions of the functional modules of the automatic testing device of the voltage analog-to-digital converter according to the embodiments of the present invention can be specifically implemented according to the method in the embodiments of the method, and the specific implementation process may refer to the description related to the embodiments of the method, which is not described herein again.
Therefore, the voltage ADC testing method and device solve the problems that pure manual testing in the related technology is low in efficiency and prone to error, and can test the voltage ADC efficiently, quickly and accurately.
It is understood that, if the automatic testing method of the voltage analog-to-digital converter in the above embodiments is implemented in the form of a software functional unit and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, a magnetic or optical disk, and other various media capable of storing program codes.
Based on this, the embodiment of the present invention further provides a computer-readable storage medium, which stores an automatic test program of the voltage analog-to-digital converter, where the automatic test program of the voltage analog-to-digital converter is executed by a processor, and the steps of the automatic test method of the voltage analog-to-digital converter according to any one of the above embodiments are provided.
The functions of the functional modules of the computer-readable storage medium according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Therefore, the voltage ADC testing method and device solve the problems that pure manual testing in the related technology is low in efficiency and prone to error, and can test the voltage ADC efficiently, quickly and accurately.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The present application provides a method, an apparatus and a computer readable storage medium for automatically testing a voltage analog-to-digital converter. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present application.

Claims (8)

1. An automated testing method for a voltage analog-to-digital converter, comprising:
acquiring a test input file of a voltage analog-to-digital converter, wherein the test input file is generated based on a high-voltage threshold and a low-voltage threshold of each channel of the voltage analog-to-digital converter;
based on the data drive and the test input file, calling a test script to carry out automatic test on the voltage analog-to-digital converter and generating a test result; the data driving means that the running times of the script are determined according to the number of data under the condition that the test script is fixed;
the step of calling a test script to automatically test the voltage analog-to-digital converter based on the data drive and the test input file and generating a test result comprises the following steps:
the test input file comprises a plurality of lines of test data, and each line of test data comprises a channel number, a high-voltage threshold and a low-voltage threshold;
reading the output value of the channel corresponding to the target test row;
converting the output value into a voltage value of a channel corresponding to the target test row by using a voltage conversion relation;
generating a test result item of the target test line according to the voltage value, a high voltage threshold and a low voltage threshold of the target test line;
and generating a test result document according to the test result items corresponding to each row of test data of the test input file.
2. The method of claim 1, wherein generating a test result entry for the target test row according to the voltage value and the high voltage threshold and the low voltage threshold of the target test row comprises:
if the voltage value is not less than the low-voltage threshold value of the target test row and not more than the high-voltage threshold value of the target test row, recording the voltage value and setting a test result item of the target test row as success;
and if the voltage value is smaller than the low-voltage threshold value of the target test line or larger than the high-voltage threshold value of the target test line, recording the voltage value and setting a test result item of the target test line as failure.
3. The method for automatically testing a voltage analog-to-digital converter according to claim 2, wherein after generating the test result, the method further comprises:
acquiring the total number of test data in the test input file and the total number of failure times in the test result document;
judging whether the ratio of the total number of the test data to the total number of the failure times is larger than a preset alarm threshold value or not;
if yes, alarming and prompting are carried out.
4. The method for automatically testing the voltage analog-to-digital converter according to any one of claims 1 to 3, wherein before obtaining the test input file of the voltage analog-to-digital converter, the method further comprises:
acquiring a preset test input file generation template, wherein the test input file generation template is a table file of which the table head consists of a channel number, a high-pressure threshold and a low-pressure threshold;
acquiring items to be tested, wherein the items to be tested comprise testing times, testing channel information of the voltage analog-to-digital converter, and a high-voltage threshold and a low-voltage threshold of each testing channel;
and calling the test input file generation template to automatically generate the test input file based on the items to be tested, wherein the number of lines in the test input file generation template is equal to the test times, and the test times are not less than the total number of test channels.
5. An automated testing apparatus for a voltage analog-to-digital converter, comprising:
the test input file acquisition module is used for acquiring a test input file of the voltage analog-to-digital converter, wherein the test input file is generated based on a high-voltage threshold and a low-voltage threshold of each channel of the voltage analog-to-digital converter;
the automatic test module is used for calling a test script to automatically test the voltage analog-to-digital converter based on the data drive and the test input file and generating a test result; the data driving means that the running times of the script are determined according to the number of data under the condition that the test script is fixed;
wherein, the automatic test module includes:
the output value reading submodule is used for reading the output value of the channel corresponding to the target test row; the test input file comprises a plurality of lines of test data, and each line of test data comprises a channel number, a high-voltage threshold and a low-voltage threshold;
the voltage value conversion submodule is used for converting the output value into a voltage value of a channel corresponding to the target test line by using a voltage conversion relational expression;
the test result generation submodule is used for generating a test result item of the target test line according to the voltage value, the high-voltage threshold and the low-voltage threshold of the target test line;
and the test result document generating submodule is used for generating a test result document according to the test result items corresponding to each line of test data of the test input file.
6. The automated testing apparatus of a voltage analog-to-digital converter according to claim 5, further comprising a test input file generation module; the test input file generation module comprises:
the template acquisition submodule is used for acquiring a preset test input file generation template, and the test input file generation template is a table file of which the header consists of a channel number, a high-pressure threshold and a low-pressure threshold;
the test information acquisition submodule is used for acquiring a to-be-tested item, wherein the to-be-tested item comprises the test times, the test channel information of the voltage analog-to-digital converter, and the high-voltage threshold value and the low-voltage threshold value of each test channel;
and the generation submodule is used for calling the test input file generation template to automatically generate the test input file based on the item to be tested, wherein the line number in the test input file generation template is equal to the test times, and the test times are not less than the total number of the test channels.
7. An apparatus for automated testing of a voltage analog to digital converter, comprising a processor for implementing the steps of a method for automated testing of a voltage analog to digital converter according to any one of claims 1 to 4 when executing a computer program stored in a memory.
8. A computer-readable storage medium, wherein an automated test program for a voltage analog-to-digital converter is stored on the computer-readable storage medium, and when executed by a processor, the automated test program for a voltage analog-to-digital converter implements the steps of the automated test method for a voltage analog-to-digital converter according to any one of claims 1 to 4.
CN202010126363.5A 2020-02-28 2020-02-28 Automatic test method and device for voltage analog-to-digital converter and storage medium Active CN111398703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010126363.5A CN111398703B (en) 2020-02-28 2020-02-28 Automatic test method and device for voltage analog-to-digital converter and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010126363.5A CN111398703B (en) 2020-02-28 2020-02-28 Automatic test method and device for voltage analog-to-digital converter and storage medium

Publications (2)

Publication Number Publication Date
CN111398703A CN111398703A (en) 2020-07-10
CN111398703B true CN111398703B (en) 2022-12-13

Family

ID=71428530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010126363.5A Active CN111398703B (en) 2020-02-28 2020-02-28 Automatic test method and device for voltage analog-to-digital converter and storage medium

Country Status (1)

Country Link
CN (1) CN111398703B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111896865B (en) * 2020-07-30 2021-06-25 电子科技大学 Fault position detection method for signal acquisition system
CN114578210B (en) * 2022-02-25 2024-02-02 苏州浪潮智能科技有限公司 Mainboard testing method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470004A (en) * 2018-04-09 2018-08-31 平安普惠企业管理有限公司 Test script generation method, test method, device, equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470004A (en) * 2018-04-09 2018-08-31 平安普惠企业管理有限公司 Test script generation method, test method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111398703A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN107844417B (en) Test case generation method and device
US10832179B2 (en) Method for constructing a future-state power grid model, device and equipment and storage medium
CN111398703B (en) Automatic test method and device for voltage analog-to-digital converter and storage medium
CN107370637B (en) Vehicle-mounted ECU communication function automatic test system and method
CN110543420B (en) Software testing method, system, terminal and storage medium
CN114662427B (en) Debugging method and device for logic system design
CN107766188B (en) Memory detection method and device in train control system
CN113835643B (en) Data storage method and device, electronic equipment and readable storage medium
CN114003451B (en) Interface testing method, device, system and medium
CN109344074B (en) Cross-platform automatic testing method and system
US20220358269A1 (en) Simulation execution system, simulation execution method, and computer readable medium
CN110908903A (en) Test method based on editable YAML file
CN112487588B (en) Wind power plant reactive voltage regulation function test method, terminal equipment and storage medium
CN111475186A (en) Firmware upgrading method, device, equipment and medium based on BMC
CN115164994A (en) Load spectrum-based test method, device, equipment and medium
CN113986618B (en) Cluster brain fracture automatic repair method, system, device and storage medium
CN114879647A (en) ECU fault code test system, electronic controller and car
CN104765616B (en) A kind of method and system for automatically generating I/O model
CN110399258B (en) Stability testing method, system and device for server system
CN112527631A (en) bug positioning method, system, electronic equipment and storage medium
CN111008150A (en) Test report generation method, device and equipment
CN115422851B (en) Power system element model calibration method, device, equipment and storage medium
CN113643128B (en) Automatic testing method and device for bank products
CN117827620B (en) Abnormality diagnosis method, training device, training equipment, and recording medium
CN111324523B (en) Data processing method and device

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