[go: up one dir, main page]

CN109656819A - File test method, device and computer readable storage medium - Google Patents

File test method, device and computer readable storage medium Download PDF

Info

Publication number
CN109656819A
CN109656819A CN201811496790.1A CN201811496790A CN109656819A CN 109656819 A CN109656819 A CN 109656819A CN 201811496790 A CN201811496790 A CN 201811496790A CN 109656819 A CN109656819 A CN 109656819A
Authority
CN
China
Prior art keywords
file
terminal
tested
communication connection
network address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811496790.1A
Other languages
Chinese (zh)
Inventor
董永清
潘温
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201811496790.1A priority Critical patent/CN109656819A/en
Publication of CN109656819A publication Critical patent/CN109656819A/en
Pending legal-status Critical Current

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
    • 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/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本公开是关于一种文件测试方法、装置及计算机可读存储介质。该方法应用于第一终端,所述第一终端用于运行待测试文件,所述方法包括:获取第二终端的第一网络地址标识,所述第二终端用于通过编译得到待测试文件;根据所述第一网络地址标识,向所述第二终端发送第一文件获取请求,以使所述第二终端与所述第一终端建立预设通信连接;在通过预设通信连接接收到第一待测试文件时,运行所述第一待测试文件,得到第一测试结果。根据本公开的实施例,第一终端可以基于与第二终端的网络连接,向第二终端发出文件获取请求,并及时获取到第一测试文件,实现了测试文件的跨端传输的自动化。

The present disclosure relates to a file testing method, apparatus and computer-readable storage medium. The method is applied to a first terminal, where the first terminal is used to run a file to be tested, and the method includes: acquiring a first network address identifier of a second terminal, and the second terminal is used to obtain the file to be tested by compiling; Send a first file acquisition request to the second terminal according to the first network address identifier, so that the second terminal and the first terminal establish a preset communication connection; after receiving the first file through the preset communication connection When a file to be tested is executed, the first file to be tested is run to obtain a first test result. According to the embodiment of the present disclosure, the first terminal can send a file acquisition request to the second terminal based on the network connection with the second terminal, and acquire the first test file in time, thereby realizing the automation of cross-terminal transmission of the test file.

Description

File test method, device and computer readable storage medium
Technical field
This disclosure relates to field of computer technology more particularly to a kind of file test method, device and computer-readable deposit Storage media.
Background technique
In the related technology, the cataloged procedure and compilation process for the application program for running on mobile terminal usually require complete at the end PC At, however the test process of application program needs to complete in mobile terminal.
During the test, tester needs the executable file of application program copying to mobile terminal from the end PC, into And operation and test application program are carried out in mobile terminal.
During the test, developer can debug repeatedly application program according to test result, be modified, each time Modification can all generate new version, and the executable file by the application program of new version is needed to copy to mobile terminal, therefore, complete In the development process of the application program of one mobile terminal, need repeatedly to copy to executable file from the end PC the behaviour of mobile terminal Make, cumbersome, development efficiency is lower.
Summary of the invention
To overcome the problems in correlation technique, the disclosure a kind of file test method, device and computer are provided can Read storage medium.
According to the first aspect of the embodiments of the present disclosure, a kind of file test method is provided, this method is applied to first terminal, The first terminal is for running file to be tested, which comprises obtains the first network address mark of second terminal, institute State second terminal for by compile obtain file to be tested;It is identified according to the first network address, Xiang Suoshu second terminal The request of the first file acquisition is sent, so that the second terminal and the first terminal establish default communication connection;By pre- If receive the first file to be tested, first file to be tested is run, the first test result is obtained.
In one possible implementation, this method further include: receiving described second by default When the file that terminal is sent updates request, the request of the second file acquisition is sent to the second terminal by default communication connection, So that the second terminal sends the second file to be tested to first terminal, second file to be tested is based on described first The updated file of file to be tested;When receiving second file to be tested by presetting, described in operation Second file to be tested, obtains the second test result.
In one possible implementation, the first network address mark for obtaining second terminal, comprising: to carrying There is the image in 2 D code of the network address of second terminal to be identified, obtains the first network address mark.
In one possible implementation, the default communication connection includes that Websocket protocol communication connects.
According to the second aspect of an embodiment of the present disclosure, a kind of file test method is provided, this method is applied to second terminal, The second terminal is used to obtain file to be tested by compiling, which comprises receives the first text that first terminal is sent Part acquisition request, wherein the first terminal carries for running file to be tested in the first file acquisition request The first network address of one terminal identifies;Default communication connection is established according to the first network address and the first terminal; It is requested in response to first file acquisition, the first file to be tested is sent to first terminal by default communication connection, so that The first terminal runs first file to be tested.
In one possible implementation, this method further include: be triggered in response to compiling control, to modified the The code of one file to be tested is compiled, and obtains the second file to be tested;It is sent by default communication connection to first terminal File updates request, so that first terminal sends the request of the second file acquisition to second terminal;It is sent out in response to the first terminal The the second file acquisition request sent sends the second file to be tested to first terminal by default communication connection, so that first is whole End runs second file to be tested.
In one possible implementation, the method also includes: according to the network address of second terminal, generate and carry There is the image in 2 D code of the network address of second terminal.
In one possible implementation, the default communication connection includes that Websocket protocol communication connects.
According to the third aspect of an embodiment of the present disclosure, a kind of file test device is provided, which is applied to first terminal, For the first terminal for running file to be tested, described device includes: the first acquisition module, for obtaining the of second terminal One network address mark, the second terminal are used to obtain file to be tested by compiling;First request module, for according to institute State first network address mark, Xiang Suoshu second terminal send the first file acquisition request so that the second terminal with it is described First terminal establishes default communication connection;First test module, for receive first to be tested by default When file, first file to be tested is run, the first test result is obtained.
In one possible implementation, the device further include: the second request module, for by presetting communication link When receiving the file that the second terminal is sent and updating request, the is sent to the second terminal by default communication connection Two file acquisitions request, so that the second terminal sends the second file to be tested, second text to be tested to first terminal Part is based on the described first updated file of file to be tested;Second test module is received by default When second file to be tested, second file to be tested is run, the second test result is obtained.
In one possible implementation, described first to obtain module include: identification submodule, for carrying the The image in 2 D code of the network address of two terminals is identified, the first network address mark is obtained.
In one possible implementation, the default communication connection includes that Websocket protocol communication connects.
According to a fourth aspect of embodiments of the present disclosure, a kind of file test device is provided, which is applied to second terminal, The second terminal is used to obtain file to be tested by compiling, and described device includes: third request module, receives first terminal The the first file acquisition request sent, wherein the first terminal for running file to be tested, ask by first file acquisition The first network address mark of first terminal is carried in asking;Link block, for according to the first network address with it is described First terminal establishes default communication connection;First sending module, for being requested in response to first file acquisition, by default It communicates to connect to first terminal and sends the first file to be tested, so that the first terminal runs first file to be tested.
In one possible implementation, the device further include: collector, for being touched in response to compiling control Hair, is compiled the code of the modified first file to be tested, obtains the second file to be tested;4th request module is used Request is updated in sending file to first terminal by default communication connection, so that first terminal sends the second text to second terminal Part acquisition request;Second sending module is requested in response to the second file acquisition that the first terminal is sent, and passes through default communication It connects to first terminal and sends the second file to be tested, so that first terminal runs second file to be tested.
In one possible implementation, described device further include: image generation module, for according to second terminal Network address generates the image in 2 D code for carrying the network address of second terminal.
In one possible implementation, the default communication connection includes that Websocket protocol communication connects.
According to a fifth aspect of the embodiments of the present disclosure, a kind of file test device is provided, comprising: processor;For storing The memory of processor-executable instruction;Wherein, the processor is configured to executing the above method.
According to a sixth aspect of an embodiment of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, when described When instruction in storage medium is executed by processor, enable a processor to execute the above method.
The technical scheme provided by this disclosed embodiment can include the following benefits: pass through above-mentioned file test side Method, tester can the network connection based on first terminal and second terminal, to second terminal issue file acquisition request, and The first test file is got in time, realizes the automation across end transmission of test file, while can will form software journey The test across end transmission link and file to be tested of software development link, file to be tested that sequence executable file needs to pass through Link closely connects, and realizes the automation to form the overall flow of software program executable file.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of file test method shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of file test method shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of file test method shown according to an exemplary embodiment.
Fig. 4 is a kind of flow chart of file test method shown according to an exemplary embodiment.
Fig. 5 is a kind of schematic diagram of the application scenarios of file test method shown according to an exemplary embodiment.
Fig. 6 is a kind of block diagram of file test device shown according to an exemplary embodiment.
Fig. 7 is a kind of block diagram of file test device shown according to an exemplary embodiment.
Fig. 8 is a kind of block diagram of file test device shown according to an exemplary embodiment.
Fig. 9 is a kind of block diagram of file test device shown according to an exemplary embodiment.
Figure 10 is a kind of block diagram of file test device shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of file test method shown according to an exemplary embodiment, as shown in Figure 1, file Test method is for including the following steps in terminal.
In step s 11, the first network address mark of second terminal is obtained.
In step s 12, it is identified according to the first network address, Xiang Suoshu second terminal sends the first file acquisition and asks It asks, so that the second terminal and the first terminal establish default communication connection.
In step s 13, when receiving the first file to be tested by presetting, it is to be measured to run described first File is tried, the first test result is obtained.
In one possible implementation, file test method described in the disclosure can be applied to exploitation software program In the process, the link of the executable file completed to compiling test, this method can be by for running file to be tested First terminal execute.Wherein, file to be tested can be by developer complete coding and the compilation phase after it is obtained File.In the present embodiment, file to be tested may include any version of produced executable file in software program iterative process This, first file to be tested can be understood as the initial version of produced executable file in software program iterative process.
In one possible implementation, first terminal described in the disclosure can be arbitrary, can be used for run to The terminal of test file;In one example, first terminal can be user equipment (User Equipment, UE), movement is set Standby, user terminal, terminal, cellular phone, wireless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, calculating equipment, mobile unit, wearable device etc..In order to guarantee that file to be tested can in first terminal To operate normally, the operating system of first terminal described in the present embodiment needs the file type phase with the file to be tested Match.
In one possible implementation, second terminal described in the disclosure can be arbitrary, and can pass through compiling Obtain the terminal of file to be tested.In one example, application developer can be encoded and be compiled by second terminal First terminal is sent to file to be tested, and by file to be tested;After first terminal receives file to be tested, program File to be tested that tester is received using second terminal test (run), and then by being obtained to test (operation) Test result analysis and judgement, to determine the file to be tested with the presence or absence of loophole.
In one possible implementation, default communication connection, which can be any one, allows server active transmission to believe Cease to the communication connection mode of client, by realize first terminal and second terminal can based on this communication connection in a manner of actively send out Breath deliver letters to other side.
In one possible implementation, the default communication connection includes that Websocket protocol communication connects.Specifically For, WebSocket agreement is the new network protocol of one kind based on TCP.It realizes browser and server full duplex (full-duplex) communication allows server active transmission information to client.
In one possible implementation, file to be tested can be any type of mobile applications (APP, Application executable file (such as rpk file or apk file etc.)), first terminal, which can be, can run mobile answer With portable equipments such as the smart phone of program or tablet computers, second terminal, which can be, has programming development environment and program compiling The terminal (such as PC or server) of environment.
In one possible implementation, first network address identifies the network address for identifying second terminal, the One terminal can identify according to first network address and carry out information exchange with second terminal.In one example, first network Location mark includes the IP address (Internet Protocol Address, Internet protocol address) and port numbers of first terminal.
In one possible implementation, the request of the first file acquisition may include for requesting the first file to be tested Request message can be by sending the behaviour of file to be tested to first terminal after second terminal receives the request message Make to respond the request message.
In one possible implementation, the present embodiment can be after getting first network address mark, can be by the One network address mark is stored in first terminal, the advantages of this arrangement are as follows, when first terminal and second terminal again into When row interaction, it rapidly extracting can identify, avoid again to the first network address of second terminal from the storage unit of itself The operation for obtaining first network address mark in step S11 is executed, is improved work efficiency.
In one possible implementation, the request of the first file acquisition may include the network for identifying first terminal Second network identity of address, it is corresponding, it is identified in step s 12 according to the first network address, Xiang Suoshu the Two terminals send the request of the first file acquisition, so that the second terminal sends the first file to be tested to first terminal, comprising: It is identified according to the first network address, Xiang Suoshu second terminal sends the request of the first file acquisition, so that the second terminal While sending the first file to be tested to first terminal, the second network identity is stored in second terminal, such benefit Be, when second terminal and first terminal interact again, can from the storage unit of itself rapidly extracting to first Second network address of terminal identifies.
In one possible implementation, the first test result can be the operation result of the first file to be tested, this In embodiment, the test result may include generated test data, test data in the first test file operational process Generation time and while breaking down produced abnormal marking code.In one example, first terminal can be by first Test result is stored in storage unit, so that tester or developer are literary to the first test according to first test result Failure in part is checked.
In this way, tester can the default communication connection based on first terminal and second terminal, to second Terminal issues file acquisition request, and gets the first test file in time, and it is automatic to realize transmitting across end for test file Change, at the same can by formed software program executable file need pass through software development link, file to be tested across end pass Defeated link and the testing process of file to be tested closely connect, and realize the entirety to form software program executable file The automation of process.
Fig. 2 is a kind of flow chart of file test method shown according to an exemplary embodiment.Such as Fig. 2, text is shown A kind of possible implementation of part test method, this document test method further include:
In step S14, when updating request by the default file for receiving the second terminal transmission, The request of the second file acquisition is sent to the second terminal by default communication connection, so that the second terminal is to first terminal The second file to be tested is sent, second file to be tested is based on the described first updated file of file to be tested;
In step S15, when receiving second file to be tested by presetting, operation described second File to be tested obtains the second test result.
In a kind of possible implementation, first terminal can be previously stored with the executable file in above-described embodiment Initial version (the i.e. first file to be tested), operation performed by step S14 to step S15 can be update, and this is first to be tested The operation of file.
In the present embodiment, second terminal is the side of active transmission request, and first terminal is the side of respond request.Its In, the file updates request and is issued by second terminal, for updating the executable file stored in first terminal.One kind can In the implementation of energy, file, which updates to request can be, completes coding and second in executable file of the developer to new version After terminal compiling is completed, actively issued by second terminal.The request of second file acquisition can be first terminal for responding File updates request and issues, to indicate that the file that first terminal " agreements " second terminal issues updates request, when second whole After termination receives the second file acquisition request of first terminal transmission, second can be sent to first terminal according to the second network identity File (i.e. the executable file of new version) to be tested.
In one possible implementation, the described second file to be tested is to be updated based on the described first file to be tested File afterwards, second file to be tested can exist in the form of service packs (a part of new version executable file), into And at no point in the update process, the second file to be tested is added to the file path in first terminal where the first file to be tested; In the implementation of another possibility, the new version executable file of second file to be tested can also be with complete file Form exist, in renewal process, can use the second file to be tested and replace the first of first terminal the file to be tested.
It in one possible implementation, can be with reference in above embodiment first to the description of the second test result The content of test result.
In one possible implementation, the first network address mark of second terminal, packet are obtained described in step S11 It includes: the image in 2 D code for the network address for carrying second terminal is identified, obtain the first network address mark.
In this embodiment, first terminal may be configured with image collecting device, and tester can pass through the image Acquisition device scans the image in 2 D code, and then gets the first network address mark of second terminal.This kind of implementation side Just quick, user experience is preferable.
Fig. 3 is a kind of flow chart of file test method shown according to an exemplary embodiment, as shown in figure 3, file Test method is applied to second terminal, includes the following steps.
In step S31, the first file acquisition request that first terminal is sent is received, wherein the first terminal is used for File to be tested is run, the first network address mark of first terminal is carried in the first file acquisition request;
In step s 32, default communication connection is established according to the first network address and the first terminal;
It in step S33, requests in response to first file acquisition, is sent by default communication connection to first terminal First file to be tested, so that the first terminal runs first file to be tested.
In the present embodiment, step S31, in step S32 and operation, with above embodiment described in step S33 Step S11, the operation that step S12 and step S13 is described is identical.Accordingly, with respect to first terminal, second terminal, the first text The definition of the nouns such as part acquisition request, the second network address mark, the first file to be tested, is referred in above embodiment Description.
In one possible implementation, file test method described in the disclosure can be applied to exploitation software program In the process, the link of executable file compiling completed test.This method can be to be tested by being obtained by compiling File carrys out second terminal execution.In one possible implementation, second terminal described in the disclosure can be user and set Standby, user terminal, server etc. have the terminal of programming development environment and program translation and compiling environment.
In one possible implementation, first terminal is the side of active transmission request, and second terminal is that response is asked The side asked.As an example, first terminal can get the first network address mark of second terminal first, and by first network Address identification record is into the storage unit of first terminal, when tester needs to obtain the first file to be tested, can pass through First terminal identifies to second terminal according to the first network address of second terminal and sends the request of the first file acquisition.When second It, can be first by the request of the first file acquisition entrained the when terminal receives the first file acquisition request that first terminal issues Second network address identification record of one terminal is obtained into the storage unit of second terminal, while for responding first file Request is taken, is identified according to second network address to first terminal and sends the first file to be tested, so that the first terminal Run the described first file to be tested.
In one possible implementation, default communication connection, which can be any one, allows server active transmission to believe Cease to the communication connection mode of client, by realize first terminal and second terminal can based on this communication connection in a manner of actively send out Breath deliver letters to other side.
In one possible implementation, the default communication connection includes that Websocket protocol communication connects.Specifically For, WebSocket agreement is the new network protocol of one kind based on TCP.It realizes browser and server full duplex (full-duplex) communication allows server active transmission information to client.
In this way, tester can the network connection based on first terminal and second terminal, to second terminal File acquisition request is issued, and gets the first test file in time, realizes the automation across end transmission of test file, together When can by formed software program executable file need pass through software development link, file to be tested across end transmission link It is closely connected with the testing process of file to be tested, realizes the overall flow to form software program executable file Automation.
Fig. 4 is a kind of flow chart of file test method shown according to an exemplary embodiment.Such as Fig. 4, text is shown A kind of possible implementation of part test method, this document test method further include:
In step S34, it is triggered in response to compiling control, the code of the modified first file to be tested is compiled It translates, obtains the second file to be tested;
In step s 35, file is sent to first terminal by default communication connection and updates request so that first terminal to Second terminal sends the request of the second file acquisition;
It in step S36, is requested in response to the second file acquisition that the first terminal is sent, passes through default communication connection The second file to be tested is sent to first terminal, so that first terminal runs second file to be tested.
In the present embodiment, the step S34, operation that step S35 and step S36 are described, with step in above embodiment It is same process that S14 and step S15, which is described,.Accordingly, with respect to the second file to be tested, the second network address mark, text Part updates the definition of the nouns such as request, the request of the second file acquisition, the description being referred in above embodiment.
In one possible implementation, the compiling control can be in the composing software of the second file to be tested Button is compiled, after developer completes to encode, second terminal can be triggered by the compiling button to the second text to be tested The compilation process of part.
In the present embodiment, second terminal is the side of active transmission request, and first terminal is the side of respond request.Its In, the file updates request and is actively issued by second terminal, for updating the executable file stored in first terminal.One In kind possible implementation, file update request can be executable file of the developer to new version complete coding and After second terminal compiling is completed, actively issued by second terminal.The request of second file acquisition can be first terminal and be used for Response file updates request and issues, and is requested with indicating that file that first terminal " agreements " second terminal issues updates, when the After two terminals receive the second file acquisition request of first terminal transmission, it can be sent according to the second network identity to first terminal Second file (i.e. the executable file of new version) to be tested.
In one possible implementation, such as Fig. 4, this document test method further include: in step S37, according to The network address of two terminals generates the image in 2 D code for carrying the network address of second terminal.
In one example, second terminal first starts its HTTP service for building completion, the operating system meeting of second terminal To the port numbers of HTTP service distribution, and using the IP address of second terminal and port numbers as network address, and to the network Address carries out the processes such as data analysis, data encoding, Error Correction of Coding, construction final data information, structural matrix, mask, in turn Generate the image in 2 D code for carrying the network address of second terminal.The disclosure does not make the concrete mode for generating image in 2 D code Limitation.
Using example
Below in conjunction with an exemplary application scene, the application example according to the embodiment of the present disclosure is provided, in order to understand The process of file test method.It will be understood by those skilled in the art that below using example merely for the sake of being easy to understand the disclosure The purpose of embodiment is not construed as the limitation to the embodiment of the present disclosure.
Fig. 5 is a kind of schematic diagram of the application scenarios of file test method shown according to an exemplary embodiment.At this Using in example, as shown in figure 5, this document test method the following steps are included:
1, compiling side (first terminal) starts HTTP service, and according to the IP address of first terminal (first network address label Know) generate two dimensional code;
2, operation side (second terminal) passes through the IP address for scanning the two-dimensional code and obtaining first terminal, and records to operation side;
3, operation side operation rpk file (file to be tested), and start debugging services (the default test clothes of Websocket Business);
4, operation lateral root sends HTTP request to compiling side according to the IP address of first terminal;
5, Websocket communication connection is established by browser and operation side in compiling side;
6, operation side group communicates to connect in Websocket operation result being sent to compiling side;
7, compiling lateral root modifies file to be tested according to operation result, and modified file to be tested is sent to operation Side.
Example is applied by above-mentioned, tester and developer can connect based on first terminal and the network of second terminal Connect, realize test file across end transmission automation, while can will be formed software program executable file need by Software development link, file to be tested closely connect across end transmission link and the testing process of file to be tested, Realize the automation to form the overall flow of software program executable file.
Fig. 6 is a kind of block diagram of file test device shown according to an exemplary embodiment.This document test device is answered For first terminal, first terminal is for running file to be tested, and referring to Fig. 6, which includes the first acquisition module 51, first Request module 52 and the first test module 53.
First obtains module 51, and the first network address for obtaining second terminal identifies, and the second terminal is for leading to It crosses compiling and obtains file to be tested;
First request module 52, for being identified according to the first network address, Xiang Suoshu second terminal sends the first text Part acquisition request, so that the second terminal and the first terminal establish default communication connection;
First test module 53, for by it is default receive the first file to be tested when, described in operation First file to be tested, obtains the first test result.
Fig. 7 is a kind of block diagram of file test device shown according to an exemplary embodiment.As shown in fig. 7, the device Further include:
Second request module 54, for passing through the default file update for receiving the second terminal and sending When request, the request of the second file acquisition is sent to the second terminal by default communication connection so that the second terminal to First terminal sends the second file to be tested, and second file to be tested is updated based on the described first file to be tested File;
Second test module 55, when receiving second file to be tested by presetting, described in operation Second file to be tested, obtains the second test result.
In one possible implementation, the first acquisition module 51 includes:
It identifies submodule 511, is identified for the image in 2 D code to the network address for carrying second terminal, obtained The first network address mark.
In one possible implementation, the default communication connection includes that Websocket protocol communication connects.
Fig. 8 is a kind of block diagram of file test device shown according to an exemplary embodiment.This document test device is answered For second terminal, second terminal is used to obtain file to be tested by compiling, and referring to Fig. 8, which includes that third asks modulus Block 71, link block 72 and the first sending module 73.
Third request module 71 receives the first file acquisition request that first terminal is sent, wherein the first terminal is used In running file to be tested, the first network address mark of first terminal is carried in the first file acquisition request;
Link block 72, for establishing default communication connection according to the first network address and the first terminal;
First sending module 73 is communicated to connect by default to first for requesting in response to first file acquisition Terminal sends the first file to be tested, so that the first terminal runs first file to be tested.
Fig. 9 is a kind of block diagram of file test device shown according to an exemplary embodiment.As shown in figure 9, the text Part test device further include:
Collector 74, for being triggered in response to compiling control, to the code of the modified first file to be tested into Row compiling, obtains the second file to be tested;
4th request module 75 updates request for sending file to first terminal by default communication connection, so that the One terminal sends the request of the second file acquisition to second terminal;
Second sending module 76, the second file acquisition request for being sent in response to the first terminal, by default It communicates to connect to first terminal and sends the second file to be tested, so that first terminal runs second file to be tested.
In one possible implementation, as shown in figure 9, this document test device further include: image generation module 77, For the network address according to second terminal, the image in 2 D code for carrying the network address of second terminal is generated.
In one possible implementation, the default communication connection includes that Websocket protocol communication connects.
Figure 10 is a kind of block diagram of device 800 for file test shown according to an exemplary embodiment.For example, dress Setting 800 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical treatment Equipment, body-building equipment, personal digital assistant etc..
Referring to Fig.1 0, device 800 may include following one or more components: processing component 802, memory 804, power supply Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and Communication component 816.
The integrated operation of the usual control device 800 of processing component 802, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 802 may include that one or more processors 820 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in device 800.These data are shown Example includes the instruction of any application or method for operating on device 800, contact data, and telephone book data disappears Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 may include power management system System, one or more power supplys and other with for device 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between described device 800 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 808 includes a front camera and/or rear camera.When device 800 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set Part 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented Estimate.For example, sensor module 814 can detecte the state that opens/closes of device 800, and the relative positioning of component, for example, it is described Component is the display and keypad of device 800, and sensor module 814 can be with 800 1 components of detection device 800 or device Position change, the existence or non-existence that user contacts with device 800,800 orientation of device or acceleration/deceleration and device 800 Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of device 800 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 1932 of instruction, above-metioned instruction can be executed by the processing component 1922 of device 1900 to complete the above method. For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, Floppy disk and optical data storage devices etc..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (18)

1.一种文件测试方法,其特征在于,应用于第一终端,所述第一终端用于运行待测试文件,所述方法包括:1. a file testing method, is characterized in that, is applied to the first terminal, and described first terminal is used for running the file to be tested, and described method comprises: 获取第二终端的第一网络地址标识,所述第二终端用于通过编译得到待测试文件;Obtain the first network address identifier of the second terminal, and the second terminal is used to obtain the file to be tested by compiling; 根据所述第一网络地址标识,向所述第二终端发送第一文件获取请求,以使所述第二终端与所述第一终端建立预设通信连接;sending a first file acquisition request to the second terminal according to the first network address identifier, so that the second terminal and the first terminal establish a preset communication connection; 在通过预设通信连接接收到第一待测试文件时,运行所述第一待测试文件,得到第一测试结果。When the first file to be tested is received through the preset communication connection, the first file to be tested is executed to obtain a first test result. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, wherein the method further comprises: 在通过预设通信连接接收到所述第二终端发送的文件更新请求时,通过预设通信连接向所述第二终端发送第二文件获取请求,以使所述第二终端向第一终端发送第二待测试文件,所述第二待测试文件为基于所述第一待测试文件更新后的文件;When a file update request sent by the second terminal is received through the preset communication connection, a second file acquisition request is sent to the second terminal through the preset communication connection, so that the second terminal sends a request to the first terminal A second file to be tested, the second file to be tested is a file updated based on the first file to be tested; 在通过预设通信连接接收到所述第二待测试文件时,运行所述第二待测试文件,得到第二测试结果。When the second file to be tested is received through the preset communication connection, the second file to be tested is run to obtain a second test result. 3.根据权利要求1所述的方法,其特征在于,所述获取第二终端的第一网络地址标识,包括:3. The method according to claim 1, wherein the acquiring the first network address identifier of the second terminal comprises: 对携带有第二终端的网络地址的二维码图像进行识别,获取所述第一网络地址标识。Identifying the two-dimensional code image carrying the network address of the second terminal to obtain the first network address identifier. 4.根据权利要求1到3中任意一项所述的方法,其特征在于,4. The method according to any one of claims 1 to 3, characterized in that, 所述预设通信连接包括Websocket协议通信连接。The preset communication connection includes a Websocket protocol communication connection. 5.一种文件测试方法,其特征在于,应用于第二终端,所述第二终端用于通过编译得到待测试文件,所述方法包括:5. A file testing method, characterized in that it is applied to a second terminal, and the second terminal is used to obtain a file to be tested by compiling, the method comprising: 接收第一终端发送的第一文件获取请求,其中,所述第一终端用于运行待测试文件,所述第一文件获取请求中携带有第一终端的第一网络地址标识;receiving a first file acquisition request sent by a first terminal, wherein the first terminal is used to run the file to be tested, and the first file acquisition request carries a first network address identifier of the first terminal; 根据所述第一网络地址与所述第一终端建立预设通信连接;establishing a preset communication connection with the first terminal according to the first network address; 响应于所述第一文件获取请求,通过预设通信连接向第一终端发送第一待测试文件,以使所述第一终端运行所述第一待测试文件。In response to the first file acquisition request, the first file to be tested is sent to the first terminal through a preset communication connection, so that the first terminal runs the first file to be tested. 6.根据权利要求5所述的方法,其特征在于,所述方法还包括:6. The method according to claim 5, wherein the method further comprises: 响应于编译控件被触发,对修改后的第一待测试文件的代码进行编译,得到第二待测试文件;In response to the compilation control being triggered, the code of the modified first file to be tested is compiled to obtain the second file to be tested; 通过预设通信连接向第一终端发送文件更新请求,以使第一终端向第二终端发送第二文件获取请求;Send a file update request to the first terminal through the preset communication connection, so that the first terminal sends a second file acquisition request to the second terminal; 响应于所述第一终端发送的第二文件获取请求,通过预设通信连接向第一终端发送第二待测试文件,以使第一终端运行所述第二待测试文件。In response to the second file acquisition request sent by the first terminal, the second file to be tested is sent to the first terminal through a preset communication connection, so that the first terminal runs the second file to be tested. 7.根据权利要求5所述的方法,其特征在于,所述方法还包括:7. The method according to claim 5, wherein the method further comprises: 根据第二终端的网络地址,生成携带有第二终端的网络地址的二维码图像。According to the network address of the second terminal, a two-dimensional code image carrying the network address of the second terminal is generated. 8.根据权利要求5到7中任意一项所述的方法,其特征在于,8. The method according to any one of claims 5 to 7, characterized in that, 所述预设通信连接包括Websocket协议通信连接。The preset communication connection includes a Websocket protocol communication connection. 9.一种文件测试装置,其特征在于,应用于第一终端,所述第一终端用于运行待测试文件,所述装置包括:9. A file testing device, characterized in that it is applied to a first terminal, and the first terminal is used to run a file to be tested, the device comprising: 第一获取模块,用于获取第二终端的第一网络地址标识,所述第二终端用于通过编译得到待测试文件;a first obtaining module, configured to obtain the first network address identifier of the second terminal, and the second terminal is used to obtain the file to be tested by compiling; 第一请求模块,用于根据所述第一网络地址标识,向所述第二终端发送第一文件获取请求,以使所述第二终端与所述第一终端建立预设通信连接;a first request module, configured to send a first file acquisition request to the second terminal according to the first network address identifier, so as to enable the second terminal to establish a preset communication connection with the first terminal; 第一测试模块,用于在通过预设通信连接接收到第一待测试文件时,运行所述第一待测试文件,得到第一测试结果。The first test module is configured to run the first file to be tested to obtain a first test result when the first file to be tested is received through the preset communication connection. 10.根据权利要求9所述的装置,其特征在于,所述装置还包括:10. The apparatus of claim 9, wherein the apparatus further comprises: 第二请求模块,用于在通过预设通信连接接收到所述第二终端发送的文件更新请求时,通过预设通信连接向所述第二终端发送第二文件获取请求,以使所述第二终端向第一终端发送第二待测试文件,所述第二待测试文件为基于所述第一待测试文件更新后的文件;A second request module, configured to send a second file acquisition request to the second terminal through a preset communication connection when receiving a file update request sent by the second terminal through a preset communication connection, so that the first The second terminal sends a second file to be tested to the first terminal, where the second file to be tested is an updated file based on the first file to be tested; 第二测试模块,在通过预设通信连接接收到所述第二待测试文件时,运行所述第二待测试文件,得到第二测试结果。The second test module, when receiving the second file to be tested through the preset communication connection, executes the second file to be tested to obtain a second test result. 11.根据权利要求10所述的装置,其特征在于,所述第一获取模块包括:11. The apparatus according to claim 10, wherein the first obtaining module comprises: 识别子模块,用于对携带有第二终端的网络地址的二维码图像进行识别,获取所述第一网络地址标识。The identification sub-module is configured to identify the two-dimensional code image carrying the network address of the second terminal, and obtain the identifier of the first network address. 12.根据权利要求9到11中任意一项所述的装置,其特征在于,12. The device according to any one of claims 9 to 11, characterized in that, 所述预设通信连接包括Websocket协议通信连接。The preset communication connection includes a Websocket protocol communication connection. 13.一种文件测试装置,其特征在于,应用于第二终端,所述第二终端用于通过编译得到待测试文件,所述装置包括:13. A file testing device, characterized in that it is applied to a second terminal, and the second terminal is used to obtain a file to be tested by compiling, the device comprising: 第三请求模块,接收第一终端发送的第一文件获取请求,其中,所述第一终端用于运行待测试文件,所述第一文件获取请求中携带有第一终端的第一网络地址标识;The third request module receives a first file acquisition request sent by a first terminal, where the first terminal is used to run the file to be tested, and the first file acquisition request carries a first network address identifier of the first terminal ; 连接模块,用于根据所述第一网络地址与所述第一终端建立预设通信连接;a connection module, configured to establish a preset communication connection with the first terminal according to the first network address; 第一发送模块,用于响应于所述第一文件获取请求,通过预设通信连接向第一终端发送第一待测试文件,以使所述第一终端运行所述第一待测试文件。A first sending module, configured to send a first file to be tested to a first terminal through a preset communication connection in response to the first file acquisition request, so that the first terminal runs the first file to be tested. 14.根据权利要求13所述的装置,其特征在于,所述装置还包括:14. The apparatus of claim 13, wherein the apparatus further comprises: 编译模块,用于响应于编译控件被触发,对修改后的第一待测试文件的代码进行编译,得到第二待测试文件;a compilation module, used for compiling the modified code of the first file to be tested in response to the compilation control being triggered to obtain a second file to be tested; 第四请求模块,用于通过预设通信连接向第一终端发送文件更新请求,以使第一终端向第二终端发送第二文件获取请求;a fourth request module, configured to send a file update request to the first terminal through a preset communication connection, so that the first terminal sends a second file acquisition request to the second terminal; 第二发送模块,用于响应于所述第一终端发送的第二文件获取请求,通过预设通信连接向第一终端发送第二待测试文件,以使第一终端运行所述第二待测试文件。A second sending module, configured to send a second file to be tested to the first terminal through a preset communication connection in response to a second file acquisition request sent by the first terminal, so that the first terminal runs the second file to be tested document. 15.根据权利要求13所述的装置,其特征在于,所述装置还包括:15. The apparatus of claim 13, wherein the apparatus further comprises: 图像生成模块,用于根据第二终端的网络地址,生成携带有第二终端的网络地址的二维码图像。The image generation module is configured to generate a two-dimensional code image carrying the network address of the second terminal according to the network address of the second terminal. 16.根据权利要求13到15中任意一项所述的装置,其特征在于,16. The device according to any one of claims 13 to 15, characterized in that, 所述预设通信连接包括Websocket协议通信连接。The preset communication connection includes a Websocket protocol communication connection. 17.一种文件测试装置,其特征在于,包括:17. A file testing device, comprising: 处理器;processor; 用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions; 其中,所述处理器被配置为执行根据权利要求1至8中任意一项所述的方法。wherein the processor is configured to perform the method of any one of claims 1 to 8. 18.一种非临时性计算机可读存储介质,当所述存储介质中的指令由处理器执行时,使得处理器能够执行根据权利要求1至8中任意一项所述的方法。18. A non-transitory computer-readable storage medium, the instructions in the storage medium, when executed by a processor, enable the processor to perform the method of any one of claims 1 to 8.
CN201811496790.1A 2018-12-07 2018-12-07 File test method, device and computer readable storage medium Pending CN109656819A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811496790.1A CN109656819A (en) 2018-12-07 2018-12-07 File test method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811496790.1A CN109656819A (en) 2018-12-07 2018-12-07 File test method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109656819A true CN109656819A (en) 2019-04-19

Family

ID=66113567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811496790.1A Pending CN109656819A (en) 2018-12-07 2018-12-07 File test method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109656819A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113497821A (en) * 2020-04-07 2021-10-12 北京沃东天骏信息技术有限公司 Method, device and system for uploading files
CN116303049A (en) * 2023-03-22 2023-06-23 联想(北京)信息技术有限公司 A function debugging method, device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110113340A1 (en) * 2009-11-12 2011-05-12 Ntt Docomo, Inc. Information-processing device, communication system, computer readable medium, and information-processing method
CN104967542A (en) * 2015-06-23 2015-10-07 深圳市腾讯计算机系统有限公司 Mobile end page testing method, device and system
CN106528404A (en) * 2016-09-30 2017-03-22 腾讯科技(深圳)有限公司 Mobile application test method and apparatus
CN108399114A (en) * 2018-03-21 2018-08-14 财付通支付科技有限公司 A kind of system performance testing method, apparatus and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110113340A1 (en) * 2009-11-12 2011-05-12 Ntt Docomo, Inc. Information-processing device, communication system, computer readable medium, and information-processing method
CN104967542A (en) * 2015-06-23 2015-10-07 深圳市腾讯计算机系统有限公司 Mobile end page testing method, device and system
CN106528404A (en) * 2016-09-30 2017-03-22 腾讯科技(深圳)有限公司 Mobile application test method and apparatus
CN108399114A (en) * 2018-03-21 2018-08-14 财付通支付科技有限公司 A kind of system performance testing method, apparatus and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113497821A (en) * 2020-04-07 2021-10-12 北京沃东天骏信息技术有限公司 Method, device and system for uploading files
CN116303049A (en) * 2023-03-22 2023-06-23 联想(北京)信息技术有限公司 A function debugging method, device and electronic equipment

Similar Documents

Publication Publication Date Title
KR102377724B1 (en) Device network configuration method and apparatus, and medium
EP2975821B1 (en) Network connection method and apparatus
KR20160023628A (en) Method and device for verification using verification code
EP3276910A1 (en) Bluetooth-based identity recognition method and device
CN105515948B (en) Instant communicating method and device
KR101642019B1 (en) Method, apparatus, program, and recording medium of verifying terminal
CN104468329A (en) Member adding method and device based on instant messaging
CN109407528A (en) Safety access method, device, server and storage medium
CN109274510A (en) Message treatment method, device, client, server and storage medium
CN109117874A (en) Operation behavior prediction technique and device
CN106375096A (en) SMS verification method and device
EP3051772A1 (en) Method and apparatus for accessing network
CN107562500A (en) Debugging apparatus, method and apparatus
CN109246227A (en) A kind of data request method, device, terminal device and storage medium
CN105337937B (en) Network verification method, device and computer readable storage medium
CN111338971B (en) Application testing method and device, electronic equipment and storage medium
CN108205455A (en) The function realizing method and device of application, terminal
CN107395624B (en) Information processing method and device
CN106413129A (en) Method and device for binding terminal to intelligent equipment
CN109656819A (en) File test method, device and computer readable storage medium
CN114896165B (en) Testing method, device, electronic device and storage medium for conversational robot system
CN105306567B (en) Method and device for terminal connection
CN107070707B (en) Method and device for determining router initialization mode
CN109614334A (en) File testing method, device and computer-readable storage medium
CN106909481A (en) Interface test method, interface test 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190419

RJ01 Rejection of invention patent application after publication