CN109491919B - Software testing method and testing platform - Google Patents

Software testing method and testing platform Download PDF

Info

Publication number
CN109491919B
CN109491919B CN201811433684.9A CN201811433684A CN109491919B CN 109491919 B CN109491919 B CN 109491919B CN 201811433684 A CN201811433684 A CN 201811433684A CN 109491919 B CN109491919 B CN 109491919B
Authority
CN
China
Prior art keywords
rule
test
statements
communication protocols
tested
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
CN201811433684.9A
Other languages
Chinese (zh)
Other versions
CN109491919A (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.)
Zhongdianke Northwest Group Co ltd
Original Assignee
Zhongdianke Northwest Group 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 Zhongdianke Northwest Group Co ltd filed Critical Zhongdianke Northwest Group Co ltd
Priority to CN201811433684.9A priority Critical patent/CN109491919B/en
Publication of CN109491919A publication Critical patent/CN109491919A/en
Application granted granted Critical
Publication of CN109491919B publication Critical patent/CN109491919B/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/3664Environments for testing or debugging software
    • 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

Abstract

The invention discloses a software testing method and a testing platform, wherein the method comprises the following steps: writing rule statements corresponding to the communication protocols according to unified rule grammars formulated by different communication protocols; combining the rule statements according to the test requirements of different communication protocols to generate at least one test scene; and executing the test scene to test the communication protocol and generate a test report. The invention can convert any communication protocol into a plurality of rule statements with a custom format, generate a plurality of test scenes according to the test requirements of different communication protocols on the basis of the rule statements, and run the specified test scenes to finish the test of the communication protocol. Therefore, in the whole testing process, the process of compiling the test case by the tester is simplified, the commonalities of different communication protocols in coding and decoding and protocol message receiving and sending processing are integrated, and the problem of developing different testing tools aiming at different communication protocols is solved.

Description

Software testing method and testing platform
Technical Field
The invention relates to the technical field of software testing, in particular to a software testing method and a software testing platform.
Background
At present, in the process of testing items related to a communication protocol, a tester usually adopts a testing mode of developing different testing tools for different communication protocols and compiling a large number of test cases, so that much time and labor are consumed in the testing process.
Moreover, although the communication protocol and the communication mode are different, the protocols have great versatility, and therefore the test mode causes a great deal of repetitive work.
Disclosure of Invention
The invention provides a software testing method and a testing platform, which are used for solving the problems that in the prior art, different testing tools need to be developed for different communication protocols to carry out testing, so that much time and labor are consumed, and a large amount of repetitive work is caused.
In a first aspect, an embodiment of the present invention provides a software testing method, where the method includes:
writing rule statements corresponding to the communication protocols according to unified rule grammars formulated by different communication protocols, wherein the contents of the rule statements at least comprise rule input, rule conditions, rule processing and rule output;
combining the rule statements according to the test requirements of different communication protocols to generate at least one test scene;
and executing the test scene to test the communication protocol and generating a test report.
As a preferred aspect of the first aspect of the present invention, after writing a rule statement corresponding to a communication protocol according to a unified rule syntax established by different communication protocols, the method further includes:
and determining the content and default value of the custom structure body included in the rule statement.
As a preferred mode of the first aspect of the present invention, the generating at least one test scenario by combining the rule statements according to the test requirements of different communication protocols includes:
performing dependency analysis on the rule statements, and comparing the relations among rule input, rule conditions, rule processing and rule output of the rule statements to obtain the dependency relations among the rule statements;
creating at least one rule set according to the dependency relationship among the rule statements, wherein the rule set comprises at least one rule statement;
selecting the rule set to generate a test sequence, and generating at least one test case by setting an initial value of the test sequence;
according to the test requirements of different communication protocols, setting parameters of a test environment to generate at least one test scene, wherein the test environment at least comprises the running environment of a test case, the running execution mode of the test case and the expected execution result of the test case.
As a preferable mode of the first aspect of the present invention, the executing the test scenario to test the communication protocol, and generating the test report includes:
establishing connection with different data signal sources according to the communication protocol; controlling an excitation signal sent by the data signal source to the system to be tested according to the rule input content of the rule statement to construct at least one test scene;
establishing connection with a system to be tested in the test scene, and completing protocol message interaction with the system to be tested;
outputting content according to the rule of the rule statement, analyzing the received protocol message sent by the system to be tested, and generating a test result, wherein the test result is used for indicating whether the received protocol message is correct according to the rule processing content of the rule statement;
and generating a test report according to the test result.
In a second aspect, an embodiment of the present invention provides a software testing platform, where the platform includes:
the rule statement writing unit is used for writing rule statements corresponding to the communication protocols according to unified rule grammars formulated by different communication protocols, and the content of the rule statements at least comprises rule input, rule conditions, rule processing and rule output;
the test scenario generation unit is used for combining the rule statements according to the test requirements of different communication protocols to generate at least one test scenario;
and the test report generating unit is used for executing the test scene to test the communication protocol and generating a test report.
As a preferable mode of the second aspect of the present invention, the rule statement writing unit is further configured to:
and determining the content and default value of the custom structure body included in the rule statement.
As a preferred mode of the second aspect of the present invention, the test scenario generating unit is specifically configured to:
performing dependency analysis on the rule statements, and comparing the relations among rule input, rule conditions, rule processing and rule output of the rule statements to obtain the dependency relations among the rule statements;
creating at least one rule set according to the dependency relationship among the rule statements, wherein the rule set comprises at least one rule statement;
selecting the rule set to generate a test sequence, and generating at least one test case by setting an initial value of the test sequence;
according to the test requirements of different communication protocols, setting parameters of a test environment to generate at least one test scene, wherein the test environment at least comprises the running environment of a test case, the running execution mode of the test case and the expected execution result of the test case.
As a preferred mode of the second aspect of the present invention, the test report generating unit is specifically configured to:
establishing connection with different data signal sources according to the communication protocol; controlling an excitation signal sent by the data signal source to the system to be tested according to the rule input content of the rule statement to construct at least one test scene;
establishing connection with a system to be tested in the test scene, and completing protocol message interaction with the system to be tested;
outputting content according to the rule of the rule statement, analyzing the received protocol message sent by the system to be tested, and generating a test result, wherein the test result is used for indicating whether the received protocol message is correct according to the rule processing content of the rule statement;
and generating a test report according to the test result.
In a third aspect, an embodiment of the present invention provides a software testing system, where the system includes:
a system to be tested;
the data signal source is used for sending an excitation signal which can influence the behavior of the system to be tested to the system to be tested;
and a software testing platform according to any one of the second aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium containing computer-executable instructions for causing a software testing platform to execute the software testing method of the first aspect or any one of the preferred modes of the first aspect.
In a fifth aspect, an embodiment of the present invention further provides an apparatus, including a processor and a memory, where the memory stores an execution instruction, and the processor reads the execution instruction in the memory to execute the software testing method in the first aspect or any preferred mode of the first aspect.
The software testing method and the software testing platform provided by the embodiment of the invention can convert any communication protocol into a plurality of rule statements with a custom format, generate a plurality of testing scenes according to testing requirements of different communication protocols on the basis of the rule statements, and run the specified testing scenes to finish the testing of the communication protocol. Therefore, in the whole testing process, the process of compiling the test case by the tester is simplified, the commonalities of different communication protocols in coding and decoding and protocol message receiving and sending processing are integrated, and the problem of developing different testing tools aiming at different communication protocols is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced 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 based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a software testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating one implementation of step 102 in the embodiment shown in FIG. 1;
FIG. 3 is a flow chart illustrating one implementation of step 103 in the embodiment shown in FIG. 1;
fig. 4 is a schematic structural diagram of a software testing platform according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a software testing system according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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.
The embodiment of the invention discloses a software testing method, which mainly comprises the following steps of:
101. writing rule statements corresponding to the communication protocols according to unified rule grammars formulated by different communication protocols, wherein the contents of the rule statements at least comprise rule input, rule conditions, rule processing and rule output;
102. combining the rule statements according to the test requirements of different communication protocols to generate at least one test scene;
103. and executing the test scene to test the communication protocol and generate a test report.
Before describing the steps of the embodiments of the present invention in detail, some terms are described as follows:
(1) rules
Rule, is a description of a certain function by analyzing a communication protocol, and converting the description into an XML format, for example:
Figure BDA0001883232540000061
wherein, the input label describes the input of the rule, including protocol message and excitation signal; the condition tag describes the rule entry permission condition, i.e. the rule can only be entered if the "expression" content in the condition tag is satisfied; the action tag describes the action to be performed after entering the rule, such as modifying or setting the value of a specified variable; the output tag describes the output message of the rule. Wherein, the statements in the expression attributes of the condition tag and the action tag are written according to the self-defined language of the system.
(2) Test sequence
The test sequence, consists of a sequence of rules where there is an association, e.g. rule1- > rule2- > rule 3.
(3) Test case
The test case sets an initial value, an input value and an output value for the specified test sequence, and is used for testing the test platform and the system to be tested.
(4) Data signal source
The data signal source is a device that sends signal data to the system to be tested, and the data sent to the system to be tested may affect the behavior of the system to be tested, such as radar, navigation device, sensor, etc.
(5) Dependency analysis
And performing relevance analysis on all the rules according to the condition tags and the action tags. For example: the action tag of rule1 is modified for variable a, and the condition tag of rule2 is a judgment for variable a, i.e., rule1 and rule2 are described to have dependency. The analysis enables the user to visually see the relationship between all rules, facilitating the design of test sequences.
(6) System under test
The system under test refers to a communication system which needs to be tested.
In step 101, according to the analysis of different communication protocols, a uniform rule grammar corresponding to the different communication protocols is made, which is a description of a certain function and is displayed by using an XML format; under the requirement of the rule grammar, each rule statement at least comprises the contents of rule input, rule condition, rule processing and rule output, such as:
Figure BDA0001883232540000071
Figure BDA0001883232540000081
then, writing rule statements corresponding to the communication protocol according to the prepared rule grammar, and automatically generating a rule description file in an XML form. The rule statements are stored in the rule base, so that a basis is provided for the subsequent generation of test sequences and test cases, and a basis is provided for the subsequent judgment of whether the test result is correct or not.
The input of the rule statement may use parseable data structures other than XML format as rule input, e.g., JSON, TREE, MAP, etc., may all be the format of the rule input.
Preferably, after step 101, the method further comprises:
104. and determining the content and default values of the custom structure bodies included in the rule statements.
Various different custom structures are involved in the rule statements and are used for flow transmission in each rule statement, so after the rule statements are generated, the content and default values of the custom structures need to be determined, and then an XML format is automatically generated and stored in a rule base.
In step 102, after the rule statements corresponding to the communication protocol obtained in the above steps, at least one test scenario under the test requirement of the communication protocol is generated based on the combination of the rule statements, so that the communication protocol can be tested.
In one possible implementation, referring to fig. 2, step 102 may be implemented as the following steps:
1021. and performing dependency analysis on the rule statements, and comparing the relations among rule input, rule conditions, rule processing and rule output of the rule statements to obtain the dependency relation among the rule statements.
In the step, the relation among all rule sentences is analyzed, the parameter relation among rule input, rule conditions, rule processing and rule output of the rule sentences is compared systematically, the dependency relation among the rule sentences is found out, and the dependency relation is displayed on a WEB page in a rule relation graph mode to provide reference for the subsequent generation of a test sequence.
1022. And creating at least one rule set according to the dependency relationship among the rule statements, wherein the rule set comprises at least one rule statement.
In the step, a rule set which can form a test case is analyzed according to the result of the dependency analysis on the rule statements, wherein one rule set comprises a plurality of rule statements.
1023. Selecting a rule set to generate a test sequence, and generating at least one test case by setting an initial value of the test sequence.
In the step, a proper rule set is selected to generate a test sequence, and then an initial value of the test sequence is set so as to generate a specific test case. One test case at least comprises the following contents:
(a) rule statements contained in the test case;
(b) and assigning initial parameters of the test cases.
In addition, the value range of variables in part of rule sentences can be set, and the rule sentences meeting the conditions can be automatically searched from all the existing rule sentences to generate the test cases.
1024. And setting parameters of a test environment according to test requirements of different communication protocols to generate at least one test scene, wherein the test environment at least comprises the running environment of the test case, the running execution mode of the test case and an expected execution result of the test case.
In this step, parameters in the test environment are set according to the test requirements of the communication protocol, so as to generate at least one test scenario. Wherein, the test environment at least comprises the following contents:
(a) the running environment of the test case comprises the byte order, the IP, the port number and the like of the communication protocol;
(b) the execution mode of the test cases, such as the number, sequence, execution times and the like of the test cases contained in the test scene;
(c) expected execution results of the test case.
In step 103, the data signal source is controlled to generate the excitation data of the system to be tested according to the requirements of the test scene, the monitoring of the test process is completed, and then a test report is generated according to the test result.
In one possible implementation, referring to fig. 4, step 103 may be implemented as the following steps:
1031. establishing connection with different data signal sources according to a communication protocol; and inputting an excitation signal which is sent to the system to be tested by the content control data signal source according to the rule of the rule statement, and constructing at least one test scene.
In the step, different data signal sources need to be customized and developed, and through communication with the data signal sources under a specified communication protocol, excitation signals sent to a system to be tested by the data signal sources are controlled, so that different test scenes are constructed.
1032. And establishing connection with the system to be tested in a test scene, and finishing protocol message interaction with the system to be tested.
1033. And outputting content according to the rule of the rule statement, analyzing the received protocol message sent by the system to be tested, and generating a test result, wherein the test result is used for indicating whether the received protocol message is correct or not according to the rule processing content of the rule statement.
In the two steps, the connection with the system to be tested and the interaction of the protocol message are mainly completed, the test case is analyzed, the process of sending and receiving the protocol message is carried out according to the input label and the output label, and finally whether the test case is successful or not is judged according to the received protocol message sent by the system to be tested. In this embodiment, when the protocol message interaction with the system to be tested is completed, no limitation is imposed on which party sends the protocol message first.
Specifically, according to a specified communication protocol mode, an IP (Internet protocol) port number and the like of the system to be tested, connection (UDP/TCP) is established with the system to be tested, and if the establishment fails, the flow failure is directly returned;
if the connection is successfully established, sequentially analyzing each rule statement in the specified test scene;
when the protocol message needs to be sent, coding is carried out according to the structure of the protocol message and the protocol message is sent to a system to be tested;
when a protocol message sent by a system to be tested needs to be waited, starting a message waiting timer, considering that the rule statement processing fails if the protocol message is not received within a specified time, and recording the failure and reasons; if so, recording the processing result of the rule statement according to whether the content carried by the protocol message is correct or not;
if the rule statement neither needs to send or receive protocol messages, continuing subsequent processing;
after each rule statement is processed, whether an unexecuted rule statement or a test case still exists needs to be judged, if so, the processing is continued, and if not, the recording flow processing is ended.
In the process, the result in the test process is recorded, the test result is analyzed, whether the current test flow is normal or not is judged, and the main records comprise: the test path, whether the designated protocol message was sent, whether the designated protocol message was received, whether the content of the designated protocol message was correct, whether the designated protocol message was received when it should not be received, etc.
1034. And generating a test report according to the test result.
In this step, a test report document in WORD format is generated according to the recorded test result, and the generation process is as follows:
making a WORD format template of a test report;
storing the template in an XML format;
setting a variable name of contents needing to be automatically generated in an XML file;
and writing the related content of the test result into the set XML document by using a freemarker tool to generate a DOC file.
The generated test report document mainly comprises a test name, an environmental parameter, a test process, a test result and the like.
Through the process, any communication protocol can be converted into a plurality of rule statements in a custom format, a plurality of test scenes are generated on the basis of the rule statements according to the test requirements of different communication protocols, and the specified test scenes are operated so as to complete the test of the communication protocol. In the whole process, the communication protocols are converted into the rule statements, and the rule statements are combined to generate different test scenes, so that the process of compiling test cases by testers is simplified, the commonalities of different communication protocols in coding and decoding and protocol message receiving and sending processing are integrated, and the problem of developing different test tools aiming at different communication protocols is solved.
It should be noted that the above-mentioned embodiments of the method are described as a series of actions for simplicity of description, but those skilled in the art should understand that the present invention is not limited by the described sequence of actions. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Based on the same technical concept, the embodiment of the invention also discloses a software testing platform, which mainly comprises the following components in percentage by reference to fig. 4:
a rule sentence writing unit 41, configured to write a rule sentence corresponding to a communication protocol according to a unified rule syntax formulated by different communication protocols, where the content of the rule sentence at least includes rule input, rule conditions, rule processing, and rule output;
a test scenario generating unit 42, configured to combine rule statements according to test requirements of different communication protocols to generate at least one test scenario;
a test report generating unit 43, configured to execute a test scenario to test the communication protocol, and generate a test report.
Preferably, the rule statement writing unit 41 is further configured to:
and determining the content and default values of the custom structure bodies included in the rule statements.
Preferably, the test scenario generating unit 42 is specifically configured to:
performing dependency analysis on the rule statements, and comparing the relations among rule input, rule conditions, rule processing and rule output of the rule statements to obtain the dependency relations among the rule statements;
creating at least one rule set according to the dependency relationship among the rule statements, wherein the rule set comprises at least one rule statement;
selecting a rule set to generate a test sequence, and generating at least one test case by setting an initial value of the test sequence;
and setting parameters of a test environment according to test requirements of different communication protocols to generate at least one test scene, wherein the test environment at least comprises the running environment of the test case, the running execution mode of the test case and an expected execution result of the test case.
Preferably, the test report generating unit 43 is specifically configured to:
establishing connection with different data signal sources according to a communication protocol; inputting an excitation signal sent by a content control data signal source to the system to be tested according to the rule of the rule statement, and constructing at least one test scene;
establishing connection with a system to be tested in a test scene, and completing protocol message interaction with the system to be tested;
outputting content according to the rule of the rule statement, analyzing the received protocol message sent by the system to be tested, and generating a test result, wherein the test result is used for indicating whether the received protocol message is correct or not according to the rule processing content of the rule statement;
and generating a test report according to the test result.
It should be understood that the above software testing platform includes only the units logically divided according to the functions implemented by the platform, and in practical applications, the above units may be stacked or split. Moreover, the functions implemented by the software testing platform provided in this embodiment correspond to the software testing methods provided in the above embodiments one to one, and for the more detailed processing flow implemented by the platform, detailed descriptions have been given in the above method embodiments, and detailed descriptions are omitted here.
Based on the same technical concept, the embodiment of the invention also discloses a software testing system, which mainly comprises the following components in percentage by reference to fig. 5:
a system to be tested 51;
at least one data signal source 52 for sending an excitation signal to the system under test that affects the behavior of the system under test;
and a software testing platform 53 as described in any of the above embodiments.
The software testing method, the software testing platform and the software testing system provided by the embodiment of the invention can convert any communication protocol into a plurality of rule statements in a user-defined format, generate a plurality of testing scenes according to testing requirements of different communication protocols on the basis of the rule statements, and run the specified testing scenes to finish the testing of the communication protocol. Therefore, in the whole testing process, the process of compiling the test case by the tester is simplified, the commonalities of different communication protocols in coding and decoding and protocol message receiving and sending processing are integrated, and the problem of developing different testing tools aiming at different communication protocols is solved.
The embodiment of the invention also discloses a computer-readable storage medium which comprises computer execution instructions, wherein the computer execution instructions are used for enabling the software testing platform to execute the software testing method in the embodiment shown in the figures 1 to 3.
The embodiment of the invention also discloses equipment which comprises a processor and a memory, wherein the memory is internally stored with an execution instruction, and the processor reads the execution instruction in the memory and is used for executing the software testing method in the embodiment shown in the figures 1 to 3.
Those skilled in the art will appreciate that all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. The program executes the steps of the above embodiments of the method when executed, and the storage medium includes various media such as ROM, RAM, magnetic or optical disk, etc. which can store program codes.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
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 (5)

1. A method for testing software, the method comprising:
writing rule statements corresponding to the communication protocols according to unified rule grammars formulated by different communication protocols, wherein the contents of the rule statements at least comprise rule input, rule conditions, rule processing and rule output;
combining the rule statements according to the test requirements of different communication protocols to generate at least one test scene; the method specifically comprises the following steps: performing dependency analysis on the rule statements, and comparing the relations among rule input, rule conditions, rule processing and rule output of the rule statements to obtain the dependency relations among the rule statements; creating at least one rule set according to the dependency relationship among the rule statements, wherein the rule set comprises at least one rule statement; selecting the rule set to generate a test sequence, and generating at least one test case by setting an initial value of the test sequence; setting parameters of a test environment according to test requirements of different communication protocols to generate at least one test scene, wherein the test environment at least comprises a running environment of a test case, a running execution mode of the test case and an expected execution result of the test case;
executing the test scene to test the communication protocol and generating a test report; the method specifically comprises the following steps: establishing connection with different data signal sources according to the communication protocol; controlling an excitation signal sent by the data signal source to a system to be tested according to the rule input content of the rule statement, and constructing at least one test scene; establishing connection with a system to be tested in the test scene, and completing protocol message interaction with the system to be tested; outputting content according to the rule of the rule statement, analyzing the received protocol message sent by the system to be tested, and generating a test result, wherein the test result is used for indicating whether the received protocol message is correct according to the rule processing content of the rule statement; and generating a test report according to the test result.
2. The method of claim 1, wherein after writing rule statements corresponding to different communication protocols according to a unified rule syntax established by the different communication protocols, the method further comprises:
and determining the content and default value of the custom structure body included in the rule statement.
3. A software testing platform, the platform comprising:
the rule statement writing unit is used for writing rule statements corresponding to the communication protocols according to unified rule grammars formulated by different communication protocols, and the content of the rule statements at least comprises rule input, rule conditions, rule processing and rule output;
the test scenario generation unit is used for combining the rule statements according to the test requirements of different communication protocols to generate at least one test scenario; the method is specifically used for: performing dependency analysis on the rule statements, and comparing the relations among rule input, rule conditions, rule processing and rule output of the rule statements to obtain the dependency relations among the rule statements; creating at least one rule set according to the dependency relationship among the rule statements, wherein the rule set comprises at least one rule statement; selecting the rule set to generate a test sequence, and generating at least one test case by setting an initial value of the test sequence; setting parameters of a test environment according to test requirements of different communication protocols to generate at least one test scene, wherein the test environment at least comprises a running environment of a test case, a running execution mode of the test case and an expected execution result of the test case;
the test report generating unit is used for executing the test scene to test the communication protocol and generating a test report; the method is specifically used for: establishing connection with different data signal sources according to the communication protocol; controlling an excitation signal sent by the data signal source to a system to be tested according to the rule input content of the rule statement, and constructing at least one test scene; establishing connection with a system to be tested in the test scene, and completing protocol message interaction with the system to be tested; outputting content according to the rule of the rule statement, analyzing the received protocol message sent by the system to be tested, and generating a test result, wherein the test result is used for indicating whether the received protocol message is correct according to the rule processing content of the rule statement; and generating a test report according to the test result.
4. The platform of claim 3, wherein the rule statement writing unit is further configured to:
and determining the content and default value of the custom structure body included in the rule statement.
5. A software testing system, the system comprising:
a system to be tested;
the data signal source is used for sending an excitation signal which can influence the behavior of the system to be tested to the system to be tested;
and a software testing platform as claimed in claim 3 or 4.
CN201811433684.9A 2018-11-28 2018-11-28 Software testing method and testing platform Active CN109491919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811433684.9A CN109491919B (en) 2018-11-28 2018-11-28 Software testing method and testing platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811433684.9A CN109491919B (en) 2018-11-28 2018-11-28 Software testing method and testing platform

Publications (2)

Publication Number Publication Date
CN109491919A CN109491919A (en) 2019-03-19
CN109491919B true CN109491919B (en) 2021-10-26

Family

ID=65698060

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811433684.9A Active CN109491919B (en) 2018-11-28 2018-11-28 Software testing method and testing platform

Country Status (1)

Country Link
CN (1) CN109491919B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181846B (en) * 2020-10-20 2022-03-25 公安部交通管理科学研究所 Automatic test platform and method for traffic signal control system messages
CN114050634B (en) * 2022-01-12 2022-06-17 深圳荣耀智能机器有限公司 Charging test method, electronic device, adapter and charging test system

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564489A (en) * 2004-04-19 2005-01-12 中兴通讯股份有限公司 Testing method for limitting status machine of communication system
CN101996131A (en) * 2009-08-19 2011-03-30 航天信息股份有限公司 Automatic test method and automatic test platform for graphic user interface (GUI) based on x extensive makeup language (XML) packaging key word
CN102981958A (en) * 2012-12-19 2013-03-20 青岛海信传媒网络技术有限公司 Method and device for testing software
CN103049371A (en) * 2012-11-07 2013-04-17 青岛海信传媒网络技术有限公司 Testing method and testing device of Android application programs
CN103838675A (en) * 2014-03-21 2014-06-04 上海富欣智能交通控制有限公司 Method for generating test cases for computer interlocking system automatically
CN105407012A (en) * 2015-10-27 2016-03-16 浪潮(北京)电子信息产业有限公司 Automatic test method and device
CN105630667A (en) * 2014-11-28 2016-06-01 阿里巴巴集团控股有限公司 Test method and terminal equipment
CN106802862A (en) * 2016-12-14 2017-06-06 中国铁路总公司 Train operation control system security critical software automatically testing platform
CN107368408A (en) * 2017-05-31 2017-11-21 中国船舶工业综合技术经济研究院 A kind of software fault towards interface injects automated testing method
US10067863B1 (en) * 2017-05-04 2018-09-04 Microsoft Technology Licensing, Llc Feature targeting of test automation lab machines
CN108521350A (en) * 2018-03-16 2018-09-11 重庆邮电大学 A kind of industrial gateway equipment automatization test method driving script based on XML
CN108804322A (en) * 2018-06-05 2018-11-13 中国平安人寿保险股份有限公司 Automated testing method, device, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8411579B2 (en) * 2005-10-04 2013-04-02 Alcatel Lucent Communication system hierarchical testing systems and methods—entity dependent automatic selection of tests
US7680782B2 (en) * 2006-10-18 2010-03-16 International Business Machines Corporation Method to generate semantically valid queries in the XQuery language
EP2175373B1 (en) * 2008-10-09 2016-06-08 Accenture Global Services Limited Test data creation and execution system for service oriented architecture
CN102014016A (en) * 2010-08-31 2011-04-13 北京邮电大学 System and method for testing defects of network protocol
CN106557413A (en) * 2015-09-25 2017-04-05 伊姆西公司 Based on the method and apparatus that code coverage obtains test case
CN106528407B (en) * 2016-10-19 2019-01-25 中国航空综合技术研究所 A kind of embedded software safety automatic Verification system and its verification method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564489A (en) * 2004-04-19 2005-01-12 中兴通讯股份有限公司 Testing method for limitting status machine of communication system
CN101996131A (en) * 2009-08-19 2011-03-30 航天信息股份有限公司 Automatic test method and automatic test platform for graphic user interface (GUI) based on x extensive makeup language (XML) packaging key word
CN103049371A (en) * 2012-11-07 2013-04-17 青岛海信传媒网络技术有限公司 Testing method and testing device of Android application programs
CN102981958A (en) * 2012-12-19 2013-03-20 青岛海信传媒网络技术有限公司 Method and device for testing software
CN103838675A (en) * 2014-03-21 2014-06-04 上海富欣智能交通控制有限公司 Method for generating test cases for computer interlocking system automatically
CN105630667A (en) * 2014-11-28 2016-06-01 阿里巴巴集团控股有限公司 Test method and terminal equipment
CN105407012A (en) * 2015-10-27 2016-03-16 浪潮(北京)电子信息产业有限公司 Automatic test method and device
CN106802862A (en) * 2016-12-14 2017-06-06 中国铁路总公司 Train operation control system security critical software automatically testing platform
US10067863B1 (en) * 2017-05-04 2018-09-04 Microsoft Technology Licensing, Llc Feature targeting of test automation lab machines
CN107368408A (en) * 2017-05-31 2017-11-21 中国船舶工业综合技术经济研究院 A kind of software fault towards interface injects automated testing method
CN108521350A (en) * 2018-03-16 2018-09-11 重庆邮电大学 A kind of industrial gateway equipment automatization test method driving script based on XML
CN108804322A (en) * 2018-06-05 2018-11-13 中国平安人寿保险股份有限公司 Automated testing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109491919A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN106547527B (en) JavaScript file construction method and device
CN106547520B (en) Code path analysis method and device
CN116860949B (en) Question-answering processing method, device, system, computing equipment and computer storage medium
JP2010097426A (en) Computer program, and device and method for receiving input of source program
CN109491919B (en) Software testing method and testing platform
CN111026634A (en) Interface automation test system, method, device and storage medium
WO2015159501A1 (en) Verification property integration device, verification property integration method, and recording medium having verification property integration program stored therein
JP7409197B2 (en) Elaboration of repair patterns for static analysis violations in software programs
US9390117B2 (en) Method of transforming sets of input strings into at least one pattern expression that is string expressing sets of input strings, method of extracting transformation pattern as approximate pattern expression, and computer and computer program for the methods
CN116028028A (en) Request function generation method, device, equipment and storage medium
CN114090365A (en) Method, device and equipment for performing function test by using dynamic link library
CN112860264B (en) Method and device for reconstructing abstract syntax tree
CN111143228B (en) Test code generation method and device based on decision table method
CN108304164B (en) Business logic development method and development system
CN112231544A (en) RPA robot search method, device and equipment combining RPA and AI
WO2021086704A1 (en) Rules generation using learned repetitive code edits
CN114238151A (en) Software testing method and device, electronic equipment and storage medium
CN113051172B (en) Execution method and device of test script, computer equipment and storage medium
CN111831288B (en) Method and system for automatically generating Thrift IDL data structure and automatic transfer function
EP2535813A1 (en) Method and device for generating an alert during an analysis of performance of a computer application
US6763516B2 (en) Convention checking apparatus, convention checking system, convention checking method, and storage medium on which is recorded a convention checking program
CN113448852A (en) Test case obtaining method and device, electronic equipment and storage medium
CN111708542A (en) Test case generation method, system, device and storage medium
CN112925564B (en) Method and device for cleaning redundant import class of source code
CN117369521B (en) Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision

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