Method, apparatus, device and computer readable medium for testing software
By using webSocket connection in the intranet to receive test requests and execute test software, the problem that the external network cannot access the intranet terminal for testing software is solved, and a safe and efficient testing process is achieved.
Patent Information
- Application Number
- CN202010092855.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-14
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2040-02-14
AI Technical Summary
In the prior art, the terminal of the test software is set in the intranet, and since the external network cannot access the intranet, it is difficult to test the software in the terminal through the external network.
By setting up a computer in the first network (intranet), receiving a test request using a webSocket connection, and knowing the test terminal type and test software based on the test request, sending a message to the corresponding terminal to execute the test software, and storing the test results to the database.
The function of testing software in intranet terminals through the external network is realized, ensuring the security of the intranet and completing the test tasks at the same time.
Smart Images

Figure CN113268406B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and computer-readable medium for testing software. Background Art
[0002] Intranet is Local Area Network (LAN), which refers to a computer group consisting of multiple computers connected in a certain area. LAN can realize functions such as file management, application software sharing, and hardware sharing. During use, by maintaining the security of the LAN network, it can effectively protect data security and ensure the normal and stable operation of the LAN network.
[0003] The external network is the Wide Area Network (WAN), which is a remote network that connects computers in local area networks or metropolitan area networks in different regions.
[0004] In order to protect the security of data and equipment in the intranet, the communication between the intranet server and the external network server is restricted. The intranet server is no longer set up in the intranet, and the intranet can only access the external network server in one direction, but the intranet cannot be accessed through the external network.
[0005] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: the terminal for testing the software is set in the intranet, and since the intranet cannot be accessed through the external network, it is difficult to test the software in the terminal through the external network. Summary of the invention
[0006] In view of this, embodiments of the present invention provide a method, apparatus, device and computer-readable medium for testing software, which can implement testing software in a terminal through an external network.
[0007] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for testing software is provided, comprising:
[0008] The computer in the first network receives the test request through the webSocket connection, wherein the test request is generated by the server in the second network according to the test terminal type and the test software;
[0009] In the first network, the computer learns the test terminal type and the test software based on the received test request;
[0010] In the first network, the computer sends a message to execute the test software to a terminal of the test terminal type connected to the computer, and stores the test result in a database.
[0011] The test request is generated by a server in the second network according to the test terminal type and test software in a preset data format.
[0012] The computer in the first network receives the test request through the webSocket connection, including:
[0013] The browser of the computer in the first network has a preset page, which receives the test request through a webSocket connection.
[0014] The computer in the first network, before receiving the test request through the webSocket connection, also includes:
[0015] The browser of the computer in the first network sends a request to establish a webSocket connection to the server in the second network, thereby establishing the webSocket connection.
[0016] In the first network, the computer acquires the test terminal type and the test software based on the test request, including:
[0017] In the first network, the computer queries a preset data format based on the test request to obtain the test terminal type and the test software.
[0018] In the first network, the computer sends a message to execute the test software to a terminal of the test terminal type connected to the computer, and stores the test result in a database, including:
[0019] In the first network, the computer calls a test framework and sends a message for executing the test software to the terminal of the test terminal type connected to the computer;
[0020] The computer receives the test result output by the terminal of the test terminal type connected to the computer, and stores the test result in a database.
[0021] The computer receives the test result output by the terminal of the test terminal type connected to the computer, and stores the test result in a database, including:
[0022] The computer controls the terminal of the test terminal type connected to the computer to output the test result after executing the test software;
[0023] The computer uploads the test result, the test terminal type and the test software to a database.
[0024] According to a second aspect of an embodiment of the present invention, there is provided a device for testing software, comprising:
[0025] A receiving module, used to control the computer in the first network to receive a test request through a webSocket connection, wherein the test request is generated by a server in the second network according to a test terminal type and a test software;
[0026] An acquisition module, configured to control the computer to acquire the test terminal type and the test software based on the received test request in the first network;
[0027] The control module is used to control the computer in the first network, send a message for executing the test software to a terminal of the test terminal type connected to the computer, and store the test result in a database.
[0028] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for testing software, comprising:
[0029] one or more processors;
[0030] a storage device for storing one or more programs,
[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0032] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method as described above is implemented.
[0033] One embodiment of the above invention has the following advantages or beneficial effects: a computer in the first network receives a test request through a webSocket connection, and the test request is generated by a server in the second network according to the test terminal type and the test software; in the first network, the computer learns the test terminal type and the test software based on the test request; in the first network, the computer sends a message to execute the test software to a terminal of the test terminal type connected to the computer, and stores the test result in a database. The second network connects to the terminal connected to the computer in the first network through webSocket, and the control terminal can execute the test software, thereby enabling the software to be tested in the terminal of the first network through the second network.
[0034] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0036] Figure 1 is a schematic diagram of the main flow of a method for testing software according to an embodiment of the present invention;
[0037] Figure 2 is a schematic diagram of an application scenario of an embodiment of the present invention;
[0038] Figure 3 is a schematic diagram of a flow chart of executing test software according to an embodiment of the present invention;
[0039] Figure 4 is a schematic diagram of a flow chart of outputting test results according to an embodiment of the present invention;
[0040] Figure 5 is a schematic diagram of the application of a method for testing software according to an embodiment of the present invention;
[0041] Figure 6 is a schematic diagram of the main structure of a device for testing software according to an embodiment of the present invention;
[0042] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0043] Figure 8 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0045] In the absence of network restrictions, the intranet server and the extranet server can communicate normally, the intranet server can access the extranet server normally, and the extranet server can also access the extranet server normally.
[0046] In order to restrict the external network server from accessing the internal network server, the internal network server is no longer set up in the internal network.
[0047] There are many reasons for restricting the access of external servers to internal servers. One reason is that many users or company employees do not need to access the internal network through the external network. Another reason is that even if some employees need to access the internal network through the external network, it is time-consuming and laborious to apply for external network access to the internal network.
[0048] The most important reason is to protect the security of data and equipment in the intranet. Specifically, the intranet includes multiple computers, each of which stores data. The loss of data in the intranet or illegal intrusion of computers will cause considerable losses.
[0049] However, in the process of testing software, the test software needs to be executed in the terminal. However, the terminal is in the intranet and cannot access the intranet through the external network. There is a technical problem that it is difficult to test the software in the terminal through the external network.
[0050] In order to solve the technical solution of the difficulty in testing software in the terminal through the external network, the following technical solution in the embodiment of the present invention can be adopted.
[0051] See also Figure 1 , Figure 1 Schematic diagram of the main process of the method for testing software according to an embodiment of the present invention, in which a test request is sent to a first network computer through a webSocket connection in a second network, and then the test software is executed by a terminal connected to the computer. Figure 1 As shown, the specific steps include:
[0052] S101. A computer in a first network receives a test request through a webSocket connection. The test request is generated by a server in a second network according to a test terminal type and test software.
[0053] In the embodiment of the present invention, when the first network is an intranet, the second network may be an extranet. Correspondingly, when the first network is an extranet, the second network may be an intranet. In the following embodiment of the present invention, the second network is an extranet and the first network is an intranet for exemplary description.
[0054] In the external network, the server can determine the test terminal type and test software based on the test requirements. The main consideration is that the test software is mainly used in the terminal, so the test software needs to be executed in different test terminal types.
[0055] The test terminal type includes parameters such as the software system version of the terminal and the model of the terminal. The software system version of the terminal can include an Android version and an IOS version. Specifically, different Android versions and different IOS versions can be distinguished by numbers. As an example, Android version 3.2, version 4.0, etc.
[0056] The model of the terminal may include the brand of the terminal and the hardware parameters of the terminal. As an example, the brand of the terminal is brand A, and the hardware parameters of the terminal include: memory 128G, screen size: 6 inches, CPU signal: A00.
[0057] See also Figure 2 , Figure 2It is a schematic diagram of an application scenario of an embodiment of the present invention. Figure 2 The system includes a first network and a second network. The server exists in the second network; the computer, terminal 1 and terminal 2 exist in the first network. Terminal 1 and terminal 2 are connected to the computer. As an example, terminal 1 is connected to the computer via a USB interface, and terminal 2 is connected to the computer via an HDMI interface.
[0058] It is understandable that the computer in the first network may be connected to one or more terminals, and the terminal may be a preset hardware device. As an example, the preset hardware device includes a smart phone.
[0059] Computers in the first network can normally access servers in the second network, but servers in the second network cannot normally access computers in the first network.
[0060] Then, after determining the test terminal type and the test software based on the test requirements, a test request can be generated according to the test terminal type and the test software. That is, the test request is generated by the server in the second network according to the test terminal type and the test software.
[0061] In one embodiment of the present invention, the server can generate a test request according to a preset data format based on the test terminal type and the test software. The data format is a list including the test terminal type, the test software and the test request. That is, the test request is generated by the server in the second network according to the test terminal type and the test software in a preset data format.
[0062] As an example, the test terminal type is A3.1, the test software is B2.2, and the test request is Q1.3. It can be seen that the test request can be obtained based on the test terminal type and the test software. The test terminal type and the test software can be obtained based on the test request.
[0063] In one embodiment of the present invention, the data format can be stored in a database in the external network. In this way, the database can be normally accessed in the external network and the database can also be normally accessed in the intranet.
[0064] WebSocket is a protocol for full-duplex communication over a single Transmission Control Protocol (TCP) connection. The WebSocket communication protocol was standardized by IETF in 2011 as RFC 6455, and supplemented by RFC7936. The WebSocket API was also standardized by W3C.
[0065] WebSocket makes data exchange between clients and servers much simpler, allowing the server to actively push data to the client. In the webSocket API, the browser and the server only need to complete a handshake to directly create a persistent connection between the two and perform two-way data transmission.
[0066] In the embodiment of the present invention, a webSocket server is provided in the server of the external network. As an example, a code is written based on Java webSocket technology as the webSocket server, so as to send messages to the computer in the internal network, that is, the local client, in real time.
[0067] Through the webSocket server, the browser / server mode has the real-time communication capability of client / server.
[0068] In the embodiment of the present invention, the browser sends a request to establish a webSocket connection to the server in the external network to establish a webSocket connection. That is, the browser of the computer in the internal network sends a request to establish a webSocket connection to the server in the external network. After the webSocket connection is successfully established, the computer in the internal network and the server in the external network can transmit data through the TCP connection.
[0069] Exemplarily, a webSocket connection is started on the computer in the intranet, and the browser preset page is started. After the preset page is loaded, the intranet computer establishes a websocket connection with the server in the external network. When the external network server sends a message to the intranet computer, the browser in the intranet computer receives the message sent by the external network server through the webSocket connection, and then forwards the message to the software of the intranet computer, thus solving the technical problem of communication between the intranet computer and the external network server.
[0070] In one embodiment of the present invention, the server in the external network sends a test request to the computer in the internal network through a webSocket connection. It is understandable that the server in the external network can send a test request to a preset page in the browser of the computer in the internal network through a webSocket connection. As an example, the URL address of the page is set, and the browser loads the URL address of the preset page, and then the test request sent by the external network server through the webSocket connection can be received in the preset page.
[0071] In this way, the external network server sends a test request to the internal network computer through the webSocket connection and the preset page in the browser of the internal network computer.
[0072] S102: In the first network, the computer obtains the test terminal type and the test software based on the received test request.
[0073] The computer in the first network can obtain the test request through the browser, and the purpose of obtaining the test request is to execute the test software in the terminal connected to the intranet computer. Therefore, the test request needs to be parsed to obtain the test terminal type and the test software.
[0074] In one embodiment of the present invention, the external network server generates a test request according to the test terminal type and the test software in a preset data format. Correspondingly, the internal network computer queries the preset data format based on the test request received from the browser to obtain the test terminal type and the test software.
[0075] The data format can be stored in a database in the external network. The computer in the internal network can obtain the data format from the database in the external network in advance. That is, the internal network computer stores the data format in advance. As an example, the internal network computer learns the data format through a mobile storage device, so that after receiving the test request, it can directly use the pre-stored data format to parse the test request.
[0076] Specifically, after the browser of the computer in the intranet receives the test request, the computer calls the pre-stored data format and queries the preset data format based on the test request. Since the data format is a list including the test terminal type, test software and test request, the test terminal type and test software can be known based on the test request.
[0077] As an example, the test request includes a test request 3.1. Based on the test request 3.1, the data format can be queried to learn that the test terminal type is A2.3 and the test software is B2.1.
[0078] The forwarded test request is parsed using a preset data format, and the test terminal type and test software are quickly obtained while ensuring the security of data in the intranet.
[0079] S103. In the first network, the computer sends a message to execute the test software to a terminal of the test terminal type connected to the computer, and stores the test result in a database.
[0080] The computer in the intranet is connected to one or more terminals, and one or more terminals of the test terminal type are selected according to the test terminal type obtained by parsing the test request. As an example, if the test terminal type in the test request is: A1.3, then according to the test terminal type A1.3, a terminal of the test terminal type can be selected from the terminals connected to the computer in the intranet.
[0081] In addition, the purpose of selecting a terminal is to test software. After the terminal is determined according to the test terminal type, the software that needs to be executed in the terminal can also be learned based on the test software.
[0082] Due to the different test terminal types and test software included in the test request, the test request test software can be called.
[0083] See also Figure 3 , Figure 3 1 is a flow chart of executing the test software according to an embodiment of the present invention, which specifically includes:
[0084] S301. In a first network, a computer calls a test framework and sends a message for executing test software to a terminal of a test terminal type connected to the computer.
[0085] A testing framework is a framework used for automated testing. As an example, testing frameworks include any of the following: Robotium Android Testing tool, UI Automator only for android, AppiumAndroid, and MonkeyRunner.
[0086] Robotium Android Testing tool provides a class library for testers to call and supports Java language. UI Automator only for Android can support multiple Android versions and platforms. Appium Android is a framework that can support iOS and Android automated testing and supports multiple languages: Java, C# and Ruby. MonkeyRunner supports the scripting language Python.
[0087] In an embodiment of the present invention, a computer can call one of the above-mentioned test frameworks, operate a terminal of the test terminal type connected to the computer in an intranet, and send a message to execute the test software. As an example, the application software in the computer calls the test framework, and sends a message to execute the test software to the terminal operating the test terminal type through the Android Debug Bridge (adb) tool, so that the terminal executes the test software.
[0088] S302: The computer receives a test result output by a terminal of a test terminal type connected to the computer, and stores the test result in a database.
[0089] A terminal of a test terminal type connected to a computer outputs a test result to the computer after executing the test software. As an example, the purpose of the test terminal is to test whether the various functions of the software can be executed normally. The test result may include a record of whether each function can be executed normally. The computer receives the test result output by the terminal of the test terminal type connected to the computer.
[0090] In order to output the test results to the external network, the computer can store the test results in a database. The database is located in the external network, so that the test results can be obtained from the external network at any time without accessing the internal network again.
[0091] See also Figure 4 , Figure 4 1 is a flow chart of outputting test results according to an embodiment of the present invention, which specifically includes:
[0092] S401. A computer controls a test terminal type terminal connected to the computer to execute test software and output test results.
[0093] The terminal of the test terminal type connected to the computer, after calling the test framework to execute the test software, outputs the test result of the test terminal type to the computer. It can be understood that the test result corresponds to the test terminal type and the test software.
[0094] S402, the computer uploads the test results, test terminal type and test software to the database.
[0095] The purpose of sending a test request is to obtain the test result. For different test terminal types and different test software, the test result may be different. Then, in order to further understand the relationship between the test result and the test terminal type and the test software, the computer can upload the test result, the test terminal type and the test software to the database through the external network.
[0096] As an example, a test result table is constructed with test results, test terminal type and test software, and the test result table is uploaded to the database through the external network. The database is in the external network, so that the database in the external network can be accessed normally from both the external network and the internal network. Furthermore, the test results can be called from the database from the external network.
[0097] In the above embodiment, the computer in the first network receives the test request through the webSocket connection, and the test request is generated by the server in the second network according to the test terminal type and the test software; in the first network, the computer learns the test terminal type and the test software based on the received test request; in the first network, the computer sends a message to execute the test software to the terminal of the test terminal type connected to the computer, and stores the test results in the database. The second network connects to the terminal connected to the computer in the first network through webSocket, and the control terminal can execute the test software, thereby enabling the software to be tested in the terminal of the first network through the second network.
[0098] See also Figure 5 , Figure 5 1 is a schematic diagram of a method for applying a test software according to an embodiment of the present invention, which specifically includes:
[0099] The server is located in the second network, and the database is located in the second network. The computer, terminal 1 and terminal 2 are located in the first network. As an example, terminal 1 and terminal 2 can both be smart phones.
[0100] First, the server starts the webSocket server, and the computer starts the client that has bound the webSocket. The computer starts the browser and establishes a webSocket connection between the server and the computer. The browser saves the session control (session) between the server and the computer, where the session is used for communication between the server and the computer.
[0101] Secondly, the tester can determine the test terminal type based on the actual needs of the test software, and then the server generates a test request based on the test terminal type and the test software. The tester sends the test request to the computer through the server via the webSocket connection.
[0102] The computer's browser receives the test request through the webSocket connection. The computer's browser sends and the computer parses the test request to learn the test terminal type and test software.
[0103] Again, if the terminal types of terminal 1 and terminal 2 are consistent with the test terminal type, the computer sends a message to execute the test software to terminal 1 and terminal 2, and executes the test software at terminal 1 and terminal 2. Terminal 1 and terminal 2 output the test results, and the computer stores the test results in the database.
[0104] Finally, the database stores the test results of terminal 1 and terminal 2. The tester can obtain the test results from the database through the server. Similarly, the computer can access the database at any time to obtain the test results.
[0105] See also Figure 6 , Figure 6 is a schematic diagram of the main structure of a device for testing software according to an embodiment of the present invention. The device for testing software can implement a method for testing software, such as Figure 6 As shown, the device for testing the software specifically includes:
[0106] The receiving module 601 is used to control the computer in the first network to receive the test request through the webSocket connection, where the test request is generated by the server in the second network according to the test terminal type and the test software;
[0107] The acquisition module 602 is used to acquire the test terminal type and the test software in the first network by controlling the test request received by the computer;
[0108] The control module 603 is used to control the computer to send a message for executing the test software to a terminal of the test terminal type connected to the computer in the first network, and store the test result in the database.
[0109] In one embodiment of the present invention, the test request is generated by a server in the second network according to a test terminal type and test software in a preset data format.
[0110] In one embodiment of the present invention, the receiving module 601 is specifically used to control a preset page in a browser of a computer in the first network to receive a test request through a webSocket connection.
[0111] In one embodiment of the present invention, the acquisition module 602 is further used to control the browser to send a request for establishing a webSocket connection to the server end of the server in the second network, so as to establish the webSocket connection.
[0112] In one embodiment of the present invention, the acquisition module 602 is specifically used to control the computer in the first network to query the preset data format based on the received test request to acquire the test terminal type and the test software.
[0113] In one embodiment of the present invention, the control module 603 is specifically used to control the computer to call the test framework in the first network and send a message to execute the test software to a terminal of the test terminal type connected to the computer;
[0114] The computer is controlled to receive the test results output by a terminal of a test terminal type connected to the computer, and the test results are stored in a database.
[0115] In one embodiment of the present invention, the control module 603 is specifically used to control the computer, and to control a terminal of a test terminal type connected to the computer to execute the test software and output the test result;
[0116] The control computer uploads the test results, test terminal type and test software to the database.
[0117] Figure 7 An exemplary system architecture 700 is shown to which the method for testing software or the apparatus for testing software according to the embodiments of the present invention may be applied.
[0118] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0119] Users can use terminal devices 701, 702, and 703 to interact with server 705 through network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0120] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0121] The server 705 may be a server that provides various services, such as a backend management server (only for example) that supports shopping websites browsed by users using the terminal devices 701, 702, and 703. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only for example) to the terminal device.
[0122] It should be noted that the method for testing software provided in the embodiment of the present invention is generally executed by the server 705 , and accordingly, the device for testing software is generally set in the server 705 .
[0123] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0124] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0125] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0126] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0127] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.
[0128] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as follows: a processor includes a sending unit, an acquisition unit, a determination unit, and a first processing unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the sending unit may also be described as a "unit that sends a request for obtaining an image to a connected server."
[0131] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0132] The computer in the first network receives the test request through the webSocket connection, wherein the test request is generated by the server in the second network according to the test terminal type and the test software;
[0133] In the first network, the computer learns the test terminal type and the test software based on the received test request;
[0134] In the first network, the computer sends a message to execute the test software to a terminal of the test terminal type connected to the computer, and stores the test result in a database.
[0135] According to the technical solution of the embodiment of the present invention, the computer in the first network receives the test request through the webSocket connection, and the test request is generated by the server in the second network according to the test terminal type and the test software; in the first network, the computer learns the test terminal type and the test software based on the test request; in the first network, the computer sends a message to execute the test software to the terminal of the test terminal type connected to the computer, and stores the test results in the database. The second network is connected to the terminal connected to the computer in the first network through webSocket, and the control terminal can execute the test software, thereby being able to test the software in the terminal of the first network through the second network.
[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for testing software, characterized in that: include: The computer in the first network receives the test request through the webSocket connection, wherein the test request is generated by the server in the second network according to the test terminal type and the test software; In the first network, the computer learns the test terminal type and the test software based on the received test request; In the first network, the computer sends a message to execute the test software to a terminal of the test terminal type connected to the computer, and stores the test result in a database; The computer in the first network, before receiving the test request through the webSocket connection, also includes: The browser of the computer in the first network sends a request for establishing a webSocket connection to the server in the second network, thereby establishing the webSocket connection; The computer in the first network receives the test request through the webSocket connection, including: The URL address of the page is set, the browser loads the URL address of the preset page, the preset page is in the browser of the computer in the first network, and the test request is received through the webSocket connection.
2. The method for testing software according to claim 1, characterized in that: The test request is generated by a server in the second network according to the test terminal type and test software in a preset data format.
3. The method for testing software according to claim 1, characterized in that: In the first network, the computer learns the test terminal type and the test software based on the received test request, including: In the first network, the computer queries a preset data format based on the received test request to obtain the test terminal type and the test software.
4. The method for testing software according to claim 1, characterized in that: In the first network, the computer sends a message to execute the test software to a terminal of the test terminal type connected to the computer, and stores the test result in a database, including: In the first network, the computer calls a test framework and sends a message for executing the test software to the terminal of the test terminal type connected to the computer; The computer receives the test result output by the terminal of the test terminal type connected to the computer, and stores the test result in a database.
5. The method for testing software according to claim 4, characterized in that: The computer receives the test result output by the terminal of the test terminal type connected to the computer, and stores the test result in a database, including: The computer controls the terminal of the test terminal type connected to the computer to execute the test software and output the test result; The computer uploads the test result, the test terminal type and the test software to a database.
6. A device for testing software, characterized in that: include: The receiving module is used to control the computer in the first network to receive a test request through a webSocket connection, wherein the test request is generated by a server in the second network according to a test terminal type and a test software; and the browser of the computer in the first network sends a request to establish a webSocket connection to a server in the second network to establish the webSocket connection; and the URL address of the page is set, the browser loads the URL address of a preset page, and the preset page in the browser of the computer in the first network receives the test request through a webSocket connection; An acquisition module, configured to control the computer to acquire the test terminal type and the test software based on the received test request in the first network; The control module is used to control the computer in the first network, send a message for executing the test software to a terminal of the test terminal type connected to the computer, and store the test result in a database.
7. An electronic device for testing software, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Systems and methods for configuration verification across secured network boundaries
CN109906586A