[go: up one dir, main page]

CN113268406B - Method, apparatus, device and computer readable medium for testing software - Google Patents

Method, apparatus, device and computer readable medium for testing software Download PDF

Info

Publication number
CN113268406B
CN113268406B CN202010092855.7A CN202010092855A CN113268406B CN 113268406 B CN113268406 B CN 113268406B CN 202010092855 A CN202010092855 A CN 202010092855A CN 113268406 B CN113268406 B CN 113268406B
Authority
CN
China
Prior art keywords
test
computer
network
software
terminal
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.)
Active
Application number
CN202010092855.7A
Other languages
Chinese (zh)
Other versions
CN113268406A (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010092855.7A priority Critical patent/CN113268406B/en
Publication of CN113268406A publication Critical patent/CN113268406A/en
Application granted granted Critical
Publication of CN113268406B publication Critical patent/CN113268406B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

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

Abstract

本发明公开了测试软件的方法、装置、设备和计算机可读介质,涉及计算机技术领域。该方法的一具体实施方式包括:第一网络中计算机,通过webSocket连接,接收测试请求,所述测试请求是第二网络中的服务器依据测试终端类型和测试软件生成的;在第一网络中,所述计算机基于接收的所述测试请求,获知所述测试终端类型和所述测试软件;在第一网络中,所述计算机向与所述计算机连接的所述测试终端类型的终端,发送执行所述测试软件的消息,并将测试结果存储至数据库。该实施方式能够实现通过外网在内网的终端中测试软件。

The present invention discloses a method, device, equipment and computer-readable medium for testing software, and relates to the field of computer technology. A specific implementation of the method includes: a computer in a first network receives a test request through a webSocket connection, and the test request is generated by a server in a second network according to a test terminal type and 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 results in a database. This implementation can realize testing software in a terminal in an intranet through an extranet.

Description

Method, apparatus, device and computer readable medium for testing software
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer readable medium for testing software.
Background
The intranet is a local area network (Local Area Network, LAN), which refers to a computer group formed by interconnecting a plurality of computers in a certain area. The local area network can realize the functions of file management, application software sharing, hardware sharing and the like, and in the using process, the data safety can be effectively protected by maintaining the safety of the local area network, so that the local area network can normally and stably run.
Corresponding to the intranet is the extranet. The external network is a wide area network (Wide Area Network, WAN) and is a remote network for connecting computers in local area networks or metropolitan area networks of different areas.
In order to protect the safety of data and equipment in an intranet, the communication between an intranet server and an extranet server is limited. The intranet server is not arranged in the intranet, and only the intranet can access the extranet server in one direction, but the intranet cannot be accessed through the extranet.
In the process of realizing the invention, the inventor finds that at least the following problems exist in the prior art that the terminal of the test software is arranged in the intranet, and the test software in the terminal through the extranet is difficult to realize because the intranet cannot be accessed through the extranet.
Disclosure of Invention
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.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of testing software, including:
The method comprises the steps that a computer in a first network is connected through webSocket and receives a test request, wherein the test request is generated by a server in a second network according to a test terminal type and test software;
In a first network, the computer learns the test terminal type and the test software based on the received test request;
In a first network, the computer sends a message for executing the test software to a terminal of the test terminal type connected with the computer, and stores a test result in a database.
The test request is generated by a server in the second network according to the type of the test terminal and the test software and a preset data format.
The computer in the first network receives a test request through webSocket connection, and includes:
and presetting a page in a browser of a computer in the first network, and receiving a test request through webSocket connection.
The computer in the first network is connected through webSocket, and before receiving the test request, the computer further comprises:
And the browser of the computer in the first network sends a request for establishing webSocket connection to the server side of the server in the second network, and establishes webSocket connection.
The computer, in the first network, based on the test request, knows the test terminal type and the test software, including:
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.
In the first network, the computer sends a message for executing the test software to the terminal of the test terminal type connected with the computer, and stores the test result in a database, including:
In a 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 with the computer;
And the computer receives the test result output by the terminal of the test terminal type connected with the computer and stores the test result into a database.
The computer receives the test result output by the terminal of the test terminal type connected with the computer, and stores the test result into a database, and the computer comprises:
The computer controls the terminal of the test terminal type connected with the computer, and outputs the test result after executing the test software;
And uploading the test result, the test terminal type and the test software to a database by the computer.
According to a second aspect of an embodiment of the present invention, there is provided an apparatus for testing software, including:
the receiving module is used for controlling the computers in the first network, receiving a test request through webSocket connection, wherein the test request is generated by a server in the second network according to the type of the test terminal and the test software;
The acquisition module is used for controlling the computer to acquire the type of the test terminal and the test software based on the received test request in the first network;
And the control module is used for controlling the computer in the first network, sending a message for executing the test software to the terminal of the test terminal type connected with the computer, and storing the test result into a database.
According to a third aspect of an embodiment of the present invention, there is provided an electronic device for testing software, including:
One or more processors;
storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements a method as described above.
The embodiment of the invention has the advantages that a computer in a first network is connected through webSocket and receives a test request, the test request is generated by a server in a second network according to the type of a test terminal and test software, the computer in the first network knows the type of the test terminal and the test software based on the test request, and the computer sends a message for executing the test software to a terminal of the type of the test terminal connected with the computer in the first network and stores a test result in a database. And the second network is connected with a terminal connected with the computer in the first network through webSocket, and the control terminal can execute test software so as to realize the test of the software in the terminal of the first network through the second network.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method of testing software according to an embodiment of the invention;
fig. 2 is a schematic diagram of an application scenario according to an embodiment of the present invention;
FIG. 3 is a flow chart of executing test software according to an embodiment of the invention;
FIG. 4 is a flow chart of outputting test results according to an embodiment of the present invention;
FIG. 5 is a method application schematic of testing software according to an embodiment of the invention;
FIG. 6 is a schematic diagram of the main structure of an apparatus for testing software according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
Fig. 8 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Under the condition that no network is limited, the intranet server and the extranet server are in normal communication, the intranet server can normally access the extranet server, and the extranet server can also normally access the extranet server.
In order to limit the external network server to access the internal network server, the internal network server is not arranged in the internal network.
There are many reasons for restricting access to intranet servers by extranet servers, one reason being that many users or corporate employees do not have the need to access the intranet through the extranet. Another reason is that even if some employees have a need to access the intranet through the extranet, accessing the intranet through the extranet is laborious and laborious.
The most important reason is that the security of the data and equipment in the intranet is protected. Specifically, the intranet includes a plurality of computers, and each computer stores data. The loss of data in the intranet or illegal intrusion of the computer can bring about no small loss.
But in the course of the test software, the test software needs to be executed in the terminal. The terminal is in an intranet, the intranet cannot be accessed through an extranet, and the technical problem that software is difficult to test in the terminal through the extranet exists.
In order to solve the technical scheme that software is difficult to test in a terminal through an external network, the following technical scheme in the embodiment of the invention can be adopted.
Referring to fig. 1, fig. 1 is a schematic diagram of a main flow of a method for testing software according to an embodiment of the present invention, and a test request is sent to a first network computer through webSocket connection in a second network, and then the test software is executed by a terminal connected with the computer. As shown in fig. 1, the method specifically comprises the following steps:
S101, connecting computers in a first network through webSocket, and receiving a test request generated by a server in a second network according to the type of a test terminal and test software.
In the embodiment of the present invention, in the case where the first network is an intranet, the second network may be an extranet. Accordingly, in the case where the first network is an extranet, the second network may be an intranet. In the embodiments of the present invention described below, the second network is an external network, and the first network is an internal network.
In the external network, the server may determine the test terminal type and test software based on the test requirements. It is mainly considered that the test software is mainly applied in the terminal, and therefore the test software needs to be executed in different test terminal types.
The type of the test terminal comprises parameters such as a software system version of the terminal, a model of the terminal and the like. The software system version of the terminal may include an android version and an IOS version. In particular, different android versions, as well as different IOS versions, may be distinguished digitally. As one example, android version 3.2, version 4.0, and so on.
The model of the terminal may include the brand of the terminal and hardware parameters of the terminal. As one 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.
Referring to fig. 2, fig. 2 is a schematic diagram of an application scenario according to an embodiment of the present invention. A first network and a second network are included in fig. 2. The server is present in the second network and the computer, terminal 1 and terminal 2 are present in the first network. The terminals 1 and 2 are connected to a computer. As an example, the terminal 1 is connected to a computer through a USB interface, and the terminal 2 is connected to a computer through an HDMI interface.
It will be appreciated that the computer in the first network may be connected to one or more terminals, which may be preset hardware devices, including smart phones, as an example.
The computer in the first network may normally access the server in the second network, but the server in the second network may not normally access the computer in the first network.
Then, after determining the test terminal type and the test software based on the test requirement, the test request may 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.
In one embodiment of the present invention, the server may generate the test request according to a preset data format according to the test terminal type and the test software. The data format is a list comprising test terminal types, test software and test requests. That is, the test request is generated by the server in the second network according to the type of the test terminal and the test software and the preset data format.
As one example, test terminal type A3.1, test software B2.2, test request Q1.3. It is known that the test request can be known based on the test terminal type and the test software. The test terminal type and the test software can be known based on the test request.
In one embodiment of the invention, the data format may be stored in a database in the external network. Thus, the database can be normally accessed in the external network, and the database can be normally accessed in the internal network.
WebSocket is a protocol for full duplex communication over a single transmission control protocol (Transmission Control Pro tocol, TCP) connection. webSocket the communication protocol was set by IETF as standard RFC 6455 in 2011 and is complemented by RFC 7936. WebSo cket API is also defined as W3C.
WebSocket makes the data exchange between the client and the server simpler, and allows the server to actively push data to the client. In webSocket API, the browser and the server only need to complete one handshake, and a persistent connection can be directly created between the two, and bidirectional data transmission can be performed.
In the embodiment of the invention, a server of webSocket is arranged in a server of the external network. As one example, code is written as a server for webSocket based on Java webSocket technology to send messages in real time to computers in the intranet, i.e., local clients.
Through webSocket's service end, the browser/server mode is enabled to have the real-time communication capability of the client/server.
In the embodiment of the invention, the browser sends a request for establishing webSocket connection to the server in the external network, and establishes webSocket connection. That is, the browser of the computer in the intranet sends a request for establishing webSocket connection to the server in the extranet, and after webSocket connection is established successfully, the computer in the intranet and the server in the extranet can transmit data through the TCP connection.
Illustratively, a webSocket connection is initiated on the computer in the intranet and a browser preset page is initiated. After loading the preset page, the intranet computer establishes websocket connection with a server in the extranet. When the external network server sends the information to the internal network computer, the browser in the internal network computer receives the information sent by the external network server through webSocket connection, the information is forwarded to the software of the internal network computer, and thus the technical problem of communication between the internal network computer and the external network server is solved.
In one embodiment of the present invention, the server in the external network is connected through webSocket to send the test request to the computer in the internal network. It can be understood that the server in the external network can be connected through webSocket to send the test request to the preset page in the browser of the internal network computer. As an example, the URL address of the page is set, and the browser loads the URL address of the preset page, so that the external network server can receive the test request sent by the webSocket connection in the preset page.
In this way, the external network server is connected through webSocket, and sends a test request to the internal network computer through a preset page in the browser of the internal network computer.
S102, in the first network, the computer acquires the type of the test terminal and the test software based on the received test request.
The computer in the first network can obtain a test request through a browser, and the purpose of the test request is to execute test software in a terminal connected with the intranet computer. Then, the test request needs to be parsed to learn the test terminal type and the test software.
In one embodiment of the invention, at the external network server, a test request is generated according to a preset data format according to the type of the test terminal and the test software. Correspondingly, in the intranet computer, based on the test request received from the browser, the preset data format is queried, and the type of the test terminal and the test software are known.
The data format may be stored in a database in the external network. In the computers in the intranet, the data format may be obtained in advance from the database in the extranet. That is, the intranet computer stores the data format in advance. As an example, the intranet computer knows the data format through the mobile storage device, so that after receiving the test request, the intranet computer can directly adopt the pre-stored data format to analyze the test request.
Specifically, after a browser of a computer in an intranet receives a test request, the computer calls a pre-stored data format, and queries the pre-stored data format based on the test request. Since the data format is a list including the test terminal type, the test software, and the test request, the test terminal type and the test software can be known based on the test request.
As an example, the test request includes a test request 3.1, and the data format may be queried based on the test request 3.1 to obtain that the test terminal type is a2.3 and the test software B2.1.
And analyzing the forwarded test request by adopting a preset data format, so that the type of the test terminal and the test software can be rapidly known under the condition of ensuring the safety of the data in the intranet.
S103, in the first network, the computer sends a message for executing test software to a terminal of a test terminal type connected with the computer, and the test result is stored in a database.
The computer in the intranet is connected with one or more terminals, and one or more terminals of the test terminal type are selected according to the test terminal type obtained by analyzing the test request. As an example, if the test terminal type a1.3 is the test terminal type a1.3 in the test request, the terminal of the test terminal type may be selected from terminals connected to the computer in the intranet.
In addition, the terminal is selected for testing software, and after the terminal is determined according to the type of the tested terminal, the software to be executed in the terminal can be obtained based on the testing software.
Since the types of the test terminals included in the test request are different and the test software is different, the test request test software can be called.
Referring to fig. 3, fig. 3 is a schematic flow chart of executing test software according to an embodiment of the present invention, which specifically includes:
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 with the computer.
The test framework is a framework for use in automated testing. As one example, the test framework includes any one of Robotium Android Testing tool, UI Automator only for android, appium Android, and MonkeyRunner.
Robotium Android Testing tool a class library is provided for the tester to call, supporting the Java language. UI Automator only for android can support multiple android versions and platforms. Appium Android is a framework capable of supporting ios and android automated testing, supporting multiple languages Java, C# and Ruby. MonkeyRunner supports the scripting language python.
In the embodiment of the invention, the computer can call the test framework, operate the terminal of the test terminal type connected with the computer in the intranet, and send the message for executing the test software. As an example, application software in a computer invokes a test framework, sends a message to a terminal operating a test terminal type to execute the test software through an android debug bridge (Android Debug Bridge, adb) tool, and the terminal executes the test software.
S302, the computer receives a terminal output test result of a test terminal type connected with the computer and stores the test result into the database.
And the terminal is connected with the computer and used for testing the terminal type, and after the test software is executed, the test result is output to the computer. As an example, the purpose of the test terminal is to test whether the various functions of the software can be performed normally. The test results may include a record of whether or not each function can be normally performed. The computer receives a terminal output test result of a test terminal type connected with the computer.
To output the test results to the external network, the computer may store the test results to a database. The database is located in the external network, so that test results can be conveniently obtained from the external network at any time, and the internal network does not need to be accessed again.
Referring to fig. 4, fig. 4 is a schematic flow chart of outputting a test result according to an embodiment of the present invention, which specifically includes:
S401, the computer controls a terminal of a test terminal type connected with the computer, and after executing test software, the computer outputs a test result.
And after the test framework is called to execute the test software, the test result of the test terminal type is output to the computer. It will be appreciated that the test results correspond to the test terminal type and the test software.
S402, uploading the test result, the test terminal type and the test software to a database by the computer.
The test request is sent for the purpose of knowing the test result, which may also be different for different test terminal types and different test software. Then, in order to further learn the relationship between the test result and the test terminal type and the test software, the computer may upload the test result, the test terminal type and the test software to the database through the extranet.
As one example, a test result table is constructed with test results, test terminal types, and test software, and the test result table is uploaded to a database through an external network. The database is located in the external network, so that the database in the external network can be normally accessed from the external network or the internal network. Further, the test results may be invoked in the database from the external network.
In the embodiment, a computer in a first network is connected through webSocket to receive a test request, wherein the test request is generated by a server in a second network according to a test terminal type and test software, the computer in the first network acquires the test terminal type and the test software based on the received test request, and the computer in the first network sends a message for executing the test software to a terminal of the test terminal type connected with the computer and stores a test result in a database. The second network is connected with the terminal connected with the computer in the first network through webSocket, and the control terminal can execute the test software, so that the test software in the terminal of the first network through the second network can be realized.
Referring to fig. 5, fig. 5 is a schematic diagram of a method application of testing software according to an embodiment of the present invention, which specifically includes:
The server is located in a second network and the database is located in the second network. The computer, terminal 1 and terminal 2 are located in a first network. As an example, both terminal 1 and terminal 2 may be smartphones.
First, the server starts webSocket the server and the computer starts the client that has been bound webSocket. The computer starts the browser and a webSocket connection is established between the server and the computer. The browser maintains session control (session) between the server and the computer, where the session is used for communication between the server and the computer.
And secondly, a tester can determine the type of the test terminal based on the actual requirement of the test software, and then the server generates a test request according to the type of the test terminal and the test software. The tester sends a test request to the computer via webSocket connections through the server.
The browser of the computer receives the test request through webSocket connections. The browser of the computer sends the test request, and the computer analyzes the test request to further obtain the type of the test terminal and the test software.
And thirdly, if the terminal types of the terminal 1 and the terminal 2 are consistent with the test terminal types, the computer sends a message for executing the test software to the terminal 1 and the terminal 2, and the test software is executed at the terminal 1 and the terminal 1. The terminal 1 and the terminal 2 output test results, and the computer stores the test results into a database.
Finally, the test results of the terminals 1 and 2 are stored in the database. The test staff can obtain the test result in the database through the server, and likewise, the computer can access the database at any time to obtain the test result.
Referring to fig. 6, fig. 6 is a schematic diagram of a main structure of a device for testing software according to an embodiment of the present invention, where the device for testing software may implement a method for testing software, and as shown in fig. 6, the device for testing software specifically includes:
The receiving module 601 is configured to control a computer in a first network, and receive a test request through webSocket connection, where the test request is generated by a server in a second network according to a test terminal type and test software;
The acquiring module 602 is configured to acquire, in the first network, a test request received by the control computer, a test terminal type and test software;
The control module 603 is configured to, in the first network, control the computer to send a message for executing the test software to a terminal of a test terminal type connected to the computer, and store the test result in the database.
In one embodiment of the invention, the test request is generated by a server in the second network according to a preset data format according to the type of the test terminal and the test software.
In one embodiment of the present invention, the receiving module 601 is specifically configured to control a preset page in a browser of a computer in the first network, and receive a test request through webSocket connection.
In one embodiment of the present invention, the learning module 602 is further configured to control the browser to send a request for establishing webSocket a connection to a server in the second network, and establish webSocket a connection.
In one embodiment of the present invention, the learning module 602 is specifically configured to, in the first network, the control computer queries a preset data format based on the received test request, and learns the test terminal type and the test software.
In one embodiment of the present invention, the control module 603 is specifically configured to control, in the first network, the computer to call the test framework, and send a message for executing the test software to a terminal of a test terminal type connected to the computer;
And the control computer receives the test result output by the terminal of the test terminal type connected with the computer and stores the test result into the database.
In one embodiment of the present invention, the control module 603 is specifically configured to control the computer, and output a test result after controlling the terminal of the test terminal type connected to the computer to execute the test software;
and uploading the test result, the test terminal type and the test software to a database by the control computer.
Fig. 7 illustrates an exemplary system architecture 700 of a method of testing software or an apparatus of testing software to which embodiments of the present invention may be applied.
As shown in fig. 7, a system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 705 via the network 704 using the terminal devices 701, 702, 703 to receive or send messages or the like. Various communication client applications such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 701, 702, 703. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
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 disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that 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 section 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, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Connected to the I/O interface 805 are an input section 806 including a keyboard, a mouse, and the like, an output section 807 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like, a storage section 808 including a hard disk, and the like, and a communication section 809 including a network interface card such as a LAN card, a modem, and the like. The communication section 809 performs communication processing via a network such as the internet. The 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, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
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 two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, which may be described as, for example, a processor comprising a sending unit, an obtaining unit, a determining unit and a first processing unit. The names of these units do not constitute a limitation on the unit itself in some cases, and for example, the transmitting unit may also be described as "a unit that transmits a picture acquisition request to a connected server".
As a further aspect, the invention also provides a computer readable medium which may be comprised in the device described in the above embodiments or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
The method comprises the steps that a computer in a first network is connected through webSocket and receives a test request, wherein the test request is generated by a server in a second network according to a test terminal type and test software;
In a first network, the computer learns the test terminal type and the test software based on the received test request;
In a first network, the computer sends a message for executing the test software to a terminal of the test terminal type connected with the computer, and stores a test result in a database.
According to the technical scheme of the embodiment of the invention, a computer in a first network is connected through webSocket and receives a test request, the test request is generated by a server in a second network according to a test terminal type and test software, the computer in the first network acquires the test terminal type and the test software based on the test request, and the computer sends a message for executing the test software to a terminal of the test terminal type connected with the computer in the first network and stores a test result in a database. And the second network is connected with a terminal connected with the computer in the first network through webSocket, and the control terminal can execute test software so as to realize the test of the software in the terminal of the first network through the second network.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1.一种测试软件的方法,其特征在于,包括:1. A method for testing software, comprising: 第一网络中计算机,通过webSocket连接,接收测试请求,所述测试请求是第二网络中的服务器依据测试终端类型和测试软件生成的;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; 所述第一网络中计算机,通过webSocket连接,接收测试请求之前,还包括:The computer in the first network, before receiving the test request through the webSocket connection, also includes: 所述第一网络中计算机的浏览器,向第二网络中的服务器的服务端,发送建立webSocket连接的请求,建立所述webSocket连接;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; 所述第一网络中计算机,通过webSocket连接,接收测试请求,包括:The computer in the first network receives the test request through the webSocket connection, including: 设置页面的URL地址,浏览器加载预设页面的URL地址,所述第一网络中计算机的浏览器中预设页面,通过webSocket连接,接收测试请求。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.根据权利要求1所述测试软件的方法,其特征在于,所述测试请求是第二网络中的服务器,依据所述测试终端类型和测试软件,按照预设数据格式生成的。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 a preset data format based on the test terminal type and the test software. 3.根据权利要求1所述测试软件的方法,其特征在于,所述在第一网络中,所述计算机基于接收的所述测试请求,获知所述测试终端类型和所述测试软件,包括:3. The method for testing software according to claim 1, characterized in that, in the first network, the computer obtains the test terminal type and the test software based on the received test request, comprising: 在第一网络中,所述计算机基于接收的所述测试请求,查询预设数据格式,获知所述测试终端类型和所述测试软件。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.根据权利要求1所述测试软件的方法,其特征在于,所述在第一网络中,所述计算机向与所述计算机连接的所述测试终端类型的终端,发送执行所述测试软件的消息,并将测试结果存储至数据库,包括: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, comprising: 在第一网络中,所述计算机调用测试框架,向所述与所述计算机连接的所述测试终端类型的终端,发送执行所述测试软件的消息;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.根据权利要求4所述测试软件的方法,其特征在于,所述计算机,接收所述与所述计算机连接的所述测试终端类型的终端输出的测试结果,并将所述测试结果存储至数据库,包括: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, comprising: 所述计算机控制所述与所述计算机连接的所述测试终端类型的终端,执行所述测试软件后,输出所述测试结果;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.一种测试软件的装置,其特征在于,包括:6. A device for testing software, comprising: 接收模块,用于控制第一网络中计算机,通过webSocket连接,接收测试请求,所述测试请求是第二网络中的服务器依据测试终端类型和测试软件生成的;以及,所述第一网络中计算机的浏览器,向第二网络中的服务器的服务端,发送建立webSocket连接的请求,建立所述webSocket连接;以及,设置页面的URL地址,浏览器加载预设页面的URL地址,所述第一网络中计算机的浏览器中预设页面,通过webSocket连接,接收测试请求;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; 获知模块,用于在第一网络中,控制所述计算机基于接收的所述测试请求,获知所述测试终端类型和所述测试软件;A learning module, used for controlling the computer to learn 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.一种测试软件的电子设备,其特征在于,包括:7. An electronic device for testing software, characterized by comprising: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,a storage device for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-5中任一所述的方法。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.一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1-5中任一所述的方法。8. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
CN202010092855.7A 2020-02-14 2020-02-14 Method, apparatus, device and computer readable medium for testing software Active CN113268406B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010092855.7A CN113268406B (en) 2020-02-14 2020-02-14 Method, apparatus, device and computer readable medium for testing software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010092855.7A CN113268406B (en) 2020-02-14 2020-02-14 Method, apparatus, device and computer readable medium for testing software

Publications (2)

Publication Number Publication Date
CN113268406A CN113268406A (en) 2021-08-17
CN113268406B true CN113268406B (en) 2025-02-25

Family

ID=77227238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010092855.7A Active CN113268406B (en) 2020-02-14 2020-02-14 Method, apparatus, device and computer readable medium for testing software

Country Status (1)

Country Link
CN (1) CN113268406B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849398A (en) * 2021-08-27 2021-12-28 青岛海尔科技有限公司 Test method, system, storage medium and electronic device for software toolkit

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109906586A (en) * 2016-12-30 2019-06-18 谷歌有限责任公司 System and method for configuration verification across secure network boundaries

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156674A (en) * 2011-04-29 2011-08-17 深圳市五巨科技有限公司 Test method and system for software products
CN104253755A (en) * 2013-06-27 2014-12-31 讯舟科技股份有限公司 Method for establishing connection between network terminal devices
CN105808422B (en) * 2014-12-31 2019-03-15 视联动力信息技术股份有限公司 A kind of network-based method for testing software, client and equipment to be tested
CN104967609B (en) * 2015-04-28 2018-11-06 腾讯科技(深圳)有限公司 Intranet exploitation server access method, apparatus and system
CN108829597B (en) * 2018-06-13 2023-04-18 中国平安人寿保险股份有限公司 Software public testing method and device, computer device and readable storage medium
CN110278192B (en) * 2019-05-20 2022-10-25 平安科技(深圳)有限公司 Method and device for accessing intranet by extranet, computer equipment and readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109906586A (en) * 2016-12-30 2019-06-18 谷歌有限责任公司 System and method for configuration verification across secure network boundaries

Also Published As

Publication number Publication date
CN113268406A (en) 2021-08-17

Similar Documents

Publication Publication Date Title
US8275892B2 (en) Low-level remote sharing of local devices in a remote access session across a computer network
US9288194B2 (en) Authorization method, apparatus, and system
WO2019015272A1 (en) Information processing method and device
CN109002366A (en) A remote debugging method and device for mobile web pages
US10135763B2 (en) System and method for secure and efficient communication within an organization
CN114465867B (en) Maintenance method and device of server, storage medium and processor
CN109218041B (en) Request processing method and device for server system
CN110324384B (en) Data pushing method and device
CN111953718B (en) Page debugging method and device
CN112015383B (en) A login method and device
CN113268406B (en) Method, apparatus, device and computer readable medium for testing software
CN114020689B (en) Data processing method, data processing device, electronic device and storage medium
CN109698832B (en) Method for rapidly providing Portal authentication and rapidly popping Portal authentication page and related equipment
CN111726401A (en) File transmission method and device
CN114995201B (en) Intelligent equipment control system handover method and device
CN112532734B (en) Method and device for detecting message sensitive information
CN113704080B (en) Automatic test method and device
AU2018390863A1 (en) Computer system and method for extracting dynamic content from websites
CN113326142B (en) Message processing method and device
CN113760563B (en) Data processing method and device based on open platform and data processing system
CN119004419B (en) Watermark generation method, proxy device, electronic device and storage medium
CN112988408B (en) Multi-terminal interaction method and device
CN111371745B (en) Method and apparatus for determining SSRF vulnerabilities
CN110011767B (en) Method and apparatus for TCP connection backup
CN117354360A (en) Material management method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant