CN115408286A - Software automation test method and device suitable for multiple operating systems - Google Patents

Software automation test method and device suitable for multiple operating systems Download PDF

Info

Publication number
CN115408286A
CN115408286A CN202211063411.6A CN202211063411A CN115408286A CN 115408286 A CN115408286 A CN 115408286A CN 202211063411 A CN202211063411 A CN 202211063411A CN 115408286 A CN115408286 A CN 115408286A
Authority
CN
China
Prior art keywords
test
target
client
program client
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211063411.6A
Other languages
Chinese (zh)
Inventor
张正迁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
VeriSilicon Microelectronics Shanghai Co Ltd
VeriSilicon Microelectronics Chengdu Co Ltd
Original Assignee
VeriSilicon Microelectronics Shanghai Co Ltd
VeriSilicon Microelectronics Chengdu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by VeriSilicon Microelectronics Shanghai Co Ltd, VeriSilicon Microelectronics Chengdu Co Ltd filed Critical VeriSilicon Microelectronics Shanghai Co Ltd
Priority to CN202211063411.6A priority Critical patent/CN115408286A/en
Publication of CN115408286A publication Critical patent/CN115408286A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a software automatic testing method and device suitable for multiple operating systems, the method is applied to a server, the server is connected with a testing program client and multiple tested program clients, the multiple tested program clients run with multiple operating systems, and the method comprises the following steps: receiving a test request sent by a test program client; sending the test action in the test request to a target tested program client consistent with the target operating system; receiving test information sent by a target tested program client; receiving a test information acquisition request sent by a test program client; and sending the test information sent by the target tested program client consistent with the target operating system to the test program client, so that the test program client determines the test result of the target tested program client according to the test information, and the test is performed on the application software of different operating systems in the same test environment.

Description

Software automation test method and device suitable for multiple operating systems
Technical Field
The application relates to the field of software testing, in particular to a software automatic testing method and device suitable for a multi-operating system.
Background
Currently, with the development of intelligent terminals and application software, there may exist APK (application package of a mobile operating system) application on an Android device, APP (application package of an iOS operating system) application on an iOS device, and application on a Linux or Windows operating system for applications with the same function. When testing application software under various different operating systems, corresponding test programs need to be developed respectively for the characteristics of the different operating systems. For example, for an APK application on an Android device, a Java (a computer programming language) language is required to develop a set of test programs suitable for the Android APK; for APP application on an iPhone/iPad device, a set of test programs suitable for an iOS operating system needs to be developed by using Objective-C (C-extended object-oriented programming language) language; for an application program on a Linux or Windows operating system, a Python (a computer programming language) or Java language is required to develop a set of test programs.
Therefore, when testing application software under different operating systems, the characteristics of various operating systems need to be known, corresponding application test programs are developed respectively, the development cost, the debugging cost and the maintenance cost are high, and the developed test programs also have no portability.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for automatically testing software suitable for multiple operating systems, so as to implement that when testing application software under different operating systems, the application software is not limited by the operating system of the application software to be tested, and the application software of different operating systems can be tested in the same testing environment.
In a first aspect, the present invention provides a software automation testing method applicable to multiple operating systems, which is applied to a server, where the server is connected to a test program client and multiple tested program clients, where the multiple tested program clients run multiple operating systems, and the method includes: receiving a test request sent by the test program client, wherein the test request comprises a target operating system and a test action; sending the test action in the test request to a target program client consistent with the target operating system so as to enable the target program client to be tested to test according to the test action; receiving test information sent by the target tested program client, wherein the test information is determined after the target tested program client tests according to the test action; receiving a test information acquisition request sent by the test program client, wherein the test information acquisition request comprises the target operating system; and sending the test information sent by the target tested program client consistent with the target operating system to the test program client so that the test program client determines the test result of the target tested program client according to the test information.
In the above scheme, when the software program of a certain operating system or the software programs of a plurality of different operating systems need to be tested simultaneously, the test program client only needs to send a test request including a target operating system and a test action to the server, and the server sends the test action to the target tested program client corresponding to the target operating system, so that the application software of different operating systems can be tested in the same test environment, and the development cost, the debugging cost and the maintenance cost are reduced.
In an alternative embodiment, the server is a Restful (a design style and development mode of a network application) server, and the test program client and the tested program client are Restful clients respectively; or the server is an HTTP (hyper text transfer protocol) server, the test program client and the tested program client are HTTP clients respectively, and the HTTP clients communicate with the HTTP server by applying an HTTP protocol.
In the scheme, the deployment of one Restful server can support the test of a plurality of tested programs running with different operating systems, and the reusability is high.
In an optional embodiment, the test request is a Post request (data is transmitted to the server), the Post request includes a requester body (generally used to store parameters and parameter data of the Post), the requester body includes a first preset field and a second preset field, and the sending the test action in the test request to the target dut client consistent with the target operating system includes: determining a target operating system according to the first preset field; determining a test action according to the second preset field; and sending the test action to a target tested program client consistent with the target operating system.
In an optional embodiment, the test action includes a scan action, and the target program under test client performs scanning according to the scan action and records scanned device information as the test information.
In an optional embodiment, the test program client determines whether the device information includes a desired device; if yes, determining that the test result of the target tested program client side is a test pass; and if not, determining that the test result of the target tested program client is test failure.
In an optional embodiment, the sending the test action in the test request to the target program under test client consistent with the target operating system includes: receiving heartbeat information sent by a target tested program client consistent with the target operating system; and when the target operating system in the test request is determined to be consistent with the operating system of the target program under test client, sending the test action in the test request to the target program under test client as the return information of the heartbeat information.
In an alternative embodiment, the heartbeat information includes a port number and an IP address of the server.
In a second aspect, the present invention provides an automatic software testing apparatus suitable for multiple operating systems, which is applied to a server, where the server is connected to a test program client and multiple tested program clients, where the multiple tested program clients run multiple operating systems, and the apparatus includes: the receiving module is used for receiving a test request sent by the test program client, wherein the test request comprises a target operating system and a test action; the sending module is used for sending the testing action in the testing request to a target tested program client consistent with the target operating system so as to enable the target tested program client to carry out testing according to the testing action; the receiving module is further configured to receive test information sent by the target tested program client, where the test information is determined after the target tested program client tests according to the test action; receiving a test information acquisition request sent by the test program client, wherein the test information acquisition request comprises the target operating system; the sending module is further configured to send test information sent by a target tested program client consistent with the target operating system to the test program client, so that the test program client determines a test result of the target tested program client according to the test information.
In a third aspect, the present invention provides an electronic device comprising: a processor, a memory; the memory stores program instructions executable by the processor, the processor being capable of invoking the program instructions to perform the method of any of the preceding embodiments.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the method according to any of the preceding embodiments.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of a software automation testing method applied to a multi-operating system according to an embodiment of the present application;
fig. 2 is a schematic diagram of a test scenario for multiple operating systems according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a method for automatically testing software of multiple operating systems according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a software automation test apparatus suitable for multiple operating systems according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Icon: 400-software automation test device suitable for multiple operating systems; 410-a receiving module; 420-a sending module; 500-an electronic device; 510-a processor; 520-memory.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The embodiment of the application provides a software automatic testing method and device suitable for multiple operating systems, which are used for realizing that when application software under different operating systems is tested, the application software is not limited by the operating systems of the tested application software, and the application software of different operating systems can be tested in the same testing environment.
Referring to fig. 1, fig. 1 is a flowchart of a software automation testing method for multiple operating systems according to an embodiment of the present application, where the software automation testing method for multiple operating systems is applied to a server, the server is connected to a testing program client and multiple tested program clients, the multiple tested program clients run with multiple operating systems, and the software automation testing method for multiple operating systems may include the following contents:
step 101: and receiving a test request sent by a test program client.
Step 102: and sending the test action in the test request to a target program client consistent with the target operating system so that the target program client carries out testing according to the test action.
Step 103: and receiving test information sent by a target tested program client.
Step 104: and receiving a test information acquisition request sent by a test program client.
Step 105: and sending the test information sent by the target tested program client consistent with the target operating system to the test program client so that the test program client determines the test result of the target tested program client according to the test information.
In the embodiment of the application, the test program client sends a test request to the server, and the test request comprises a target operating system and a test action. And after receiving the test request sent by the test program client, the server analyzes the test request and sends the test action in the test request to the target tested program client which is consistent with the target operating system. And after the target tested program client receives the test action sent by the server, calling a program code corresponding to the test action according to the test action to execute the test action, and determining test information. The test information is then sent to the server. The test program client sends a test information acquisition request to the server, wherein the test information acquisition request comprises a target operating system, and the target operating system represents that the test program client wants to acquire test information corresponding to a target tested program client corresponding to the target operating system. After receiving the test information acquisition request, the server sends the test information sent by the target program client consistent with the target operating system to the test program client according to the target operating system in the test acquisition request, and the test program client determines the test result of the target program client according to the test information.
By the method, when the software program of one operating system or the software programs of a plurality of different operating systems need to be tested simultaneously, the test program client only needs to send the test request comprising the target operating system and the test action to the server, and the server sends the test action to the target tested program client corresponding to the target operating system, so that the software program of the corresponding operating system is tested.
In some embodiments, the server may be an HTTP server, the test program client and the tested program client are HTTP clients, and the HTTP server is accessible by the test program client and the tested program client through an HTTP protocol.
In some embodiments, the server may be a Restful server, and the test program client and the program under test client are Restful clients that communicate with the Restful server over a wireless network.
For example, please refer to fig. 2, fig. 2 is a schematic diagram illustrating a test scenario for various operating systems according to an embodiment of the present disclosure. As shown in fig. 2, three tested program clients exist in the test scenario, and a tested program of one tested program client is an APK and runs on an Android device; the tested program of the tested program client is an APP and runs on the iOS device; the tested program of the tested program client is a Linux or Windows application program and runs on Linux or Windows equipment. The test program client runs on Linux or Windows equipment. It is understood that in the REST (Representational State Transfer) framework, the Restful server and each Restful client perform information interaction through the REST request and the REST response.
It can be understood that in the test scenario shown in fig. 2, three tested program clients respectively run different operating systems, that is, the operating system of one tested program client is an Android operating system, the operating system of one tested program client is an iOS operating system, and the operating system of one tested program client is a Linux operating system.
In other embodiments, there may be multiple tested program clients running the same operating system. For example, in a certain test scenario, there are 4 tested program clients, the operating systems of the tested program client 1 and the tested program client 2 are both Android operating systems, the operating system of the tested program client 3 is an iOS operating system, and the operating system of the tested program client 4 is a Linux operating system; in another test scenario, there are 4 tested program clients, the operating systems of the tested program client 1 and the tested program client 2 are both Android operating systems, and the operating systems of the tested program client 3 and the tested program client 4 are both iOS operating systems. The application does not specifically limit the operating system run by the multiple tested program clients.
The above steps are described below by taking the test scenario corresponding to fig. 2 as an example.
Step 101: and receiving a test request sent by a test program client.
In the embodiment of the application, the test program client sends the test request to the server. Wherein the test request includes a target operating system and a test action.
And the target operating system in the test request is used for representing the operating system corresponding to the software program to be tested in the current software test. It can be understood that, different operating systems run on a plurality of clients of the program under test connected to the server, and the operating systems may be: an Android operating system, an iOS operating system, a Linux or a Windows operating system, etc. For example, if the operating system corresponding to the software program to be tested is the Android operating system in the current software test, the target operating system is the Android operating system.
The test action is used for characterizing the test action which needs to be executed by the software to be tested in the current software test. For example, the test action may be a bluetooth scan action (i.e., testing whether the bluetooth scan function of the software program is normal), a WI-FI (wireless network) scan action (i.e., testing whether the bluetooth scan function of the software program is normal), and the like.
When the test is started, the test program client sends a test request to the Restful server, and the Restful server receives the test request sent by the test program client.
In some embodiments, the test request is a Post request. The Post request includes a URL (uniform resource locator) and a requester body. The URL is an IP Address (Internet Protocol Address, an interconnection Protocol Address between networks) and a port number of the Restful server. For example, assuming that the IP address of Restful server is 10.10.46.170 and the port number is 5000, the URL of the Post request is: http:// 10.10.46.170.
The requesting body comprises a first preset field and a second preset field. The first preset field is used for representing a target operating system, and the second preset field is used for representing a test action. For example, there are prescribed: the Android operating system is represented by the character "0", the iOS operating system by the character "1", the Linux or Windows operating system by the character "2", the test action is a bluetooth scan test, represented by the string: "device _ scan" means. Assuming that the target operating system of the software test is an Android operating system, and the test action is a bluetooth scan test, the request body of the Post request is as follows: { "connection": 0), "action": device _ scan "}.
Step 102: and sending the test action in the test request to a target program client consistent with the target operating system so that the target program client carries out testing according to the test action.
In the embodiment of the application, after receiving the test request sent by the test program client, the Restful server analyzes the test request and determines the target operating system and the test action. And determining the software to be tested corresponding to the software test request (namely determining the target tested program client corresponding to the software test from a plurality of tested program clients) according to the target operating system in the test request, wherein the operating system of the target tested program client is consistent with the target operating system in the test request. And then sending the analyzed test action to the target tested program client so that the target tested program client tests according to the test action.
As an optional implementation, sending the test action in the test request to the target program under test client consistent with the target operating system includes: determining a target operating system according to the first preset field; determining a test action according to the second preset field; and sending the test action to a target tested program client consistent with the target operating system.
In the embodiment of the application, the test program client sends the test request to the Restful server as a Post request, the Post request includes a request body, and the request body includes a first preset field and a second preset field.
For example, the requester body of the received Post request is: the method comprises the following steps of { "connection": 0), "action": device _ scan "}, wherein the first preset field is: "connection": 0"; the second preset field is: action 'device _ scan'. Determining that the target operating system is an Android operating system according to the first preset field, and determining that the test action is as follows according to the second preset field: "device _ scan" (i.e., perform bluetooth scan test). And the Restful server takes the tested program client connected with the Restful server and running the Android operating system as a target tested program client, and sends the test action corresponding to the second preset field to the target tested program client.
In addition, in some implementation methods, sending a test action in a test request to a target program under test client consistent with a target operating system includes: receiving heartbeat information sent by a target tested program client consistent with a target operating system; and when the target operating system in the test request is consistent with the operating system of the target tested program client, sending the test action in the test request as the return information of the heartbeat information to the target tested program client.
In the embodiment of the application, each tested program client sends heartbeat information to the Restful server at preset time intervals. When the Restful server does not receive the test request sent by the test program client, sending an empty message to the tested program client as a return message of the heartbeat information; and when the Restful server receives the test request sent by the test program client and determines that the target operating system in the test request is consistent with the operating system of the target tested program client, sending the test action in the test request as the return information of the heartbeat information to the target tested program client.
Further, the tested program client sends heartbeat information including the port number and the IP address of the Restful server. In some implementations, the heartbeat information can be a Get request. For example, assuming that the Restful server has an IP address of 10.10.46.170 and a port number of 5000, the Get request is: http:// 10.10.46.170.
Step 103: and receiving test information sent by a target tested program client.
In the embodiment of the application, after the target program-under-test client receives the test action sent by the Restful server, the target program-under-test client calls the program code corresponding to the test action according to the test action to execute the test action, and determines the test information.
In some embodiments, when the test action is a scan action, the target program client under test calls its own program code related to the scan to scan the peripheral device after receiving the scan action, and records the scanned device information as the test information. The test information is then sent to the Restful server, which saves the test information.
Specifically, the target tested program client may send the test information to the Restful server through a Post request. The requesting body of the Post request is also provided with a first preset field for representing the operating system of the target tested program client, and the specific form is the same as the first preset field in the requesting body of the Post request in the test request.
Step 104: and receiving a test information acquisition request sent by a test program client.
Step 105: and sending the test information sent by the target tested program client consistent with the target operating system to the test program client so that the test program client determines the test result of the target tested program client according to the test information.
In the embodiment of the application, the test information acquisition request includes a target operating system, after receiving the test information acquisition request sent by the test program client, the Restful server sends the test information sent by the target tested program client corresponding to the target operating system to the test program client according to the target operating system in the test information acquisition request, and the test client determines the test result of the target tested program client according to the test information.
In some embodiments, when the test action is a scan action, the test result sent by the target program under test client is device information scanned by the target program under test client, and the test client determines whether the device information includes the expected device; if yes, determining that the test result of the target tested program client is that the test is passed; if not, determining that the test result of the target tested program client is test failure.
It can be understood that expected device information is preset in the test client, the test client checks the device information scanned by the target tested program client, if the device information scanned by the target tested program client contains the expected device information, it indicates that the scanning function of the target tested program client is normal, and the test result of the target tested program client is that the test is passed; if the device information scanned by the target program client does not contain the expected device information, the scanning function of the target program client is abnormal, and the test result of the target program client is that the test passes the test and fails.
For ease of understanding, please refer to fig. 3, where fig. 3 is a complete flowchart of a software automation testing method applicable to multiple operating systems according to an embodiment of the present application. As shown in fig. 3, it is assumed that the target operating system of the software Test is an Android operating system, the Test action is a bluetooth scan Test, and the Test program client (corresponding to Test Application in fig. 3) sends a Test request (corresponding to POST/api/Test "connection": "0" and "device _ scan" in fig. 3) to the Restful Server (corresponding to Restful Server in fig. 3).
After the receiving end of the Restful server receives the test request, the receiving end of the Restful server sends the test action "device _ scan" in the test request to the target program under test client as the return information of the heartbeat information (corresponding to GET/api/heartbeat in fig. 3) sent by the target program under test client (corresponding to APK in fig. 3).
The target program under test client performs a scan test action according to the test action "device _ scan", sends the scanned device information as test information (corresponding to POST/api/device _ scan in fig. 3) to the Restful server, and the Restful server stores the test information.
The testing program client sends a testing information obtaining request (corresponding to GET/api/"connection/0/devices in fig. 3) to the Restful server, the Restful server sends the stored testing information to the testing program client, the testing program client checks whether the device information scanned by the target tested program client contains the preset expected device information, and if the device information contains the expected device information, the testing program client indicates that the testing is passed; otherwise, it indicates that the test failed (corresponding to check scan list in fig. 3).
In addition, when the above embodiments are introduced, a software test performed on one target program under test client is taken as an example for the description. The software automation test method applicable to multiple operating systems provided by the embodiment of the application can test multiple target program clients simultaneously, the process of testing each target program client is the same as that of each embodiment, and details are not repeated here for the sake of brevity of the description.
Based on the same inventive concept, please refer to fig. 4, and fig. 4 is a block diagram of a software automation test apparatus for multiple operating systems according to an embodiment of the present application, where the software automation test apparatus 400 for multiple operating systems may include:
a receiving module 410, configured to receive a test request sent by the test program client, where the test request includes a target operating system and a test action;
a sending module 420, configured to send a test action in the test request to a target program under test client consistent with the target operating system, so that the target program under test client performs a test according to the test action;
the receiving module 410 is further configured to receive test information sent by the target tested program client, where the test information is determined after the target tested program client tests according to the test action; receiving a test information acquisition request sent by the test program client, wherein the test information acquisition request comprises the target operating system;
the sending module 420 is further configured to send test information sent by a target program under test client consistent with the target operating system to the test program client, so that the test program client determines a test result of the target program under test client according to the test information.
In an alternative embodiment, the server is a Restful server, and the test program client and the tested program client are Restful clients.
In an optional embodiment, the test request is a Post request, the Post request includes a request body, the request body includes a first preset field and a second preset field, and the sending module is specifically configured to determine a target operating system according to the first preset field; determining a test action according to the second preset field; and sending the test action to a target tested program client consistent with the target operating system.
In an optional embodiment, the test action includes a scan action, and the target program under test client performs scanning according to the scan action and records scanned device information as the test information.
In an optional embodiment, the test program client determines whether the device information includes a desired device; if yes, determining that the test result of the target tested program client is a test pass; and if not, determining that the test result of the target tested program client is test failure.
In an optional embodiment, the sending module 420 is specifically configured to receive heartbeat information sent by a target tested program client consistent with the target operating system; and when the target operating system in the test request is determined to be consistent with the operating system of the target program under test client, sending the test action in the test request to the target program under test client as the return information of the heartbeat information.
In an alternative embodiment, the heartbeat information includes a port number and an IP address of the server.
The software automatic testing apparatus 400 for multiple operating systems corresponds to the aforementioned software automatic testing method for multiple operating systems, and each functional module corresponds to each step of the aforementioned software automatic testing method for multiple operating systems, so that the implementation of each functional module refers to the implementation of the software automatic testing method for multiple operating systems in the foregoing embodiments, and will not be described again here.
Referring to fig. 5, an embodiment of the present application further provides an electronic device 500, which can be used as an execution main body of the software automation test method applicable to multiple operating systems, including: processor 510, memory 520.
The memory 520 stores instructions executable by the processor 510, and the instructions are executed by the processor 510, so that the processor 510 can execute the software automation test method suitable for the multiple operating systems in the foregoing embodiments.
The processor 510 and the memory 520 may be connected by a communication bus. Or by some communication module, for example: a wireless communication module, a bluetooth communication module, a Wi-Fi communication module, a 2G (second generation mobile communication technology), a 3G (third generation mobile communication technology), a 4G (fourth generation mobile communication technology), a 5G (fifth generation mobile communication technology), and the like.
Processor 510 may be an integrated circuit chip having signal processing capabilities. Processor 510 may be a general-purpose Processor including a CPU (Central Processing Unit), an NP (Network Processor), etc.; but may also be a digital signal processor, an application specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components. Which may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 520 may include, but is not limited to, a RAM (Random Access Memory), a ROM (Read Only Memory), a PROM (Programmable Read-Only Memory), an EPROM (Erasable Programmable Read-Only Memory), an EEPROM (electrically Erasable Programmable Read-Only Memory), and the like.
It is understood that the electronic device 500 may further include more general modules required by itself, and the embodiments of the present application are not described one by one.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computer, the steps of the software automation testing method applied to the multiple operating systems in the foregoing embodiments are executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical function may be implemented in other ways, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some communication interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A software automation test method suitable for multiple operating systems is applied to a server, the server is connected with a test program client and a plurality of tested program clients, the plurality of tested program clients run with a plurality of operating systems, and the method comprises the following steps:
receiving a test request sent by the test program client, wherein the test request comprises a target operating system and a test action;
sending the test action in the test request to a target program client consistent with the target operating system so that the target program client carries out testing according to the test action;
receiving test information sent by the target tested program client, wherein the test information is determined after the target tested program client tests according to the test action;
receiving a test information acquisition request sent by the test program client, wherein the test information acquisition request comprises the target operating system;
and sending the test information sent by the target tested program client consistent with the target operating system to the test program client so that the test program client determines the test result of the target tested program client according to the test information.
2. The method of claim 1, wherein the server is a Restful server, and the test program client and the tested program client are Restful clients, respectively; or the server is an HTTP server, the test program client and the tested program client are HTTP clients respectively, and the HTTP clients communicate with the HTTP server by applying an HTTP protocol.
3. The method of claim 2, wherein the test request is a Post request, the Post request includes a requester body, the requester body includes a first preset field and a second preset field, and the sending the test action in the test request to the target dut client consistent with the target operating system includes:
determining a target operating system according to the first preset field;
determining a test action according to the second preset field;
and sending the test action to a target program under test client consistent with the target operating system.
4. The method according to claim 3, wherein the test action comprises a scanning action, and the target dut client performs scanning according to the scanning action and records scanned device information as the test information.
5. The method of claim 4, wherein the test program client determines whether the device information includes a desired device;
if yes, determining that the test result of the target tested program client side is a test pass;
and if not, determining that the test result of the target tested program client is test failure.
6. The method according to any one of claims 1-5, wherein sending the test action in the test request to a target program under test client consistent with the target operating system comprises:
receiving heartbeat information sent by a target tested program client consistent with the target operating system;
and when the target operating system in the test request is determined to be consistent with the operating system of the target program client under test, sending the test action in the test request to the target program client under test as the return information of the heartbeat information.
7. The method of claim 6, wherein the heartbeat information includes a port number and an IP address of the server.
8. An automatic software testing device suitable for multiple operating systems, which is applied to a server, wherein the server is connected with a testing program client and a plurality of tested program clients, and the plurality of tested program clients run with multiple operating systems, the device comprises:
the receiving module is used for receiving a test request sent by the test program client, wherein the test request comprises a target operating system and a test action;
the sending module is used for sending the test action in the test request to a target program client consistent with the target operating system so as to enable the target program client to be tested to carry out testing according to the test action;
the receiving module is further configured to receive test information sent by the target tested program client, where the test information is determined after the target tested program client tests according to the test action; receiving a test information acquisition request sent by the test program client, wherein the test information acquisition request comprises the target operating system;
the sending module is further configured to send test information sent by a target tested program client consistent with the target operating system to the test program client, so that the test program client determines a test result of the target tested program client according to the test information.
9. An electronic device, comprising: a processor, a memory; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any one of claims 1-7.
10. A computer-readable storage medium having computer program instructions stored thereon which, when read and executed by a computer, perform the method of any one of claims 1-7.
CN202211063411.6A 2022-08-31 2022-08-31 Software automation test method and device suitable for multiple operating systems Pending CN115408286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211063411.6A CN115408286A (en) 2022-08-31 2022-08-31 Software automation test method and device suitable for multiple operating systems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211063411.6A CN115408286A (en) 2022-08-31 2022-08-31 Software automation test method and device suitable for multiple operating systems

Publications (1)

Publication Number Publication Date
CN115408286A true CN115408286A (en) 2022-11-29

Family

ID=84163405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211063411.6A Pending CN115408286A (en) 2022-08-31 2022-08-31 Software automation test method and device suitable for multiple operating systems

Country Status (1)

Country Link
CN (1) CN115408286A (en)

Similar Documents

Publication Publication Date Title
CN107133180B (en) Dynamic page testing method, testing device and storage medium
US10698797B2 (en) Mobile application program testing method, server, terminal, and storage medium
CN111159614B (en) Webpage resource acquisition method and device
CN108228444B (en) Test method and device
CN104821954A (en) Cross-platform remote procedure call method
US10404568B2 (en) Agent manager for distributed transaction monitoring system
CN109683997B (en) Method for accessing application program interface through sandbox, sandbox and sandbox equipment
CN107644075B (en) Method and device for collecting page information
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN115208951A (en) Request processing method and device, electronic equipment and computer readable storage medium
CN112699034B (en) Virtual login user construction method, device, equipment and storage medium
CN112565277B (en) Data transmission method, system and electronic equipment
CN111597020A (en) Application Programming Interface (API) debugging method and debugging terminal
CN110825622A (en) Software testing method, device, equipment and computer readable medium
CN109756948B (en) Method and device for connecting wireless access point through application in user equipment
CN115408286A (en) Software automation test method and device suitable for multiple operating systems
CN113296911B (en) Cluster calling method, cluster calling device, electronic equipment and readable storage medium
CN112395194B (en) Method and device for accessing test platform
CN114915565A (en) Method and system for debugging network
CN113535544A (en) Running method of sub-application to be debugged, computer equipment and device
CN113704079A (en) Interface testing method and device based on Protobuf
CN106713453B (en) Application information monitoring method and device
CN113760693A (en) Method and apparatus for local debugging of microservice systems
CN111694587A (en) Server PNOR firmware upgrading method, device, equipment and storage medium
CN111124907A (en) Mobile phone game testing method and device and server

Legal Events

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