CN115629996B - Automatic testing method for embedded software - Google Patents

Automatic testing method for embedded software Download PDF

Info

Publication number
CN115629996B
CN115629996B CN202211646760.0A CN202211646760A CN115629996B CN 115629996 B CN115629996 B CN 115629996B CN 202211646760 A CN202211646760 A CN 202211646760A CN 115629996 B CN115629996 B CN 115629996B
Authority
CN
China
Prior art keywords
embedded
data
test case
automatic
test
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
CN202211646760.0A
Other languages
Chinese (zh)
Other versions
CN115629996A (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.)
Shenzhen Weike Technology Co ltd
Original Assignee
Shenzhen Wake Up 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 Shenzhen Wake Up Technology Co ltd filed Critical Shenzhen Wake Up Technology Co ltd
Priority to CN202211646760.0A priority Critical patent/CN115629996B/en
Publication of CN115629996A publication Critical patent/CN115629996A/en
Application granted granted Critical
Publication of CN115629996B publication Critical patent/CN115629996B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses an automatic testing method of embedded software, in particular to the field of embedded software testing, which is used for solving the problems that most of the existing embedded software testing still adopts manual repeated functional testing, the testing efficiency is extremely low, the coverage is incomplete and the error rate is high; the method comprises the following steps that after a test case management tool is successfully connected, the test cases are issued to an embedded product according to a configured test case in a single sequence; activating an automatic testing process after the embedded product successfully receives the automatic testing plug-in; the key node replacement code segment takes effect, and the embedded software executes according to the established business process; the embedded business function code is executed and the result of the business execution is sent to a test case management tool; according to the invention, the automatic test case plug-in is injected into the embedded product as required through the test case management tool, so that the automatic test and management of the embedded software are realized, and the artificial repeated tedious test is completely eliminated; the testing efficiency and the software quality are greatly improved.

Description

Automatic testing method for embedded software
Technical Field
The invention relates to the technical field of embedded software testing, in particular to an automatic testing method for embedded software.
Background
After twenty-first century, hardware components have been developed rapidly, so that embedded software has more powerful and complex functions.
At present, due to the limitations of a program running carrier (generally referred to as a PCBA motherboard), such as the limitation of CPU resources or flash storage, the support of a compiling tool chain, and the like, no method exists for automatically testing the embedded software on the running carrier. Common embedded software testing methods include the following: most of the tests are 100 percent of manual work and repeated functional tests; directly writing the test code in the product code; the test code is executed out of order as an independent process; therefore, the existing software testing method has the following defects:
1. the method has the advantages that the method is purely manual, tedious and repeated in functional test, extremely low in test efficiency, incomplete in coverage and high in error rate; when the business cost increases, the labor cost also increases;
2. test codes are directly written in product codes, so that code redundancy is greatly increased, and the test codes can be developed only aiming at few functions and are hardly adopted;
3. the test codes are executed out of order as independent processes, are random tests with no purpose, and have extremely low pertinence and extremely high time consumption;
4. the prior art does not have a testing method capable of carrying out 100% coverage on the release version of embedded software, and also does not carry out automatic service function testing on the embedded software.
In view of the above problems, the present invention proposes a solution.
Disclosure of Invention
In order to overcome the above defects in the prior art, embodiments of the present invention provide an automated testing method for embedded software, which injects an automated test case plug-in into an embedded product as required by a test case management tool, so as to implement automated testing and management for embedded software, and completely get rid of manual repeated tedious testing; the testing efficiency and the software quality are greatly improved, and the problems in the background technology are solved.
In order to achieve the purpose, the invention provides the following technical scheme:
an automatic testing method for embedded software comprises the following steps:
selecting an automatic test case to be tested by the test case management tool;
normally powering on and starting the embedded product;
the test case management tool is connected with the embedded product;
after the test case management tool is successfully connected, the test cases are issued to the embedded product according to the configured test cases in a single sequence;
the embedded product activates the automatic testing process after receiving the automatic testing plug-in unit successfully, at the moment, the plug-in unit is initialized, the preset condition setting is completed, the code segment is inserted into the subsequent service code at a specific node, and the embedded software code is replaced;
enabling the embedded software to normally start a service process;
the key node replacement code segment takes effect, and the embedded software is executed according to the established business flow;
the embedded business function code is executed and the result of the business execution is sent to a test case management tool;
and repeatedly executing the automatic test flow until all the automatic test cases are completed.
In a preferred embodiment, after the embedded business function code is executed, the result of the business execution is matched with the expectation, and the matching result is also sent to the test case management tool.
In a preferred embodiment, when the embedded product performs an automatic test process, the operation condition information of the embedded product is judged and analyzed, and the specific analysis process is as follows:
acquiring a temperature difference heat dissipation factor, an electromagnetic interference factor and a voltage deviation factor, and respectively marking the temperature difference heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor as T, EMI and U; judging the sizes of the temperature difference heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor and the corresponding threshold values;
if any value of the temperature difference heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor exceeds a corresponding threshold value, regulating and controlling the factor exceeding the threshold value;
if the heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor do not exceed the corresponding threshold values, calculating to obtain an operation deviation coefficient E through a formula, wherein the specific calculation expression is as follows:
Figure 337124DEST_PATH_IMAGE001
in the formula, a1, a2 and a3 are respectively preset proportionality coefficients of a temperature difference heat dissipation factor, an electromagnetic interference factor and a voltage deviation factor;
and comparing the operation deviation coefficient with a standard operation threshold, and if the operation deviation coefficient is greater than the standard operation threshold, sequencing the heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor from large to small according to the deviation of the operation deviation coefficient and the standard operation threshold, and regulating and controlling according to the sequencing sequence.
In a preferred embodiment, when the embedded service function code is executed and the result of the service execution is sent to the test case management tool, the communication condition information of the upper computer and the lower computer is analyzed:
acquiring a data real-time quantity, a data floating value and a data floating frequency, and respectively marking the data real-time quantity, the data floating value and the data floating frequency as B, F and F; judging the real-time data quantity, the data floating value and the data floating frequency and the corresponding threshold value:
if any value of the real-time data quantity, the floating data value and the floating data frequency exceeds the corresponding threshold value, regulating and controlling a factor exceeding the threshold value;
if the real-time data quantity, the data floating value and the data floating frequency do not exceed the corresponding threshold values, the data stability coefficient R is obtained through formula calculation, and the specific calculation expression is as follows:
Figure 823600DEST_PATH_IMAGE002
in the formula, b1, b2 and b3 are respectively preset proportionality coefficients of data real-time quantity, data floating value and data floating frequency;
and comparing the data stability coefficient with a standard stability threshold, and if the data stability coefficient is greater than the standard stability threshold, sequencing the real-time data quantity, the data floating value and the data floating frequency from large to small according to the deviation from the respective thresholds, and regulating and controlling in sequence according to the sequencing.
In a preferred embodiment, after the test case management tool receives the service execution result, the validity of the overall automatic test result is evaluated, and the specific evaluation method is as follows:
acquiring a result of service execution, an expected matching degree M, and operation condition information and communication condition information in a test process; and calculating an evaluation coefficient K of an automatic test result through a formula, wherein the specific expression is as follows:
Figure 692068DEST_PATH_IMAGE003
in the formula, c1, c2 and c3 are respectively preset proportionality coefficients of a service execution result and an expected matching degree, a data stability coefficient R and an operation deviation coefficient E;
comparing the evaluation coefficient K of the automatic test result with an evaluation standard threshold, and if the evaluation coefficient K of the automatic test result is smaller than the evaluation standard threshold, testing again after adjustment;
and if the evaluation coefficient K of the automatic test result is greater than or equal to the evaluation standard threshold, the automatic test result meets the requirement, at the moment, the automatic test result is specifically evaluated, whether the embedded software can normally run is determined, and single automatic test of the embedded software is completed.
In a preferred embodiment, when a key node replacement code segment takes effect, acquiring the service flow time of the embedded software for executing the automatic test case plug-in, and if the execution time is greater than an execution time threshold, marking the automatic test case plug-in of the node to prompt that the node is abnormal;
when the execution time of each node is smaller than the execution time threshold, acquiring the total operation time of the system software of the embedded product, acquiring the execution time of the plug-in service of the automatic test case, comparing the two execution times, and if the ratio of the execution time of the plug-in service to the total operation time of the system software of the embedded product is larger than the standard ratio threshold, marking the service execution result of the automatic test and prompting the test abnormity.
The embedded software automatic testing method has the technical effects and advantages that:
according to the invention, the automatic test case plug-in is injected into the embedded product as required through the test case management tool, so that the automatic test and management of the embedded software are realized, and the artificial repeated and tedious test is completely eliminated; the testing efficiency and the software quality are greatly improved;
the invention can dynamically load the plug-in unit, inject a large amount of test codes into the embedded software, and can finish a large amount of tests almost without the limitation of flash storage;
the automatic test plug-in is completely independent and dynamically loaded and unloaded, and the performance and the function of the embedded product are not influenced completely after the test is finished; the maintenance difficulty is almost 0, and the problem that bug is brought to a product by a test code is avoided;
the invention injects codes to freely control the execution time sequence and flow of the embedded software, and realizes 100% coverage test of the embedded software;
the testing process of the invention executes the source code of the embedded product, 100 percent of the product service function is restored, and the code is injected to realize the judgment of the normal service function and realize the automatic testing management.
Drawings
FIG. 1 is a schematic diagram of an embedded software automation test object connection topology according to the present invention;
fig. 2 is a timing diagram of an automated testing method for embedded software according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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.
Example 1
FIG. 1 is a schematic diagram of an embedded software automation test object connection topology according to the present invention; fig. 2 shows a timing diagram of an automated testing method for embedded software according to the present invention, as shown in fig. 1, the present invention includes a test case management tool, the test case management tool includes a plurality of automated test case plug-ins, and the test case management tool is in signal connection with an embedded product.
The test case management tool is a management tool for automatic test case plug-ins/automatic test results/test;
the automatic test case plug-in comprises the preset condition setting of a test case, the operation guidance of embedded software and the expected judgment of a test result;
the embedded product comprises an embedded software release version which is an embedded independent process running on an embedded product carrier;
the test case management tool is connected with the embedded software through wires or wirelessly to establish a test communication mechanism; the test case management tool issues the automatic test case plug-in unit to the embedded product carrier according to the requirement, and activates the embedded software through a protocol to enter an automatic test flow;
when the embedded software enters the automatic test process, the automatic test plug-in is loaded, and after the loading is successful, a large number of test codes, such as the running basic conditions/data of the embedded software, the execution path of the service logic code and the expected judgment of the service logic running result, are implanted into the embedded software.
The embedded software activates a one-time automatic test case, a program captures preposed basic data in the running process, the program is executed according to the preposed condition at the inflection point of a key service code, and the data generated in the running process is subjected to expected value matching after the running is finished, so that the one-time automatic test process is completed and a test result is returned to a management tool;
and the test case management tool counts the test result and circularly completes other test plug-in cases of the automatic test according to the requirement.
As shown in fig. 2, the specific test method is as follows:
s1, selecting an automatic test case to be tested by a test case management tool;
s2, normally powering on and starting the embedded product;
s3, establishing connection between the test case management tool and the embedded product;
s4, the test case management tool issues the test cases after the connection is successful to the embedded product according to the configured test cases in sequence;
and S5, activating an automatic test flow after the embedded product successfully receives the automatic test plug-in, initializing the plug-in at the moment, finishing the setting of the precondition, operating the subsequent service codes on a specific data/service basis, and replacing/inserting code segments into the embedded software codes at specific nodes.
S6, enabling the embedded software to normally start a service process;
s7, the key node replacing code segment takes effect, at the moment, part of codes of the embedded software can be replaced by the plug-in (including data), and the embedded software is guided to execute according to the established business process;
s8, the key node insertion code segment takes effect, at the moment, the embedded software jumps to the plug-in code segment, executes additional services (such as changing/judging data), and returns to the embedded software code segment to continue executing downwards;
s9, completing the execution of the embedded service function code;
s10, matching the result of the inserted code segment on the service execution with an expectation, and returning the result to a test case management tool;
step S11, repeatedly executing the steps S5 to S10 until all the automatic test cases are completed;
and S12, counting the test result and outputting a visual report by the management tool.
It should be noted that, the number of the plug-ins of the automated test case of the key node is greater than or equal to 1, and step S7 and step S8 are only examples, and a plurality of key node replacement code segments can be actually validated to meet the test requirements.
The test case management tool can independently run on a personal computer; the tester only needs to select a test case and connect an embedded product carrier to a computer tool as required, and the system can automatically complete a test task after starting the test; and activating a test mode after the embedded product carrier loads the automatic test plug-in, and returning a test result to the management tool.
According to the invention, the automatic test case plug-in is injected into the embedded product as required through the test case management tool, so that the automatic test and management of the embedded software are realized, and the artificial repeated and tedious test is completely eliminated; the testing efficiency and the software quality are greatly improved.
Example 2
The difference between the embodiment 2 and the embodiment 1 is that the embodiment 1 mainly introduces how to automatically test the embedded software, but in the actual test process, the embedded software is easily affected by various reasons during the test, and the embodiment mainly monitors various working condition information during the test of the embedded software in real time and adjusts the automatic test method of the embedded software based on different working condition information so as to ensure that the test result is more accurate.
Specifically, the working condition information includes operating condition information of the embedded product and communication working condition information between the upper computer and the lower computer, the upper computer may be a personal computer, and the lower computer is the embedded product.
The operation condition information refers to the influence parameters of the environment where the embedded product is located on the embedded product and the operation parameters of the embedded product, and in detail, the operation condition information comprises a temperature difference heat dissipation factor, an electromagnetic interference factor and a voltage deviation factor; the temperature difference heat dissipation factor refers to an absolute value obtained by subtracting a rated working temperature from a real-time temperature on the surface of the embedded product, the electromagnetic interference factor refers to an absolute value obtained by subtracting a rated working electromagnetic wave frequency of the embedded product from a peripheral real-time electromagnetic wave frequency of the embedded product, and the voltage deviation factor refers to an absolute value of deviation between a real-time voltage and a rated working voltage of a test circuit of the embedded product.
The real-time voltage of the embedded product is acquired through a voltage sensor, the frequency of the peripheral real-time electromagnetic waves can be acquired through an oscilloscope, and the real-time temperature of the surface can also be acquired through a temperature sensor.
The temperature difference heat dissipation factor reflects the heat dissipation condition of the embedded product; the electromagnetic interference factor reflects the influence of the electromagnetic wave frequency around the embedded product; the voltage deviation factor reflects the stable condition of the working voltage of the embedded product, and the working state of the embedded product is different under different conditions, so that the embedded product needs to be collected and judged.
The communication working condition information refers to a communication condition that an execution result of the embedded product service is returned to the upper computer test case management tool, and specifically, the communication working condition information comprises a data real-time quantity, a data floating value and a data floating frequency, the data real-time quantity refers to a real-time data quantity that the execution result of the embedded product service is sent to the test case management tool, and when the data quantity is too large, the communication is easily blocked due to more test result data; the data floating value and the data floating frequency represent the real-time data stable state of the result of the service execution of the embedded product sent to the test case management tool.
Therefore, when the automatic test is performed, if any one of the temperature difference heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor exceeds the corresponding threshold, it is determined that the current embedded product is in a poor operation state, and the embedded product needs to be correspondingly regulated and controlled to ensure that the embedded software operates normally.
Specifically, the temperature difference heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor are respectively calibrated to be T, EMI and U, and the operation deviation coefficient E is obtained through formula calculation, wherein the specific calculation expression is as follows:
Figure 21418DEST_PATH_IMAGE001
in the formula, a1, a2, and a3 are preset proportionality coefficients of the temperature difference heat dissipation factor, the electromagnetic interference factor, and the voltage deviation factor, respectively, and a1, a2, and a3 are all greater than 0.
And comparing the operation deviation coefficient E with a standard operation threshold, wherein if the operation deviation coefficient E is greater than the standard operation threshold, the situation shows that the comprehensive operation environment is poor although the temperature difference heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor do not exceed the self-set threshold, and the operation state of the embedded product is still poor. And if the operation deviation coefficient E is less than or equal to the standard operation threshold value, the operation state of the embedded product is good.
Meanwhile, when the service execution result is sent to the test case management tool, if the real-time data quantity, the floating data value and the floating data frequency cannot be guaranteed to exceed the corresponding threshold values, the data received by the upper computer is prone to being distorted and inaccurate, and therefore when any numerical value of the real-time data quantity, the floating data value and the floating data frequency exceeds the corresponding threshold values, the data transmission is judged to be inaccurate and the data needs to be uploaded again; when the real-time data quantity, the data floating value and the data floating frequency do not exceed the corresponding threshold values, the whole embedded software needs to be analyzed so as to ensure that the service result of the embedded software is transmitted normally.
Specifically, the data real-time quantity, the data floating value and the data floating frequency are respectively marked as B, F and F to be represented, and a data stability coefficient R is obtained through formula calculation, wherein the specific calculation expression is as follows:
Figure 33368DEST_PATH_IMAGE002
in the formula, b1, b2, b3 are preset proportionality coefficients of data real-time quantity, data floating value and data floating frequency, and b1, b2, b3 are all greater than 0.
And comparing the data stability coefficient R with a standard stability threshold, and if the data stability coefficient R is greater than the standard stability threshold, indicating that the comprehensive transmission quality is poor although the real-time data quantity, the data floating value and the data floating frequency do not exceed the self-set threshold, and the service execution result received by the upper computer still has deviation. And when the data stability coefficient R is less than or equal to the standard stability threshold, the service execution result data received by the upper computer is good.
After the test case management tool receives the service execution result, the effectiveness of the whole automatic test result is evaluated, the effectiveness comprises the matching degree of the service execution result and the expected result, the operation condition information and the communication condition information in the test process, when the matching degree of the service execution result and the expected result is higher, the automatic test result completion degree is better, when the data stability coefficient R and the operation deviation coefficient E are higher, the working condition of the automatic test is worse, namely the deviation from the theoretical actual operation result is larger, and at the moment, the automatic test result is worse. Therefore, the matching degree between the result of the service execution and the expected matching degree is designated as M, and an evaluation coefficient K of the automatic test result is calculated through a formula, wherein the specific expression is as follows:
Figure 233405DEST_PATH_IMAGE003
in the formula, c1, c2, and c3 are respectively preset proportionality coefficients of the result of the service execution and the expected matching degree, the data stability coefficient R, and the operation deviation coefficient E, and c1, c2, and c3 are all greater than 0.
Comparing the evaluation coefficient K of the automatic test result with an evaluation standard threshold, if the evaluation coefficient K of the automatic test result is smaller than the evaluation standard threshold, indicating that the automatic test result does not meet the requirement, determining the items to be adjusted according to the relevant numerical values of the matching degree, the data stability coefficient and the operation deviation coefficient, and testing again after adjustment; if the evaluation coefficient K of the automatic test result is greater than or equal to the evaluation standard threshold, the automatic test result meets the requirement. And at the moment, the automatic test result is specifically evaluated, whether the embedded software can normally run is determined, and single automatic test of the embedded software is completed.
The preset proportion coefficient is used for balancing the proportion weight of each item of data in formula calculation, so that the accuracy of the calculation result is promoted; the size of the coefficient is a specific numerical value obtained by quantizing each parameter, so that the subsequent comparison is convenient, and the size of the coefficient depends on the number of sample data and a corresponding weight factor coefficient is preliminarily set for each group of sample data by a person skilled in the art; as long as the proportional relationship between the parameters and the quantized values is not affected.
Example 3
The difference between the embodiment 3 of the present invention and the above-mentioned embodiment is that the above-mentioned embodiment focuses on monitoring, regulating and controlling the automated testing method and the working condition information during the automated testing process, but because the automatic testing case plug-in of the present invention is directly injected into the embedded product, at the stage of the key node replacement code segment becoming effective, part of the code of the embedded software is replaced by the plug-in (including data), and the embedded software is guided to execute according to the established business process, and at this time, if the execution time is too long, the real-time performance of the system software of the embedded product itself is affected.
Therefore, in this embodiment, the time for the embedded software to execute the service flow of the automatic test case plug-in is obtained, if the execution time is greater than the execution time threshold, it indicates that the system waiting time of the embedded software is too long, and the automatic test case plug-in of the node is marked to prompt that the node is abnormal.
Meanwhile, when the execution time of each node is smaller than the execution time threshold, the total running time of the system software of the embedded product is obtained, the automatic test case plug-in service execution time is obtained, the two are compared, if the proportion of the plug-in service execution time to the total running time of the system software of the embedded product is larger than the standard proportion threshold, the self-system waiting time of the test embedded software is overlong, the service execution result of the automatic test is marked, and the test abnormality is prompted.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information which can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
The following points are also required: firstly, in the drawings of the disclosed embodiments of the present invention, only the structures related to the disclosed embodiments are referred to, and other structures can refer to general designs, and under the condition of no conflict, the same embodiment and different embodiments of the present invention can be combined with each other;
secondly, the method comprises the following steps: the application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
And finally: the present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (3)

1. An automatic testing method for embedded software is characterized by comprising the following steps:
selecting an automatic test case to be tested by the test case management tool;
normally powering on and starting the embedded product;
the test case management tool is connected with the embedded product;
after the test case management tool is successfully connected, the test cases are issued to the embedded product according to the configured test cases in a single sequence;
after the embedded product successfully receives the automatic testing plug-in, activating an automatic testing process, initializing the plug-in, completing the setting of the precondition, inserting a code segment into a specific node by a subsequent service code, and replacing an embedded software code;
enabling the embedded software to normally start a service process;
the key node replacement code segment takes effect, and the embedded software executes according to the established business process;
the embedded business function code is executed and the result of the business execution is sent to a test case management tool;
repeatedly executing the automatic test flow until all the automatic test cases are completed;
when the embedded product carries out an automatic test process, the operation condition information of the embedded product is judged and analyzed, and the specific analysis process is as follows:
acquiring a temperature difference heat dissipation factor, an electromagnetic interference factor and a voltage deviation factor, and judging the temperature difference heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor and the size of the corresponding threshold value:
if any value of the temperature difference heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor exceeds a corresponding threshold value, regulating and controlling the factor exceeding the threshold value;
if the heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor do not exceed the corresponding threshold values, calculating to obtain an operation deviation coefficient through a formula;
comparing the operation deviation coefficient with a standard operation threshold, if the operation deviation coefficient is greater than the standard operation threshold, sequencing the heat dissipation factor, the electromagnetic interference factor and the voltage deviation factor from large to small according to the deviation of the operation deviation coefficient with the respective thresholds, and regulating and controlling according to the sequencing sequence;
when the embedded business function code is executed and the result of the business execution is sent to the test case management tool, the communication condition information of the upper computer and the lower computer is analyzed:
acquiring a data real-time quantity, a data floating value and a data floating frequency, and judging the data real-time quantity, the data floating value and the data floating frequency and the corresponding threshold values:
if any value of the real-time data quantity, the floating data value and the floating data frequency exceeds the corresponding threshold value, regulating and controlling a factor exceeding the threshold value;
if the data real-time quantity, the data floating value and the data floating frequency do not exceed the corresponding threshold values, calculating by a formula to obtain a data stability coefficient;
comparing the data stability coefficient with a standard stability threshold, if the data stability coefficient is greater than the standard stability threshold, sequencing the real-time data quantity, the data floating value and the data floating frequency from large to small according to the deviation from the respective thresholds, and regulating and controlling in sequence according to the sequencing;
after the test case management tool receives the service execution result, the effectiveness of the overall automatic test result is evaluated, and the specific evaluation method comprises the following steps:
acquiring the matching degree of a service execution result and an expected matching degree, and operation condition information and communication condition information in the test process; calculating an evaluation coefficient of an automatic test result through a formula;
comparing the evaluation coefficient of the automatic test result with an evaluation standard threshold, and if the evaluation coefficient of the automatic test result is smaller than the evaluation standard threshold, testing again after adjustment;
if the evaluation coefficient of the automatic test result is greater than or equal to the evaluation standard threshold, the automatic test result meets the requirement, at the moment, the automatic test result is specifically evaluated, whether the embedded software can normally run is determined, and single automatic test of the embedded software is completed.
2. The automatic testing method for the embedded software according to claim 1, characterized in that: and matching the result of the service execution with the expected result after the execution of the embedded service function code is finished, and sending the matching result to the test case management tool.
3. The automatic testing method for the embedded software according to claim 1, characterized in that: when the key node replacement code segment takes effect, acquiring service flow time for executing the automatic test case plug-in by the embedded software, and if the execution time is greater than an execution time threshold, marking the automatic test case plug-in of the node to prompt that the node is abnormal;
when the execution time of each node is smaller than the execution time threshold, acquiring the total operation time of the system software of the embedded product, acquiring the execution time of the plug-in service of the automatic test case, comparing the two execution times, and marking the execution result of the service of the automatic test if the ratio of the execution time of the plug-in service to the total operation time of the system software of the embedded product is larger than the standard ratio threshold, so as to prompt the abnormal test.
CN202211646760.0A 2022-12-21 2022-12-21 Automatic testing method for embedded software Active CN115629996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211646760.0A CN115629996B (en) 2022-12-21 2022-12-21 Automatic testing method for embedded software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211646760.0A CN115629996B (en) 2022-12-21 2022-12-21 Automatic testing method for embedded software

Publications (2)

Publication Number Publication Date
CN115629996A CN115629996A (en) 2023-01-20
CN115629996B true CN115629996B (en) 2023-03-10

Family

ID=84911192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211646760.0A Active CN115629996B (en) 2022-12-21 2022-12-21 Automatic testing method for embedded software

Country Status (1)

Country Link
CN (1) CN115629996B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117827621B (en) * 2024-03-06 2024-05-10 泰安北航科技园信息科技有限公司 Automatic test platform system and method for embedded software

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402484A (en) * 2011-11-30 2012-04-04 北京航空航天大学 Automatic experimental device and method for reliability growth test of embedded software
CN110704314A (en) * 2019-09-26 2020-01-17 天津津航计算技术研究所 Fault injection method for embedded software test
CN112597006A (en) * 2020-12-14 2021-04-02 中国航发控制系统研究所 Embedded software integration test automatic execution system and method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739334A (en) * 2008-11-21 2010-06-16 上海科梁信息工程有限公司 Automatic testing method of embedded software
CN104063325B (en) * 2014-07-11 2016-10-26 电子科技大学 A kind of test exemple automation generating means for embedded software and method thereof
CN110543421B (en) * 2019-08-31 2022-03-29 华南理工大学 Unit test automatic execution method based on test case automatic generation algorithm
CN112698974A (en) * 2019-10-22 2021-04-23 中兴通讯股份有限公司 Fault injection test method, device and storage medium
CN113778838B (en) * 2020-06-09 2024-01-26 中国电信股份有限公司 Binary program dynamic stain analysis method and device
CN115145808A (en) * 2022-06-07 2022-10-04 中国航空工业集团公司沈阳飞机设计研究所 Automatic testing method for airborne embedded software

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402484A (en) * 2011-11-30 2012-04-04 北京航空航天大学 Automatic experimental device and method for reliability growth test of embedded software
CN110704314A (en) * 2019-09-26 2020-01-17 天津津航计算技术研究所 Fault injection method for embedded software test
CN112597006A (en) * 2020-12-14 2021-04-02 中国航发控制系统研究所 Embedded software integration test automatic execution system and method

Also Published As

Publication number Publication date
CN115629996A (en) 2023-01-20

Similar Documents

Publication Publication Date Title
US10748083B2 (en) Automated tuning of a service configuration
CN103164328B (en) The regression testing method of a kind of business function, Apparatus and system
US8140911B2 (en) Dynamic software tracing
CN115629996B (en) Automatic testing method for embedded software
CN107302476B (en) Automatic testing method and system for testing asynchronous interactive system
CN111651358A (en) Method for generating test case, software testing method, device and server
CN112948189B (en) Margin test method, margin test system and related device
JP5545087B2 (en) Distributed control system test execution management device
CN106250298B (en) A kind of test method and device
CN109189673B (en) Software test scheme, and method and device for determining test cases
CN115470141A (en) Fault simulation method, device and related equipment
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN114416545A (en) Method and device for determining test code coverage rate and electronic equipment
CN114386510A (en) Method and system for identifying measurement errors of power system
CN113806231A (en) Code coverage rate analysis method, device, equipment and medium
KR20180035515A (en) Method for verifying a performance of clients and servers for smart ternimal
CN113849484A (en) Big data component upgrading method and device, electronic equipment and storage medium
CN111478728A (en) Automatic debugging method, device, equipment and storage medium for optical power of optical module
CN112346994A (en) Test information correlation method and device, computer equipment and storage medium
CN106941552B (en) Mobile terminal shutdown performance evaluation method
CN111812445A (en) Intelligent capacitor error correction method and device, computer equipment and storage medium
CN111274128A (en) Test method, test device, computer equipment and computer readable storage medium
CN111444108A (en) Behavior audit automatic testing method based on S7 industrial protocol
CN105531726A (en) Product sampling inspection method, apparatus and system
CN115374012A (en) Automatic regression testing method and device, electronic equipment and storage medium

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
CP03 Change of name, title or address

Address after: 4208, Tower A, Hongrongyuan North Station Center, Minzhi Street North Station Community, Longhua District, Shenzhen City, Guangdong Province, 518000

Patentee after: Shenzhen Weike Technology Co.,Ltd.

Country or region after: China

Address before: 518000 room 1501, building e, phase II, Xinghe world, Minle community, Minzhi street, Longhua District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN WAKE UP TECHNOLOGY CO.,LTD.

Country or region before: China

CP03 Change of name, title or address