An ATS automated testing method based on interface operations

By reading the properties of ATS interface element objects and creating and executing test scripts, the problem of inefficient ATS interface testing is solved, and efficient and accurate interface automation testing is achieved.

CN115649248BActive Publication Date: 2025-06-13浙江众合科技股份有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211312887.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2025-06-13
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

In the prior art, ATS interface testing is relatively low, takes a lot of time, and there are omissions and errors.

Method used

By reading the object properties of all element objects in the ATS interface, creating a test script, and executing relevant instructions and operations, comparing the verification state with the expected state, and implementing batch testing.

Benefits of technology

It greatly improves the efficiency of interface testing, reduces the time and errors of manual testing, and realizes 24-hour continuous automated testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115649248B_ABST
    Figure CN115649248B_ABST
Patent Text Reader

Abstract

The present invention discloses an ATS automated testing method based on interface operations, comprising the following steps: S1: Start the automated interface service and establish a connection with the interface; S2: Start the object under test and read the object attributes of all element objects within the ATS interface of the object under test; S3: Create a test script according to the object attributes and test cases to be tested, and make function and data configurations between different projects; S4: Execute the test script and send corresponding operations to the specified object under test; S5: Obtain the real-time status of the object attributes as the verification status, compare the verification status with the expected status, and record the test results in the storage unit. By reading the ATS interface, the present invention can clearly and accurately obtain the position information, status, etc. of all devices on the interface, improve the accuracy of interface automated operations, and provide different configurations for different projects, realizing the versatility and flexibility of automated testing under different requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and particularly to an ATS automated testing method based on interface operations. Background Art

[0002] The Automatic Train Supervision (ATS) system in rail transit has functions closely related to human-computer interaction such as train operation control, train identification management, train route handling, train position display, and user information management. The above human-computer interaction functions are of great significance for dispatchers to complete normal train operation work. Therefore, there are high requirements for ensuring the correctness of business function implementation, the usability of interface operations, and the correctness of interface displays. Since the elements in the UI interface have different requirements in different projects, the testing of this part of the function mainly relies on manual testing according to the steps of test cases. Although the manual method is flexible, due to the high repetition rate of many test cases, the testing takes a lot of time and there are omissions and mistakes. Therefore, it is necessary to improve the testing efficiency of the UI interface while ensuring the testing quality. Summary of the Invention

[0003] Aiming at the problem of low interface testing efficiency in the prior art, the present invention provides an ATS automated testing method based on interface operations. By reading the object attributes of all element objects in the ATS interface of the object under test and creating test scripts, relevant instructions and operations are executed through the test scripts, and the verification status is compared with the expected status, so as to perform batch testing on the interface and greatly improve the testing efficiency.

[0004] The following are the technical solutions of the present invention.

[0005] An ATS automated testing method based on interface operations includes the following steps:

[0006] S1: Start the automated interface service and establish a connection with the interface;

[0007] S2: Start the object under test and read the object attributes of all element objects in the ATS interface of the object under test;

[0008] S3: Create test scripts according to the object attributes and test cases to be tested, and make function and data configurations between different projects;

[0009] S4: Execute the test scripts and send corresponding operations to the specified object under test;

[0010] S5: Obtain the real-time status of the object attributes as the verification status, compare the verification status with the expected status, and record the test results in the storage unit.

[0011] The present invention realizes clearly and accurately obtaining all device position information, status, etc. of the interface by reading the ATS interface, improves the accuracy of interface automation operations, and provides different configurations for different projects to achieve the versatility and flexibility of automated testing under different requirements.

[0012] Preferably, in S1, start the automated interface service and establish a connection with the interface, including: based on the S / C architecture mode, create an automated interface service, and establish a connection with the interface through a specified ip and port. The automated interface service is used to provide a transfer for the instructions expressed by the test script and forward them to the object under test.

[0013] Preferably, in S2, start the object under test and read the object attributes of all element objects in the ATS interface of the object under test, including:

[0014] Start the object under test, open the ATS interface of the object under test, and use the station yard map devices, menus, and pop-up windows including signal machines, switches, and sections as element objects;

[0015] Read and record the object attributes based on the type and / or content of each element object.

[0016] Preferably, in S3, create a test script according to the object attributes and test cases to be tested, and make function and data configurations between different projects, including:

[0017] Decompose the test case steps into basic business logics, further refine them to basic interface operation instructions and verification checkpoints, and encapsulate them layer by layer to obtain encapsulated instructions;

[0018] For case differences, adapt and adjust through a parameter configuration method combined with object attributes to make project configuration information;

[0019] Assemble the encapsulated instructions and project configuration information into a test script.

[0020] Preferably, in S4, execute the test script and send corresponding operations to the specified object under test, including:

[0021] According to the test requirements, select the test script corresponding to the required test case for execution;

[0022] Move the ATS interface of the object under test to the middle of the device interface and operate according to the instructions of the test script;

[0023] If the ATS interface of the object under test cannot be fully displayed on the device interface, record the overflow coordinate values of the ATS interface, and adjust the ATS interface of the object under test according to the overflow coordinate values after the operation in the test script is interrupted until the remaining interface has been displayed on the device interface at least once.

[0024] Among them, since the ATS interface of individual objects to be measured is too large, it may not be fully displayed on the device interface. In this case, dragging is required. The present invention first records the overflow coordinate values, and then adjusts them after the operation interruption of the test script. Since the script execution is relatively fixed, a clear order is adopted to avoid operation errors and ensure the integrity of task execution.

[0025] Preferably, in S5, the real-time state of the object attribute is obtained as the verification state, and the verification state is compared with the expected state, and the test result is recorded in the storage unit, including:

[0026] Judge whether the verification point is an interface. If so, obtain the device interface state according to the expected verification point requirements, compare the result of the device interface state with the expected result, fill the compared test result into the test record form, and generate a test log;

[0027] If not, obtain the interface device message state according to the expected verification point requirements, compare the result of the message state with the expected result, fill the compared test result into the test record form, and generate a test log;

[0028] If the use case requires storing the scenario picture, the picture is stored and recorded according to the specified storage path.

[0029] The substantial effects of the present invention include:

[0030] 1. By reading the ATS interface object method, it is possible to clearly and accurately obtain all device position information, status, etc. on the interface, improving the accuracy of interface automation operations.

[0031] 2. Save manpower and do not require manual repeated manual testing.

[0032] 3. Improve the equipment utilization rate. The automated test can continuously execute the test for 24 hours, improving the test efficiency while reducing manpower.

[0033] 4. Provide configurations for different projects to achieve the versatility and flexibility of automated testing under different requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is the overall flowchart of the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0035] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the following will, in conjunction with the embodiments, clearly and completely describe the technical solutions. Obviously, the described embodiments are only a part rather than all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0036] It should be understood that in various embodiments of the present invention, the sequence numbers of the processes do not mean the order of execution, and the order of execution of the processes should be determined by their functions and internal logics, and should not constitute any limitation to the implementation processes of the embodiments of the present invention.

[0037] It should be understood that in the present invention, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0038] It should be understood that in the present invention, "a plurality of" means two or more. "And / or" is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. "Including A, B, and C", "including A, B, C" means that all of A, B, and C are included. "Including A, B, or C" means including one of A, B, and C. "Including A, B, and / or C" means including any one or any two or all three of A, B, and C.

[0039] The following will detail the technical solutions of the present invention with specific embodiments. The embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0040] Embodiment:

[0041] An ATS automated testing method based on interface operations, as Figure 1 shown, includes the following steps:

[0042] S1: Start the automated interface service and establish a connection with the interface;

[0043] S2: Start the object under test and read the object attributes of all element objects in the ATS interface of the object under test;

[0044] S3: Create a test script according to the object attributes and test cases to be tested, and make function and data configurations between different projects;

[0045] S4: Execute the test script and send corresponding operations to the specified object under test.

[0046] S5: Obtain the real-time status of the object attributes as the verification status, compare the verification status with the expected status, and record the test results in the storage unit.

[0047] In this embodiment, by reading the ATS interface, it is possible to clearly and accurately obtain all device location information, status, etc. of the interface, improve the accuracy of interface automation operations, and provide different configurations for different projects to achieve the generality and flexibility of automated testing under different requirements.

[0048] In S1 of this embodiment, start the automated interface service and establish a connection with the interface, including: based on the S / C architecture mode, create an automated interface service, and establish a connection with the interface through the specified ip and port. The automated interface service is used to provide a transfer for the instructions expressed by the test script and forward them to the object under test.

[0049] In S2 of this embodiment, start the object under test and read the object attributes of all element objects in the ATS interface of the object under test, including:

[0050] Start the object under test, open the ATS interface of the object under test, and use the station yard map devices, menus, and pop-up windows including signal machines, turnouts, and sections as element objects;

[0051] Take the type and / or content of each element object as the object attribute, and read and record them.

[0052] The element objects and object attributes of this embodiment are shown in Table 1 below.

[0053] Element object Object attribute Signal machine Location information, equipment type Turnout Location information, equipment type Section Location information, equipment type, interface display range, color Menu Menu content, operability, visibility, menu level Pop-up window Pop-up window title, pop-up window type, text box content … …

[0054] Table 1

[0055] In S3 of this embodiment, create a test script according to the object attributes and test cases to make function and data configurations between different projects, including:

[0056] Decompose the test case steps into basic business logics, further refine them to basic interface operation instructions and verification checkpoints, and perform layer-by-layer encapsulation to obtain encapsulated instructions;

[0057] For test case differences, adapt and adjust through a parameter configuration method in combination with object attributes to make project configuration information;

[0058] Assemble the encapsulated instructions and project configuration information into a test script.

[0059] In step S4 of this embodiment, a test script is executed to send corresponding operations to the specified object under test, including:

[0060] According to the test requirements, select the test script corresponding to the required test case for execution;

[0061] Move the ATS interface of the object under test to the middle of the device interface and perform operations according to the instructions of the test script;

[0062] If the entire ATS interface of the object under test cannot be fully displayed on the device interface, record the overflow coordinate values of the ATS interface, and after the operation of the test script is interrupted, adjust the ATS interface of the object under test according to the overflow coordinate values until the remaining interface has been displayed on the device interface at least once.

[0063] Among them, the ATS interface of some objects under test may be too large to be fully displayed on the device interface. At this time, dragging is required. The present invention first records the overflow coordinate values, and then makes adjustments after the operation of the test script is interrupted. Since the script execution is relatively fixed, a clear order is adopted to avoid operation errors and ensure the integrity of task execution.

[0064] Among them, the instructions mainly include operations such as left-clicking and right-clicking in a specific order and position.

[0065] In step S5 of this embodiment, obtain the real-time status of the object attribute as the verification status, compare the verification status with the expected status, and record the test result in the storage unit, including:

[0066] Judge whether the verification point is an interface. If so, obtain the device interface status according to the expected verification point requirements, compare the result of the device interface status with the expected result, fill the compared test result into the test record form, and generate a test log;

[0067] If not, obtain the interface device message status according to the expected verification point requirements, compare the result of the message status with the expected result, fill the compared test result into the test record form, and generate a test log;

[0068] If the test case requires storing the scenario picture, store and record the picture according to the specified storage path.

[0069] The substantial effects of this embodiment include:

[0070] 1. By reading the ATS interface object method, it is possible to clearly and accurately obtain all device position information, status, etc. on the interface, improving the accuracy of interface automation operations.

[0071] 2. Save manpower and eliminate the need for manual repeated testing.

[0072] 3. Improve equipment utilization rate. Automated tests can be continuously executed for 24 hours, improving test efficiency while reducing manpower.

[0073] 4. Provide configurations for different projects to achieve the generality and flexibility of automated tests under different requirements.

[0074] Through the description of the above implementation manners, those skilled in the art can understand that, for the convenience and conciseness of description, only the division of the above functional modules is used as an example for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the specific device is divided into different functional modules to complete all or part of the functions described above.

[0075] In the embodiments provided in the present application, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the embodiments of the structures described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another structure, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces, and the indirect couplings or communication connections of structures or units can be in electrical, mechanical or other forms.

[0076] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0077] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0078] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0079] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. An ATS automated testing method based on interface operations, characterized in that, it includes the following steps: S1: Start the automated interface service and establish a connection with the interface; S2: Start the object under test and read the object attributes of all element objects in the ATS interface of the object under test; S3: Create a test script according to the object attributes and test cases to be tested, and make function and data configurations between different projects; S4: Execute the test script and send corresponding operations to the specified object under test; S5: Obtain the real-time status of the object attributes as the verification status, compare the verification status with the expected status, and record the test results in the storage unit; In the above S3, creating a test script according to the object attributes and test cases to be tested, and making function and data configurations between different projects includes: Decompose the test case steps into basic business logics, further refine them to basic interface operation instructions and verification checkpoints, and perform layer-by-layer encapsulation to obtain encapsulated instructions; For test case differences, perform adaptation and adjustment by combining the parameter configuration method with the object attributes to make project configuration information; Assemble the encapsulated instructions and the project configuration information into a test script; In the above S4, executing the test script and sending corresponding operations to the specified object under test includes: According to the test requirements, select the test script corresponding to the required test case for execution; Move the ATS interface of the object under test to the middle of the device interface and perform operations according to the instructions of the test script; If the ATS interface of the object under test cannot be fully displayed on the device interface, record the overflow coordinate values of the ATS interface, and adjust the ATS interface of the object under test according to the overflow coordinate values after the operation in the test script is interrupted until the rest of the interface is displayed on the device interface at least once.

2. The ATS automated testing method based on interface operations according to claim 1, characterized in that, in the above S1, starting the automated interface service and establishing a connection with the interface includes: Based on the S / C architecture mode, create an automated interface service, and establish a connection with the interface through the specified ip and port. The automated interface service is used to provide a transfer for the instructions expressed by the test script and forward them to the object under test.

3. The ATS automated testing method based on interface operations according to claim 1, characterized in that, in the above S2, starting the object under test and reading the object attributes of all element objects in the ATS interface of the object under test includes: Start the object under test, open the ATS interface of the object under test, and use the station yard map devices including signal machines, turnouts, and sections, menus, and pop-up windows as element objects; Read and record the object attributes with the types and / or contents of each element object.

4. The ATS automated testing method based on interface operations according to claim 1, characterized in that, in the above S5, obtaining the real-time status of the object attributes as the verification status, comparing the verification status with the expected status, and recording the test results in the storage unit includes: Determine whether the verification point is an interface. If so, obtain the device interface status according to the expected verification point requirements, compare the result of the device interface status with the expected result, fill the test result after comparison into the test record form, and generate a test log; If not, obtain the interface device message status according to the expected verification point requirements, compare the result of the message status with the expected result, fill the test result after comparison into the test record form, and generate a test log; If the test case requires storing the scenario picture, record the picture according to the specified storage path.

Citation Information

Patent Citations

  • A system for continuous integration and delivery of ATS software

    CN109614321A

  • Sub-function independent test method of automatic train monitoring system based on interface

    CN112631932A

  • Automatic test method and device for automatic train monitoring system (ATS) interface

    CN113590468A