Software automatic testing method and device, storage medium and electronic equipment
By packaging the software to be tested, test cases, test tasks and test engines into the target operating system and flashing to the target hard, the problem of inconvenience of software testing in the existing technology is solved, and flexible and convenient software testing is achieved.
Patent Information
- Application Number
- CN202411696253.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-18
AI Technical Summary
In the prior art, software testing is inconvenient, and users need to configure and software testing of test tasks through the network connection of the computer room or through data cables.
Provides a software automated testing method, which determines the software to be tested, test cases, test tasks and test engines when receiving test instructions, packages them into the target operating system, and flashes the target operating system into the target hardware through flashing operations, so that the hardware automatically runs the operating system and conducts tests after startup.
It realizes software testing without networking to the computer room or connecting the computer room equipment through a data cable, improving the flexibility and convenience of testing.
Smart Images

Figure CN119645844A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing, and in particular to a software automated testing method, device, storage medium and electronic device. Background Art
[0002] In the prior art, a user can test the software by logging into a cloud platform and configuring a test task on the cloud platform.
[0003] However, the cloud platform is generally composed of multiple devices, occupying the area of one or more computer rooms. Users need to connect to the computer room through the network, or connect to the computer room through a data cable in the computer room, and then deploy test tasks and test the software. This method has the problem of inconvenient testing. Summary of the invention
[0004] The present application provides a software automated testing method, device, storage medium and electronic device to solve the technical problem of inconvenient software testing in the prior art.
[0005] In a first aspect, the present application provides a software automation testing method, comprising: upon receiving a test instruction, determining the software to be tested, test cases, test tasks and test engines indicated by the test instructions; packaging the software to be tested, the test cases, the test tasks and the test engine into a target operating system; flashing the target operating system to the target hardware through a flashing operation, so that after the target hardware is started and runs the target operating system, the test engine is started to use the test cases to test the software to be tested according to the test tasks.
[0006] In the second aspect, the present application provides a software automation testing device, including: a determination module, used to determine the software to be tested, test cases, test tasks and test engines indicated by the test instructions when receiving the test instructions; a packaging module, used to package the software to be tested, the test cases, the test tasks and the test engines into a target operating system; a processing module, used to flash the target operating system to the target hardware through a flashing operation, so that after the target hardware is started and runs the target operating system, the test engine is started to use the test cases to test the software to be tested according to the test tasks.
[0007] As an optional example, the target hardware is portable target hardware.
[0008] As an optional example, the target operating system automatically runs after the target hardware is started, and the running of the target operating system is suspended after the target hardware is shut down.
[0009] As an optional example, the packaging module includes: a packaging unit, which is used to place the test platform used to generate the test task into the target operating system, and determine it as the front-end service of the target operating system, wherein the target operating system provides back-end services; and place the test engine, the test case, and the software to be tested into the storage device of the target operating system, so that when the target operating system is running, the data of the test engine, the test case, and the software to be tested are read from the storage device. .
[0010] As an optional example, the above-mentioned device also includes: a network redirection module, which is used to determine whether the above-mentioned target operating system is connected to the network during operation before flashing the above-mentioned target operating system to the target hardware through a flashing operation; in the case that the above-mentioned target operating system needs to be connected to the network during operation, redirecting the network connection request of the above-mentioned target operating system to the above-mentioned target hardware, determining the network services that the above-mentioned target operating system depends on; and redirecting the above-mentioned network services to the local.
[0011] As an optional example, the above-mentioned device also includes: a testing module, which is used to obtain new test cases and new test tasks for testing the first software to be tested when a new test instruction is received after the above-mentioned target operating system is flashed to the target hardware through a flashing operation, and when the first software to be tested by the new test instruction is located in the above-mentioned target operating system, and use the new test cases and new test tasks to test the above-mentioned first software to be tested.
[0012] As an optional example, the above-mentioned test module includes: a test unit, which is used to download the above-mentioned new test cases and new test tasks from the above-mentioned network service when the above-mentioned target hardware is connected to the network service; when the above-mentioned target hardware is not connected to the network service, obtain the above-mentioned new test cases and new test tasks through the interface of the above-mentioned target hardware.
[0013] In a third aspect, the present application provides an electronic device comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the memory stores a computer program, and the processor is configured to implement any one of the above-mentioned software automation testing methods when executing the computer program.
[0014] In a fourth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute any of the above-mentioned software automation testing methods of the present application.
[0015] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages over the prior art: the scheme provided by the embodiment of the present application, when receiving a test instruction, determines the software to be tested, test case, test task and test engine indicated by the above-mentioned test instruction; packages the above-mentioned software to be tested, the above-mentioned test case, the above-mentioned test task and test engine into the target operating system; flashes the above-mentioned target operating system to the target hardware through a flashing operation, so that after the above-mentioned target hardware is started and runs the above-mentioned target operating system, the above-mentioned test engine is started to use the above-mentioned test case to test the above-mentioned software to be tested according to the above-mentioned test task, so that according to the needs of the test, the target operating system can be flashed to the target hardware, and the software to be tested can be tested by starting the target hardware, so that there is no need to be connected to the Internet to the computer room or connected to the equipment in the computer room through a data cable to test the software, thereby improving the flexibility of software testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0019] Figure 1 A flowchart of a software automation testing method provided in an embodiment of the present application;
[0020] Figure 2 A test schematic diagram of a software automation testing method provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of network redirection of a software automation testing method provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of an online or offline test of a software automation test method provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of the structure of a software automation testing device provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0026] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0027] In order to solve the technical problem of inconvenient software testing in the prior art, the present application provides a software automation testing method, which can achieve the effect of improving the flexibility of software testing.
[0028] Figure 1 A flowchart of a software automation testing method provided in an embodiment of the present application.
[0029] like Figure 1 As shown, the above-mentioned software automation testing method includes:
[0030] S102, upon receiving a test instruction, determining the software to be tested, the test case, the test task, and the test engine indicated by the test instruction;
[0031] S104, packaging the software to be tested, the test case, the test task and S106, the test engine into the target operating system;
[0032] S106, flashing the target operating system to the target hardware through a flashing operation, so that after the target hardware is started and runs the target operating system, the test engine is started to use the test case to test the software to be tested according to the test task.
[0033] Optionally, in this embodiment, the above-mentioned software automation testing method can be applied in the process of testing system software and application software. The system software can be an operating system, a control system, an operating system, etc., and the application software can be software deployed and installed on the operating system, the control system or the operating system.
[0034] In this embodiment, users can configure test instructions on the cloud platform, and use test instructions to determine the software to be tested, the test cases to be used, and the test tasks to be performed. If the test engine has different versions, the engine version can also be selected. In addition, the number of tests, whether to perform scheduled tests, etc. can also be configured. By configuring test instructions, users can perform one-click flashing and automated testing without user intervention.
[0035] In this embodiment, the test engine may be a test tool or a test framework, which writes its functions through language codes and supports multiple programming languages, such as Python, Java, C#, and Ruby, etc. Different test tools or test frameworks may be used to test different products. The test engine may be an automated test engine, which may provide a front-end interface to interact with the user, so that the user may configure the test through the front-end interface.
[0036] If you want to implement one-click flashing and automated testing, you need to package the software to be tested in the test instructions configured by the user, the above test cases, the above test tasks, and the test engine into the target operating system, and flash the target operating system to the target hardware. Flashing is equivalent to installing the target operating system for the target hardware. After the target hardware is powered on, it will automatically start the target operating system to perform automated testing.
[0037] The target hardware in this embodiment can be portable target hardware, which can be powered on and started only by powering on, and can be moved without any other disassembly or assembly except for plugging in and out of the power cord. For example, it can be a mobile phone, a tablet computer, a laptop computer, a learning machine, a smart pen, etc. After flashing the target operating system, this type of smart hardware can be started as long as there is a power supply (charging or battery), and after starting, the above-mentioned test engine can be started to use the above-mentioned test cases to test the above-mentioned software to be tested according to the above-mentioned test tasks. If the user wants to move, he can directly shut down the machine, unplug the power supply (if there is a built-in battery, there is no need to charge and shut down the machine) and carry it to move, and then connect the power supply and turn it on when he reaches the target location.
[0038] The target hardware in this embodiment can automatically run the target operating system after the target hardware is started, and the target operating system is suspended after the target hardware is shut down. In other words, since the target operating system is flashed to the target hardware, the target operating system is a resident system on the target hardware and can be started when the target hardware is turned on. If the target hardware is shut down, the test process is suspended, and after the target hardware is restarted, the test process can be restarted or continued without user intervention.
[0039] In one example, flashing the target operating system onto the target hardware can cover the previous system and use the target operating system as the new system of the intelligent hardware. In another example, the target operating system can be flashed onto an unoccupied storage medium of the intelligent hardware so that it runs in parallel with the original operating system. When the target hardware starts, you can choose whether to perform automated testing or open the original system for operation.
[0040] The solution provided in the embodiment of the present application, when receiving a test instruction, determines the software to be tested, test case, test task and test engine indicated by the above test instruction; packages the above software to be tested, the above test case, the above test task and the test engine into a target operating system; flashes the above target operating system to the target hardware through a flashing operation, so that after the above target hardware is started and runs the above target operating system, the above test engine is started to use the above test case to test the above software to be tested according to the above test task, so that according to the needs of the test, the target operating system can be flashed to the target hardware, and the software to be tested can be tested by starting the target hardware, so that there is no need to be connected to the computer room or connected to the equipment in the computer room through a data cable to test the software, thereby improving the flexibility of software testing.
[0041] As an optional example, the above-mentioned packaging of the above-mentioned software to be tested, the above-mentioned test cases, the above-mentioned test tasks and the test engine into a target operating system includes: placing the test platform for generating the above-mentioned test tasks into the above-mentioned target operating system, and determining it as the front-end service of the above-mentioned target operating system, wherein the above-mentioned target operating system provides back-end services; placing the above-mentioned test engine, the above-mentioned test cases and the above-mentioned software to be tested into the storage device of the above-mentioned target operating system, so that when the above-mentioned target operating system is running, the data of the above-mentioned test engine, the above-mentioned test cases and the above-mentioned software to be tested are read from the above-mentioned storage device.
[0042] In this embodiment, when packaging the software to be tested, the above-mentioned test cases, the above-mentioned test tasks and the test engine into the target operating system, since the target operating system is to be flashed to the target hardware, the foreground service and the background service of the target operating system can be determined, so that after the target hardware is started, the target operating system can not only automatically test, but also provide foreground services and background services. The foreground service can interact with the user, so that the user can interfere with the test process, or create a new test task. The background service can provide support for automated testing. In this embodiment, the target operating system has operating logic and can provide background services for the target hardware. The front-end service can be provided by the test platform used to configure the test task.
[0043] For example, in this embodiment, for the target operating system, the target operating system can be flashed into the target hardware through the flashing operation. As a hardware, the target hardware can run the target operating system at startup after the target operating system is flashed. For example, taking a host as an example, the host as a hardware can be flashed into the target operating system, and when the host is powered on and started, the target operating system will be automatically run. The software to be tested, the above-mentioned test cases, the above-mentioned test tasks, and the test engine can be regarded as software installed on the target operating system. Some software can be automatically started after the target operating system is running, and some software can be non-automatically started. In one example, the software to be tested is passively started, and the startup command lies in the test case, test task, and test engine. The test case, test task, and test engine are regarded as one or more automatically started software, which are started after the target operating system is running. After the test case, test task, and test engine are started, a startup command is generated to control the startup of the software to be tested, and then according to the test task and test case, the test engine is used to generate a control command to control the execution of the software to be tested, and the results are recorded, thereby performing automated testing. Since the target operating system provides a front-end service, namely the above-mentioned test platform for generating test tasks, the user can configure or adjust the test tasks through the test platform before, during and after the test.
[0044] As an optional example, before flashing the target operating system to the target hardware through a flashing operation, it also includes: determining whether the target operating system is connected to the network during operation; if the target operating system needs to be connected to the network during operation, redirecting the target operating system's request to connect to the network to the target hardware, determining the network services that the target operating system depends on; and redirecting the network services to the local area.
[0045] In this embodiment, in order to avoid the situation where the target operating system cannot be tested due to network disconnection after the target operating system is flashed to the target hardware, the network services that the target operating system depends on are redirected to the local target hardware in this embodiment. To redirect the network services of the target operating system to the local target hardware, it is necessary to check whether the target operating system needs to connect to the network. For example, the execution logic in the target operating system is to automatically connect to the network after running. If there is no network, the target operating system cannot connect to the network after startup, and normal automated testing may not be performed at this time. Therefore, when it is determined that the target operating system needs to be connected to the network, the network access request of the target operating system to connect to the network is redirected to the target hardware. Then, after the target operating system is powered on, it sends a network access request, which will be received by the target hardware. The target hardware can respond, allowing the target operating system to perform automated testing normally, so that the target operating system will not be unable to perform automated testing when it cannot connect to the network.
[0046] If the network service is not redirected to the target hardware, after the target operating system is flashed to the target hardware, the target hardware can connect to the network when the target hardware is started.
[0047] The difference between connecting to the network and not connecting to the network is that some services in the automated testing process need to be connected to the network. For example, if the translation function is connected to the network for translation, the content of the translation library on the network will be used. If the network is not connected, the translation function can also be tested, but the translation function uses the content of the local translation library. In other words, whether the network is used or not, automated testing can be performed.
[0048] As an optional example, after the above-mentioned target operating system is flashed to the target hardware through a flashing operation, it also includes: after receiving a new test instruction, when the first software to be tested by the new test instruction is located in the above-mentioned target operating system, obtaining a new test case and a new test task for testing the first software to be tested, and using the new test case and the new test task to test the above-mentioned first software to be tested.
[0049] In this embodiment, after the user flashes the target operating system to the target hardware, the user can also interact with the target operating system. Since the target operating system will run when the target hardware is started after being flashed to the target hardware, the user can interact with the target operating system during the operation of the target operating system, such as creating a new test task, adjusting an existing running test task, etc. If the user creates a new test task, the new test task can be placed after the current test task, and the new test task can be executed after the current test task is automatically executed.
[0050] As an optional example, the above-mentioned acquisition of new test cases and new test tasks for testing the first software to be tested includes: when the above-mentioned target hardware is connected to a network service, downloading the above-mentioned new test cases and new test tasks from the above-mentioned network service; when the above-mentioned target hardware is not connected to a network service, acquiring the above-mentioned new test cases and new test tasks through the interface of the above-mentioned target hardware.
[0051] In this embodiment, if after the target hardware is started, the user generates a new test task by interacting with the target operating system on the target hardware, then it is necessary to check whether the test case of the new test task (referred to as the first test case in this embodiment) and the first software to be tested are both on the target hardware.
[0052] If the first software to be tested and the test case to be tested by the new test task are included in the target operating system, then when the target operating system is flashed to the target hardware, the first software to be tested and the first test case are already on the target hardware. When the user generates a new test task through interaction with the target operating system, the first test case on the target hardware can be directly used to test the first software to be tested. If there is no first software to be tested in the target operating system when the target operating system is flashed, the first software to be tested cannot be tested. If there is the first software to be tested but no first test case, the first test case can be downloaded through the network, or an external device can be connected through the hardware interface on the target hardware, and the first test case can be imported from the external device to test the first software to be tested. The hardware interface can be a universal serial bus (USB) or a hub interface.
[0053] Figure 2 It is a schematic diagram of the test system of this embodiment. Users can configure the test through the configuration module. The test configuration can be but not limited to configuring the minimum resource unit (Stock Keeping Unit, SKU), operating system (Operating System, OS), application (Application, APP), scheduled test, number of tests, etc. to be tested. Flexible configuration is possible through the configuration module. In other words, users can configure the software to be tested, the operating system to be used, whether to perform scheduled tests, the number of tests, etc. in the configuration module. For the software to be tested, you can select the use case library, use case set, and use case to be tested, and download them to the cloud real machine platform. Then, you can generate test tasks according to the configuration, or edit the test tasks after copying, delete unnecessary test tasks, etc.
[0054] After completing the configuration, you can package the test engine, which includes the device management engine, task scheduling engine, and test execution engine. You can also package the content configured by the user through the configuration module, and the test tasks and test cases into the target operating system or into the target operating system. If you want to implement offline testing, you need to redirect network-dependent services to the local computer. The redirection diagram is shown in the figure below. Figure 3 Flash the packaged target operating system to the target hardware.
[0055] The hardware device in this embodiment can be equipped with a power supply module, a USB, a HUB interface, etc. The target operating system can be flashed to the host of the hardware device, and the hardware device can be carried by the user for movement, and can be tested without a network. For example, after the user configures the data in the company and flashes it into the hardware device, he can leave work, and the hardware device can be tested offline as long as it has power, and the user can check the results when he goes to work the next day. In addition, if the hardware device has a built-in battery, the user can take the hardware device home and let the hardware device test itself. Figure 4 This is a schematic diagram of the online and offline design of this embodiment. Users can use the cloud real machine platform to test online through the cloud real machine. If they want to test offline, they can flash the target operating system into the test device, and then they can carry the test device and conduct offline testing.
[0056] This embodiment integrates and packages the operation logic of the entire cloud real machine after the test, as well as test cases, test configurations, test engines, etc. into a set of operating systems, and flashes them into the test device (test box), thus realizing an offline test device. This solves the problems of the cloud real machine platform's dependence on the network, task management's dependence on testers, and the difficulty of overall replication and migration, improves the efficiency of testing, and becomes a powerful supplement to the cloud real machine platform's online solution in daily testing, product confidentiality, new product public testing, factory production, user problem troubleshooting, and more portable uninterrupted testing.
[0057] Figure 5 This is a schematic diagram of the structure of a software automation testing device provided in an embodiment of the present application. Figure 5 As shown, the above-mentioned software automation testing device includes:
[0058] The determination module 502 is used to determine the software to be tested, the test case, the test task and the test engine indicated by the test instruction when receiving the test instruction;
[0059] The packaging module 504 is used to package the software to be tested, the test cases, the test tasks and the test engine into the target operating system;
[0060] The processing module 506 is used to flash the target operating system to the target hardware through a flashing operation, so that after the target hardware is started and runs the target operating system, the test engine is started to test the software to be tested according to the test task using the test case.
[0061] Optionally, in this embodiment, the above-mentioned software automation testing method can be applied in the process of testing system software and application software. The system software can be an operating system, a control system, an operating system, etc., and the application software can be software deployed and installed on the operating system, the control system or the operating system.
[0062] In this embodiment, users can configure test instructions on the cloud platform, and use test instructions to determine the software to be tested, the test cases to be used, and the test tasks to be performed. If the test engine has different versions, the engine version can also be selected. In addition, the number of tests, whether to perform scheduled tests, etc. can also be configured. By configuring test instructions, users can perform one-click flashing and automated testing without user intervention.
[0063] If you want to implement one-click flashing and automated testing, you need to package the software to be tested in the test instructions configured by the user, the above test cases, the above test tasks, and the test engine as the target operating system, and flash the target operating system to the target hardware. Flashing is equivalent to installing the target operating system for the target hardware. After the target hardware is powered on, it will automatically start the target operating system to perform automated testing.
[0064] The target hardware in this embodiment can be portable target hardware, which can be powered on and started only by powering on, and can be moved without any other disassembly or assembly except for plugging in and out of the power cord. For example, it can be a mobile phone, a tablet computer, a laptop computer, a learning machine, a smart pen, etc. After flashing the target operating system, this type of smart hardware can be started as long as there is a power supply (charging or battery), and after starting, the above-mentioned test engine can be started to use the above-mentioned test cases to test the above-mentioned software to be tested according to the above-mentioned test tasks. If the user wants to move, he can directly shut down the machine, unplug the power supply (if there is a built-in battery, there is no need to charge and shut down the machine) and carry it to move, and then connect the power supply and turn it on when he reaches the target location.
[0065] The target hardware in this embodiment can automatically run the target operating system after the target hardware is started, and the target operating system is suspended after the target hardware is shut down. In other words, since the target operating system is flashed to the target hardware, the target operating system is a resident system on the target hardware and can be started when the target hardware is turned on. If the target hardware is shut down, the test process is suspended, and after the target hardware is restarted, the test process can be restarted or continued without user intervention.
[0066] In one example, flashing the target operating system onto the target hardware can cover the previous system and use the target operating system as the new system of the intelligent hardware. In another example, the target operating system can be flashed onto an unoccupied storage medium of the intelligent hardware so that it runs in parallel with the original operating system. When the target hardware starts, you can choose whether to perform automated testing or open the original system for operation.
[0067] The solution provided in the embodiment of the present application, when receiving a test instruction, determines the software to be tested, test case, test task and test engine indicated by the above test instruction; packages the above software to be tested, the above test case, the above test task and the test engine into a target operating system; flashes the above target operating system to the target hardware through a flashing operation, so that after the above target hardware is started and runs the above target operating system, the above test engine is started to use the above test case to test the above software to be tested according to the above test task, so that according to the needs of the test, the target operating system can be flashed to the target hardware, and the software to be tested can be tested by starting the target hardware, so that there is no need to be connected to the computer room or connected to the equipment in the computer room through a data cable to test the software, thereby improving the flexibility of software testing.
[0068] For other examples of this embodiment, please refer to the above examples and will not be described in detail here.
[0069] like Figure 6 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0070] Memory 113, used for storing computer programs;
[0071] In one embodiment of the present application, the processor 111 is used to implement the software automation testing method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 113.
[0072] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the software automation testing method provided by any of the aforementioned method embodiments is implemented.
[0073] The device embodiments described above are merely illustrative, wherein the units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0074] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0075] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0076] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A software automated testing method, characterized in that: include: Upon receiving a test instruction, determining the software to be tested, the test case, the test task, and the test engine indicated by the test instruction; Packaging the software to be tested, the test cases, the test tasks and the test engine into a target operating system; The target operating system is flashed to the target hardware through a flashing operation, so that after the target hardware is started and runs the target operating system, the test engine is started to use the test case to test the software to be tested according to the test task.
2. The method according to claim 1, characterized in that The target hardware is portable target hardware.
3. The method according to claim 1, characterized in that The target operating system is automatically run after the target hardware is started, and the target operating system is suspended after the target hardware is shut down.
4. The method according to any one of claims 1 to 3, characterized in that: The step of packaging the software to be tested, the test case, the test task and the test engine into the target operating system includes: Placing a test platform for generating the test task into the target operating system and determining it as a front-end service of the target operating system, wherein the target operating system provides a back-end service; The test engine, the test case and the software to be tested are placed in the storage device of the target operating system, so that when the target operating system is running, the data of the test engine, the test case and the software to be tested are read from the storage device.
5. The method according to any one of claims 1 to 3, characterized in that: Before flashing the target operating system to the target hardware through a flashing operation, the method further includes: Determining whether the target operating system is connected to a network when running; In the case that the target operating system needs to connect to the network during operation, the network connection request of the target operating system is redirected to the target hardware.
6. The method according to any one of claims 1 to 3, characterized in that: After the target operating system is flashed to the target hardware through a flashing operation, the method further includes: After receiving a new test instruction, when the first software to be tested by the new test instruction is located in the target operating system, a new test case and a new test task for testing the first software to be tested are obtained, and the first software to be tested is tested using the new test case and the new test task.
7. The method according to claim 6, characterized in that The obtaining of new test cases and new test tasks for testing the first software to be tested includes: When the target hardware is connected to a network service, downloading the new test case and the new test task from the network service; When the target hardware is not connected to a network service, the new test case and the new test task are obtained through an interface of the target hardware.
8. A software automated testing device, characterized in that: include: A determination module, configured to determine the software to be tested, the test case, the test task and the test engine indicated by the test instruction upon receiving the test instruction; A packaging module, used to package the software to be tested, the test cases, the test tasks and the test engine into a target operating system; The processing module is used to flash the target operating system to the target hardware through a flashing operation, so that after the target hardware is started and runs the target operating system, the test engine is started to use the test case to test the software to be tested according to the test task.
9. An electronic device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein the memory stores a computer program, and the processor implements the software automation testing method described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the software automation testing method described in any one of claims 1 to 7 of the present application.