CN108984385B - Dynamic testing method and system - Google Patents

Dynamic testing method and system Download PDF

Info

Publication number
CN108984385B
CN108984385B CN201710411849.1A CN201710411849A CN108984385B CN 108984385 B CN108984385 B CN 108984385B CN 201710411849 A CN201710411849 A CN 201710411849A CN 108984385 B CN108984385 B CN 108984385B
Authority
CN
China
Prior art keywords
test
testing
steps
execution
current
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
CN201710411849.1A
Other languages
Chinese (zh)
Other versions
CN108984385A (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.)
Beijing Xinghe Taishite Technology Co ltd
Original Assignee
Beijing Xinghe Taishite 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 Beijing Xinghe Taishite Technology Co ltd filed Critical Beijing Xinghe Taishite Technology Co ltd
Priority to CN201710411849.1A priority Critical patent/CN108984385B/en
Publication of CN108984385A publication Critical patent/CN108984385A/en
Application granted granted Critical
Publication of CN108984385B publication Critical patent/CN108984385B/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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention provides a dynamic test method and a system, wherein the dynamic test method comprises the following steps: the method comprises a configuration process of the testing step and an execution process of the testing step, wherein the configuration process of the testing step comprises the following steps: writing basic test steps through scripts, and combining the basic test steps to obtain combined test steps required by a test process; configuring the execution attribute of the combined test step according to the combined test step required to be used in the test process; and the execution process of the testing step comprises the following steps: reading all test steps of the sample test, determining the current test step through the index, and determining the execution attribute of the current step; the sample is tested according to the performance attributes of the current testing step. The invention links all the steps to realize logical association and carries out calculation and action in dynamic execution, thus equivalently realizing a customized test mode and realizing the automatic test which can be customized by self without modifying software.

Description

Dynamic testing method and system
Technical Field
The invention relates to the field of application testing, in particular to a dynamic testing method and a dynamic testing system.
Background
In the existing testing technology, a sample (such as a household circuit board) is usually tested (or detected) manually or is detected by adopting a specific tool design, but the testing is performed by the two methods, so that the specificity is strong and the flexibility is low, for example, for a testing system, a certain timing requirement and a certain real-time requirement are required, which is very important for stable measurement. For the test system, in the test of the circuit board, because the points to be tested are many, the relevance of the test before and after is strong, and an automatic test system which can be customized by a customer is necessary. However, the existing test method is not a fixed test program mode, but a simple test item selection mode, the former is inflexible and inconvenient, the latter may not meet the requirements of time sequence and measurement precision, and the test technology can combine the advantages of the two to realize high-quality automatic test.
An effective solution to the problems in the related art has not been proposed yet.
Disclosure of Invention
Aiming at the problems in the related art, the invention provides a dynamic testing method and a dynamic testing system, which can link all the steps to realize logical association and carry out calculation and action in dynamic execution, thus being equivalent to realizing a customized testing mode and realizing the purpose of completing customized automatic testing without modifying software.
The technical scheme of the invention is realized as follows:
according to one aspect of the invention, a dynamic testing method is provided.
The dynamic testing method comprises the following steps: the method comprises a configuration process of the testing step and an execution process of the testing step, wherein the configuration process of the testing step comprises the following steps: compiling basic testing steps through scripts, and combining the basic testing steps to obtain combined testing steps needed in a testing process; configuring the execution attribute of the combined test step according to the combined test step required to be used in the test process; and the execution process of the testing step comprises the following steps: reading all test steps of a sample test, determining the current test step through an index, and determining the execution attribute of the current step; the sample is tested according to the performance attributes of the current testing step.
According to one embodiment of the invention, the step of combinatorial testing comprises at least one of: control step, test step, circulation step and parallel step.
According to one embodiment of the present invention, configuring the execution attribute of the combined test step includes: and configuring the execution attributes of the control step, the test step, the circulation step and the parallel step.
According to one embodiment of the present invention, the configuring of the control step execution attribute includes: and initially setting the equipment before testing. According to one embodiment of the invention, the configuring of the execution attribute for the test step comprises: and configuring the acquisition or calculation mode of the test data.
According to one embodiment of the invention, the configuring of the loop step execution attribute comprises: and configuring the execution condition, the exit condition, the time and the frequency of the loop step.
According to one embodiment of the invention, the configuration of the attributes performed on the parallel stepping lines comprises: the period, duration, work content of the parallel steps are set, and the configuration of the multiple threads of execution.
According to one embodiment of the present invention, testing the sample according to the performance attributes of the current testing step comprises: executing the current step through the first thread, judging whether to circulate the current step or not under the condition that the execution of the current testing step is finished, if so, repeatedly executing the current step, and if not, executing the next testing step until the testing step; and executing the parallel step by the second thread.
According to another aspect of the present invention, a dynamic test system is provided.
The dynamic test system includes: a configuration module for testing a configuration process of the step, wherein the configuration module comprises: the method comprises the following steps of compiling a combination module, compiling basic testing steps through scripts, and combining the basic testing steps to obtain the combination testing steps needed by a testing process; the configuration submodule is used for configuring the execution attribute of the combined test step according to the combined test step required to be used in the test process; the test execution module is used for executing the test steps, wherein the test module comprises: the reading index module is used for reading all the testing steps of the sample testing, determining the current testing step through the index and determining the execution attribute of the current step; and the testing module is used for testing the sample according to the execution attribute of the current testing step.
The invention compiles basic test steps through scripts, combines the basic test steps to obtain the combined test steps needed by the test process, configures the execution attributes of the combined test steps according to the combined test steps needed by the test process, reads all test steps of sample test, determines the current test step through indexes, determines the execution attributes of the current step, tests the sample according to the execution attributes of the current test step, can link the steps to realize logical association, and calculates and acts in dynamic execution, thus being equivalent to realizing a customized test mode and realizing the customized automatic test without modifying software.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow diagram of a dynamic testing method according to an embodiment of the invention;
FIG. 2 is a flow chart of a configuration process of a test step according to an embodiment of the invention;
FIG. 3 is a flow chart of a process of performing a test step according to an embodiment of the invention;
FIG. 4 is a block diagram of a dynamic test system according to an embodiment of 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 that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present invention.
According to an embodiment of the present invention, a dynamic testing method is provided.
As shown in fig. 1, the dynamic test method according to an embodiment of the present invention includes: the method comprises a configuration process of the testing step and an execution process of the testing step, wherein the configuration process of the testing step comprises the following steps:
step S101, compiling basic test steps through scripts, and combining the basic test steps to obtain combined test steps required by a test process;
step S103, configuring the execution attribute of the combined test step according to the combined test step required to be used in the test process; and
the test step is performed by:
step S105, reading all test steps of the sample test, determining the current test step through the index, and determining the execution attribute of the current step;
step S107, according to the execution attribute of the current testing step, testing the sample
Through the scheme of the invention, all the steps can be connected to realize logical connection, and calculation and action are carried out in dynamic execution, so that a customized test mode is realized, and customized automatic test can be completed without modifying software.
According to one embodiment of the invention, the step of combinatorial testing comprises at least one of: control step, test step, circulation step and parallel step.
According to one embodiment of the invention, configuring the execution attribute of the combined test step comprises: and configuring the execution attributes of the control step, the test step, the circulation step and the parallel step.
According to one embodiment of the present invention, the configuring of the control step execution attribute includes: and initially setting the equipment before testing. According to one embodiment of the invention, the configuring of the execution attribute for the test step comprises: and configuring the acquisition or calculation mode of the test data.
According to one embodiment of the invention, the configuring of the loop step execution attribute comprises: and configuring the execution condition, the exit condition, the time and the frequency of the loop step.
According to one embodiment of the invention, the configuration of the attributes performed on the parallel stepping lines comprises: the period, duration, work content of the parallel steps are set, and the configuration of the multiple threads of execution.
According to one embodiment of the present invention, testing the sample according to the performance attributes of the current testing step comprises: executing the current step through the first thread, judging whether to circulate the current step or not under the condition that the execution of the current testing step is finished, if so, repeatedly executing the current step, and if not, executing the next testing step until the testing step; and executing the parallel step by the second thread.
In order to better describe the invention, a detailed description is given below with reference to a specific example.
The invention programs and controls the test process according to the idea of computer programming, thereby supporting flexible and changeable test flow, and being universal and not needing too complex operation flow.
In addition, the invention has two-stage definition for the testing method, the basic definition is written by script, the basic testing step can realize the action of various standard or user-defined peripheral equipment, the conversion of measurement data, time delay and the like, the action content can be standard, of course, the invention can also be user-defined communication content, such as the communication between a host computer and an oscilloscope and the like, the testing method is composed of sequential statements and is an inseparable section, thereby ensuring the repeatability of the test, the second-stage definition mainly comprises the combination of the basic defined testing steps to obtain the combined testing step, meanwhile, the combination mode can be judged according to the execution result of the testing step, if the execution result is a loop, the basic testing steps are combined to obtain the loop step and the like, in addition, the loop and condition processing and the like are realized by setting different execution attributes of the combined testing step, this will be described in detail below.
In addition, as shown in fig. 2, it shows a configuration process of the testing step, specifically:
step S1, a motion sequence (or a basic test step) is compiled according to the instruction by a text editing method, and the instruction and the content of the operation can be defined by controlling the instrument or the board, and the command and the content are used by an abstract method, which is performed in a text format, as shown below, it can complete the communication with the oscilloscope, and can hide the implementation details of the upper layer, it is understood that the peripheral device for communication can also be set according to the actual requirement, for example, according to an embodiment of the present invention, the peripheral device can also be a program-controlled power supply, which is not limited by the present invention.
STEP3$=WRITEIO$("U3402A","Delay")
STEP4$=WRITEIO$("U3402A","S110F"+C_RANGE$)
STEP4$=WRITEIO$("U3402A","Delay")
Step S2, defining a combination test step representing a measurement operation including a test step, a control step, a loop step, and a parallel step, wherein the test step refers to a test step of a test device, and the definition of the test step refers to an initial setting of the test device, for example, according to an embodiment of the present invention, the test step refers to an initial setting of an oscilloscope, and for a task completed in steps, except for sequential execution, sometimes for control purposes, the control step must be written to complete the control of other steps, so as to implement a logical process judgment, wait, jump, and other operations, so that most of the measurement tasks can be completed in combination with calculation, and the loop step is a loop of the test step, and the parallel step is an arrangement of computer resources, which reduces the difficulty in defining the combination test step, particularly suited for capturing communication-like signals, which simulates multi-threaded processing of a computer, for example, according to one embodiment of the present invention, in table 1 of the following example, "read data" and "write data" in the first column are parallel steps, "loop start" and "loop end" are loop steps, "set load interval voltage value" is control step, wherein the load refers to a peripheral device for communication, the second column is an additional step of reading data, writing data, cycle starting, setting voltage value of a load interval and cycle ending, that is, the specific steps of the above-mentioned several steps are shown, and not described herein, column 4 can set the standard value that should be returned when the steps are executed correctly, columns 5 and 6 show the allowable positive and negative deviations, column 7 shows the measured value returned by the current measurement, column 8 shows the error of the measured value, and column 9 shows a measurement delay value.
Reading data Additional step ··· 0 5.00 5.00 -1 100.0 0
Writing data Additional step ··· 0 5.00 5.00 0 0.0 0
Beginning of cycle Additional step ··· 0 5.00 5.00 0 0.0 0
Setting a load interval voltage value Additional step ··· 0 5.00 5.00 0v 0.0 0
End of cycle Additional step ··· 0 5.00 5.00 0 0.0 0
TABLE 1
Step S3, defining the attribute of the control action, wherein the control step is relative to the test step, and can be understood as collecting a quantity to calculate, however, in order to collect a quantity, sometimes a series of internal control processes are needed, and the control processes need to be changed, and an external interface is also needed, so that the dynamic process can be adjusted or controlled by defining a control step, a certain condition is reached, and then the value is measured and designated by the test step, and the control step can also realize the control of the test action of the peripheral equipment;
step S4, defining the attributes of the loop action, setting the exit condition of the loop step in addition to the condition (or execution condition) for entering the loop, setting the time, number of times, combination of time and number of times, and setting the execution results of other steps as conditions, these can be understood as the attributes of the loop step, and the test can execute a repeated action according to the attributes during the test execution, and the loop step can also realize the loop of the test action of the peripheral equipment;
step S5, defining the attribute of the parallel action, the action of the parallel step generally defines its cycle, working duration and working content, in addition, to simplify the processing, the user only needs to select one action, and also can define the corresponding script of this action, in order to speed up the processing, the program needs to put it into the memory to execute, at the same time, the parallel step can also implement the parallel test of the test action of the peripheral device, in addition, the parallel step needs a plurality of threads to perform the parallel test.
Furthermore, as shown in fig. 3, it shows the execution process of the testing step, specifically:
step S6: reading the test steps is generally carried out in a mode of completely reading, then finding the current step through an index, calling the loop step in a recursion mode, sequentially taking the next step for operation after the current step is finished, carrying out the parallel step in another execution thread, carrying out formatting processing on each test step by a data structure defined by a standard, and carrying out external calling on an externally input part by combining a script analysis program;
step S7: the current step is the current position of program execution, including positioning, judging and calculating, and determines how to execute the current task according to the types of different steps, the result of the current step returns to the calling point after finishing, and continues to execute or perform other control operations, and the whole process is similar to the instruction execution process of a computer;
step S8: after the execution, the program proceeds to the next step when the execution is not finished.
In addition, in order to implement dynamic testing, two problems need to be solved, one is the addition of a combined test step, the other is the execution and judgment of the combined test step, the software can support the definition of the steps, and execute specific operations according to the definitions, and then execute other steps according to the results, thereby, the method of testing is customized through such a programming mechanism, in addition, the software can realize not only logical operations through the setting of loop steps and parallel steps, but also can ensure that the specific operations are realized within a certain time, such as continuous transmission of communication within 10 milliseconds, meanwhile, for each combined test step, the software uses a standardized testing language to adapt to the operation of testing a common circuit board, so that external users can easily understand and modify, and the execution of the dynamic steps is equivalent to the method of customizing the testing. Software uses certain interpretation methods to interpret, store, and execute these instructions in a canonical manner.
According to an embodiment of the invention, a dynamic test system is also provided.
As shown in fig. 4, the dynamic test system according to an embodiment of the present invention includes:
a configuration module (not shown) for testing the configuration process of the steps, wherein the configuration module comprises: a compiling and combining module 41 for compiling basic test steps through scripts and combining the basic test steps to obtain combined test steps required by the test process; the configuration submodule 42 is used for configuring the execution attribute of the combined test step according to the combined test step required to be used in the test process;
a test execution module (not shown) for executing the test procedure, wherein the test module comprises: a reading index module 43, configured to read all test steps of the sample test, determine a current test step through the index, and determine an execution attribute of the current step; a test module 44 for testing the sample according to the performance attributes of the current test step.
In summary, according to the above technical solution of the present invention, the basic test steps are compiled through the script, the basic test steps are combined to obtain the combined test step required to be used in the test process, the execution attribute of the combined test step is configured according to the combined test step required to be used in the test process, all the test steps of the sample test are read, the current test step is determined through the index, the execution attribute of the current step is determined, the sample is tested according to the execution attribute of the current test step, the steps can be linked to each other, the logical association is realized, and the calculation and the action are performed in the dynamic execution, which is equivalent to realizing a customized test mode, and realizing the customized automatic test by itself without modifying software.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (7)

1. A dynamic testing method, comprising: a configuration process of the test step and an execution process of the test step,
wherein the configuration process of the testing step comprises:
compiling basic test steps through scripts, and combining the basic test steps to obtain combined test steps required by a test process;
configuring the execution attribute of the combined test step according to the combined test step required to be used in the test process; and
the test step is performed by:
reading all test steps of a sample test, determining a current test step through an index, and determining an execution attribute of the current test step;
testing the sample according to the performance attributes of the current testing step,
wherein, the combined test step comprises a test step and a parallel step, and the configuration of the execution attribute of the test step comprises the following steps: the manner in which test data is collected or calculated is configured,
wherein testing the sample according to the performance attributes of the current testing step comprises:
executing the current testing step through the first thread, judging whether to circulate the current step under the condition that the execution of the current testing step is finished, if so, repeatedly executing the current step, and if not, executing the next testing step, and
the parallel steps are executed by a second thread.
2. The dynamic testing method of claim 1, wherein the step of combinatorial testing further comprises at least one of: control step and circulation step.
3. The dynamic testing method of claim 2, wherein configuring the performance attributes of the combinatorial testing step comprises:
and configuring the execution attributes of the control step, the test step, the circulation step and the parallel step.
4. The dynamic test method of claim 3, wherein configuring the control step with the execution attribute comprises: and initially setting the equipment before testing.
5. The dynamic testing method of claim 3, wherein configuring the loop step for execution attributes comprises: and configuring the execution condition, the exit condition, the time and the frequency of the circulation step.
6. The dynamic testing method of claim 3, wherein configuring the execution attributes for the parallel steps comprises: setting the period, duration and work content of the parallel steps, and configuring a plurality of execution threads.
7. A dynamic test system, comprising:
a configuration module for testing a configuration process of the step, wherein the configuration module comprises:
the method comprises the following steps of compiling a combination module, compiling basic testing steps through scripts, and combining the basic testing steps to obtain the combination testing steps needed by a testing process;
the configuration sub-module is used for configuring the execution attribute of the combined test step according to the combined test step required to be used in the test process;
a test execution module, configured to execute a test procedure, wherein the test execution module includes:
the reading index module is used for reading all the test steps of the sample test, determining the current test step through the index and determining the execution attribute of the current test step;
a testing module for testing the sample according to the performance attribute of the current testing step,
wherein, the combined test step comprises a test step and a parallel step, and the configuration of the execution attribute of the test step comprises the following steps: the manner of acquisition or calculation of the test data is configured,
wherein testing the sample according to the performance attributes of the current testing step comprises:
executing the current testing step through the first thread, judging whether to circulate the current step under the condition that the execution of the current testing step is finished, if so, repeatedly executing the current step, and if not, executing the next testing step, and
the parallel steps are executed by a second thread.
CN201710411849.1A 2017-06-05 2017-06-05 Dynamic testing method and system Active CN108984385B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710411849.1A CN108984385B (en) 2017-06-05 2017-06-05 Dynamic testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710411849.1A CN108984385B (en) 2017-06-05 2017-06-05 Dynamic testing method and system

Publications (2)

Publication Number Publication Date
CN108984385A CN108984385A (en) 2018-12-11
CN108984385B true CN108984385B (en) 2022-07-08

Family

ID=64501964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710411849.1A Active CN108984385B (en) 2017-06-05 2017-06-05 Dynamic testing method and system

Country Status (1)

Country Link
CN (1) CN108984385B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339532A (en) * 2007-07-06 2009-01-07 中国银联股份有限公司 Web application system automatized test method and apparatus
CN102169183A (en) * 2010-12-10 2011-08-31 北京空间飞行器总体设计部 Test atom based method for automatically testing satellites
JP2017037494A (en) * 2015-08-10 2017-02-16 富士通株式会社 Test case generation method, test case generation program, and test case generation apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339532A (en) * 2007-07-06 2009-01-07 中国银联股份有限公司 Web application system automatized test method and apparatus
CN102169183A (en) * 2010-12-10 2011-08-31 北京空间飞行器总体设计部 Test atom based method for automatically testing satellites
JP2017037494A (en) * 2015-08-10 2017-02-16 富士通株式会社 Test case generation method, test case generation program, and test case generation apparatus

Also Published As

Publication number Publication date
CN108984385A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
JP6488244B2 (en) Method for simultaneous testing of semiconductor devices, manufacturing method, and computer storage medium
JP4454198B2 (en) Automatic test equipment with easy programming
EP0189848B1 (en) Method and apparatus for software debugging
US6618853B1 (en) Program production system for semiconductor tester
US20140310693A1 (en) Implementing edit and update functionality within a development environment used to compile test plans for automated semiconductor device testing
US9645911B2 (en) System and method for debugging firmware/software by generating trace data
CN104778124A (en) Automatic testing method for software application
CN103135011A (en) Test module generation apparatus, test procedure generation apparatus, generation method, and test apparatus
CN101639805A (en) Method and equipment for tracing variable in program debugging
CN106093897B (en) A kind of the test system and test method of radar system
Takeda et al. Sensory uncertainty field for mobile robot navigation
CN104915228B (en) Application program language setting method and device
CN108984385B (en) Dynamic testing method and system
CN102760086B (en) Data detection control method and device based on flexible test technology
CN113568825A (en) Program flow debugging method, device, equipment and storage medium
CN107818051B (en) Test case jump analysis method and device and server
CN101814051A (en) Computer testing system capable of combining testing items at will and method thereof
US20190213108A1 (en) Method that supports multithreading/concurrent programming debugging, computer readable recording medium and computer program product
CN102088503A (en) Surface noise testing system and testing method of LCD (liquid crystal display) screen of mobile phone
CN105095093A (en) Intelligent terminal performance test method and system
CN114280459A (en) Test method and device for integrated circuit
CN111177014B (en) Software automatic test method, system and storage medium
CN108459959A (en) User interface automated testing method, device, equipment and storage medium
CN112989752B (en) Simulation method, simulation device, terminal equipment and medium for power supply scheme
CN109815153B (en) Static slicing method and device for PLC program and motor start-stop control program

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