Automatic testing method for container terminal user interface

Through automated testing methods, the use cases of container terminal user interfaces are generated, executed and monitored, and the error operation and incomplete recording of manual manual testing is solved, and the testing efficiency and accuracy are improved.

CN120295924APending Publication Date: 2025-07-11SHANGHAI ZHENHUA HEAVY IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510482861.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the prior art, automated container terminal user interface testing relies on manual writing and execution of use cases, which are prone to misoperation and imperfect recording of the test execution process, resulting in high difficulty and low efficiency.

Method used

The automated testing method is adopted, including generating test cases, initializing the test environment, executing and monitoring the use cases, generating test reports, using intelligent learning algorithms to optimize the use case model, and defining the exception triggering mechanism and interface simulation, and automatically generating test reports.

Benefits of technology

Reduce repeated operations by testers, improve testing efficiency and accuracy, and make full use of testing resources, testers can focus on design and exploratory testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295924A_ABST
    Figure CN120295924A_ABST
Patent Text Reader

Abstract

The invention provides an automatic test method for a container terminal user interface, which comprises the following steps: S1, generating a test case: carrying out basic definition on the test case, generating the test case, and storing the test case; s2, executing the test case: initializing a test environment, executing the test case, and monitoring the execution process of the case; and S3, generating a test report: after the execution of the test case is completed, creating a self-defined test report production method, summarizing the execution results of all the cases, performing data statistical analysis, and generating the test report. According to the method, repeated operation of testers is reduced, test resources are fully utilized, and automatic testing is executed in non-working time. The test personnel can concentrate on the design of the automatic test case, exploratory test and execution of other cases which are not suitable for the automatic test, so that the software test efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated terminal testing, and particularly to an automated testing method for the user interface of a container terminal. Background Art

[0002] In the prior art, traditional automated container terminal user interfaces (User Interface, abbreviated as UI) usually mainly rely on manually writing test cases and manually executing the cases. Since the working conditions and processes of automated terminals are relatively complex. For example, the same operation process is executed by different devices, which may correspond to the same expected results, and manual intervention is required in case of abnormal situations to continue the test, etc. These will all lead to complex processes and operations of the UI system and great testing difficulty.

[0003] In addition, the workload of manually executing cases is large. Not only can it not ensure that all test cases can be covered in each iteration, but there may be some misoperations during the case execution process, and there is also an imperfect situation in the recording of the test execution process.

[0004] In view of this, the inventors of the present application have designed an automated testing method for the user interface of a container terminal in order to overcome the above technical problems. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide an automated testing method for the user interface of a container terminal in order to overcome the defects in the prior art that the user interface of an automated container terminal uses manual writing and execution of cases, is prone to misoperations, and the recording of the test execution process is imperfect.

[0006] The present invention solves the above technical problems through the following technical solutions:

[0007] An automated testing method for the user interface of a container terminal, characterized in that the automated testing method includes the following steps:

[0008] S1. Generate test cases: perform basic definition on the test cases, generate test cases, and then store the test cases;

[0009] S2. Execute test cases: initialize the test environment, execute the test cases, and monitor the process of case execution;

[0010] S3. Generate a test report: when the execution of the current test cases is completed, create a custom test report generation method, summarize the execution results of all current cases, perform data statistical analysis and generate a test report.

[0011] According to an embodiment of the present invention, the basic definition of the test cases in step S1 includes:

[0012] S 11 Define the state, data flow, and behavior of the UI system;

[0013] S 12 Define the test case model, and continuously learn and train the existing test cases through intelligent learning algorithms to continuously optimize the test case model;

[0014] S 13 Define the algorithm for automatically generating test cases;

[0015] S 14 Define the exception trigger mechanism and provide interfaces for calling and simulating different system exceptions.

[0016] According to an embodiment of the present invention, generating test cases in step S1 includes: inputting relevant parameters of the test cases in the front-end page, selecting the corresponding test case model and test case algorithm; processing the information input by the front-end at the back-end, and generating the corresponding test cases and displaying them at the front-end.

[0017] According to an embodiment of the present invention, storing test cases in step S1 includes: creating a folder named with the test suite serial number + suite name at the back-end for each test suite to place local storage and data information, and completely isolating different test cases in the test suite.

[0018] According to an embodiment of the present invention, initializing the test environment in step S2 includes: before each test case is executed, it is necessary to initialize the test environment.

[0019] According to an embodiment of the present invention, the initialization of the test environment includes clearing cache data, initializing the front-end and back-end data of the system, and setting preconditions.

[0020] According to an embodiment of the present invention, executing test cases in step S2 includes:

[0021] Automatically execute the test cases in ascending order of the unique code of the selected cases, or execute the test cases in the order of the priority of the manually input test cases;

[0022] According to the content of the test cases, initialize the test environment by calling the front-end and back-end interfaces of the UI system, and determine whether to enable the module for simulating the control system;

[0023] Call the data generation interface to generate and execute test cases.

[0024] According to an embodiment of the present invention, the execution progress of the cases is displayed during the execution of the test cases, and the timeout for the execution of the cases is set according to the characteristics of each test case;

[0025] When the test case exceeds the set time and is not executed completely, it is forcibly determined that the test case fails to execute, and the next test case starts to be executed.

[0026] According to an embodiment of the present invention, the monitoring of the use case execution process in step S2 includes:

[0027] Real-time monitoring and recording of process data during the test execution process;

[0028] Using network priority assertions, calling expect(value) and selecting a matcher corresponding to the expected test result;

[0029] After the use case is executed, compare the test result with the expected result; if the comparison is consistent, output that the test result passes; if the comparison is inconsistent, output that the test result fails.

[0030] According to an embodiment of the present invention, the test report in step S3 includes the test version, test time, and the execution rate, pass rate, and test coverage rate of the test cases.

[0031] The positive and progressive effects of the present invention are as follows:

[0032] The automated test method for the container terminal user interface of the present invention reduces the repetitive operations of testers, makes full use of test resources, and performs automated tests during non-working hours. Testers can concentrate on the design of automated test cases, exploratory testing, and the execution of other cases that are not suitable for automated testing, thereby improving the efficiency and accuracy of software testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The above and other features, properties, and advantages of the present invention will become more obvious through the following description in conjunction with the drawings and embodiments. In the drawings, the same reference numerals always represent the same features, where:

[0034] Figure 1 is a flowchart of the automated test method for the container terminal user interface of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0035] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention is provided in conjunction with the drawings.

[0036] Embodiments of the present invention will now be described in detail with reference to the drawings. Preferred embodiments of the present invention will now be described in detail, and examples thereof are shown in the drawings. Whenever possible, the same reference numerals will be used throughout the drawings to represent the same or similar parts.

[0037] In addition, although the terms used in the present invention are selected from well-known and commonly used terms, some of the terms mentioned in the specification of the present invention may be selected by the applicant according to his or her judgment, and their detailed meanings are described in the relevant parts of the present description.

[0038] In addition, it is required to understand the present invention not only by the actual terms used, but also by the meaning implied by each term.

[0039] Figure 1 It is a flowchart of the automated testing method for the container terminal user interface of the present invention.

[0040] As Figure 1 shown, the present invention discloses an automated testing method for the container terminal user interface, which includes the following steps:

[0041] Step S1, generate test cases: perform basic definition on the test cases, generate test cases, and then store the test cases.

[0042] Preferably, the basic definition of the test cases in step S1 includes:

[0043] Step S 11 , define the state, data flow, and behavior of the UI system.

[0044] Step S 12 , define the test case model, such as the business process model and the function model. Through the intelligent learning algorithm, continuously learn and train the existing test cases, and continuously optimize the test case model.

[0045] For example, taking the ship unloading process as an example, the main trolley of the quay crane grabs the container from the ship side and places it on the transfer platform, the gantry trolley grabs the container from the transfer platform and places it on the horizontal transportation equipment, the horizontal transportation equipment transports the container to the yard interaction lane, and the yard crane grabs the container from the horizontal transportation equipment and places it in the yard. Monitor whether the task execution status, equipment status, interaction status, and equipment operation trajectory of the quay crane, horizontal transportation equipment, and yard crane during the ship unloading process meet the expectations.

[0046] Step S 13 , define the algorithm for automatically generating test cases. For example, scenario design method, boundary value method, equivalence class partitioning, cause-and-effect relationship method, etc.

[0047] For example, taking the scenario design method as an example, if the horizontal transportation equipment located at the yard operation position is manually intervened to a specified position, the target position types are yard operation position, quay crane operation position, buffer position, parking position, and charging position. Monitor whether the horizontal transportation equipment travels to the destination position, and whether the status data and task data of the equipment during the travel meet the expectations.

[0048] Step S14 Define an exception trigger mechanism, such as triggering device failures and system failures. Provide interfaces for calling and simulating different system exceptions.

[0049] During the task execution process, it is possible to specify the exceptions to be triggered and the stages at which the exceptions are triggered. At the same time, by calling methods for exception handling, such as terminating the task, canceling the task, ignoring the exception and continuing to execute the task, etc., to monitor whether the system execution meets the expectations.

[0050] Preferably, generating test cases in step S1 includes: inputting relevant parameters of the test cases in the front-end page, for example, test suite name, preconditions, input conditions, execution steps of the test cases, and expected results. Select the corresponding test case model and the algorithm of the test cases. Process the information input by the front-end at the back-end, and generate the corresponding test cases and display them at the front-end.

[0051] Preferably, storing test cases in step S1 includes: creating a folder named with the test suite serial number + suite name for each test suite at the back-end, which is used to place local storage and data information, completely isolate different test cases in the test suite, and use before or after hooks to avoid repeatedly testing a specific function point. This can improve the repeatability of the test cases.

[0052] Among them, for test cases involving exception handling, provide functions for automatic exception handling and continuing to execute the test cases after timeout manual intervention.

[0053] Step S2, execute the test cases: initialize the test environment, execute the test cases, and monitor the process of case execution.

[0054] Select the test cases to be executed on the interface and click the case execution button.

[0055] Since the data interaction between systems is complex during the operation process, and different external influencing factors may lead to different test results. For example, cache data accumulates continuously during the system operation. If not cleared in time, it may cause old data to interfere with the reading and processing of data in the new test process, thus affecting the accuracy of the test results.

[0056] Therefore, it is necessary to ensure that the system data is in an initial and known state before executing each case, so that each test is carried out based on the same data starting point, avoiding unnecessary changes introduced due to the residue of historical data, and ensuring that the test environment is consistent each time the same test case is executed.

[0057] Based on the above situation, the initialization of the test environment in step S2 includes: Before each test case is executed, the test environment needs to be initialized. The initialization of the test environment includes clearing cached data, initializing the front-end and back-end data of the system, and setting up preconditions.

[0058] Preferably, the execution of test cases in step S2 includes:

[0059] Automatically execute the selected test cases in ascending order of their unique codes, or execute the test cases in the order of the priorities manually input for the test cases. According to the content of the test cases, initialize the test environment by calling the front-end and back-end interfaces of the UI system, determine whether to enable the module for simulating the control system, etc.

[0060] Call the data generation interface to generate and execute test cases. During the execution of the cases, display the execution progress of the cases, and set the timeout for the execution of the cases according to the characteristics of each test case, such as the time spent on page jumps, test functions, devices, etc. When the test case exceeds the set time and has not been completed, then forcefully determine that the test case has failed and start executing the next test case.

[0061] During the above process of executing test cases, the execution of test cases can be paused and resumed at any time. Especially when an exception occurs in the system during the execution of the cases, the pause button can be clicked to pause the system to the current state. This can facilitate finding the cause of the problem. After the problem is solved, the resume button can be clicked to continue executing the test cases, or the subsequent test cases can be executed manually. Clicking the pause and save the current system data button can store the current state of the system and provide the function of one-key restoration to the current state of the system, which is convenient for problem reproduction and verification.

[0062] Preferably, the monitoring of the process of executing test cases in step S2 includes:

[0063] Monitor and record the process data in real time during the test execution process, including recording the specific times when click events and jump events occur, recording videos, taking screenshots of key nodes, etc.

[0064] Use network-first assertions, call expect(value), and select a matcher corresponding to the expected test result. Among them, in the retry assertion, an await needs to be added to determine whether the execution result of the test case passes.

[0065] After the test cases are executed, compare the test results with the expected results. For example, compare the screenshots of the key nodes with the baseline screenshots. If the comparison is consistent, output the test result as passed; if the comparison is inconsistent, output the test result as failed. The reason for the failure is recorded as that the screenshot of a certain node does not match the expected result.

[0066] Step S3, generating a test report: After the execution of the current test cases is completed, create a custom test report generation method.

[0067] Summarize the execution results of all the current test cases. For example, call the reporter to summarize the execution results. Conduct statistical analysis on data such as the execution rate and passing rate of the test cases, and generate a test report.

[0068] Preferably, the test report output adopts a flexible and configurable manner. For example, configure the test report generation path, test report title, test report format, etc.

[0069] Preferably, the test report may include content such as the test version, test time, and the execution rate, passing rate, test coverage rate, etc. of the test cases. This can reduce the time for testers to manually compare data, reduce the time for report formation, and ensure the uniformity of the test report format.

[0070] According to the above description, the automated test method for the container terminal user interface of the present invention includes automatically generating test cases, automatically generating test data, executing the test cases, and automatically generating a test report.

[0071] In summary, the automated test method for the container terminal user interface of the present invention reduces the repetitive operations of testers, makes full use of test resources, and performs automated tests during non-working hours. Testers can focus on the design of automated test cases, exploratory testing, and the execution of other cases that are not suitable for automated testing, thereby improving the efficiency and accuracy of software testing.

[0072] For those skilled in the art, the above disclosure of the invention is only an example and does not constitute a limitation to this application. Although not explicitly stated here, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are proposed in this application, so such modifications, improvements, and corrections still fall within the spirit and scope of the exemplary embodiments of this application.

[0073] At the same time, this application uses specific terms to describe the embodiments of this application. Such as "one embodiment", "an embodiment", and / or "some embodiments" mean a certain feature, structure, or characteristic related to at least one embodiment of this application. Therefore, it should be emphasized and noted that the "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more at different positions in this specification is not necessarily the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of this application can be appropriately combined.

[0074] Similarly, it should be noted that, in order to simplify the description of the disclosure of the present application and thus help the understanding of one or more embodiments of the invention, in the foregoing description of the embodiments of the present application, sometimes multiple features are grouped into one embodiment, drawing or description thereof. However, this disclosure method does not mean that the features required by the subject matter of the present application are more than those mentioned in the claims. In fact, the features of the embodiments are less than all the features of the individual embodiments disclosed above.

[0075] Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that these are only examples, and the protection scope of the present invention is defined by the appended claims. Without departing from the principles and essence of the present invention, those skilled in the art can make various changes or modifications to these embodiments, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. An automated testing method for a container terminal user interface, characterized in that The automated test method includes the following steps: S1. Generate test cases: Define the basic test cases, generate test cases, and then store the test cases; S2. Execute test cases: Initialize the test environment, execute the test cases, and monitor the execution process of the cases; S3. Generate test reports: When the execution of the current test cases is completed, create a custom test report generation method, summarize the execution results of all current cases, perform data statistical analysis, and generate test reports.

2. The automated testing method for the container terminal user interface according to claim 1, wherein The basic definition of test cases in step S1 includes: S 11 , define the state of the UI system, the data flow, and the behavior of the UI system; S 12 Define a test case model, and through an intelligent learning algorithm, continuously learn and train the existing test cases to continuously optimize the test case model; S 13 Define the algorithm for automatically generating test cases; S 14 , define an exception trigger mechanism and provide an interface for calling to simulate different system exceptions.

3. The automated testing method for the container terminal user interface according to claim 1, wherein Generating test cases in step S1 includes: Entering the relevant parameters of the test cases in the front-end page, selecting the corresponding test case model and algorithm of the test cases; Processing the information input by the front-end in the back-end, generating the corresponding test cases, and displaying them in the front-end.

4. The automated testing method for the container terminal user interface according to claim 1, wherein, Storing test cases in step S1 includes: Creating a folder named with the test suite serial number + suite name for each test suite in the back-end, which is used to place local storage and data information, and completely isolating different test cases in the test suite.

5. The automated testing method for the container terminal user interface according to claim 1, characterized in that, Initializing the test environment in step S2 includes: Before each test case is executed, the test environment needs to be initialized.

6. The automated test method for the container terminal user interface according to claim 5, wherein The initialization of the test environment includes clearing cache data, initializing the front-end and back-end data of the system, and setting preconditions.

7. The automated test method for the container terminal user interface according to claim 1, wherein Executing test cases in step S2 includes: Automatically execute in ascending order according to the unique code of the selected cases, or execute the test cases in order of the priority manually input for the test cases; According to the content of the test cases, initialize the test environment by calling the front-end and back-end interfaces of the UI system, and determine whether to enable the module for simulating the control system; Call the data generation interface to generate and execute test cases.

8. The automated testing method for the container terminal user interface according to claim 7, characterized in that During the execution of the test cases, display the execution progress of the cases, and set the timeout for the execution of the cases according to the characteristics of each test case; When the test case exceeds the set time and is not completed, it is forcibly determined that the execution of the test case fails, and the execution of the next test case starts.

9. The automated testing method for the container terminal user interface according to claim 1, characterized in that Monitoring the execution process of the cases in step S2 includes: Real-time monitoring and recording of process data during the test execution; Using network priority assertions, calling expect(value) and selecting a matcher corresponding to the expected test result; After the execution of the cases is completed, compare the test results with the expected results; if the comparison is consistent, output the test result as passed; if the comparison is inconsistent, output the test result as failed.

10. The automated testing method for the container terminal user interface according to claim 1, characterized in that The test reports in step S3 include the test version, test time, and the execution rate, pass rate, and test coverage rate of the test cases.