CN112988596A - Automatic testing method and system based on state transition - Google Patents

Automatic testing method and system based on state transition Download PDF

Info

Publication number
CN112988596A
CN112988596A CN202110456418.3A CN202110456418A CN112988596A CN 112988596 A CN112988596 A CN 112988596A CN 202110456418 A CN202110456418 A CN 202110456418A CN 112988596 A CN112988596 A CN 112988596A
Authority
CN
China
Prior art keywords
state
migration
task
action
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.)
Granted
Application number
CN202110456418.3A
Other languages
Chinese (zh)
Other versions
CN112988596B (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.)
CRSC Research and Design Institute Group Co Ltd
Original Assignee
CRSC Research and Design Institute 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 CRSC Research and Design Institute Group Co Ltd filed Critical CRSC Research and Design Institute Group Co Ltd
Priority to CN202110456418.3A priority Critical patent/CN112988596B/en
Publication of CN112988596A publication Critical patent/CN112988596A/en
Application granted granted Critical
Publication of CN112988596B publication Critical patent/CN112988596B/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/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides an automatic test method and system based on state transition, wherein the method comprises the following steps: acquiring a test script, wherein the test script comprises one or more state elements, and the state elements are used for expressing a test action and a state migration relation; analyzing the test script, converting the state element into a state object, and storing the state object in a state object list; performing an automatic test comprising: acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object; and migrating the current state object to other state objects in the state object list according to the specified conditions, and continuously executing automatic test according to the switched current state object. By standardizing the test script and the corresponding object list, the refined control scheduling management of the test process with the incidence relation can be realized, the test execution condition can be conveniently and comprehensively mastered in real time, and the test script editing difficulty is reduced.

Description

Automatic testing method and system based on state transition
Technical Field
The invention belongs to the field of automatic testing, and particularly relates to an automatic testing method and system based on state transition.
Background
In recent years, in order to meet the demand of rapid development of passenger dedicated lines and high-speed railways, China refers to the ETCS standard in Europe and provides a Chinese train operation control system (CTCS) based on the national conditions of China. The RBC is the most critical device in the ground devices of the CTCS-3 Level (Chinese Train operation Control System Level3, China Train operation Control System application Level 3) Train Control System, generates a safe Train Control command according to the line information and the Train position information obtained by interacting with other external ground systems, calculates the driving permission (MA), and transmits the driving permission to the Train through a GSM-R (GSM For railway) wireless network, thereby realizing the safe and reliable operation of the Train controlled by the RBC in the coverage range.
As a radio block center of a safety demanding system, once faults and errors which are not measured in advance occur, the transport efficiency is influenced, and more seriously, the personal and property safety is endangered. Therefore, before the radio block center is put into operation, the equipment must be strictly tested to avoid unnecessary losses.
The test system of the radio block center needs to simulate all external equipment communicating with the radio block center, and simulate the external equipment to send information to the radio block center according to a corresponding communication protocol, so as to construct a test scene. Meanwhile, the information fed back to each simulation device by the radio block center is checked, so that whether the function of the radio block center is correct or not is judged. Because the test cases related to the radio block center have a plurality of test scenes, in order to ensure the test efficiency and the test quality, an automatic test method based on scripts is adopted at present. The automatic test process generally includes first writing a test script, specifying data to be sent to the radio block center to be tested in the script, and setting a test feedback verification condition. And then, loading and executing a corresponding script through a script executor so as to realize automatic testing.
The existing automatic test system of the radio block center is usually compiled by a script language TCL, and the script form is according to the specific script language grammar. The script compiling process is a code development process, and the script does not have a fixed text form and is difficult to visually edit.
The existing automatic testing system of the radio block center has the following defects:
1. the script of the existing automatic test system of the radio block center is directly compiled by adopting a script language, so that testers are required to master script programming skillfully, and the compiling difficulty is high.
2. When the existing automatic test system of the radio block center compiles the script, the script is directly edited by adopting a text editor, and a visual script editing interface cannot be provided.
3. The existing automatic test system of the radio block center cannot feed back the execution condition of the script in real time in the test process, and the test result can only be checked through the test log after the test is finished.
The invention provides a new solution mainly aiming at the problem that the test script in the prior art is lack of standardization, so that the fine scheduling management of the test process is difficult to carry out.
Disclosure of Invention
To solve at least one of the above problems in the prior art, the present invention provides an automatic testing method based on state transition, which includes the following steps:
acquiring a test script, wherein the test script comprises one or more state elements, and the state elements are used for expressing a test action and a state migration relation;
analyzing the test script, converting the state element into a state object, and storing the state object in a state object list;
performing an automatic test comprising:
acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object;
and migrating the current state object to other state objects in the state object list according to the specified conditions, and continuously executing automatic test according to the switched current state object.
Further, the state element comprises two sub-elements, an action element and a migration element;
and defining a test action through the action element, and defining a next state element which needs to be executed when a specified condition is met through the migration element.
Further, the test script further comprises a task element, wherein the task element comprises one or more state elements as sub-elements of the task element.
Further, the test script further comprises a task group element, wherein the task group element comprises one or more task elements, and the task elements are used as sub-elements of the task group element.
Further, the attribute of the action element further includes a variable reference symbol that references a variable acquired in a migration element of a previously executed state element by a specified name.
Furthermore, when the test script is analyzed, a corresponding object is created for each element in the script, and the attribute of the corresponding element in the script is mapped to an object attribute, including:
mapping the state element into a state object, mapping the migration element into a migration object and storing the migration object in a migration object list, and mapping the action element into an action object and storing the action object in an action object list;
the state object contains a corresponding action object list and a migration object list.
Further, a set of associated tasks in a test script are executed in parallel.
Further, executing a set of associated tasks in a test script in a parallel manner includes:
storing the task object converted by the task element by adopting a task object list;
when the task objects are executed, a plurality of task objects are obtained from the task object list, and the test tasks represented by the task objects are executed in parallel.
Further, the parallel execution of the test tasks represented by the task objects includes: and periodically polling and scheduling each task in the task object list in a time division multiplexing mode.
Further, periodically polling each task in the scheduling task object list in a time division multiplexing manner includes: and one thread processes the action and/or migration of the current state of each task in the task group in each period, and simulates the concurrent execution of a plurality of tasks.
Further, periodically polling each task in the scheduling task object list in a time division multiplexing manner includes: periodically traversing the tasks in the task object list, and sequentially judging whether the current state of each task has a skip condition according to the priority of the tasks in the task object list; if any migration condition in the current state of the task at the processing moment is met, updating the current state of the task, and jumping to a migration-specified target state; a jump to a task within a cycle is performed at most once.
Further, performing the automatic test includes:
acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object;
acquiring an action object in a current state, and sending data to the equipment to be tested according to the action object;
and acquiring the migration object in the current state, verifying the data fed back by the equipment to be tested according to the migration condition, and jumping to a new state object according to a verification result.
Further, the process of processing a set of associated tasks includes:
step 1: taking out the task objects from the task object list according to the priority, and then performing step 2;
step 2: acquiring the current state of the task object, and then performing step 3;
and step 3: if the state is the ending state of the task, deleting the task object from the task object list and performing step 6, otherwise performing step 4;
and 4, step 4: processing the state action defined by the current state, and then performing step 5;
and 5: checking the state transition defined by the current state, and updating the current state of the task to a transition target state if the transition is triggered; if the migration is not triggered, the task keeps the current state; then step 6 is carried out;
step 6: if unprocessed tasks exist in the task object list in the period, repeating the step 1, and if unprocessed tasks do not exist, performing a step 7;
and 7: the task object list is executed.
Further, state transition is realized through the life cycle of the state so as to complete the execution of the test action in the state; the state lifecycle includes creation and execution.
Further, acquiring the state object and creating the state lifecycle to be executed, including:
initializing action information and migration information in the action processor and the migration processor according to the static action data and the static migration data respectively;
the action information comprises parameters for marking the execution condition of the action;
the migration information includes a parameter for marking the execution of migration.
Further, the migration object further includes an action object for immediately executing a corresponding action when the migration condition is satisfied.
Further, performing the automatic test includes the action performing step of:
step 1: acquiring an action object from the action object list, and then performing step 2;
step 2: comparing the executed times of the action object with the repeated times in the attribute of the action object, if the executed times is less than the repeated times, jumping to 3, if the executed times is more than or equal to the repeated times, executing step 6;
and step 3: calculating the time interval between the current time and the last action execution, and then performing step 4;
and 4, step 4: comparing the time interval with the action interval in the action object attribute, and performing the step 6 if the time interval is less than the action interval, and performing the step 5 if the time interval is greater than or equal to the action interval;
and 5: if the action object has the variable reference symbol, firstly replacing the variable reference symbol with the referenced data content, and then sending data to the device to be tested according to the replaced data content, wherein the variable reference symbol refers to the variable obtained from the migration element of the previously executed state element by the appointed name; if the variable quote symbol does not exist, directly sending data in the script to the equipment to be tested; then step 6 is carried out;
step 6: repeating the step 1 if the unprocessed action in the current period exists in the action object list, and performing the step 7 if the unprocessed action does not exist;
and 7: and finishing the execution of the action object list.
Further, performing automatic testing includes performing the steps of migrating the object:
step 1: acquiring a migration object from the migration object list, and then performing step 2;
step 2: verifying the migration condition according to the feedback of the system to be tested, if the migration condition is met, performing the step 3, otherwise, performing the step 5;
and step 3: if the migration includes a variable statement identifier, acquiring a value of a corresponding variable in the received data according to a variable name indicated by the variable statement identifier of the migration object, storing the value in an actuator memory, and then performing step 4, and if the variable statement identifier is empty, performing step 4;
and 4, step 4: if the migration contains an action, processing the migration action, and then performing step 5; otherwise, directly executing the step 5;
and 5: updating the current state of the task according to the specified target state in the migration object, and then performing step 6;
step 6: if the unprocessed migration exists in the migration object list in the period, repeating the step 1, otherwise, entering the step 7;
and 7: and finishing the execution of the migration object list.
Further, the migration processing process adopts double threads, including:
the first thread periodically judges whether the migration condition of each migration object in the migration processor is met, if so, state skipping is carried out, if not, the next migration object is checked, and blocking waiting is not carried out;
the second thread periodically judges whether a migration condition matched with the second thread exists according to the data received by verification, and if the verification condition of a certain migration exists, the verification result mark of the migration object is modified.
Further, the performing the corresponding test action comprises:
and simulating information interaction of the external equipment to the radio block center according to a corresponding communication protocol by simulating all the external equipment which is communicated with the radio block center.
Further, in the process of executing the automatic test, recording the state transition sequence, and displaying the execution progress of the automatic test according to the state transition sequence.
Further, when the state migration of the task is executed, a first hash table is adopted to record the migration sequence of the task, the task identifier is used as a key of the first hash table, and the state of the task is stored as an array according to the migration sequence and used as the value of the first hash table;
the action and the migration execution condition of the state are stored by adopting a second hash table, the key of the second hash table is determined by the task name and the state name in the task, and the executed migration name corresponding to the state of the task is used as the value of the second hash table;
and displaying the task execution progress according to the records of the first hash table and the second hash table.
And further, providing a first visual interface corresponding to the test script element, and displaying the elements in the test script in a tree structure, wherein nodes of the tree structure correspond to the elements in the test script, and the tree structure corresponds to the element hierarchical relationship in the test script.
The invention also provides an automatic test system based on state transition, which comprises:
the device comprises an acquisition unit, a test unit and a state transition unit, wherein the acquisition unit is used for acquiring a test script, the test script comprises one or more state elements, and the state elements are used for expressing a test action and a state transition relation;
the analysis unit is used for analyzing the test script, converting the state elements into state objects and storing the state objects in a state object list;
an execution unit for performing an automatic test, comprising:
acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object;
and migrating the current state object to other state objects in the state object list according to the specified conditions, and continuously executing automatic test according to the switched current state object.
The invention also provides an automatic test system based on state transition, which comprises at least one processor and at least one memory;
the memory stores a computer program for executing the automatic test method based on the state transition, and the processor calls the computer program in the memory to execute the automatic test method based on the state transition.
The automatic test method and the system based on the state transition have the following advantages that:
the testing steps are normalized by adopting the state elements, the testing link is associated with the state transition relationship, the complex front and back logics in the testing process are converted into the object list with the transition relationship, the testing process with the association relationship can be conveniently and finely and controllably scheduled and managed through the state object list, the logics are clear, and the testing progress condition can be conveniently obtained in real time.
The script execution method drives the test according to the state and the state jump in the script, so that the specific steps and progress executed by the script can be fed back to a user in real time in the test process, the user can know the current test progress and information interaction details, and the test progress is displayed in real time.
Based on the standardized script structure, a simple and easy-to-use script compiling method without additional learning cost is provided for testers, and the script compiling efficiency of the testers is improved.
And moreover, the unified formatting script is adopted, so that the conversion of the text script and the visual chart can be conveniently realized by a program, and a visual script editing tool can be provided for testers based on the script.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a diagram illustrating a test script element structure, according to an embodiment of the invention;
FIG. 2 illustrates an object relationship diagram corresponding to a test script according to an embodiment of the invention;
FIG. 3 illustrates a process diagram for performing a set of test tasks according to an embodiment of the invention;
FIG. 4 shows a state lifecycle change process diagram according to an embodiment of the invention;
FIG. 5 is a schematic diagram illustrating an action and migration processing sequence according to an embodiment of the present invention;
FIG. 6 is a process diagram illustrating the handling of a migration condition by a dual thread in accordance with an embodiment of the present invention;
FIG. 7(a) is a diagram illustrating an example of a test script visualization editing interface, according to an embodiment of the invention;
FIG. 7(b) is an exemplary diagram illustrating a visual editing interface for a test script migration configuration, according to an embodiment of the invention;
FIG. 8 illustrates an example diagram of a test progress visualization in accordance with an embodiment of the invention;
FIG. 9 is a hash table structure diagram illustrating a migration process for recording task states according to an embodiment of the present invention
FIG. 10 is a diagram illustrating a state transition-based automatic test system according to an embodiment of the present invention;
FIG. 11 is a block diagram of another automatic test system based on state transition according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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 provides an automatic testing method based on state transition, which comprises the following steps:
acquiring a test script, wherein the test script comprises one or more state elements, and the state elements are used for expressing a test action and a state migration relation;
analyzing the test script, converting the state element into a state object, and storing the state object in a state object list;
performing an automatic test comprising:
acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object;
and migrating the current state object to other state objects in the state object list according to the specified conditions, and continuously executing automatic test according to the switched current state object.
In the embodiment of the present invention, executing the corresponding test action includes: and simulating information interaction of the external equipment to the radio block center according to a corresponding communication protocol by simulating all the external equipment which is communicated with the radio block center.
The following describes an exemplary structure, script parsing and execution process of the automatic test script in the embodiment of the present invention. In the embodiment of the present invention, a state transition-based automatic testing script for a radio block center and an execution method thereof are described by taking a radio block center test as an example, and a person skilled in the art can apply the technical scheme of the present invention to other similar testing scenarios according to the description of the embodiment of the present invention, without departing from the spirit and scope of the technical scheme of each embodiment of the present invention.
Script structure
The embodiment of the invention adopts the structured script which is simple in structure and easy to analyze so as to meet the requirement of compiling related logic by the test script. Illustratively, the script in the present invention is written in xml (extensible markup language), and other existing structured script languages (such as JSON, Python, and the like) or automatically defined structured scripts may also be used, as long as the following element organization expressions in the embodiments of the present invention can be implemented.
The embodiment of the invention provides an automatic test method based on state transition (or state jump), therefore, in the structural design of a test script, the test script comprises one or more state elements for representing the relation between test actions and state transition, and actions and transitions to be executed in the state elements can be defined by the action elements and the transition elements respectively. Specifically, the state element includes two sub-elements, an action element and a migration element; the test action is defined by an action element, and the next state element that needs to be executed when the specified condition is met is defined by a migration element. Through the standardized test script, the complex test process is arranged into elements with fixed formats, the relationship among a plurality of parallel state elements is defined through the migration elements, the design is ingenious, and the convenience difficulty of the script is simplified. Moreover, the structured script is convenient to realize through a visual convenient interface, the convenience, the efficiency and the definition of the test script are further improved, and the error rate is reduced. At the same time, a basis for translating elements into object lists is provided.
Further, a complete test task may be represented with a set of associated state elements, which when executed performs one or more test actions.
Furthermore, a plurality of tasks with the same or corresponding test scenes can be integrated to form a task group, and task management based on scene division is facilitated.
The embodiment of the invention is used for exemplarily describing a test script comprising a Task group (Tasks) element, a Task (Tasks) element, a State (State) element, an Action (Action) element and a migration (Tran) element. Illustratively, a test script element structure is as shown in fig. 1, the test script includes a task group, the task group includes three task elements (task 1, task2, and task 3), taking task1 as an example, the task element of task1 includes two state elements (state 1 and state 2), and taking state 1 as an example, state 1 includes two action elements (action 1 and action 2) and two transition elements (transition 1 and transition 2). The elements and the inclusion relationship between the elements are set by specific element symbols and element position relationships according to the syntax of the structured foot language, for example, one element is represented by a set of tags having head-to-tail correspondence, and the content between the head-to-tail tags is the content contained by the element.
Illustratively, in an XML test script, the element structure in fig. 1 is represented in the following manner.
< tasks > → task group
< Task name = "Task1" > Task1
< state name = "S0" > → state 1
< action name = "action1"/> action1
< tran name = "tran1"/> migration 1
< action name = "action2"/> action2
< tran name = "tran2"/> migration 2
</state > → state 1 finish
< state name = "S1" > omit content of state 2 >
</task > → end of task1
< Task name = "Task2" > omit content of Task2 </Task > → Task2
< Task name = "Task3" > omit content of Task3 </Task > → Task3
</tasks > → task group end
The above structure represents only the element organization relationship and the contents such as the omitted element attributes. The respective elements are explained in detail below.
a. Task group
A task group is a collection of tasks, and one task group may include one or more tasks, for example, a plurality of parallel tasks including a scene described by a current script. The tasks belong to a parallel relation, and the tasks are organized by task groups. Without loss of generality, a test script contains a task group to facilitate modification management. The Task group element needs to contain one or more Task (Task) elements. Further, the task group includes at least two task elements, which are a test task element and a cleaning task element, respectively, and may also include a plurality of test tasks and a plurality of cleaning tasks.
The task group element includes a cycle attribute, and when the automatic test is executed, the tasks in the script are periodically and sequentially executed according to the cycle attribute. Without loss of generality, the periodic attribute is a numeric type, in milliseconds, and cannot be 0 or null.
Illustratively, the task group execution period defined below is 500 time units (e.g., milliseconds).
<tasks cycle="500">
b. Task
A task represents a series of related test actions to be performed to achieve a test goal. In the embodiment of the present invention, the task element includes a state sub-element, that is, the task is a set of states. Tasks are used to organize the states to facilitate scheduling by the executor according to rules. In an embodiment of the invention, the executor is one or a group of programs or a hardware device containing the programs for parsing the test script and executing the test script. Tasks are mainly divided into test tasks and cleaning tasks according to types. Wherein the test task is used for executing a test flow; the cleaning task is used for performing related processing after the script is normally executed or abnormally terminated, such as closing related threads, cleaning a memory, cleaning a temporary file, disconnecting network connection and the like. So as to ensure that the script does not interfere with the subsequently executed script. The script executor is used to generally process actions of a state, send data, process a migration of a state, check data, and the like. Wherein the processing action is undertaken by the action handler and the processing migration is undertaken by the migration handler. The action handler and the migration handler are scheduled for use by the script executor or as an integral part of the script executor.
A task element needs to contain more than one State element. The task at least comprises an ending state and a non-ending state.
The tasks contain a name (name) attribute to distinguish between the tasks in the task group. The name attribute is a character string which can be defined by user, generally is not empty, and the name attributes of different tasks in the same task group are different.
The task contains a cleaning identification (clean) attribute to indicate whether the task is a cleaning task. Without loss of generality, the attribute is of boolean type, "true" indicating that this task is a cleaning task, and "false" or null indicating that this task is a testing task. In further embodiments, the number 0,1 may also be used to distinguish between test tasks and cleaning tasks.
The tasks include a priority attribute to indicate the order of execution of the tasks in the task group. Without loss of generality, the priority is of the integer number type, with the lowest priority being 0.
The task includes a description (descriptor) attribute for prompting the function and scene of the task. Without loss of generality, this attribute is a string, can be custom defined, and can be null.
Illustratively, one task element is represented as follows:
< Task name = "Task1" priority = "0" descriptor = "establishing session with RBC in different ATP mode" clear = "false" > omitting subelement >
The name of the Task element is 'Task 1', the priority is the lowest priority, the description of the Task is 'establishing a session with RBC in different ATP modes', the cleaning identifier is 'false', namely the Task is a testing Task.
c. Status of state
The states are basic units for controlling the test logic and basic units for processing tasks by the executor, and the information interaction process with the equipment to be tested is controlled through conditional jump among different states. One task includes one to a plurality of states.
The states contain name (name) attributes that are used to distinguish between different states in the same task. The name attribute is a character string, can be self-defined and is not empty generally. The name attributes of states in different tasks may be the same.
The state includes a description (descriptor) attribute for indicating the function and scenario of the state. This attribute is a string, which can be custom defined and can be null.
The state element is used to represent the test action and state transition relationships. Specifically, the test action and migration relationship are represented by the action element and the migration element as child elements of the state element.
A state may contain zero to multiple Action (Action) elements that represent operations that need to be performed while the task is in that state.
The state may include zero to multiple transition (Tran) elements, which indicate that the state transition is performed if the corresponding condition is satisfied, updating the current state.
The state contains an end identification (end) attribute that identifies the last state in the task. The ending attribute is of a boolean type, "true" indicates that this state is an ending state, and "false" or null indicates that this state is not an ending state.
Illustratively, one state element is represented as follows:
< state name = "S0" end = "false" describe = "establish secure connection" > omit subelement >
The name of the state is "S0", the ending attribute is "false", and the state is not the ending state and is described as "establishing a secure connection".
d. Movement of
The state sets the operation required to be performed by the actuator in the corresponding state through the attribute in the action element. For example, to transmit data to a device under test.
Actions contain a name (name) attribute that is used to distinguish between different actions in the same state. The name attribute is a character string, can be self-defined and is not empty generally. The name attribute of an action in different states may be the same.
The action contains a repeat times (times) attribute indicating the number of times the content of the action is repeatedly executed. The repeat number attribute is expressed in decimal numbers and may be null. If the entry is null, it is default to send 1 time.
The action includes an action interval (interval) attribute indicating an interval for repeatedly executing the action. The action interval attribute is expressed in decimal milliseconds and may be null. This property makes sense when the number of repetitions is not 0 and empty. If this entry is empty, the default interval is 0.
The action contains a source device (src) attribute that represents the emulated device to which the action corresponds. The source device attribute is a string and may not be null.
The action includes an action target device (target) attribute for representing the device under test corresponding to the action. The action target attribute is a character string and cannot be null.
The action contains an action content (do) attribute to represent the relevant operation affecting the test. This attribute is in the form of a string, which may be null. Illustratively, the data content sent to the device to be tested may be modified by using the action content attribute, some states of the test device may also be modified, for example, on/off of a certain channel between the test device and the device to be tested, and some variable values may also be preset for reference by subsequent actions. These all affect the transmission of data to the device under test.
Further, to increase flexibility of script writing, the actions (specifically, action contents) may further include: a variable reference symbol that references a variable acquired in a migration element of a previously executed state element by a specified name. In particular, the action content string may use a string in the form of "{ capture variable name }" to reference the variable that was obtained by the variable attribute, namely the var attribute, in the prior state transition. Wherein "{", "}" is the variable reference sign, and the capture variable name is the specified name.
The action content may further include: the saved variables can be used as reference variables of subsequent actions by saving the variable representation, the variable name and the variable value and manually setting and saving the designated variables. Illustratively, the action content string may use a string of a specified form, such as "savvar: variable name: variable value" to set and save a variable value, and the subsequent action content may refer to the variable in the above-mentioned manner.
In the embodiment of the invention, the quoted variable sources are two places: 1. and (4) a variable in the migration, wherein the variable is extracted from data sent by the equipment to be tested. 2. And a variable is set in the action, the variable represents a preset variable value, and the value can be directly referred by the subsequent action.
Illustratively, the identification of one action element is as follows:
<action name="action1" do="SetVariable:ATP1_RBC-6:*:t_train_ack Value {t_train}+AddPacket(Once):ATP1_RBC-6:Message146" interval="0" times="1" src="ATP1" target="RBC-6" />
the name of the action is 'action 1', the action content is 'SetVariable' ATP1_ RBC-6 '. t _ train _ ack Value { t _ train } + AddPacket (one): ATP1_ RBC-6: Message 146', and the variable Value of the variable name t _ train _ ack in the information packet sent to the device to be tested is firstly set as the previously captured variable t _ train. The information packet is then sent 146 to the device under test. This is an internal contract agreement. Where { t _ train } is a variable named t _ train referenced from a previous migration; the action interval is 0 ms, i.e. no interval, the number of repetitions is 1, the source device is "ATP 1", and the target device is "RBC-6".
Illustratively, the identification of another action element is as follows:
<action name="action1" do="SaveVar:V1:1" interval="0" times="1" src="ATP1" target="RBC-6" />
where "savvar: V1:1" indicates that the variable V1 is assigned a value of 1, and that subsequent actions may refer directly to the variable value.
e. Migration
And the migration element records the condition of state jump and is used for realizing the jump to the corresponding state according to different feedback results of the equipment to be tested.
The migration element may contain a name (name) attribute that is used to distinguish different migrations in the same state. The name attribute is a character string, can be self-defined and is not empty generally. For transitions in different states, their name attributes may be the same.
The migration element should contain a target state (dest) attribute, which indicates that the current state is updated to the specified target state when the present migration condition is satisfied. The target state attribute is a character string and cannot be null. In the embodiment of the invention, the target state is a state name in the same task, namely jump in the same task by default.
The migration element contains a source device (src) attribute that indicates the source device for which the migration check data is currently available.
The migration element contains a target device (target) attribute to represent a recipient device of the current migration check data. This attribute is a string, which may be null. A device under test (such as a designated RBC) may communicate with multiple external devices. During testing, an environment interacting with the device to be tested is provided in a simulation mode, namely, the simulation device is used as an external device to communicate with the device to be tested. The plurality of simulation devices can perform simulation data injection by one script, the executor receives information sent by the device to be tested to different external devices during testing, and whether the information is data sent to the corresponding simulation device needs to be distinguished through the attribute.
The migration element may contain zero to multiple migration Action (Action) sub-elements. This element is used to identify the action that is performed immediately when the migration condition is satisfied. The action elements of the migration may be the same as the actions of the states described above.
Migration may include a get variable (var) attribute that represents a field value for a specified name in the get information when the check condition is true. And storing the data in the memory of the actuator after the data is acquired. And acquiring that the attribute of the variable is a character string and cannot be null. The stored variable field can be referred to in the subsequent state action content, so that the dynamic assignment of the parameters in the action content is realized. The problem of automatically setting the value of the feedback data according to the information in the received data is solved.
The migration element should contain a migration condition (exp) attribute, which is used to define the specific contents of the migration check. The attribute is a logical expression in the form of a character string and cannot be null.
In order to increase flexibility of script writing, synchronization between tasks is realized by specifying a synchronization task and a synchronization state, specifically, a second state of a second task is set in migration of a first state of a first task, and in an execution process, only when an execution condition of the second state of the second task meets a specified condition, jump of the migration is executed, that is, a current state is updated. Wherein the execution condition satisfying the specified condition may start execution or complete execution for the second state of the second task.
The migration instruction may specify the form of the task name and state name (e.g., "task # task name _ state name") to control synchronization between the various tasks. For example, if a transition instruction in state 3 of task2 is "task # task 1_ state 5", after task1 is executed to state 5 (specifically, when execution state 5 is started), state 3 of task2 jumps, and thus inter-task synchronization can be achieved.
Illustratively, the following are two transition representations in one state:
the first migration:
<tran name="tran1" dest="S0" exp="recv#"m_ack":1" src="RBC-6" target="ATP1" var="t_train">
<action name="action1" do="SetVariable:ATP1_RBC-6:*:t_train_ack Value {t_train}+AddPacket(Once):ATP1_RBC-6:Message146" interval="0" times="1" src="ATP1" target="RBC-6" />
</tran>
the name of the migration is "tran1", and the migration condition is exp = "recv #" m _ ack ":1", which means that the m _ ack variable in the received packet is checked to be 1, and then the condition is satisfied, wherein "" "is the transition of the double quotation mark in the XML text, and the instruction is actually recv #" m _ ack ": 1. When the migration condition is satisfied, an action1 during migration is executed, and a function of transmitting a packet from the source device ATP (ATP 1) to the target device RBCR (RBC-6) is executed; when the migration condition is met, firstly executing an action1 in the migration, then jumping to the next state S0, namely the current state migration executed by the actuator is the jumping target state S0, declaring a variable var ='t _ train', wherein var is a variable declaration identifier, and the variable can be referred to by a subsequent action after being assigned; the source device of the jump is RBBC-6 and the target device is ATP 1. And when the check book is migrated, taking out and storing a t _ train variable in the data meeting the condition. This variable is referenced in action with a { t _ trian } value for the t _ train _ ack in the sent M146 packet.
src and target respectively denote a source device and a target device of data transmission during the test.
The second migration:
<tran name="tran2" dest="S12" exp="outOfTime#2000000" src="" target="" />
the transition is named "tran", and when the execution time of the motion in the same state exceeds a predetermined time and 2000000 milliseconds, the transition condition for the transition is satisfied, and the target state "S12" is jumped to.
The element definition with the hierarchical relationship can provide a data basis for realizing control processes of different levels.
Script parsing and executing method
With reference to the description of the above embodiments, a test script is written. When the test script needs to be executed, the test script is acquired, the test script is analyzed, the state elements are converted into state objects, and the state objects are stored in a state object list. In the process of executing the automatic test, at least one state object is obtained from the state object list as a current state object, and a corresponding test action is executed according to the current state object; and whether the specified conditions are met in the execution process or not, when the specified conditions are met, the current state object is migrated into other state objects in the list, and the automatic test is continuously executed according to the switched current state object.
In the embodiment of the invention, a program or a component for analyzing and executing the test script is used as an executor. Illustratively, the executor reads a script file, analyzes information in an xml format in the script, and maps the script information into object information in the memory based on an object-oriented principle. In the embodiment of the present invention, a test script including a task group, a task, a state, an action, and a migration is taken as an example for illustration, but the test script is not limited to a script including all the above elements, and may be simplified into a test script including a state, an action, and a migration, and may also include other elements, and the same or similar implementation may be performed according to the analysis execution process disclosed in the embodiment of the present invention.
When the test script is analyzed, a corresponding object is created for each element in the script, the attribute of the corresponding element in the script is mapped to be an object attribute, the task element is mapped to be a task object, the task group element is mapped to be a task group object, the state element is mapped to be a state object, the migration element is mapped to be a migration object and stored in a migration object list, and the action element is mapped to be an action object and stored in an action object list. The relationship of the respective objects is shown in fig. 2. The Task group element corresponds to a Task object list object, namely a Task list object, the object comprises a dynamic array (m _ tasks) of the Task (Task) object, and the array stores the associated tasks according to the writing sequence of the tasks in the script to form a Task set without loss of generality. The Task object comprises a State (State) object dynamic array m _ states, and the m _ states store states according to the writing sequence of the Task in the script to form a State set of the Task. The state object comprises a list of Action (Action) objects, specifically an Action object dynamic array and a migration (Transition) object list, specifically dynamic arrays m _ actions and m _ trans of the migration object, wherein the m _ actions stores actions according to the writing sequence of the actions in the state in the script to form an Action dynamic array of the state object; and m _ trans stores and migrates according to the writing sequence of the migration in the state in the script to form a migration set of the state. The Transition object can also contain a migration dynamic array m _ transitions of the Action object as a migration Action set, and the storage sequence of the migration Action set is consistent with the writing sequence of the migration actions in the script.
Furthermore, an action dynamic array composed of action object sets can be contained in the migration object, wherein the action objects and the action objects in the state can be the same type of objects. In the embodiment of the present invention, for example, a dynamic array in JAVA language is used as a container for storing object sets such as state, action, migration, and the like, in another embodiment, a static array or Set that adopts sufficient space may also be used for implementation, and the programming language is not limited. In the embodiment of the present invention, except that "Set" here represents a type Set in programming, other places where "Set" appears should be understood in a broad sense, i.e. the ease of identifying a group of elements included is the same as "list".
And directly acquiring script information from the memory object in the script executing process of the executor without repeatedly reading the script, wherein the object information is used as static script information.
The elements in the script are converted into the corresponding object lists, so that the test process can be subjected to objectification programming control, and a more definite data coupling relation is achieved, so that a mode of 'analyzing while executing' based on the script execution test is separated. The object list records the whole testing process under a testing scene, can comprehensively and finely acquire the testing condition, and displays the whole testing progress in real time according to the record of object processing in the execution process instead of linearly displaying the current progress state.
The current script adopts a self-defined structure and cannot be directly executed by an analyzer of a corresponding language like a script language. Special execution methods need to be defined to parse and execute the scripts, thereby driving the test. The following describes a process of executing a test operation after parsing a process storage object based on the script.
a. Method for executing task group
In order to implement batch execution of scripts, it is necessary to ensure that a result of a previous script operation does not affect a subsequent script operation, so that one or more tasks are defined in each script for cleaning. The cleaning task and the execution task have the same structure and the same processing flow. The element object definition and the processing process are simplified by only distinguishing through cleaning identification (clean). The cleaning operation for the test in the cleaning task can be customized by a user, such as cleaning a memory, closing network connection and the like. After the executor identifies the cleaning tasks according to the cleaning identification attributes of the tasks and places the execution sequence of the cleaning tasks after the test tasks are completely executed, the executor calls corresponding cleaning interfaces or methods in the cleaning task objects to execute cleaning operation. The method can ensure that the cleaning work aiming at different test scenes is completed by adopting the unified executor logic without developing specific programs for different cleaning works. The method for processing the task group by the executor is as follows:
(1) and classifying the tasks in the task group to form a test task set and a cleaning task set.
(2) And executing each task in the test task set in turn according to the priority.
(3) And sequentially executing each task in the cleaning task set according to the priority.
(4) Script execution is ended.
The process of analyzing the text storage object is to store the text storage object according to the sequence in the script, then sort the groups according to the priority, and form a task set which is sorted according to the priority, wherein the priorities are the same according to the writing sequence.
Illustratively, the set of test tasks is stored in a first dynamic array m _ tasks, and the task group object may further include a second dynamic array m _ clean _ tasks, which is also used to store a series of task objects, i.e., a set of cleaning task objects.
In the embodiment of the present invention, a group of associated tasks in a task group (in a test script) is executed in a parallel manner, specifically, a test operation corresponding to a plurality of task objects in a task set in a task group is executed in a parallel manner, and further, a test task of a test task dynamic array is executed in a parallel manner. Specifically, the task object list is adopted to store the task objects converted by the task elements, so that during execution, a plurality of task objects can be conveniently obtained from the task object list, and the test tasks represented by the task objects are executed in parallel, so that the execution efficiency of the test script is improved, and the execution progress is easy to manage and track. When the task priority is considered, a plurality of tasks with the same priority can be executed in parallel or the tasks can be executed in parallel according to the specified time interval.
Taking processing a task of a task group as an example, the method for implementing parallel execution of tasks in the embodiment of the present invention includes: and periodically polling each task in the scheduling task list in a time division multiplexing mode. And one thread of the executor processes the action and/or migration of the current state of each task in the task group in each period, and simulates the concurrent execution of a plurality of tasks. In the embodiment of the invention, one thread is adopted to poll and execute the tasks, so that the system resources are prevented from being wasted by a plurality of threads, and certain system resources are required for starting the threads, so that a task group of the script can contain a plurality of tasks, and the resource consumption caused by the same number of threads can not be caused.
The method for realizing the parallel execution of the tasks can also be as follows: and executing the test tasks corresponding to the plurality of task objects in a multithreading concurrent mode. And setting execution threads for the tasks respectively, and automatically allocating resources for the threads by the system. Under the condition that the number of tasks in the task group is matched with system resources properly, programming implementation can be simplified.
The following describes in detail a parallel way of time division multiplexing, specifically, a group of test tasks is a test task in a test task set in a task group.
And the executor periodically traverses the tasks in the task set and sequentially judges whether the current state of each task has a jump condition according to the priority of the tasks in the task set. And if any migration condition in the current state of the task at the processing moment is met, updating the current state of the task, and jumping to a migration-specified target state. Jumping of one task in one period is executed at most once, and continuous jumping is not carried out; if the current state of the task at the processing moment is not satisfied by the migration condition, the task keeps the current state unchanged; if the current state of the task is the end state, the task keeps the end state unchanged, and the task is not executed in the next period. The scheduling mode enables all tasks in the task set to be processed in each period, so that the concurrent execution of all tasks in the task set is simulated in a single thread mode.
For example, as shown in fig. 3, (executor) executes to cycle 6, and the task objects that are not completed in the test task set are: task1, task2, and task 3. The execution starts, and the three task objects are traversed according to the priority and executed respectively, in this example, task1, task2, and task3 are executed in sequence according to the priority. For task1, the current state is state 1, and state 1 is executed and it is determined whether a migration (jump) condition is satisfied, in this example, state 1 satisfies the migration condition, so that the task jumps to state 2, that is, the current state of task1 is migrated to state 2. The current state of a task may be specified during execution by a corresponding variable definition, such as by a string holding the name of the current state. And for the task2, executing the action in the current state, namely the state 1, judging that the action does not meet the transition condition, keeping the state 1, finishing the execution of the task2 in the period, and continuing to execute the task 3. For task3, the current state is the end state, which may be the result of the last cycle jump, and then the end state is maintained, ending the convenience of the task set in this cycle. And entering a 7 th period, traversing the tasks in the task set, and respectively executing the tasks of which the current state is not the end state, including the task1 and the task2, according to the priority. For task1, the current state is state 2, the action of state 2 is executed, whether the transition condition is satisfied or not is judged, and if not, state 2 is maintained. And continuing to execute the task2, executing the action of the state 1, judging whether the migration condition is met, if so, jumping to the state 2, ending the execution of the task2 in the current period, and ending the execution of the task set in the current period.
b. Task execution method
And in the task execution process, namely, each state in the task is processed, at least one state object is acquired from the state object list and is used as a current state object, and a corresponding test action is executed according to the current state object. And acquiring the action object in the current state, and sending data to the equipment to be tested according to the action object. Migrating the current state object to other state objects in the state object list according to the specified conditions, wherein the migrating comprises the following steps: and acquiring the migration object in the current state, verifying the data fed back by the equipment to be tested according to the migration condition, and jumping to a new state object according to a verification result. Illustratively, the process by which an executor processes a set of associated tasks is as follows:
step 1: and taking out the tasks from the task set according to the priority, and then performing the step 2.
Step 2: and acquiring the current state of the task, and then performing step 3. The current state initialization of the task may be the first state in the state list, after which the current state is modified based on the state jump.
And step 3: if the state is the ending state of the task, the task is deleted from the task object list and step 6 is carried out, otherwise step 4 is carried out.
And 4, step 4: the state actions defined by this state are processed, followed by step 5.
And 5: the state transitions defined by the state are checked. And if the migration is triggered, updating the current state of the task to the target state of the migration. If the migration is not triggered, the task remains in the current state. Then step 6 is performed. Waiting for some data of the system under test requires, for example, the executor to maintain the current task state unchanged. Embodiments of the present invention further provide timeout judging migration, for example, the following:
<tran name="tran2" dest="S12" exp="outOfTime#2000000" src="" target="" />
and adding a timeout check to the state, so that after the state waits for timeout and the transition condition is met, the state can jump to the expected state, and the situation that the state is executed in an infinite loop can not happen.
Step 6: and repeating the step 1 if the unprocessed task in the period exists in the task set. If there are no unprocessed tasks, step 7 is performed.
And 7: this set of tasks is complete.
The invention sets the state as the set of action and migration, realizes the state migration through the life cycle of the state, and completes the execution of the test action in the state. The state life cycle comprises creation and execution. Further, cleaning is also included, i.e., this step is not necessary, but may increase the stringency of the test execution.
Creating: when the current state of a certain task is updated, firstly, the action processor and the migration processor respectively load static data (including attribute information of the action and the migration) of the action and the migration of the state, the action information and the migration information of the state are set in the action processor and the migration processor, the action information includes parameters corresponding to the attributes of an action object, such as static data of execution times, action intervals and the like, and also includes parameters for marking the execution condition of the action, and the migration information includes parameters corresponding to the attributes of the migration object and also includes parameters for marking the execution condition of the migration. In one embodiment, static data of the action and the migration can also be set in the action processor and the migration processor by means of object copy, wherein the action object and the migration object have corresponding attributes. In the embodiment of the present invention, the action processor and the migration processor are programs or devices for executing the action process and the migration process, respectively, and are included in the executor.
Specifically, an action object in the current state is obtained, attribute information of the action object is obtained, and the action information is set according to the attribute information, wherein the action information comprises parameters corresponding to action attributes, and the attributes of the action object also correspond to the attributes of action elements in the test script. Such as storing the repetition attribute value of the action object by the numeric parameter time. And calculating the times in the execution process, and recording the execution times of the current action so as to judge whether the specified times are repeatedly executed according to the requirements in the test script. Similarly, attribute information of the migration object is assigned to a migration information field in the migration executor, and in addition, a parameter for marking the migration execution condition is set, for example, whether the state parameter mark migration condition is satisfied is checked through the migration condition.
Executing: and after the state is established, the action processor executes the action, and updates parameters such as the execution times of the action, the interval from the last execution and the like. And checking whether the migration condition is met or not by the migration processor, and updating the verification state of the migration condition, such as passing verification or failing verification. And then the executor acquires the check state in the migration processor, judges whether the jump condition is met, and updates the current state when the jump condition is met.
Cleaning: and after the transition of the current state is met, the state is about to jump, and the action information and the transition information of the state in the action processor and the transition processor are cleared before the jump. Thus, if the subsequent state jumps back to this state again, the processing of the state dependent transitions and actions is not affected by the previous state.
The method can flexibly process the jump between the states, only needs to load corresponding actions and transitions in the processor for processing different states, and clears the actions and transitions of the old state in the processor before the state jump.
The state lifecycle is described below in conjunction with fig. 4. And acquiring a state object, creating a state life cycle to be executed, and initializing action information and migration information in the action processor and the migration processor according to the static action data and the static migration data respectively. Illustratively, the action of acquiring the state, action object, action1, is copied in the action processor, and the parameter of the number of times of execution of action1 is initialized to 0. Acquiring a migration object of a state: and (3) migration 1 and migration 2, generating a copied migration object, wherein the migration condition verification state of the initialization migration 1 is 'condition unsatisfied', and the migration condition verification state of the initialization migration 2 is 'condition unsatisfied'. A start execution state: and executing corresponding test actions according to action contents specified by the action objects in the executor, such as sending a specified message from the source equipment to the target equipment, and repeatedly executing the test actions for n times according to the repetition times of the objects. And after the action execution is finished, the migration executor judges whether the migration condition is met, and updates the migration condition check states of the migration 1 and the migration 2. And (3) cleaning: when one migration condition of the migration processor is satisfied, updating the verification state of the migration condition to be 'condition satisfied', and clearing the action information and the migration information of the state in the action processor and the migration processor before jumping. When neither migration 1 nor migration 2 is satisfied, the current state is maintained (no jump is made), and when the state is executed in the next cycle, since the action executor has completed n action operations, the execution is no longer required, and only the migration executor determines whether the migration satisfying the migration condition exists.
When the test script is analyzed, the generated action object and the generated migration object are respectively stored in respective lists according to the writing sequence in the script. When the action processor executes, the actions are executed in sequence according to the storage sequence in the list, namely the actions are executed in sequence according to the writing sequence in the script, and after all the actions in the current state are executed. And judging whether the migration conditions are met according to the migration objects in the migration object list, and jumping according to a target state specified by migration immediately after a certain migration condition is met without checking subsequent migration conditions. And if the migration meeting the condition comprises the migration action, executing the action firstly, and jumping after the execution of the migration action is finished. As shown in fig. 5, the action and migration processing sequence diagram firstly executes actions 1, 2, 3 and 4 according to the sequence in the list (corresponding to the sequence in the script, and in another embodiment, the list sequence may be reordered as needed), and then executes migration 1 to determine whether the migration condition is satisfied; if not, executing migration 2, and judging whether migration conditions are met; if not, migration 3 is executed, and if the migration condition of migration 3 is satisfied, the migration action in migration 3 (if there is an action in migration 3), that is, migration action 3, is executed. After that, the state jump is performed, and the migration 4 is not performed any more.
c. The action execution method comprises the following steps:
the executor sequentially obtains the action object lists in the current state, and in the embodiment of the invention, the action object lists are stored through a dynamic array ArrayList, as shown in FIG. 2. And executing the actions in the list in sequence, namely executing the test operation according to the execution requirement set by the action attribute and the action content. And specifically, executing action content according to the repeated times and time intervals of the action, and sending corresponding data to the equipment to be tested. The method for processing the action by the actuator (specifically, the action processor in the actuator) is as follows:
step 1: the action object is acquired from the action object list, and then step 2 is performed.
Step 2: and comparing the executed times of the action object with the repeated times (times) attribute of the action object attribute, jumping to the step 3 if the executed times is less than the times, and performing the step 6 if the executed times is more than or equal to the times.
And step 3: the time interval T from the current time to the last execution of the action is calculated, followed by step 4.
And 4, step 4: and comparing the T with the action interval in the action object attribute, if the T is less than the interval, performing the step 6, and if the T is greater than or equal to the interval attribute value, performing the step 5.
And 5: if the variable reference symbol exists in the action object, the variable reference symbol is replaced by the referenced data content, and then the data is sent to the device to be tested according to the replaced data content. And if the variable reference symbol does not exist, directly sending data in the script to the equipment to be tested. Then step 6 is performed. The referenced data content sources are two places: 1. and (4) a variable in the migration, wherein the variable is extracted from data sent by the equipment to be tested. 2. And a variable is set in the action, the variable represents a preset variable value, and the value can be directly referred by the subsequent action. The data content to be replaced with the reference is the numerical value of the source of the data content to be replaced with the reference.
Step 6: and repeating the step 1 if the action which is not processed in the period exists in the action object list. If there are no unprocessed actions, step 7 is performed.
And 7: and finishing the execution of the action object list.
In the embodiment of the present invention, the actions are divided into two types, one is an action object included in the state object, and the other is an action object included in the migration object. The former action is an operation performed when the task is executed to the current state, and the latter action is to execute the corresponding action immediately when the migration condition is satisfied, and to react quickly, for example: and immediately replying confirmation to the equipment to be tested after receiving the feedback data of the equipment to be tested.
The actions referred to in this section are the latter. The specific order of execution of the migration and actions is described above in b.
d. The migration execution method comprises the following steps:
the state object may comprise a plurality of migration objects, which are stored in a migration object list, such as the dynamic array described above in the embodiments of the present invention. The executor executes migration in sequence according to the sequence of the migration objects in the list, namely the sequence in the script: and checking whether the migration condition is met, thereby controlling the jump updating of the state. The migration processing method of the executor (specifically, the migration processor in the executor) is as follows:
step 1: and acquiring the migration object from the migration object list, and then performing step 2.
Step 2: and (5) verifying the migration condition according to the feedback of the system to be tested, if the migration condition is met, performing the step (3), and if not, performing the step (5).
And step 3: if the migration includes a variable declaration identifier, obtaining the value of the corresponding variable in the received data according to the variable name indicated by the variable declaration identifier (var) of the migration object, storing the value in the memory of the actuator, and then performing step 4, and if the attribute of the var is empty, performing step 4.
And 4, step 4: if the migration contains an action, the migration action is processed, followed by step 5. This migrated action (the action is processed according to the action execution method described in c), otherwise, step 5 is directly executed.
And 5: the current state of the task is updated according to the target state specified by the attribute dest in the migration object, and then step 6 is performed.
Step 6: and (4) repeating the step (1) if the unprocessed migration exists in the migration object list in the period, otherwise, entering the step (7).
And 7: and finishing the execution of the migration object list.
In order to prevent blocking caused by meeting of a waiting migration condition, a double thread is adopted in the migration processing process, a first thread (thread 1) periodically judges whether the migration condition of each migration object in the migration processor is met, specifically, the value of a state parameter is checked through the migration condition to determine whether the condition is met, the parameter is used for marking a condition judgment result, if the migration condition is met, state skipping is carried out, if the migration condition is not met, the next migration is checked, and blocking waiting is not carried out. The second thread (thread 2) periodically judges whether a migration condition matched with the second thread exists according to the data received by verification, if the verification condition of a certain migration matches with the migration condition, the verification result mark of the migration is modified, namely the migration condition verifies the state parameters, and the first thread in the next period immediately jumps when the verification result mark of the migration is detected to be satisfied. The method separates the analysis verification of the received information from the verification of the state jump condition, thereby avoiding the blockage caused by waiting for the system data to be tested.
The specific flow of processing the migration condition by the dual thread is shown in fig. 6. In the first period, the thread 2 receives the message1 from the system to be tested, the thread 1 acquires the verification result of the migration condition (the condition is that the message 2 is received) of the migration 1, and the verification result (namely the verification state of the migration condition) of the migration 1 is not satisfied at the moment; thread 1 obtains the migration condition for migration 2 (this condition is: receiving message 3), and the check result for migration 2 is not satisfied at this time. Entering a 2 nd cycle, and finishing the execution of the cycle after the thread 1 repeatedly checks the verification of the migration 1 and the migration 2; the thread 2 receives the information 2 from the system to be tested, searches whether the migration meeting the migration condition exists according to the received information 2, and modifies the verification result of the migration 2 meeting the condition to be met. And entering a 3 rd cycle, repeatedly checking the verification result of the migration 1 by the thread 1, and executing the jump if the verification result is found to be satisfied.
Based on the structured and normalized test script and object list execution mode of the embodiment of the invention, the overall and fine progress condition of the test can be obtained. Furthermore, the progress can also be visualized.
Automatic test visualization
Based on the test script structure and the facility mode of script analysis and execution, the embodiment of the invention provides a visualization scheme for automatic test based on state transition from two aspects of test script editing and test execution progress. Based on the structured test script, a corresponding visual editing tool can be set to edit the script, and the specific progress of script execution can be fed back to a display interface.
And (3) visual editing of the script: and editing the script by adding and deleting visual elements corresponding to the script in the interface and modifying the attributes of the elements. The method comprises the following specific steps:
adopting a structured test script, wherein the test script comprises elements with a hierarchical relationship, and the elements at least comprise one or more state elements;
the state elements comprise action elements used for representing test actions and migration elements used for representing state migration relations;
and providing a first visual interface corresponding to the test script elements, and displaying the elements in the test script in a tree structure, wherein nodes of the tree structure correspond to the elements in the test script, and the tree structure corresponds to the element hierarchical relationship in the test script.
The elements of the test script further include respective attributes, and when a node of the tree structure is selected, a second visual interface for displaying and editing the tree shape of the corresponding element is provided for editing the attributes of the elements of the test script, where the second visual interface may be included in the first visual interface, or may be displayed in parallel or suspended on the first visual interface.
Adding elements in the test script by adding nodes; deleting elements in the script by deleting nodes; the order of elements in the test script is adjusted by adjusting the node positions.
And converting the nodes and the attribute settings thereof in the first visual interface or the second visual interface into corresponding test scripts at the appointed time through a program. Without loss of generality, the specified opportunity is an edit completion action that the program can recognize, such as a confirmation instruction received via a confirmation button or a capture edit action via interface control event monitoring. In one embodiment, a test script with a specified structure may also be loaded by a program, parsed and displayed in the first visualization interface.
Further, the test script also comprises the task and the task group element, wherein the task group element comprises the task and the task comprises the state, and the conversion and the correspondence between the script and the display content are carried out according to the hierarchical relation and the same principle.
Illustratively, the visual editing examples are fig. 7(a), 7 (b). The specific method comprises the following steps:
(1) and displaying each element in the script by using a tree structure, wherein nodes of the tree structure correspond to the script elements.
(2) When a certain node of the tree structure is selected, the attribute of the element corresponding to the node is displayed, so that the attribute of the element can be visually edited.
(3) And selecting a certain node of the tree structure, adding child nodes of the certain node, and deleting the currently selected node, thereby realizing the addition, deletion and editing of script tasks, states, transitions and action elements.
(4) And selecting a certain node of the tree structure, and adjusting the position of the nodes at the same level, thereby realizing the sequencing of the nodes at the same level in the script.
(5) And after the user edits and modifies the corresponding attributes on the visual interface, the corresponding script file is updated.
And displaying the script execution progress: the execution progress is fed back by taking the state element as a basic unit, so that the execution condition of the script can be fed back to a tester in detail. An example of a test progress visualization is shown in fig. 8. Illustratively, the display mode is as follows:
(1) and displaying the script execution progress according to the execution condition of each state in the script, wherein if the state is being executed, the corresponding tree structure node is displayed in yellow, if the state is executed, the corresponding tree structure node is displayed in green, and if the state is not executed, the corresponding tree structure node is displayed in white. The method clearly shows the executed states of all the tasks, and therefore the script execution progress is reflected.
(2) And displaying nodes of the tree structure corresponding to the executed jump migration of the state as green, and showing that the corresponding migration condition in the state is met, thereby clearly displaying the jump sequence of the state in the script and the verification result of the migration condition.
The following describes the principle of the test progress display in detail. The invention provides an automatic test visualization method based on state transition, which comprises the following steps:
storing a set of state objects having a migration relationship in a state object list;
executing test actions related to the state objects according to a certain sequence according to the migration relation among the state objects;
and displaying the execution progress of the automatic test according to the state object list and the state execution sequence.
Specifically, the method comprises the following steps:
acquiring a test script, wherein the test script comprises one or more state elements, and the state elements are used for expressing a test action and a state migration relation;
analyzing the test script, converting the state elements into state objects, and storing the state objects in a list;
and executing automatic test, acquiring the state object from the list, executing corresponding test action, migrating to a new state object according to the state migration relationship, and executing corresponding test action.
And in the process of executing the automatic test, recording the state transition sequence, and displaying the execution progress of the automatic test according to the state transition sequence.
Further, the test script comprises one or more task elements, and the task elements respectively comprise one or more state elements; the task elements are converted into task objects and then stored in a list; and recording the state transition of each task in the test execution process, and displaying the execution condition of the states in the test according to the state transition sequence.
Furthermore, the test script comprises a plurality of task elements, and when the test script is executed, the plurality of task elements are executed in parallel; and simultaneously displaying the state execution conditions of a plurality of tasks executed in parallel in the execution process.
Further, the state execution condition comprises executed, non-executed and executed conditions, and the state is displayed as different styles according to different conditions. The styles include, but are not limited to: color, font, shape size.
When the state migration of the tasks is executed, a first hash table is adopted to record a task migration sequence, the task identification is used as a first hash table key, and the states of the tasks are stored into an array according to the migration sequence and used as the value of the first hash table. The task representation is specifically a task name. In the execution process, when the state is migrated, the hash value of the corresponding task in the first hash table is set or updated.
Specifically, the state elements include an action element for representing a test action and a migration element for representing a state migration relationship. A state element may contain one or more action elements and one or more migration elements.
And adopting the action of storing the state and the migration execution condition of the second hash table, determining the key of the second hash table according to the task name and the state name in the task, and taking the executed migration name corresponding to the state of the task as the value of the second hash table. Specifically, if the state is not executed or executing and not jumping, the attribute is empty, and if the state is executed completely, the attribute records the name of the state transition.
And displaying the task execution progress according to the records of the first hash table and the second hash table. Specifically, the state transition process of each task is integrated according to the first hash table and the second hash table, the task name, the state name and the transition name of each task are spliced into a character string according to the state transition sequence, and the state transition condition is sequentially displayed after the character string is analyzed. In the embodiment of the invention, the execution condition and the migration condition of the task state can be clearly reflected in the test execution process through the migration execution condition of the state.
When the executor processes the state jump of each task, a hash table 1 (namely, a first hash table) is adopted to record the state jump sequence of each task in the script execution process, and the keys of the hash table are: task name, value is: the task is composed of an array of states that the task experiences from the starting state to the current state. In addition, the execution unit records the jump transition of each state by using a hash table 2 (i.e. a second hash table), wherein the hash table key is: task name + state name, value is: and (3) corresponding migration of the state of the corresponding task, wherein if the state is not executed or is being executed and is not jumped, the attribute is null, and if the state is executed, the attribute records the name of the jump migration of the state.
And the executor periodically traverses the hash table 1, acquires an array formed by corresponding task experience states, traverses the array, inquires the jump migration of the corresponding state from the hash table 2 according to the task name and the state name, and accordingly generates corresponding character string information to be fed back to the interface. The format of the character string information is as follows: task name + first symbol + first state + second symbol + executed transition of first state + separation symbol + second state + second symbol + executed transition of second state. Not generally, the first symbol may be "#", the second symbol "@", the separation symbol "@", and the executed transition of the last state may be null. And if the state is the current state of the task, jumping to the migration filling space.
Referring to fig. 9, the process principle is that the character string information of the task2 at the joint of the hash table 1 and the hash table 2 is: "task 2# state 1@ transition 1, state 2@ transition 2, and state 3@ null" indicate that the task2 has already executed state 1 and state 2, and after the action in state 1 is executed, the transition 1 is satisfied and the transition to state 2 is skipped, and after the action in state 2 is executed, the transition 2 that satisfies state 2 is skipped to state 3, and the transition to state 3 is not yet executed. The character strings of the spliced task1 are 'task 1# state 1@ migration 1' and 'state 2@ null'.
In the mode, the state jump paths of all the tasks are generated by taking the tasks as units every period and are sent to the interface in real time, so that the interface can feed back the execution conditions of all the tasks in the script to a user in real time.
Based on the same inventive concept, an embodiment of the present invention further provides an automatic test system based on state transition, as shown in fig. 10, the system includes:
the device comprises an acquisition unit, a test unit and a state transition unit, wherein the acquisition unit is used for acquiring a test script, the test script comprises one or more state elements, and the state elements are used for expressing a test action and a state transition relation;
the analysis unit is used for analyzing the test script, converting the state elements into state objects and storing the state objects in the list;
an execution unit for performing an automatic test, comprising: acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object; and migrating the current state object to other state objects in the state object list according to the specified conditions, and continuously executing automatic test according to the switched current state object.
The specific implementation manner of the automatic test system based on state transition in the embodiment of the invention can be obtained according to the method in any embodiment of the invention. That is, the test script may also include task group elements, task elements, action elements, migration elements, and the like. The acquisition unit is used for acquiring a test script containing the elements (or part of the elements), and the analysis unit is used for analyzing the test script to generate a corresponding object and an object list; the execution unit is used for automatically executing the test according to the corresponding object list.
The method of the invention can be realized by a computer or an embedded program controlled system. Correspondingly, another automatic test system based on state transition is provided in the embodiments of the present invention, as shown in fig. 11, an automatic test system based on state transition includes at least one processor and at least one memory; the memory stores a computer program for performing any of the above methods of embodiments of the invention, and the processor calls the computer program in the memory to perform any of the methods of embodiments of the invention.
Further, the memory may be communicatively coupled to the one or more processors and have stored therein instructions executable by the one or more processors to cause the one or more processors to perform the method of the present invention.
Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (25)

1. An automatic test method based on state transition is characterized by comprising the following steps:
acquiring a test script, wherein the test script comprises one or more state elements, and the state elements are used for expressing a test action and a state migration relation;
analyzing the test script, converting the state element into a state object, and storing the state object in a state object list;
performing an automatic test comprising:
acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object;
and migrating the current state object to other state objects in the state object list according to the specified conditions, and continuously executing automatic test according to the switched current state object.
2. The state-migration based automatic test method of claim 1, wherein the state element comprises two sub-elements, an action element and a migration element;
and defining a test action through the action element, and defining a next state element which needs to be executed when a specified condition is met through the migration element.
3. The method of claim 2, wherein the test script further comprises a task element, the task element including one or more of the state elements as sub-elements of the task element.
4. The method according to claim 3, wherein the test script further comprises a task group element, the task group element comprising one or more of the task elements, the task elements being sub-elements of the task group element.
5. The state-migration-based automatic test method according to claim 2, wherein the attribute of the action element further includes a variable reference symbol that references a variable obtained in a migration element of a previously executed state element by specifying a name.
6. The automatic testing method based on state transition according to claim 3, wherein when the test script is parsed, a corresponding object is created for each element in the script, and the attribute of the corresponding element in the script is mapped to the object attribute, including:
mapping the state element into a state object, mapping the migration element into a migration object and storing the migration object in a migration object list, and mapping the action element into an action object and storing the action object in an action object list;
the state object contains a corresponding action object list and a migration object list.
7. The state-migration based automatic test method of claim 6, wherein a set of associated tasks in a test script are executed in parallel.
8. The state-migration based automatic test method of claim 7, wherein executing a set of associated tasks in a test script in a parallel manner comprises:
storing the task object converted by the task element by adopting a task object list;
when the task objects are executed, a plurality of task objects are obtained from the task object list, and the test tasks represented by the task objects are executed in parallel.
9. The state-migration based automatic testing method of claim 8, wherein executing the test tasks represented by the task objects in parallel comprises: and periodically polling and scheduling each task in the task object list in a time division multiplexing mode.
10. The method for automatic testing based on state transition of claim 9, wherein periodically polling each task in the scheduled task object list in a time-division multiplexing manner comprises: and one thread processes the action and/or migration of the current state of each task in the task group in each period, and simulates the concurrent execution of a plurality of tasks.
11. The method for automatic testing based on state transition of claim 9, wherein periodically polling each task in the scheduled task object list in a time-division multiplexing manner comprises: periodically traversing the tasks in the task object list, and sequentially judging whether the current state of each task has a skip condition according to the priority of the tasks in the task object list; if any migration condition in the current state of the task at the processing moment is met, updating the current state of the task, and jumping to a migration-specified target state; a jump to a task within a cycle is performed at most once.
12. The state-migration based automatic test method of claim 6, wherein performing automatic testing comprises:
acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object;
acquiring an action object in a current state, and sending data to the equipment to be tested according to the action object;
and acquiring the migration object in the current state, verifying the data fed back by the equipment to be tested according to the migration condition, and jumping to a new state object according to a verification result.
13. The state-migration based automatic test method of claim 8, wherein the process of processing a set of associated tasks comprises:
step 1: taking out the task objects from the task object list according to the priority, and then performing step 2;
step 2: acquiring the current state of the task object, and then performing step 3;
and step 3: if the state is the ending state of the task, deleting the task object from the task object list and performing step 6, otherwise performing step 4;
and 4, step 4: processing the state action defined by the current state, and then performing step 5;
and 5: checking the state transition defined by the current state, and updating the current state of the task to a transition target state if the transition is triggered; if the migration is not triggered, the task keeps the current state; then step 6 is carried out;
step 6: if unprocessed tasks exist in the task object list in the period, repeating the step 1, and if unprocessed tasks do not exist, performing a step 7;
and 7: the task object list is executed.
14. The automatic test method based on state transition of claim 8, characterized in that the state transition is implemented through the life cycle of the state to complete the execution of the test action in the state; the state lifecycle includes creation and execution.
15. The automatic test method based on state transition according to claim 14, wherein obtaining the state object and creating the state lifecycle to be executed comprises:
initializing action information and migration information in the action processor and the migration processor according to the static action data and the static migration data respectively;
the action information comprises parameters for marking the execution condition of the action;
the migration information includes a parameter for marking the execution of migration.
16. The automatic test method based on state transition of claim 6, wherein the transition object further comprises an action object for immediately executing a corresponding action when the transition condition is satisfied.
17. The automatic test method based on state transition according to claim 8, characterized in that executing automatic test comprises the execution steps of action objects:
step 1: acquiring an action object from the action object list, and then performing step 2;
step 2: comparing the executed times of the action object with the repeated times in the attribute of the action object, if the executed times is less than the repeated times, jumping to 3, if the executed times is more than or equal to the repeated times, executing step 6;
and step 3: calculating the time interval between the current time and the last action execution, and then performing step 4;
and 4, step 4: comparing the time interval with the action interval in the action object attribute, and performing the step 6 if the time interval is less than the action interval, and performing the step 5 if the time interval is greater than or equal to the action interval;
and 5: if the variable reference symbol exists in the action object, replacing the variable reference symbol with the referenced data content, and then sending data to the equipment to be tested according to the replaced data content; if the variable quote symbol does not exist, directly sending data in the script to the equipment to be tested; then step 6 is carried out;
step 6: repeating the step 1 if the unprocessed action in the current period exists in the action object list, and performing the step 7 if the unprocessed action does not exist;
and 7: and finishing the execution of the action object list.
18. The automatic test method based on state transition according to claim 8, characterized in that executing automatic test includes executing steps of migrating objects:
step 1: acquiring a migration object from the migration object list, and then performing step 2;
step 2: verifying the migration condition according to the feedback of the system to be tested, if the migration condition is met, performing the step 3, otherwise, performing the step 5;
and step 3: if the migration includes a variable statement identifier, acquiring a value of a corresponding variable in the received data according to a variable name indicated by the variable statement identifier of the migration object, storing the value in an actuator memory, and then performing step 4, and if the variable statement identifier is empty, performing step 4;
and 4, step 4: if the migration contains an action, processing the migration action, and then performing step 5; otherwise, directly executing the step 5;
and 5: updating the current state of the task according to the specified target state in the migration object, and then performing step 6;
step 6: if the unprocessed migration exists in the migration object list in the period, repeating the step 1, otherwise, entering the step 7;
and 7: and finishing the execution of the migration object list.
19. The automatic test method based on state transition according to claim 8, wherein the transition processing process adopts dual threads, including:
the first thread periodically judges whether the migration condition of each migration object in the migration processor is met, if so, state skipping is carried out, if not, the next migration object is checked, and blocking waiting is not carried out;
the second thread periodically judges whether a migration condition matched with the second thread exists according to the data received by verification, and if the verification condition of a certain migration exists, the verification result mark of the migration object is modified.
20. The state-migration based automatic test method of claim 1, wherein said performing a corresponding test action comprises:
and simulating information interaction of the external equipment to the radio block center according to a corresponding communication protocol by simulating all the external equipment which is communicated with the radio block center.
21. The automatic test method based on state transition according to claim 1,
and in the process of executing the automatic test, recording the state transition sequence, and displaying the execution progress of the automatic test according to the state transition sequence.
22. The state-transition-based automatic test method of claim 21,
when the state migration of the tasks is executed, a first hash table is adopted to record the migration sequence of the tasks, the task identification is used as a key of the first hash table, and the states of the tasks are stored into an array according to the migration sequence and used as the value of the first hash table;
the action and the migration execution condition of the state are stored by adopting a second hash table, the key of the second hash table is determined by the task name and the state name in the task, and the executed migration name corresponding to the state of the task is used as the value of the second hash table;
and displaying the task execution progress according to the records of the first hash table and the second hash table.
23. The state-transition-based automatic test method of claim 21,
and providing a first visual interface corresponding to the test script elements, and displaying the elements in the test script in a tree structure, wherein nodes of the tree structure correspond to the elements in the test script, and the tree structure corresponds to the element hierarchical relationship in the test script.
24. An automatic test system based on state transition, comprising:
the device comprises an acquisition unit, a test unit and a state transition unit, wherein the acquisition unit is used for acquiring a test script, the test script comprises one or more state elements, and the state elements are used for expressing a test action and a state transition relation;
the analysis unit is used for analyzing the test script, converting the state elements into state objects and storing the state objects in a state object list;
an execution unit for performing an automatic test, comprising:
acquiring at least one state object from the state object list as a current state object, and executing a corresponding test action according to the current state object;
and migrating the current state object to other state objects in the state object list according to the specified conditions, and continuously executing automatic test according to the switched current state object.
25. An automatic test system based on state migration, characterized in that the system comprises at least one processor and at least one memory;
the memory stores a computer program for performing the method of any of claims 1-23, and the processor calls the computer program in the memory to perform the method of any of claims 1-23.
CN202110456418.3A 2021-04-27 2021-04-27 Automatic testing method and system based on state transition Active CN112988596B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110456418.3A CN112988596B (en) 2021-04-27 2021-04-27 Automatic testing method and system based on state transition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110456418.3A CN112988596B (en) 2021-04-27 2021-04-27 Automatic testing method and system based on state transition

Publications (2)

Publication Number Publication Date
CN112988596A true CN112988596A (en) 2021-06-18
CN112988596B CN112988596B (en) 2021-08-03

Family

ID=76340232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110456418.3A Active CN112988596B (en) 2021-04-27 2021-04-27 Automatic testing method and system based on state transition

Country Status (1)

Country Link
CN (1) CN112988596B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110283148A1 (en) * 2010-05-14 2011-11-17 Sap Ag Generating reusable test components out of remote application programming interface
CN104391782A (en) * 2014-03-28 2015-03-04 烽火通信科技股份有限公司 Network-equipment managing-software client-end simulating method on basis of XML (X Extensive Markup Language) script
CN110532162A (en) * 2019-03-18 2019-12-03 信联科技(南京)有限公司 A kind of fuzz testing script and testing engine based on protocol state machine
CN111400198A (en) * 2020-06-03 2020-07-10 中邮消费金融有限公司 Self-adaptive software testing system
CN112069080A (en) * 2020-09-23 2020-12-11 北京合众伟奇科技股份有限公司 Automatic executable script test method and system
CN112148610A (en) * 2020-09-28 2020-12-29 深圳壹账通智能科技有限公司 Test case execution method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110283148A1 (en) * 2010-05-14 2011-11-17 Sap Ag Generating reusable test components out of remote application programming interface
CN104391782A (en) * 2014-03-28 2015-03-04 烽火通信科技股份有限公司 Network-equipment managing-software client-end simulating method on basis of XML (X Extensive Markup Language) script
CN110532162A (en) * 2019-03-18 2019-12-03 信联科技(南京)有限公司 A kind of fuzz testing script and testing engine based on protocol state machine
CN111400198A (en) * 2020-06-03 2020-07-10 中邮消费金融有限公司 Self-adaptive software testing system
CN112069080A (en) * 2020-09-23 2020-12-11 北京合众伟奇科技股份有限公司 Automatic executable script test method and system
CN112148610A (en) * 2020-09-28 2020-12-29 深圳壹账通智能科技有限公司 Test case execution method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
网易游戏雷火事业群: "《https://zhuanlan.zhihu.com/p/248617541》", 22 September 2020 *

Also Published As

Publication number Publication date
CN112988596B (en) 2021-08-03

Similar Documents

Publication Publication Date Title
CN110764753B (en) Business logic code generation method, device, equipment and storage medium
CN107273286B (en) Scene automatic test platform and method for task application
CN111930635B (en) Swagger-based rapid automatic testing method and system
CN104407973B (en) A kind of implementation method and device of automation cell test
Grieskamp et al. Model‐based quality assurance of protocol documentation: tools and methodology
CN106649103B (en) A kind of method and system of Android application program Automated Black Box Testing
US20060282419A1 (en) Diagnosing problems in distributed systems
CN110013672B (en) Method, device, apparatus and computer-readable storage medium for automated testing of machine-run games
CN108897676B (en) Flight guidance control software reliability analysis system and method based on formalization rules
CN102915242A (en) Method for implementing code programming by graphical operations
CN112988597B (en) Automatic test visualization method and system based on state transition
CN112435072A (en) Model creating method and device, electronic equipment and storage medium
EP2105837B1 (en) Test script transformation analyzer with change guide engine
CN108874649B (en) Method and device for generating automatic test script and computer equipment thereof
CN107870863A (en) A kind of distributed automatization method of testing based on XML
CN115794106A (en) Method and system for analyzing configuration of binary protocol data of rail transit
CN113919158A (en) Simulation method and device for flight control panel and storage medium
KR20130053714A (en) Method of program development using visual programming language and computer readable medium thereof
CN112988596B (en) Automatic testing method and system based on state transition
CN106560797B (en) A kind of unit test system and method based on debugger
CN111142861A (en) Method and device for integrating structured comprehensive control system
CN113434387A (en) Script-driven-based automatic testing tool and system
CN100367233C (en) Program execution control mode
CN113434405A (en) Method and device for determining test file, storage medium and electronic device
CN110413518A (en) The generation method and generating means and computer readable storage medium of control object library

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210618

Assignee: BEIJING RAILWAY SIGNAL Co.,Ltd.

Assignor: BEIJING NATIONAL RAILWAY RESEARCH & DESIGN INSTITUTE OF SIGNAL & COMMUNICATION Co.,Ltd.

Contract record no.: X2023980035234

Denomination of invention: An Automatic Testing Method and System Based on State Transfer

Granted publication date: 20210803

License type: Common License

Record date: 20230504

EE01 Entry into force of recordation of patent licensing contract