CN109634858A - File test method, device and computer readable storage medium - Google Patents
File test method, device and computer readable storage medium Download PDFInfo
- Publication number
- CN109634858A CN109634858A CN201811497973.5A CN201811497973A CN109634858A CN 109634858 A CN109634858 A CN 109634858A CN 201811497973 A CN201811497973 A CN 201811497973A CN 109634858 A CN109634858 A CN 109634858A
- Authority
- CN
- China
- Prior art keywords
- file
- port
- terminal
- tested
- request
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3664—Environments for testing or debugging software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Abstract
The disclosure is directed to a kind of file test method, device and computer readable storage mediums.This method is applied to first terminal, and first terminal, this method comprises: identifying according to the first port of default testing service, determines first port corresponding with first port mark in the first terminal for running file to be tested;The request of the first file acquisition is sent to second terminal by the first port, so that the second terminal sends the first file to be tested to first terminal;When the first port receives the first file to be tested, first file to be tested is run, the first test result is obtained.In accordance with an embodiment of the present disclosure, first terminal can be issued file acquisition request to second terminal, and get the first test file in time, be realized the automation across end transmission of test file based on default testing service.
Description
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 test repeatedly application program according to test result, be modified, each time
Modification can all generate new version, and the executable file by new edition application is needed to copy to mobile terminal, therefore, complete one
In the development process of the application program of a mobile terminal, need repeatedly to copy to executable file from the end PC the operation of mobile terminal,
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 is identified according to the first port of default testing service, really
First port corresponding with first port mark in the fixed first terminal, leads between the first terminal and second terminal
It crosses default testing service to be communicated, the second terminal is used to obtain file to be tested by compiling;Pass through the first end
Mouth sends the request of the first file acquisition to second terminal, so that the second terminal sends the first text to be tested to first terminal
Part;When the first port receives the first file to be tested, first file to be tested is run, the first test knot is obtained
Fruit.
In one possible implementation, the method also includes: the first port receive file update ask
When asking, the request of the second file acquisition is sent to second terminal by the first port, so that the second terminal is whole to first
End sends the second file to be tested, and second file to be tested is based on the described first updated file of file to be tested;
When the first port receives the second file to be tested, second file to be tested is run, the second test result is obtained.
In one possible implementation, the default testing service includes the first port mark of the first port
Know, the second port mark and test thread of the second port in the second terminal, wherein by the first port to
Second terminal sends the request of the first file acquisition, comprising: sends institute for the request of the first file acquisition by the first port
State test thread;It is identified according to the second port, is sent to first file acquisition request by the test thread
The second port.
In one possible implementation, the method also includes: according to the first port of the first port identify
It is identified with the second port of the second port, the mapping being pre-configured between the first port and the second port is closed
System;According to the mapping relations, the default testing service is created.
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 according to the second end of default testing service
Mouth mark, determines second port corresponding with second port mark, the first terminal and second in the second terminal
It is communicated between terminal by default testing service, the first terminal is for running file to be tested;Pass through second port
Receive the first file acquisition request that first terminal is sent;It is requested in response to first file acquisition, it will by second port
First file to be tested is sent to first terminal, so that the first terminal runs first file to be tested.
In one possible implementation, the method also includes: in response to compiling control be triggered, to modified
The code of first file to be tested is compiled, and obtains the second file to be tested;File request is updated by second port to turn
It is sent to first terminal, 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, is sent to first terminal for the second file to be tested by second port, so that first terminal
Run the described second file to be tested.
In one possible implementation, the default testing service includes being set to the first end of the first port
Mouth identifies, the second port mark and test thread of the second port in the second terminal, wherein in response to described first
File acquisition request, is sent to first terminal for the first file to be tested by second port, so that the first terminal is run
First file to be tested, comprising: requested in response to first file acquisition, by second port by the first text to be tested
Part is sent to test thread;It is identified, is sent to the first file to be tested by the test thread described according to first port
First port.
In one possible implementation, the method also includes: according to the first port of the first port identify
It is identified with the second port of the second port, the mapping being pre-configured between the first port and the second port is closed
System;According to the mapping relations, the default testing service is created.
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 determining module, for according to default testing service
First port mark, determine first port corresponding with first port mark in the first terminal, first end
End is communicated between second terminal by default testing service, and the second terminal is used to obtain text to be tested by compiling
Part;First request module is requested for sending the first file acquisition to second terminal by the first port, so that described the
Two terminals send the first file to be tested to first terminal;First test module, for receiving first in the first port
When file to be tested, first file to be tested is run, the first test result is obtained.
In one possible implementation, this document test device further include: the second request module, for described the
When Single port receives file update request, the request of the second file acquisition is sent to second terminal by the first port, with
Make the second terminal to first terminal send the second file to be tested, second file to be tested be based on described first to
The updated file of test file;Second test module, for transporting when the first port receives the second file to be tested
Row second file to be tested, obtains the second test result.
In one possible implementation, the default testing service includes the first port mark of the first port
Know, the second port mark and test thread of the second port in the second terminal, wherein the first request module includes:
First request submodule, for sending the test thread for the request of the first file acquisition by the first port;Second
Submodule is requested, for being identified according to the second port, requests to send out by first file acquisition by the test thread
It send to the second port.
In one possible implementation, this document test device further include: the first configuration module, for according to
The first port mark of first port and the second port of the second port identify, and are pre-configured with the first port and described
Mapping relations between second port;First creation module, for creating the default test clothes according to the mapping relations
Business.
According to a fourth aspect of embodiments of the present disclosure, a kind of file test device is provided, is applied to second terminal, described the
Two terminals are used to obtain file to be tested by compiling, and described device includes: the second determining module, for according to default test clothes
The second port of business identifies, and determines second port corresponding with second port mark in the second terminal, and described first
It is communicated between terminal and second terminal by default testing service, the first terminal is for running file to be tested;The
One receiving module is requested for receiving the first file acquisition that first terminal is sent by second port;First file sends mould
Block, for the first file to be tested to be sent to first terminal by second port in response to first file acquisition request,
So that the first terminal runs first file to be tested.
In one possible implementation, this document test device further include: collector, for being controlled in response to compiling
Part is triggered, and is compiled to the code of the modified first file to be tested, obtains the second file to be tested;Third asks modulus
Block is forwarded to first terminal for file to be updated request by second port, so that first terminal sends the to second terminal
The request of two file acquisitions;Second file sending module, the second file acquisition request for being sent in response to the first terminal,
The second file to be tested is sent to first terminal by second port, so that first terminal runs second text to be tested
Part.
In one possible implementation, the default testing service includes being set to the first end of the first port
Mouth identifies, the second port mark and test thread of the second port in the second terminal, wherein the first file sends mould
Block includes: the first file sending submodule, in response to first file acquisition request, by second port by first to
Test file is sent to test thread;Second file sending submodule passes through the p-wire for identifying according to first port
First file to be tested is sent to the first port by journey.
In one possible implementation, this document test device further include: the second configuration module, for according to
The first port mark of first port and the second port of the second port identify, and are pre-configured with the first port and described
Mapping relations between second port;Second creation module, for creating the default test clothes according to the mapping relations
Business.
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 presets testing service just when the first test file is sent to the default testing service for occupying first port by first terminal
The information exchange between first terminal and second terminal can be completed with pre-set mapping relations.Realize test file across
The software development link, to be tested held the automation of transmission, while can will form software program executable file and need to pass through
File is closely connected across end transmission link and the testing process of file to be tested, realizes to form software program and can hold
The automation of the overall flow of style of writing part.
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 A is a kind of schematic diagram of the application scenarios of file test method shown according to an exemplary embodiment.
Fig. 5 B is a kind of schematic diagram of the application scenarios of file test method shown according to an exemplary embodiment.
Fig. 5 C 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 in first terminal, comprising the following steps:
In step s 11, it is identified, is determined in the first terminal with described the according to the first port of default testing service
Single port identifies corresponding first port, is communicated between the first terminal and second terminal by default testing service,
The second terminal is used to obtain file to be tested by compiling;
In step s 12, the request of the first file acquisition is sent to second terminal by the first port, so that described the
Two terminals send the first file to be tested to first terminal;
In step s 13, when the first port receives the first file to be tested, first text to be tested is run
Part obtains the first test result.
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, 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 terminal and second terminal can pass through wired connection or wireless connection
Mode connect, in this implementation, first terminal and second terminal can establish wired connection by usb interface.The disclosure
With no restriction to the specific connection type between first terminal and second terminal.
In one possible implementation, default testing service can be used for the letter between first terminal and second terminal
Breath interaction, first port mark can be in first terminal and preset shared by testing service for identifying first port, first port
Communication port.In the present embodiment, default testing service can issue (or reception) by the first port of first terminal
Information, and the information exchange between first terminal and second terminal is completed by pre-set mapping relations.
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 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, the first test file is sent to the default testing service of occupancy first port when first terminal
When, default testing service can complete the information between first terminal and second terminal by pre-set mapping relations
Interaction, realize test file across end transmission automation, while can will be formed software program executable file need through
The testing process across end transmission link and file to be tested of the software development link, file to be tested crossed closely connects
Come, realizes the automation to form the overall flow of software program executable file.
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 the first port receives file and updates request, by the first port to second
Terminal sends the request of the second file acquisition, so that the second terminal sends the second file to be tested to first terminal;
In step S15, when the first port receives the second file to be tested, second text to be tested is run
Part obtains the second test result.
In one possible implementation, first terminal can be previously stored with the executable file in above-described embodiment
Initial version (having the first file to be tested), operation performed by step S14 to step S15 can be update this first to
The operation of test 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.
In one possible implementation, file, which updates, requests to can be the executable text in developer to new version
After part completes coding and second terminal compiling completion, actively issued by second terminal.The request of second file acquisition can be
What first terminal was issued for response file update request, to indicate the file of first terminal " agreement " second terminal sending more
New request can be according to second port, to first after second terminal receives the second file acquisition request of first terminal transmission
Terminal sends the second file (i.e. the executable file of new version) to be tested.
In one possible implementation, the default testing service includes the first port mark of the first port
Know, the second port mark and test thread of the second port in the second terminal, second file to be tested is base
In the described first updated file of file to be tested;Wherein, step S12 sends the to second terminal by the first port
One file acquisition request, comprising: the test thread is sent for the request of the first file acquisition by the first port;According to
First file acquisition request is sent to the second port by the test thread by the second port mark.
In a kind of possible implementation, default testing service may include the first sub- testing service, the second son test clothes
Business and test thread, wherein the first sub- testing service is set to first terminal, and occupies the first port of first terminal;Second
Sub- testing service is set to second terminal, and occupies the second port of second terminal.
In a kind of possible implementation, the second file to be tested can be sent to by the compiling application program of second terminal to be accounted for
Test can be passed through after the second sub- testing service receives the second file to be tested with the second sub- testing service of second port
Second file to be tested is sent to the first sub- testing service for occupying first port by thread, and the first sub- testing service receives the
After two files to be tested, the second file to be tested is sent to the test application program of first terminal.
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, such as Fig. 2, this document test method further include:
In step s 16, according to the second port mark of the first port of first port mark and the second port
Know, the mapping relations being pre-configured between the first port and the second port;
In step S17, according to the mapping relations, the default testing service is created.
It in one possible implementation, can will be according to the end being in idle condition in first terminal and second terminal
Mouth is used as first port and second port, and is identified according to the second port of the first port of first port mark and second port
The mapping relations of the two are established, and according to the mapping relations, create the default testing service.
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 the step s 21, it is identified, is determined in the second terminal with described the according to the second port of default testing service
Two-port netwerk identifies corresponding second port, is communicated between the first terminal and second terminal by default testing service,
The first terminal is for running file to be tested;
In step S22, the first file acquisition that first terminal is sent is received by second port and is requested;
It in step S23, requests in response to first file acquisition, is sent out the first file to be tested by second port
It send to first terminal, so that the first terminal runs first file to be tested.
In the present embodiment, the step S21, operation that step S22 and step S23 are described, with step in above embodiment
S11, step S12 and the operation that step S13 is described are identical.It is obtained accordingly, with respect to first terminal, second terminal, the first file
The definition for taking the nouns such as request, first port mark, the first file to be tested, is referred to retouching in above embodiment
It states.
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 this way, second terminal can send the first test text by occupying the default testing service of second port
Part, default testing service can pre-set mapping relations complete the information exchange between first terminal and second terminal.
Realize test file across end transmission automation, while can will be formed software program executable file needs pass through it is soft
Part exploitation link, the testing process across end transmission link and file to be tested of file to be tested closely connect, and realize
Form the automation of the overall flow of software program executable file.
Fig. 4 is a kind of flow chart of file test method shown according to an exemplary embodiment, as shown in figure 4, described
Method further include:
In step s 24, 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 25, file is updated by request by second port and is forwarded to first terminal, so that first terminal is to the
Two terminals send the request of the second file acquisition;
It in step S26, is requested in response to the second file acquisition that the first terminal is sent, by second port by the
Two files to be tested are sent to first terminal, so that first terminal runs second file to be tested.
In the present embodiment, the step S24, operation that step S25 and step S26 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, second port mark, file more
The definition of the nouns such as new 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, the default testing service includes the first port mark of the first port
Know, the second port mark and test thread of the second port in the second terminal, wherein step S23 is in response to described
The request of first file acquisition, is sent to first terminal for the first file to be tested by second port, so that the first terminal
Run the described first file to be tested, comprising: it is requested in response to first file acquisition, it is to be measured by first by second port
Examination file is sent to test thread;It is identified according to first port, is sent to the first file to be tested by the test thread
The first port.
In a kind of possible implementation, default testing service may include the first sub- testing service, the second son test clothes
Business and test thread, wherein the first sub- testing service is set to first terminal, and occupies the first port of first terminal;Second
Sub- testing service is set to second terminal, and occupies the second port of second terminal.
In a kind of possible implementation, the second file to be tested can be sent to by the compiling application program of second terminal to be accounted for
Test can be passed through after the second sub- testing service receives the second file to be tested with the second sub- testing service of second port
Second file to be tested is sent to the first sub- testing service for occupying first port by thread, and the first sub- testing service receives the
After two files to be tested, the second file to be tested is sent to the test application program of first terminal.
Such as Fig. 4, in one possible implementation, this document test method further include:
In step s 27, according to the second port mark of the first port of first port mark and the second port
Know, the mapping relations being pre-configured between the first port and the second port;
In step S28, according to the mapping relations, the default testing service is created.
In the present embodiment, step S17 and step in operation, with above embodiment described in step S27 and step S28
It is same process that S18, which is described, and detailed process is referred to the description in above embodiment.
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 A 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 5A, this document test method the following steps are included:
1, it runs side (first terminal) and compiling side (second terminal) starts HTTP service;
2, operation side passes through USB interface link edition side;
3, compiling side wheel, which is ask, has detected whether operation side (first using ADB (Android Debug Bridge debugs bridge)
Terminal) it is connected into;
4, one group of forwarding port from compiling side to operation side is arranged in compiling side (from compiling side ports to operation side ports);
5, one group of forwarding port from operation side to compiling side is arranged in compiling side (from operation side ports to compiling side ports).
Fig. 5 B is a kind of schematic diagram of the application scenarios of file test method shown according to an exemplary embodiment.Such as figure
Shown in 5B, this document test method the following steps are included:
1, operation side (first terminal) compiles modified code and obtains new rpk file (the second file to be tested);
2, compiling side sends HTTP request by the local port side (first port) Xiang Yunhang, indicates that request sends rpk text
Part;
3, operation side sends HTTP request to compiling side by local port (second port), indicates that request receives rpk text
Part;
4, compiling side sends new rpk file by the side local port (first port) Xiang Yunhang;
5, operation side runs new rpk file.
Fig. 5 C is a kind of schematic diagram of the application scenarios of file test method shown according to an exemplary embodiment.Such as figure
Shown in 5C, this document test method the following steps are included:
1, operation side sends HTTP request to compiling side by local port (second port), indicates request downloading rpk text
Part;
2, compiling side sends rpk file by the local port side (first port) Xiang Yunhang;
3, operation side runs rpk file.
According to the application example of the disclosure, first terminal and second can be realized eventually by establishing preset testing service
Information exchange between end realizes the automation across end transmission of test file, while formation software program can be held
The testing process across end transmission link and file to be tested of software development link, file to be tested that style of writing part needs to pass through is tight
Close connects, and realizes 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 determining module 51, and first
Request module 52 and the first test module 53.
First determining module 51, for determining in the first terminal according to the first port mark for presetting testing service
First port corresponding with first port mark, between the first terminal and second terminal by default testing service into
Row communication, the second terminal are used to obtain file to be tested by compiling;
First request module 52, for sending the request of the first file acquisition to second terminal by the first port, with
The second terminal is set to send the first file to be tested to first terminal;
First test module 53, for running described first when the first port receives the first file to be tested
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, this document
Test device further include:
Second request module 54, for passing through the first end when the first port receives file and updates request
Mouth sends the request of the second file acquisition to second terminal, so that the second terminal sends the second text to be tested to first terminal
Part, second file to be tested are based on the described first updated file of file to be tested;
Second test module 55, for running described second when the first port receives the second file to be tested
File to be tested obtains the second test result.
In one possible implementation, as shown in fig. 7, the default testing service includes the of the first port
Single port identifies, the second port mark and test thread of the second port in the second terminal, wherein first asks modulus
Block 52 includes: the first request submodule 521, for sending the survey for the request of the first file acquisition by the first port
Try thread;Second request submodule 522, for being identified according to the second port, by the test thread by described first
File acquisition request is sent to the second port.
In one possible implementation, as shown in fig. 7, this document test device further include:
First configuration module 56, for according to the second of the first port of first port mark and the second port
Port-mark, the mapping relations being pre-configured between the first port and the second port;
First creation module 57, for creating the default testing service according to the mapping relations.
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 determines mould including second
Block 71, the first receiving module 72 and the first file sending module 73.
Second determining module 71, for determining in the second terminal according to the second port mark for presetting testing service
Second port corresponding with second port mark, between the first terminal and second terminal by default testing service into
Row communication, the first terminal is for running file to be tested;
First receiving module 72 is requested for receiving the first file acquisition that first terminal is sent by second port;
First file sending module 73, for being requested in response to first file acquisition, by second port by first
File to be tested is sent to first terminal, 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;
Third request module 75 is forwarded to first terminal for file to be updated request by second port, so that first
Terminal sends the request of the second file acquisition to second terminal;
Second file sending module 76, the second file acquisition request for sending in response to the first terminal, passes through
Second file to be tested is sent to first terminal by second port, so that first terminal runs second file to be tested.
In one possible implementation, as shown in figure 9, the default testing service includes being set to the first end
The first port of mouth identifies, the second port mark and test thread of the second port in the second terminal,
Wherein, the first file sending module 73 includes: the first file sending submodule 731, in response to described first
File acquisition request, is sent to test thread for the first file to be tested by second port;Second file sending submodule
732, for identifying according to first port, the first file to be tested is sent to by the first port by the test thread.
In one possible implementation, as shown in figure 9, described device further include:
Second configuration module 77, for according to the second of the first port of first port mark and the second port
Port-mark, the mapping relations being pre-configured between the first port and the second port;
Second creation module 78, for creating the default testing service according to the mapping relations.
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..
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. a kind of file test method, which is characterized in that be applied to first terminal, the first terminal is for running text to be tested
Part, which comprises
It is identified, is determined corresponding with first port mark in the first terminal according to the first port of default testing service
First port is communicated between the first terminal and second terminal by default testing service, and the second terminal is used for
File to be tested is obtained by compiling;
The request of the first file acquisition is sent to second terminal by the first port, so that the second terminal is to first terminal
Send the first file to be tested;
When the first port receives the first file to be tested, first file to be tested is run, the first test is obtained
As a result.
2. the method according to claim 1, wherein the method also includes:
When the first port receives file and updates request, the second file is sent to second terminal by the first port
Acquisition request, so that the second terminal sends the second file to be tested to first terminal, second file to be tested is base
In the described first updated file of file to be tested;
When the first port receives the second file to be tested, second file to be tested is run, the second test is obtained
As a result.
3. the method according to claim 1, wherein the default testing service includes the of the first port
Single port identifies, the second port mark and test thread of the second port in the second terminal,
Wherein, the request of the first file acquisition is sent to second terminal by the first port, comprising:
The test thread is sent by the request of the first file acquisition by the first port;
It is identified according to the second port, first file acquisition request is sent to described second by the test thread
Port.
4. according to claim 1 to method described in any one of 3, which is characterized in that the method also includes:
It is identified according to the second port of the first port of first port mark and second port, is pre-configured with the first end
Mapping relations between mouth and the second port;
According to the mapping relations, the default testing service is created.
5. a kind of file test method, which is characterized in that be applied to second terminal, the second terminal is used to obtain by compiling
File to be tested, which comprises
It is identified, is determined corresponding with second port mark in the second terminal according to the second port of default testing service
Second port is communicated between first terminal and second terminal by default testing service, and the first terminal is for running
File to be tested;
The first file acquisition request that first terminal is sent is received by second port;
It is requested in response to first file acquisition, the first file to be tested is sent to by first terminal by second port, with
The first terminal is set to run first file to be tested.
6. according to the method described in claim 5, it is characterized in that, the method also includes:
It is triggered in response to compiling control, the code of the modified first file to be tested is compiled, it is to be measured to obtain second
Try file;
File is updated into request by second port and is forwarded to first terminal, so that first terminal sends the second text to second terminal
Part acquisition request;
In response to the second file acquisition request that the first terminal is sent, the second file to be tested is sent by second port
To first terminal, so that first terminal runs second file to be tested.
7. the method according to any one of claim 5, which is characterized in that the default testing service includes being set to
The first port of first port identifies, the second port mark and test thread of the second port in the second terminal,
Wherein, it is requested in response to first file acquisition, the first file to be tested is sent to first eventually by second port
End, so that the first terminal runs first file to be tested, comprising:
It is requested in response to first file acquisition, the first file to be tested is sent to by test thread by second port;
It is identified according to first port, the first file to be tested is sent to by the first port by the test thread.
8. according to method described in claim 5 to 7 any one, which is characterized in that the method also includes:
It is identified according to the second port of the first port of first port mark and the second port, is pre-configured with the first end
Mapping relations between mouth and the second port;
According to the mapping relations, the default testing service is created.
9. a kind of file test device, which is characterized in that be applied to first terminal, the first terminal is for running text to be tested
Part, described device include:
First determining module, for according to preset testing service first port mark, determine in the first terminal with it is described
First port identifies corresponding first port, is led between the first terminal and second terminal by default testing service
Letter, the second terminal are used to obtain file to be tested by compiling;
First request module, for sending the request of the first file acquisition to second terminal by the first port, so that described
Second terminal sends the first file to be tested to first terminal;
First test module, for it is to be tested to run described first when the first port receives the first file to be tested
File obtains the first test result.
10. device according to claim 9, which is characterized in that described device further include:
Second request module, for when the first port receives file and updates request, by the first port to the
Two terminals send the request of the second file acquisition, so that the second terminal sends the second file to be tested to first terminal, it is described
Second file to be tested is based on the described first updated file of file to be tested;
Second test module, for it is to be tested to run described second when the first port receives the second file to be tested
File obtains the second test result.
11. device according to claim 9, which is characterized in that the default testing service includes the first port
First port identifies, the second port mark and test thread of the second port in the second terminal,
Wherein, the first request module includes:
First request submodule, for sending the test thread for the request of the first file acquisition by the first port;
Second request submodule is obtained first file by the test thread for being identified according to the second port
Request is taken to be sent to the second port.
12. the device according to any one of claim 9 to 11, which is characterized in that described device further include:
First configuration module, for being identified according to the second port of the first port of first port mark and second port,
The mapping relations being pre-configured between the first port and the second port;
First creation module, for creating the default testing service according to the mapping relations.
13. a kind of file test device, which is characterized in that be applied to second terminal, the second terminal is used for by compiling
To file to be tested, described device includes:
Second determining module, for according to preset testing service second port mark, determine in the second terminal with it is described
Second port identifies corresponding second port, is communicated between first terminal and second terminal by default testing service, institute
First terminal is stated for running file to be tested;
First receiving module is requested for receiving the first file acquisition that first terminal is sent by second port;
First file sending module, it is to be tested by first by second port for being requested in response to first file acquisition
File is sent to first terminal, so that the first terminal runs first file to be tested.
14. device according to claim 13, which is characterized in that described device further include:
Collector, in response to compiling control be triggered, the code of the modified first file to be tested is compiled,
Obtain the second file to be tested;
Third request module, for by second port by file update request be forwarded to first terminal so that first terminal to
Second terminal sends the request of the second file acquisition;
Second file sending module, the second file acquisition request for sending in response to the first terminal, passes through second end
Second file to be tested is sent to first terminal by mouth, so that first terminal runs second file to be tested.
15. device described in any one of 3 according to claim 1, which is characterized in that the default testing service includes setting
It is identified in the first port of first port, the second port mark and test thread of the second port in the second terminal,
Wherein, the first file sending module includes:
First file sending submodule, it is to be measured by first by second port for being requested in response to first file acquisition
Examination file is sent to test thread;
Second file sending submodule, for being identified according to first port, by the test thread by the first file to be tested
It is sent to the first port.
16. device described in 3 to 15 any one according to claim 1, which is characterized in that described device further include:
Second configuration module, for being identified according to the second port of the first port of first port mark and the second port,
The mapping relations being pre-configured between the first port and the second port;
Second creation module, for creating the default testing service according to the mapping relations.
17. a kind of file test device characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to method as claimed in any of claims 1 to 8.
18. a kind of non-transitorycomputer readable storage medium makes when the instruction in the storage medium is executed by processor
It obtains processor and is able to carry out method as claimed in any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811497973.5A CN109634858A (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 |
---|---|---|---|
CN201811497973.5A CN109634858A (en) | 2018-12-07 | 2018-12-07 | File test method, device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109634858A true CN109634858A (en) | 2019-04-16 |
Family
ID=66072107
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811497973.5A Pending CN109634858A (en) | 2018-12-07 | 2018-12-07 | File test method, device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109634858A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101162456A (en) * | 2007-07-03 | 2008-04-16 | 王辉 | ATS automatization test system |
CN104967542A (en) * | 2015-06-23 | 2015-10-07 | 深圳市腾讯计算机系统有限公司 | Mobile end page testing method, device and system |
CN105376107A (en) * | 2014-08-29 | 2016-03-02 | 腾讯科技(深圳)有限公司 | Terminal test method and proxy server |
CN106201858A (en) * | 2015-05-07 | 2016-12-07 | 阿里巴巴集团控股有限公司 | The test system of application program and control method thereof and device in mobile terminal |
CN106528404A (en) * | 2016-09-30 | 2017-03-22 | 腾讯科技(深圳)有限公司 | Mobile application test method and apparatus |
CN107423218A (en) * | 2017-07-20 | 2017-12-01 | 北京小米移动软件有限公司 | Application testing method, device and terminal |
CN108170606A (en) * | 2018-01-03 | 2018-06-15 | 中国工商银行股份有限公司 | The test system and method for system software upgrading class application |
CN108345531A (en) * | 2017-01-23 | 2018-07-31 | 阿里巴巴集团控股有限公司 | A kind of test method, apparatus and system |
CN108804336A (en) * | 2018-06-15 | 2018-11-13 | 深圳壹账通智能科技有限公司 | Interactive system test method, device, computer equipment and storage medium |
-
2018
- 2018-12-07 CN CN201811497973.5A patent/CN109634858A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101162456A (en) * | 2007-07-03 | 2008-04-16 | 王辉 | ATS automatization test system |
CN105376107A (en) * | 2014-08-29 | 2016-03-02 | 腾讯科技(深圳)有限公司 | Terminal test method and proxy server |
CN106201858A (en) * | 2015-05-07 | 2016-12-07 | 阿里巴巴集团控股有限公司 | The test system of application program and control method thereof and device in mobile terminal |
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 |
CN108345531A (en) * | 2017-01-23 | 2018-07-31 | 阿里巴巴集团控股有限公司 | A kind of test method, apparatus and system |
CN107423218A (en) * | 2017-07-20 | 2017-12-01 | 北京小米移动软件有限公司 | Application testing method, device and terminal |
CN108170606A (en) * | 2018-01-03 | 2018-06-15 | 中国工商银行股份有限公司 | The test system and method for system software upgrading class application |
CN108804336A (en) * | 2018-06-15 | 2018-11-13 | 深圳壹账通智能科技有限公司 | Interactive system test method, device, computer equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
朱百钢: "《现代远程教育及校园网建设全书 上》", 31 January 2001 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106126685B (en) | Page loading method and device | |
CN110262818A (en) | The hot update method of Java code, device, electronic equipment and storage medium | |
CN105553963B (en) | The control method and device of positioning service | |
CN105094931B (en) | Method for upgrading software and device | |
CN106528255B (en) | Kind loading method and device | |
CN106254467A (en) | Sharing files method and device | |
CN104052796A (en) | Plug-in processing method, device, system and terminal | |
KR101642019B1 (en) | Method, apparatus, program, and recording medium of verifying terminal | |
CN103916468B (en) | Method for upgrading system, terminal, server and upgrade-system | |
CN109117874A (en) | Operation behavior prediction technique and device | |
CN107205084A (en) | Network speed processing method, device and the terminal of application program | |
CN104317647B (en) | Application function implementation method, device and terminal | |
CN106201610A (en) | Web application accesses the method and device of the primary function of terminal | |
CN107562500B (en) | Debugging device, method and equipment | |
CN107423218A (en) | Application testing method, device and terminal | |
CN106413129A (en) | Method and device for binding terminal to intelligent equipment | |
CN107911482A (en) | Intended application deployment method and device | |
CN109582297A (en) | A kind of generation method of Code Template, device, electronic equipment and storage medium | |
CN109684112A (en) | Program file operation method, device, terminal and storage medium | |
CN109344051A (en) | Method, apparatus, electronic equipment and the storage medium of data processing | |
CN108984417A (en) | Method for testing software, device, terminal and storage medium | |
CN105530129A (en) | Router reset method and device | |
CN108319835A (en) | User's space access control method, device, equipment and storage medium | |
CN106062762B (en) | Using encryption method and device | |
CN105323318B (en) | Amending method, device and the equipment of parameter |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190416 |