CN114064485A - Software testing method, system, computer equipment and readable storage medium - Google Patents

Software testing method, system, computer equipment and readable storage medium Download PDF

Info

Publication number
CN114064485A
CN114064485A CN202111367497.7A CN202111367497A CN114064485A CN 114064485 A CN114064485 A CN 114064485A CN 202111367497 A CN202111367497 A CN 202111367497A CN 114064485 A CN114064485 A CN 114064485A
Authority
CN
China
Prior art keywords
communication network
upper computer
operation data
train
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.)
Pending
Application number
CN202111367497.7A
Other languages
Chinese (zh)
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.)
CRRC Changchun Railway Vehicles Co Ltd
Original Assignee
CRRC Changchun Railway Vehicles 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 CRRC Changchun Railway Vehicles Co Ltd filed Critical CRRC Changchun Railway Vehicles Co Ltd
Priority to CN202111367497.7A priority Critical patent/CN114064485A/en
Publication of CN114064485A publication Critical patent/CN114064485A/en
Pending legal-status Critical Current

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/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Abstract

The application provides a software testing method, a system, computer equipment and a readable storage medium, wherein an upper computer configures an identity identification number for each pre-input train communication network test case and stores the identity identification number in a database; the upper computer searches a test case corresponding to the target identity identification number from a database according to the target identity identification number input by the user, inputs the test case into software to be tested as a test program and operates to obtain a control instruction for controlling the operation of the test equipment; the lower computer controls the test equipment to operate according to the control instruction and returns the operation data of the test equipment to the upper computer; and the upper computer compares the operation data with expected operation data and judges whether the software to be tested can realize the function of the expected software according to the obtained comparison result. By adopting the method, the test case is automatically taken and the test process is automatically executed during the software test, which is beneficial to improving the speed of the software test.

Description

Software testing method, system, computer equipment and readable storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a software testing method, a software testing system, computer equipment and a readable storage medium.
Background
In the prior art, when testing and verifying a computer software program, test cases are generally manually input to tested software one by one for observation, and when testing repeatedly, the test cases are manually input to the tested software repeatedly. Because the test case needs to be input again for each use and the input of the test case needs to consume a large amount of time, the time consumption of the whole software testing process is increased, and the software testing speed is reduced.
Disclosure of Invention
In view of the above, the present invention provides a software testing method, a software testing system, a computer device and a readable storage medium, which are beneficial to increasing the software testing speed.
In a first aspect, an embodiment of the present application provides a software testing method, which is applied to a software testing system, where the system includes an upper computer, a lower computer and a testing device, where the lower computer is electrically connected to the upper computer and the testing device, respectively;
the upper computer configures an identity identification number for each pre-input train communication network test case, and stores all the test cases into a database of the upper computer;
the upper computer searches a target train communication network test case corresponding to a target identity identification number from the database according to the target identity identification number input by a user, and inputs the train communication network test case into train communication network software to be tested as a test program to run so as to obtain a control instruction for controlling running of test equipment for simulating running of a train, wherein the train communication network software to be tested is pre-installed in the upper computer and is used for providing a running environment for the train communication network test case;
the lower computer controls the test equipment for simulating the train operation to operate according to the received control instruction, and returns the operation data of the test equipment for simulating the train operation to the upper computer;
and the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result.
Optionally, when the lower computer controls the test equipment for simulating train operation to operate according to the received control instruction, the method includes:
and the lower computer controls different modules in the test equipment for simulating the train operation to operate according to different control instructions.
Optionally, when the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method includes:
the upper computer compares the operation data with expected operation data, and if the operation data threshold range of the test equipment falls into the expected operation data threshold range, the train communication network software to be tested is judged to be capable of realizing the function of the expected train communication network software;
and if the operation data threshold range of the test equipment is out of the expected operation data threshold range, judging that the train communication network software to be tested can not realize the function of the expected train communication network software.
Optionally, after the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method includes:
and the upper computer exports the operation data and the comparison result to a table file which is used for recording the operation data and the comparison result and stores the table file into a cache.
Optionally, before the upper computer configures an identity identification number for each pre-input train communication network test case and stores all the test cases in a database of the upper computer, the method includes:
the upper computer stores each communication protocol into a protocol database respectively, calls a communication protocol matched with the testing equipment from the protocol database according to the type of the testing equipment for simulating the running of the train, and establishes a communication line for data transmission between the lower computer and the testing equipment according to the communication protocol.
In a second aspect, an embodiment of the present application provides a software testing system, where the system includes an upper computer, a lower computer and a testing device, where the lower computer is electrically connected to the upper computer and the testing device, respectively;
the upper computer is used for configuring an identity identification number for each pre-input train communication network test case and storing all the test cases to a database of the upper computer;
the upper computer is used for searching a target train communication network test case corresponding to a target identity identification number from the database according to the target identity identification number input by a user, inputting the train communication network test case into train communication network software to be tested as a test program to run, and obtaining a control instruction for controlling running of test equipment for simulating running of a train, wherein the train communication network software to be tested is pre-installed in the upper computer and is used for providing a running environment for the train communication network test case;
the lower computer is used for controlling the test equipment for simulating the train operation to operate according to the received control instruction and returning the operation data of the test equipment for simulating the train operation to the upper computer;
and the upper computer is used for comparing the operation data with expected operation data and judging whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result.
Optionally, when the lower computer controls the test equipment for simulating train operation to operate according to the received control instruction, the method includes:
and the lower computer is used for controlling different modules in the test equipment for simulating the train operation to operate according to different control instructions.
Optionally, when the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method includes:
the upper computer is used for comparing the operation data with expected operation data, and if the operation data threshold range of the test equipment falls into the expected operation data threshold range, the train communication network software to be tested is judged to realize the function of the expected train communication network software;
and if the operation data threshold range of the test equipment is out of the expected operation data threshold range, judging that the train communication network software to be tested can not realize the function of the expected train communication network software.
Optionally, after the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method includes:
the upper computer is used for exporting the operation data and the comparison result to a table file which is used for recording the operation data and the comparison result in the upper computer, and storing the table file into a cache.
Optionally, before the upper computer configures an identity identification number for each pre-input train communication network test case and stores all the test cases in a database of the upper computer, the method includes:
the upper computer is used for storing each communication protocol into a protocol database, calling a communication protocol matched with the testing equipment from the protocol database according to the type of the testing equipment for simulating the running of the train, and establishing a communication line for data transmission between the lower computer and the testing equipment according to the communication protocol.
The embodiment of the invention provides a software testing method, a system, computer equipment and a readable storage medium, wherein the upper computer configures an identity identification number for each pre-input train communication network test case and stores all the test cases into a database of the upper computer; the upper computer searches a target train communication network test case corresponding to the target identity identification number from the database according to the target identity identification number input by a user, and inputs the train communication network test case into train communication network software to be tested as a test program to run so as to obtain a control instruction for controlling running of test equipment for simulating train running, wherein the train communication network software to be tested is pre-installed in the upper computer and is used for providing a running environment for the train communication network test case; the lower computer controls the test equipment for simulating the train operation to operate according to the received control instruction, and returns the operation data of the test equipment for simulating the train operation to the upper computer; the upper computer compares the operation data with expected operation data, judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, and can shorten the time consumed for manually inputting data into the form file by manpower for automatically exporting the test result. Compared with the prior art that the test cases are input again when used each time, the method and the device have the advantages that the test cases and the test data are imported and exported for automatic processing, the time consumed by software testing can be shortened, and the software testing speed is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart illustrating a software testing method according to an embodiment of the present application;
FIG. 2 is a block diagram of a software testing device according to an embodiment of the present invention;
fig. 3 shows a schematic structural diagram of a software testing system according to a second 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 only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Example one
For the convenience of understanding of the present application, the following describes in detail an embodiment of the present application with reference to a flowchart of a software testing method provided in the embodiment of the present application shown in fig. 1.
Referring to fig. 1, fig. 1 shows a flowchart of a software testing method provided in an embodiment of the present application, where the method includes steps S101 to S104:
s101: the upper computer configures an identity identification number for each pre-input train communication network test case, and stores all the test cases to a database of the upper computer.
Specifically, before the upper computer executes the software test, software for executing the software test process is installed in the upper computer, including but not limited to automated test software suitable for controlling train network key equipment units, such as CCU (Central Control Unit) and HMI (Human Machine Interface), where each function module of the automated test software is activated by creating or opening a created file in the automated test software, where the function module includes but is not limited to a test data import and export module, a test case import and export module, a data management module, a case management module, a configuration management module, a test behavior module, a case execution module, and a test report generation and analysis module.
The user can trigger the function of the test Data import and export module by clicking the corresponding control of the human-computer interaction interface contained in the upper computer, export the test Data obtained after the test to a third party device or a system from the upper computer through a physical port, a local area network or the internet, or import the Data originally stored in the third party device or the system into the upper computer, wherein, the Data import and export path supported by the upper computer includes but is not limited to an MVB (Multifunction Vehicle Bus), an Ethernet, a TRDP (Train Real-time Data Protocol) line.
The user can trigger the function of the test case import and export module by clicking a corresponding control of a human-computer interaction interface contained in the upper computer, and export the test case used for being input to the software to be tested from the upper computer to a third-party device or system through a physical port, a local area network or the internet, or import the test case into the upper computer through the third-party device or system, wherein in the process of exporting or importing the test case, the data can be written into a newly-built or established form file, and the form file can also comprise a plurality of sub-forms which are respectively used for storing different types of data, such as a test target, a test environment, input data, a test step, an expected result, a test script and the like.
The user can trigger the function of the data management module by clicking the corresponding control of the human-computer interaction interface contained in the upper computer, the upper computer can uniformly manage information such as different devices, different bus types, different attribute signals and the like, configures identity marks for the data aiming at the data, and updates and maintains the identity mark information of the data.
The user can trigger the functions of the case management module by clicking the corresponding control of the human-computer interaction interface contained in the upper computer, wherein the functions comprise configuring an identity for the test case aiming at the test case, and updating and maintaining the identity information of the test case.
The user can trigger the function of the configuration management module by clicking the corresponding control of the human-computer interaction interface contained in the upper computer, so as to realize the management configuration of the automatic test software and the configuration of the lower computer connected with the upper computer.
The user can trigger the function of the test behavior module by clicking the corresponding control of the human-computer interaction interface contained in the upper computer, so that the management of the test action of each variable input into the software to be tested in the test process is realized.
The user can trigger the function of the case execution module by clicking the corresponding control of the human-computer interaction interface contained in the upper computer, so that the process of software testing, in which the test case in the upper computer is sent to the lower computer through the communication interface and the result is collected from the lower computer and then the conclusion is judged whether to be correct or not, is realized.
The user can trigger the functions of the test report generation and analysis module by clicking the corresponding control of the human-computer interaction interface contained in the upper computer, so that the data collected from the lower computer and returned to the upper computer are analyzed, the data and the analyzed result automatically generate a test conclusion, and the test conclusion is stored in the cache of the upper computer in a form of a table file.
When the upper computer configures an identity identification number for each pre-input train communication network test case and stores all the test cases in a database of the upper computer, because the database for storing the test cases is preset in the upper computer, in order to facilitate the subsequent software test, after a user introduces the test cases into the upper computer, the upper computer can number the test cases or configure the identity identification number and store the test cases in the database, wherein the mode of configuring the identity identification number comprises but is not limited to the date of writing the test cases into the upper computer, and after the information of the category, the byte size and the like of the test cases is combined, the identity identification number uniquely corresponding to the test cases is generated.
It should be noted that, when the upper computer configures an identity identification number for each pre-input train communication network test case, the rule for configuring the identity identification number may be set according to actual needs, and is not specifically limited herein, where the specific description is a schematic description of the first embodiment of the present application and does not form a limitation on the first embodiment of the present application.
S102: the upper computer searches a target train communication network test case corresponding to the target identity identification number from the database according to the target identity identification number input by a user, inputs the train communication network test case into train communication network software to be tested as a test program to run, and obtains a control instruction for controlling running of test equipment for simulating running of a train, wherein the train communication network software to be tested is pre-installed in the upper computer and is used for providing a running environment for the train communication network test case.
Specifically, the upper computer takes out the test case calls corresponding to the identity identification number input by the user from the database for storing the test cases according to the identity identification number input by the user in the upper computer, after the software testing process is started, inputting a program or a code for matching the software to be tested to run in a test case into the software to be tested, wherein, the test case is input into the software to be tested to operate and then a control instruction is obtained, the upper computer can convert the control instruction into data comprising at least one part of case number, operation steps, time delay acquisition time, expected result, action name, variable value parameter and variable attribute parameter according to the preset rule, and transmitting the data to a lower computer, analyzing the data by the lower computer, and controlling the test equipment to operate according to the data information.
The data Transmission mode in the whole software testing process includes, but is not limited to, establishing communication connection with the MVB gateway or the TRDP gateway through three-way handshake through TCP (Transmission control protocol) communication.
S103: and the lower computer controls the test equipment for simulating the train operation to operate according to the received control instruction, and returns the operation data of the test equipment for simulating the train operation to the upper computer.
Specifically, an instruction sent by the upper computer is firstly sent to the lower computer, and the lower computer interprets the instruction into a corresponding time sequence signal according to the instruction to directly control corresponding equipment, so that the equipment can operate according to the control instruction sent by the upper computer; meanwhile, in the running process of the equipment, the lower computer reads the equipment state data (generally analog quantity), converts the equipment state data into digital signals and feeds the digital signals back to the upper computer, and the upper computer analyzes the signals to obtain the actual running data of the equipment.
S104: and the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result.
Specifically, the user inputs expected operation data into the upper computer in advance, and the lower computer transmits the equipment operation data to the upper computer. And the upper computer compares the pre-fetching operation data preset by the user with the actual operation data of the equipment operation, and judges whether the tested software meets the expected software function of the user or not according to the comparison result.
In a possible embodiment, when the lower computer controls the test equipment for simulating train operation to operate according to the received control instruction, the method includes: and the lower computer controls different modules in the test equipment for simulating the train operation to operate according to different control instructions.
Specifically, because the test device is composed of a plurality of execution modules, and different execution modules are respectively used for completing corresponding control instructions, when the device is operated, the lower computer controls at least one execution module to operate according to the operation instructions aiming at different modules of the device in the control instructions transmitted by the upper computer, so that the device operates under the combined action of the plurality of modules.
In a feasible implementation scheme, when the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method comprises the following steps: the upper computer compares the operation data with expected operation data, and if the operation data threshold range of the test equipment falls into the expected operation data threshold range, the train communication network software to be tested is judged to be capable of realizing the function of the expected train communication network software; and if the operation data threshold range of the test equipment is out of the expected operation data threshold range, judging that the train communication network software to be tested can not realize the function of the expected train communication network software.
Specifically, after the upper computer receives the expected operation data input by the user in advance and the actual operation data detected by the testing equipment, the upper computer compares the expected operation data input by the user in advance with the actual operation data detected by the testing equipment, and the comparison result may be a determined value or a range interval; when the operation data threshold range of the test equipment falls into the expected operation data threshold range or the operation data is consistent with the expected operation, the train communication network software to be tested can be judged to realize the function of the expected train communication network software, and the to-be-tested software can be marked as passing; when the operation data threshold range of the test equipment does not fall within the expected operation data threshold range or the operation data is not in accordance with the expected operation, the train communication network software to be tested can be judged to be incapable of realizing the function of the expected train communication network software, and the software to be tested can be marked as an error.
In a feasible implementation scheme, after the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method comprises the following steps: and the upper computer exports the operation data and the comparison result to a table file which is used for recording the operation data and the comparison result and stores the table file into a cache.
Specifically, a form file is newly created or stored in the upper computer in advance, when the upper computer exports test data or a comparison result, the data and the comparison result can be exported to the form file, and the form file is placed in a cache of the upper computer, so that a user can send the form file to other equipment or systems.
In a feasible embodiment, before the upper computer configures an identity identification number for each pre-input train communication network test case and stores all the test cases into a database of the upper computer, the method comprises the following steps: the upper computer stores each communication protocol into a protocol database respectively, calls a communication protocol matched with the testing equipment from the protocol database according to the type of the testing equipment for simulating the running of the train, and establishes a communication line for data transmission between the lower computer and the testing equipment according to the communication protocol.
Specifically, because the communication ports and the communication protocols matched with different test devices are different, when the lower computer controls different test devices to operate, the matched communication protocols need to be determined according to the types or models of the test devices to establish communication connection; the upper computer stores each communication protocol into the protocol database before executing the software test, and automatically calls the matched communication protocol from the protocol database according to the type of the test equipment after the software test is started, and establishes a communication line for control and data transmission between the lower computer and the test equipment.
The following describes a software testing method provided by the present invention with reference to a structure diagram of a software testing device provided in an embodiment of the present invention shown in fig. 2, where the software testing device is applied to the software testing method.
Software test equipment 200 includes TRDP gateway 201, switch 202, terminal row 203, empty opening pilot lamp panel 204, MVB gateway 205, ethernet gateway 206, industrial computer 207, adjustable power supply 208, wherein, computer equipment pass through VGA (Video Graphics Array) line with software test equipment communication, test equipment pass through MVB with software test equipment looks communication, TRDP gateway pass through ethernet and switch communication, the switch passes through ethernet respectively with ethernet gateway, industrial computer communication.
The TRDP gateway, the MVB gateway and the Ethernet gateway in the software testing equipment are used for providing communication protocols for the unused equipment, and can store information of different communication protocols into computer equipment, for example, the information can be read into a table file, and the corresponding protocols are automatically matched or read for communication according to the type of the testing equipment to be controlled by the software testing equipment; the switch is used for providing an exclusive electric signal path for any two network nodes accessed into the switch; the terminal strip is used for connecting lines of the equipment inside the screen and the equipment outside the screen and plays a role in signal transmission; the air switch indicator lamp panel is used for indicating the state of the air switch at the current moment; the industrial personal computer is used for monitoring and controlling data parameters and the like of the test equipment; the adjustable power supply is used for supplying power to the whole software testing equipment.
The method comprises the steps that a user needs to install software to be tested in computer equipment and input at least one test case, after a software test program starts, the computer equipment finds out a target test case according to an identity identification number of the test case input into the computer equipment by the user at present and inputs the test case into the software to be tested to obtain a control instruction, the software test equipment controls the test equipment to operate according to the control instruction, operation data of the test equipment is compared with expected operation data preset on an upper computer, and then a comparison result is output from the computer equipment.
Example two
Referring to fig. 3, fig. 3 is a schematic structural diagram illustrating a software testing system according to a second embodiment of the present invention, wherein, as shown in fig. 3, a software testing system 300 according to a second embodiment of the present invention includes an upper computer 301, a lower computer 302 and a testing device 303, wherein the lower computer is electrically connected to the upper computer and the testing device, respectively;
the upper computer is used for configuring an identity identification number for each pre-input train communication network test case and storing all the test cases to a database of the upper computer;
the upper computer is used for searching a target train communication network test case corresponding to a target identity identification number from the database according to the target identity identification number input by a user, inputting the train communication network test case into train communication network software to be tested as a test program to run, and obtaining a control instruction for controlling running of test equipment for simulating running of a train, wherein the train communication network software to be tested is pre-installed in the upper computer and is used for providing a running environment for the train communication network test case;
the lower computer is used for controlling the test equipment for simulating the train operation to operate according to the received control instruction and returning the operation data of the test equipment for simulating the train operation to the upper computer;
and the upper computer is used for comparing the operation data with expected operation data and judging whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result.
In a possible embodiment, when the lower computer controls the test equipment for simulating train operation to operate according to the received control instruction, the method includes:
and the lower computer is used for controlling different modules in the test equipment for simulating the train operation to operate according to different control instructions.
In a feasible implementation scheme, when the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method includes:
the upper computer is used for comparing the operation data with expected operation data, and if the operation data threshold range of the test equipment falls into the expected operation data threshold range, the train communication network software to be tested is judged to realize the function of the expected train communication network software;
and if the operation data threshold range of the test equipment is out of the expected operation data threshold range, judging that the train communication network software to be tested can not realize the function of the expected train communication network software.
In a feasible implementation scheme, after the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method comprises the following steps:
the upper computer is used for exporting the operation data and the comparison result to a table file which is used for recording the operation data and the comparison result in the upper computer, and storing the table file into a cache.
In a feasible embodiment, before the upper computer configures an identity identification number for each pre-input train communication network test case and stores all the test cases in a database of the upper computer, the method includes:
the upper computer is used for storing each communication protocol into a protocol database, calling a communication protocol matched with the testing equipment from the protocol database according to the type of the testing equipment for simulating the running of the train, and establishing a communication line for data transmission between the lower computer and the testing equipment according to the communication protocol.
The software testing system provided by the embodiment of the invention can be specific hardware on the equipment or software or firmware installed on the equipment. The system provided by the embodiment of the present invention has the same implementation principle and technical effect as the foregoing method embodiment, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiment for the part of the embodiment of the apparatus that is not mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided by the present invention, it should be understood that the disclosed system and method can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided by the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the present invention in its spirit and scope. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. The software testing method is characterized by being applied to a software testing system, wherein the system comprises an upper computer, a lower computer and testing equipment, wherein the lower computer is respectively and electrically connected with the upper computer and the testing equipment;
the upper computer configures an identity identification number for each pre-input train communication network test case, and stores all the test cases into a database of the upper computer;
the upper computer searches a target train communication network test case corresponding to a target identity identification number from the database according to the target identity identification number input by a user, and inputs the train communication network test case into train communication network software to be tested as a test program to run so as to obtain a control instruction for controlling running of test equipment for simulating running of a train, wherein the train communication network software to be tested is pre-installed in the upper computer and is used for providing a running environment for the train communication network test case;
the lower computer controls the test equipment for simulating the train operation to operate according to the received control instruction, and returns the operation data of the test equipment for simulating the train operation to the upper computer;
and the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result.
2. The method according to claim 1, wherein when the lower computer controls the test equipment for simulating train operation to operate according to the received control instruction, the method comprises the following steps:
and the lower computer controls different modules in the test equipment for simulating the train operation to operate according to different control instructions.
3. The method according to claim 1, wherein when the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method comprises the following steps:
the upper computer compares the operation data with expected operation data, and if the operation data threshold range of the test equipment falls into the expected operation data threshold range, the train communication network software to be tested is judged to be capable of realizing the function of the expected train communication network software;
and if the operation data threshold range of the test equipment is out of the expected operation data threshold range, judging that the train communication network software to be tested can not realize the function of the expected train communication network software.
4. The method according to claim 1, wherein after the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method comprises the following steps:
and the upper computer exports the operation data and the comparison result to a table file which is used for recording the operation data and the comparison result and stores the table file into a cache.
5. The method according to claim 1, wherein before the upper computer configures an identity identification number for each pre-input train communication network test case and stores all the test cases in a database of the upper computer, the method comprises:
the upper computer stores each communication protocol into a protocol database respectively, calls a communication protocol matched with the testing equipment from the protocol database according to the type of the testing equipment for simulating the running of the train, and establishes a communication line for data transmission between the lower computer and the testing equipment according to the communication protocol.
6. A software testing system is characterized by comprising an upper computer, a lower computer and testing equipment, wherein the lower computer is respectively and electrically connected with the upper computer and the testing equipment;
the upper computer is used for configuring an identity identification number for each pre-input train communication network test case and storing all the test cases to a database of the upper computer;
the upper computer is used for searching a target train communication network test case corresponding to a target identity identification number from the database according to the target identity identification number input by a user, inputting the train communication network test case into train communication network software to be tested as a test program to run, and obtaining a control instruction for controlling running of test equipment for simulating running of a train, wherein the train communication network software to be tested is pre-installed in the upper computer and is used for providing a running environment for the train communication network test case;
the lower computer is used for controlling the test equipment for simulating the train operation to operate according to the received control instruction and returning the operation data of the test equipment for simulating the train operation to the upper computer;
and the upper computer is used for comparing the operation data with expected operation data and judging whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result.
7. The system according to claim 6, wherein when the lower computer controls the test equipment for simulating the train operation to operate according to the received control instruction, the method comprises the following steps:
and the lower computer is used for controlling different modules in the test equipment for simulating the train operation to operate according to different control instructions.
8. The system of claim 6, wherein when the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method comprises the following steps:
the upper computer is used for comparing the operation data with expected operation data, and if the operation data threshold range of the test equipment falls into the expected operation data threshold range, the train communication network software to be tested is judged to realize the function of the expected train communication network software;
and if the operation data threshold range of the test equipment is out of the expected operation data threshold range, judging that the train communication network software to be tested can not realize the function of the expected train communication network software.
9. The system of claim 6, wherein after the upper computer compares the operation data with expected operation data and judges whether the train communication network software to be tested can realize the function of the expected train communication network software according to the obtained comparison result, the method comprises the following steps:
the upper computer is used for exporting the operation data and the comparison result to a table file which is used for recording the operation data and the comparison result in the upper computer, and storing the table file into a cache.
10. The system according to claim 6, wherein before the upper computer configures an identification number for each pre-input train communication network test case and stores all the test cases in a database of the upper computer, the method comprises:
the upper computer is used for storing each communication protocol into a protocol database, calling a communication protocol matched with the testing equipment from the protocol database according to the type of the testing equipment for simulating the running of the train, and establishing a communication line for data transmission between the lower computer and the testing equipment according to the communication protocol.
CN202111367497.7A 2021-11-18 2021-11-18 Software testing method, system, computer equipment and readable storage medium Pending CN114064485A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111367497.7A CN114064485A (en) 2021-11-18 2021-11-18 Software testing method, system, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111367497.7A CN114064485A (en) 2021-11-18 2021-11-18 Software testing method, system, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114064485A true CN114064485A (en) 2022-02-18

Family

ID=80277773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111367497.7A Pending CN114064485A (en) 2021-11-18 2021-11-18 Software testing method, system, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114064485A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679402A (en) * 2022-03-25 2022-06-28 武汉联影智融医疗科技有限公司 Method and device for testing communication protocol between upper computer and lower computer of medical robot

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679402A (en) * 2022-03-25 2022-06-28 武汉联影智融医疗科技有限公司 Method and device for testing communication protocol between upper computer and lower computer of medical robot

Similar Documents

Publication Publication Date Title
CN111371638B (en) Intelligent equipment testing method and device, server and storage medium
CN109582588B (en) Test case generation method and device and electronic equipment
EP1958169B1 (en) Rfid architecture in an industrial controller environment
CN111459794A (en) Communication network testing method, device, computer equipment and storage medium
US8793366B2 (en) Method and arrangement for diagnosing networks including field bus systems
CN107656126B (en) CAN-based automatic testing method and system for quiescent current of vehicle-mounted sound equipment
CN107832217A (en) A kind of automated testing method and device
CN106407059A (en) Server node testing system and method
CN112016708A (en) Multi-dimensional data display method and device for intelligent cable
CN114064485A (en) Software testing method, system, computer equipment and readable storage medium
CN114095581A (en) Data processing method, system and computer readable storage medium
CN113407469B (en) Parameter configuration method and device, storage medium and electronic device
CN113074783A (en) Lighthouse type industrial equipment monitoring method and device
CN108875368A (en) A kind of safety detection method, apparatus and system
CN111124828A (en) Data processing method, device, equipment and storage medium
CN108200062B (en) Data management method and system for intelligent instrument equipment
CN114268650A (en) Configuration method and system for establishing communication connection
CN115860877A (en) Product marketing method, device, equipment and medium
CN106546936B (en) Virtual detection system and detection method for detecting energy efficiency monitoring equipment
CN103678054B (en) Test method and device used for BACnet equipment
CN113179181A (en) Data acquisition method, device and system, data processing device and electronic equipment
CN111143262A (en) Switching device, instrument control system and instrument control method
US20220368780A1 (en) Assembly type edge system
CN116661893A (en) Device parameter acquisition method, device, computer device and computer readable medium
CN117130318B (en) Industrial data acquisition method, device, system and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination