Automatic testing method based on embedded Linux system gateway machine
By adopting an automated test method based on embedded Linux system gateways in industrial automation equipment, and using the Bash scripting language to generate automated test scripts, the problems of low efficiency and error prone traditional manual testing methods are solved, and an efficient and accurate test process is achieved.
Patent Information
- Application Number
- CN202411820909.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-25
AI Technical Summary
Traditional manual testing methods are inefficient and error-prone, making it difficult to meet the needs of large-scale and high-efficiency testing, especially during the testing process of industrial automation equipment.
An automated test method based on embedded Linux system gateway is adopted, and automated test scripts are generated using the Bash script language, testing processes, test parameters, test instructions and result judgment logic are defined, various operations under actual operating conditions are simulated, and test results are automatically recorded and analyzed.
It realizes comprehensive, efficient and accurate testing of gateways, improves testing efficiency and accuracy, reduces testing costs, and facilitates problem tracking and solving.
Smart Images

Figure CN119690837A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automated testing technology, and for example, to an automated testing method based on an embedded Linux system gateway machine. Background Art
[0002] With the rapid development of industrial automation technology, the demand for testing industrial automation equipment is increasing. Traditional manual testing methods have problems such as low efficiency and prone to errors, and it is difficult to meet the needs of large-scale and efficient testing. Therefore, it is particularly important to develop an automated testing method based on an embedded Linux system gateway.
[0003] From R&D to mass production, a product needs to be tested for functions and performance. In the early stages of a project, the shipment volume is small, and it is acceptable for manual labor to spend a lot of time testing the product. However, as the product functions become more and more, or the product enters the mass production stage, the test content increases, and the required test time becomes shorter and shorter. It is difficult for manual single testing to meet the requirements. In the existing automated testing system, due to the large number of test items, testers may miss tests during the testing process. If a problem occurs with the machine at the customer's place, there is no basis to follow, and it is impossible to determine whether the problem existed at the factory or was caused by the customer's misoperation. In addition, some test items require strong professional knowledge in design and high technical requirements for testers. Often, general technical testers cannot complete the operation or need to spend a long time learning and testing, resulting in low work efficiency.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this application. Summary of the invention
[0005] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0006] The present disclosure provides an automated testing method based on an embedded Linux system gateway machine, the method comprising:
[0007] Generate an automated test script using the Bash scripting language, wherein the automated test script defines a test process, test parameters, test instructions, and result judgment logic to simulate various operations under actual working conditions, and automatically record and analyze test results;
[0008] Based on the automated test script, a cross-platform graphical programming language is used to perform module tests on the functions of the gateway to be tested, thereby achieving simultaneous testing of different test items.
[0009] In some embodiments, the above-mentioned use of Bash scripting language to generate an automated test script includes:
[0010] Based on the functions of different gateways, the status and attribute data of the gateways are obtained and divided according to the functions;
[0011] Marking the status results of the gateways according to the status and attribute data corresponding to the gateways with different functions;
[0012] Based on the status and attribute data corresponding to gateways with different functions, as well as the status results of the corresponding gateways, automated test scripts are generated using the Bash scripting language.
[0013] In some embodiments, the above-mentioned acquisition of the state and attribute data of the gateway based on the functions of different gateways and the division according to the functions include:
[0014] Divide the gateway into routing functions, firewall rules and NAT conversion gateway according to its functions;
[0015] Perform status tests on gateways of each function, including using test tools to test the basic connectivity and routing functions of the gateway, verify the implementation of firewall rules, and check the status of network services and ports;
[0016] Perform performance tests on gateways of each function, including using test tools to measure the gateway's throughput, latency, and packet loss rate, and monitoring the gateway's CPU, memory, and network resource usage under different loads;
[0017] Perform stability tests on gateways for each function, including evaluating the stability of the gateway by running tests for a long time or simulating a large number of concurrent connections, and monitoring logs and exceptions during the test process to promptly discover and locate problems.
[0018] In some embodiments, the above-mentioned marking of the status result of the gateway according to the status and attribute data corresponding to the gateways with different functions obtained includes:
[0019] Analyze the correlation between the status and attribute data corresponding to gateways with different functions and the status results of the gateways;
[0020] Based on the association relationship, the status result of the gateway is marked.
[0021] In some embodiments, the above analysis of the association between the status and attribute data corresponding to the gateways with different functions and the status results of the gateways includes:
[0022] Analyze the correlation between the status data and performance data of the gateway;
[0023] Based on the association between the state data and the performance data, determining the relationship with the stability data;
[0024] Based on the determined relationship with the stability data, an association relationship with the status result of the gateway is determined.
[0025] In some embodiments, the above analysis of the association between the state data and the performance data of the gateway includes:
[0026] Based on the basic connectivity and routing functions of the gateway, the implementation effect of the determined firewall rules, as well as the status of network services and ports, determine the correlation with the gateway's throughput, latency and packet loss rate, and the gateway's CPU, memory and network resource usage under different loads.
[0027] In some embodiments, the method further includes generating a test report, wherein the test report includes a test start time, a test end time, test items, test details, and a test conclusion.
[0028] The embodiment of the present disclosure provides an automated testing device based on an embedded Linux system gateway machine, the device comprising:
[0029] A test script generation module is used to generate an automated test script using the Bash scripting language, wherein the automated test script defines a test process, test parameters, test instructions, and result judgment logic to simulate various operations under actual working conditions, and automatically record and analyze test results;
[0030] The test module is used to perform module tests on the functions of the gateway machine to be tested based on the automated test script and use a cross-platform graphical programming language to achieve simultaneous testing of different test items.
[0031] An embodiment of the present disclosure provides an electronic device, the device comprising at least one processor;
[0032] and a memory communicatively coupled to the at least one processor;
[0033] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned automated testing method based on the embedded Linux system gateway machine.
[0034] The embodiment of the present disclosure provides a storage medium storing program instructions, which, when running, execute the above-mentioned automated testing method based on an embedded Linux system gateway machine.
[0035] The automated testing method, apparatus, device, and storage medium based on an embedded Linux system gateway provided by the embodiments of the present disclosure can achieve the following technical effects:
[0036] The present disclosure generates an automated test script by using the Bash scripting language, wherein the automated test script defines the test process, test parameters, test instructions, and result judgment logic to simulate various operations under actual working conditions, and automatically records and analyzes the test results; then, based on the automated test script, a cross-platform graphical programming language is used to perform module tests on the functions of the gateway machine to be tested, and different test items are tested simultaneously. Based on the written automated test software, through the execution of the automated test software, the gateway machine can be tested comprehensively, efficiently, and accurately. The above general description and the description below are only exemplary and explanatory and are not intended to limit this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0038] Figure 1 It is a flowchart of an automated testing method based on an embedded Linux system gateway machine provided by an embodiment of the present disclosure;
[0039] Figure 2 It is a flowchart of another automated testing method based on an embedded Linux system gateway machine provided by an embodiment of the present disclosure;
[0040] Figure 3 It is a structural schematic diagram of an automated testing device based on an embedded Linux system gateway machine provided by an embodiment of the present disclosure;
[0041] Figure 4 It is a structural diagram of an automated testing device based on an embedded Linux system gateway machine provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0043] The terms "first", "second", etc. in the embodiments of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0044] Unless otherwise stated, the term "plurality" means two or more.
[0045] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0046] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0047] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0048] In order to solve the above problems, the present disclosure provides an automated testing method, apparatus, device and storage medium based on an embedded Linux system gateway machine.
[0049] The following describes an automated testing method, apparatus, device, and storage medium based on an embedded Linux system gateway provided by an embodiment of the present disclosure in conjunction with the accompanying drawings.
[0050] Figure 1 It is a flowchart of an automated testing method based on an embedded Linux system gateway machine provided by an embodiment of the present disclosure.
[0051] like Figure 1 As shown, the automated testing method based on the embedded Linux system gateway machine may include:
[0052] S01, using the Bash scripting language to generate an automated test script, wherein the automated test script defines a test process, test parameters, test instructions, and result judgment logic to simulate various operations under actual working conditions, and automatically records and analyzes test results;
[0053] S02, based on the automated test script, uses a cross-platform graphical programming language to perform module tests on the functions of the gateway to be tested, and implements simultaneous testing of different test items.
[0054] In some embodiments, the above-mentioned use of Bash scripting language to generate an automated test script includes:
[0055] Based on the functions of different gateways, the status and attribute data of the gateways are obtained and divided according to the functions;
[0056] Marking the status results of the gateways according to the status and attribute data corresponding to the gateways with different functions;
[0057] Based on the status and attribute data corresponding to gateways with different functions, as well as the status results of the corresponding gateways, automated test scripts are generated using the Bash scripting language.
[0058] In some embodiments, the above-mentioned acquisition of the state and attribute data of the gateway based on the functions of different gateways and the division according to the functions include:
[0059] Divide the gateways by function into routing, firewall rules, and NAT conversion gateways;
[0060] Perform status tests on gateways of each function, including using test tools to test the basic connectivity and routing functions of the gateway, verify the implementation of firewall rules, and check the status of network services and ports;
[0061] Perform performance tests on gateways of each function, including using test tools to measure the gateway's throughput, latency, and packet loss rate, and monitoring the gateway's CPU, memory, and network resource usage under different loads;
[0062] Perform stability tests on gateways for each function, including evaluating the stability of the gateway by running tests for a long time or simulating a large number of concurrent connections, and monitoring logs and exceptions during the test process to promptly discover and locate problems.
[0063] In some embodiments, the above-mentioned marking of the status result of the gateway according to the status and attribute data corresponding to the gateways with different functions obtained includes:
[0064] Analyze the correlation between the status and attribute data corresponding to gateways with different functions and the status results of the gateways;
[0065] Based on the association relationship, the status result of the gateway is marked.
[0066] In some embodiments, the above analysis of the association between the status and attribute data corresponding to the gateways with different functions and the status results of the gateways includes:
[0067] Analyze the correlation between the status data and performance data of the gateway;
[0068] Based on the association between the state data and the performance data, determining the relationship with the stability data;
[0069] Based on the determined relationship with the stability data, an association relationship with the status result of the gateway is determined.
[0070] In some embodiments, the above analysis of the association between the state data and the performance data of the gateway includes:
[0071] Based on the basic connectivity and routing functions of the gateway, the implementation effect of the determined firewall rules, as well as the status of network services and ports, determine the correlation with the gateway's throughput, latency and packet loss rate, and the gateway's CPU, memory and network resource usage under different loads.
[0072] In some embodiments, Figure 1 The method may further include: generating a test report, wherein the test report includes a test start time, a test end time, test items, test details, and a test conclusion.
[0073] Figure 2 This is a flow chart of another automated testing method based on an embedded Linux system gateway provided by an embodiment of the present disclosure, combined with Figure 2 ,right Figure 1 The automated testing method based on the embedded Linux system gateway machine is further described in the following.
[0074] First, architecture design. The automated testing software described in the embodiment of the present disclosure is a graphical testing software, which is convenient for testers to operate. The test software is designed with automated, modular, and integrated testing methods, calling automated testing scripts and test interfaces to achieve comprehensive automated testing of industrial computers. The modules do not interfere with each other and can be operated simultaneously to improve work efficiency. After the test is completed, the test results are displayed and the test report can be printed.
[0075] Second, write test scripts. Use Bash (Bourne Again SHell) scripting language or other scripting languages suitable for embedded systems to generate automated test scripts. The scripts define the test process, test parameters, test instructions, and result judgment logic, which can simulate various operations under actual working conditions and automatically record and analyze test results.
[0076] Third, one-click driver upgrade / installation. Check whether the driver is up to date, and test whether the software calls scripts and instructions to achieve one-click driver upgrade / installation.
[0077] Fourth, modular automatic testing uses a cross-platform graphical programming language to implement simultaneous testing of different test items.
[0078] Fifth, generate a test report. The test report includes information such as the test start time, test end time, test items, test details, and test conclusions. The test report is saved in electronic document form, forming a one-page report for subsequent review and analysis.
[0079] Sixth, one-click installation / uninstallation of test software. Write installation / uninstallation scripts to achieve one-click installation / uninstallation of test software.
[0080] In a specific example, the automated testing method based on the embedded Linux system gateway machine may specifically be:
[0081] Step 1: Prepare the test medium to ensure the smooth progress of the test;
[0082] Step 2: One-click installation and deployment;
[0083] Step 3: Execute the test software and enter or select the corresponding information in the information entry interface to enter the test state;
[0084] Step 4: If the information is entered or selected correctly, the software will enter the detection state;
[0085] Step 5: If the software detection status is the latest status, enter the test of each module. If there are abnormal items in the software detection status, enter the driver installation / upgrade status, and re-enter the detection status after the installation / upgrade is completed;
[0086] Step 6: Different models of gateways have different functions. Module tests are performed according to different functions. Each module test can be performed at the same time. After the test is completed, a test report is presented;
[0087] Step 7: If there is a test abnormality, find out the cause and retest;
[0088] Step 8: After all modules are tested and all are normal, a total test report is presented and can be saved as an electronic document.
[0089] The present disclosure uses Bash scripting language to generate an automated test script, wherein the automated test script defines a test process, test parameters, test instructions, and result judgment logic to simulate various operations under actual working conditions, and automatically records and analyzes test results; then, based on the automated test script, a cross-platform graphical programming language is used to perform module tests on the functions of the gateway to be tested, and different test items are tested simultaneously, thereby achieving the following beneficial effects:
[0090] Improve testing efficiency: Automated testing methods can significantly reduce manual intervention and improve testing efficiency.
[0091] Improve test accuracy: Automated test scripts can accurately simulate various operations under actual working conditions and improve test accuracy.
[0092] Reduce testing costs: Automated testing methods can reduce the number of testers and working hours, thereby reducing testing costs.
[0093] Facilitates problem tracking and resolution: Automated testing reports record the testing process and results in detail, making it easier for developers to track and resolve problems.
[0094] In summary, the beneficial effects of the present invention can improve test efficiency, improve test accuracy, reduce test costs, facilitate problem tracking and resolution, etc.
[0095] and Figure 1 Corresponding to the automated testing method based on the embedded Linux system gateway machine in the present disclosure, the present disclosure also provides an automated testing device based on the embedded Linux system gateway machine, such as Figure 3 As shown, the device may specifically include:
[0096] A test script generation module 301 is used to generate an automated test script using the Bash scripting language, wherein the automated test script defines a test process, test parameters, test instructions, and result judgment logic to simulate various operations under actual working conditions, and automatically record and analyze test results;
[0097] The test module 302 is used to perform module tests on the functions of the gateway to be tested based on the automated test script using a cross-platform graphical programming language, thereby achieving simultaneous testing of different test items.
[0098] In some embodiments, the automated test script is generated using the Bash scripting language, including:
[0099] Based on the functions of different gateways, the status and attribute data of the gateways are obtained and divided according to the functions;
[0100] Marking the status results of the gateways according to the status and attribute data corresponding to the gateways with different functions;
[0101] Based on the status and attribute data corresponding to gateways with different functions, as well as the status results of the corresponding gateways, automated test scripts are generated using the Bash scripting language.
[0102] In some embodiments, based on the functions of different gateways, the state and attribute data of the gateways are obtained and divided according to the functions, including:
[0103] Divide the gateways by function into routing, firewall rules, and NAT conversion gateways;
[0104] Perform status tests on gateways of each function, including using test tools to test the basic connectivity and routing functions of the gateway, verify the implementation of firewall rules, and check the status of network services and ports;
[0105] Perform performance tests on gateways of each function, including using test tools to measure the gateway's throughput, latency, and packet loss rate, and monitoring the gateway's CPU, memory, and network resource usage under different loads;
[0106] Perform stability tests on gateways for each function, including evaluating the stability of the gateway by running tests for a long time or simulating a large number of concurrent connections, and monitoring logs and exceptions during the test process to promptly discover and locate problems.
[0107] In some embodiments, the status result of the gateway is marked according to the acquired status and attribute data corresponding to the gateways with different functions, including:
[0108] Analyze the correlation between the status and attribute data corresponding to gateways with different functions and the status results of the gateways;
[0109] Based on the association relationship, the status result of the gateway is marked.
[0110] In some embodiments, analyzing the association between the status and attribute data corresponding to gateways with different functions and the status results of the gateways includes:
[0111] Analyze the correlation between the status data and performance data of the gateway;
[0112] Based on the association between the state data and the performance data, determining the relationship with the stability data;
[0113] Based on the determined relationship with the stability data, an association relationship with the status result of the gateway is determined.
[0114] In some embodiments, analyzing the association between the state data and the performance data of the gateway includes:
[0115] Based on the basic connectivity and routing functions of the gateway, the implementation effect of the determined firewall rules, as well as the status of network services and ports, determine the correlation with the gateway's throughput, latency and packet loss rate, and the gateway's CPU, memory and network resource usage under different loads.
[0116] In some embodiments, Figure 3 The device in can also generate a test report, wherein the test report includes the test start time, test end time, test items, test details and test conclusions.
[0117] Combination Figure 4 As shown, the embodiment of the present disclosure also provides an automated testing device 400 based on an embedded Linux system gateway machine, including a processor 404 and a memory (memory) 401. Optionally, the system may also include a communication interface (Communication Interface) 402 and a bus 403. Among them, the processor 404, the communication interface 402, and the memory 401 can communicate with each other through the bus 403. The communication interface 402 can be used for information transmission. The processor 404 can call the logic instructions in the memory 401 to execute the automated testing method based on the embedded Linux system gateway machine of the above embodiment.
[0118] In addition, the logic instructions in the memory 401 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0119] The memory 401 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 404 executes the functional application and data processing by running the program instructions / modules stored in the memory 401, that is, the automated testing method based on the embedded Linux system gateway in the above embodiment is implemented.
[0120] The memory 401 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 401 may include a high-speed random access memory and may also include a non-volatile memory.
[0121] The embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute an automated testing method based on an embedded Linux system gateway machine.
[0122] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0123] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0124] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. As used in the description of the embodiments, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or including (comprising) refer to the existence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or these groups. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0125] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the systems, devices and units described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0126] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0127] The flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
[0128] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0129] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0130] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0132] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0133] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0134] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of this disclosure can be achieved, and this document is not limited here.
[0135] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An automated testing method based on an embedded Linux system gateway machine, characterized in that: The method comprises: Generate an automated test script using the Bash scripting language, wherein the automated test script defines a test process, test parameters, test instructions, and result judgment logic to simulate various operations under actual working conditions, and automatically record and analyze test results; Based on the automated test script, a cross-platform graphical programming language is used to perform module tests on the functions of the gateway to be tested, thereby achieving simultaneous testing of different test items.
2. The method according to claim 1, characterized in that The method of using the Bash scripting language to generate an automated test script includes: Based on the functions of different gateways, the status and attribute data of the gateways are obtained and divided according to the functions; Marking the status results of the gateways according to the status and attribute data corresponding to the gateways with different functions; Based on the status and attribute data corresponding to gateways with different functions, as well as the status results of the corresponding gateways, automated test scripts are generated using the Bash scripting language.
3. The method according to claim 2, characterized in that The state and attribute data of the gateways are obtained based on the functions of different gateways, and divided according to the functions, including: Divide the gateway into routing functions, firewall rules and NAT conversion gateway according to its functions; Perform status tests on gateways of each function, including using test tools to test the basic connectivity and routing functions of the gateway, verify the implementation of firewall rules, and check the status of network services and ports; Perform performance tests on gateways of each function, including using test tools to measure the gateway's throughput, latency, and packet loss rate, and monitoring the gateway's CPU, memory, and network resource usage under different loads; Perform stability tests on gateways for each function, including evaluating the stability of the gateway by running tests for a long time or simulating a large number of concurrent connections, and monitoring logs and exceptions during the test process to promptly discover and locate problems.
4. The method according to claim 3, characterized in that The step of marking the status result of the gateway according to the acquired status and attribute data corresponding to the gateways with different functions includes: Analyze the correlation between the status and attribute data corresponding to gateways with different functions and the status results of the gateways; Based on the association relationship, the status result of the gateway is marked.
5. The method according to claim 4, characterized in that The analysis of the association between the status and attribute data corresponding to the gateways with different functions and the status results of the gateways includes: Analyze the correlation between the status data and performance data of the gateway; Based on the association between the state data and the performance data, determining the relationship with the stability data; Based on the determined relationship with the stability data, an association relationship with the status result of the gateway is determined.
6. The method according to claim 5, characterized in that The analysis of the association between the state data and the performance data of the gateway includes: Based on the basic connectivity and routing functions of the gateway, the implementation effect of the determined firewall rules, as well as the status of network services and ports, determine the correlation with the gateway's throughput, latency and packet loss rate, and the gateway's CPU, memory and network resource usage under different loads.
7. The method according to claim 1, characterized in that The method further includes generating a test report, wherein the test report includes a test start time, a test end time, test items, test details, and a test conclusion.
8. An automated testing device based on an embedded Linux system gateway, characterized in that: The device comprises: A test script generation module is used to generate an automated test script using the Bash scripting language, wherein the automated test script defines a test process, test parameters, test instructions, and result judgment logic to simulate various operations under actual working conditions, and automatically record and analyze test results; The test module is used to perform module tests on the functions of the gateway machine to be tested based on the automated test script and use a cross-platform graphical programming language to achieve simultaneous testing of different test items.
9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; It is characterized in that the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
Citation Information
Cited By
Workflow execution method and system based on distributed architecture
CN120909800A
Workflow execution method and system based on distributed architecture
CN120909800B