CN110022244A - Method and apparatus for sending information - Google Patents

Method and apparatus for sending information Download PDF

Info

Publication number
CN110022244A
CN110022244A CN201910264557.9A CN201910264557A CN110022244A CN 110022244 A CN110022244 A CN 110022244A CN 201910264557 A CN201910264557 A CN 201910264557A CN 110022244 A CN110022244 A CN 110022244A
Authority
CN
China
Prior art keywords
test case
test
pending
replacement
response
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.)
Granted
Application number
CN201910264557.9A
Other languages
Chinese (zh)
Other versions
CN110022244B (en
Inventor
宋立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910264557.9A priority Critical patent/CN110022244B/en
Publication of CN110022244A publication Critical patent/CN110022244A/en
Application granted granted Critical
Publication of CN110022244B publication Critical patent/CN110022244B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

Embodiment of the disclosure discloses the method and apparatus for sending information.One specific embodiment of this method includes: the initialization in response to detecting the test environment of target application, the first object method for configuring test parameter is replaced using the first replacement method, and is used for the second goal approach of implementation of test cases using the replacement of the second replacement method;The first replacement method is executed to obtain pending test case number;The relevant information of the implementation procedure of the test case is recorded in file destination in response to detecting that the test case executes the second replacement method for a test case;According to pending test case number, determining whether the several test cases of pending test case execute terminates;Terminate in response to the several test case execution of the pending test case of determination, sends newest file destination.The embodiment realizes the amount of storage for increasing and testing obtained validity test information every time, to shorten the test period of entire target application.

Description

Method and apparatus for sending information
Technical field
Embodiment of the disclosure is related to field of computer technology, and in particular to the method and apparatus for sending information.
Background technique
Test to mobile application usually may include two class of manual testing and automatic test.Wherein, manual testing side The test job amount of method is big, test period is longer, and is easy error, causes testing efficiency not high.Use various testing tools Automatic test test speed is very fast, can promote testing efficiency.But some testing tools be typically only capable to provide it is some simple Test report, cannot provide it is detailed about failure test case failure information (such as failure cause).
Summary of the invention
Embodiment of the disclosure proposes the method and apparatus for sending information.
In a first aspect, embodiment of the disclosure provides a kind of method for sending information, this method comprises: in response to The initialization for detecting the test environment of target application, replaces the first mesh for configuring test parameter using the first replacement method Mark method, and the second goal approach using the replacement of the second replacement method for implementation of test cases;Execute the first replacement side Method is to obtain pending test case number, wherein pending test case number indicates the test case for test target application Number;Test case in test cases several for pending test case, in response to detecting that the test case executes Second replacement method records the relevant information of the implementation procedure of the test case in file destination;It is used according to pending test Number of cases, determining whether the several test cases of pending test case execute terminates;It is several in response to the pending test case of determination Test case execution terminates, and sends newest file destination.
In some embodiments, according to pending test case number, determine that the several test cases of pending test case are No execution terminates, comprising: the test case in test cases several for pending test case, in response to determining that the test is used Example, which executes the second replacement method, to be terminated, and subtracts one for current pending test case number to update pending test case number;It rings It should determine that the several test case execution of pending test case terminate in determining that newest pending test case number is zero.
In some embodiments, the relevant information of the implementation procedure of the test case includes execution result information, wherein is held Row result information includes executing failure for characterizing information that the test case runs succeeded or for characterizing the test case The information of failure cause.
In some embodiments, the above method further include: moved back in response to detecting that target application occurs to dodge, obtain target and answer The relevant information moved back with the sudden strain of a muscle of generation, and save the correlation that the sudden strain of a muscle that target application occurs is moved back in newest file destination and believe Breath.
In some embodiments, the above method further include: determine the execution time of the first replacement method as target application The test time started;Determine that the several test cases of pending test case execute test of the time terminated as target application End time;Record test time started and test end time in newest file destination.
In some embodiments, send newest file destination, comprising: to server-side send newest file destination with by Server-side executes following steps: parsing to newest file destination, obtains parsing result information, and show parsing result Information.
Second aspect, embodiment of the disclosure provide a kind of for sending the device of information, which includes: that replacement is single Member is configured in response to detect the initialization of the test environment of target application, be replaced using the first replacement method for matching The first object method of test parameter is set, and is used for the second target side of implementation of test cases using the replacement of the second replacement method Method;Acquiring unit is configured to execute the first replacement method to obtain pending test case number, wherein pending test is used Number of cases indicates the number of the test case for test target application;Recording unit is configured to for pending test case Test case in several test cases, in response to detecting that the test case executes the second replacement method, in file destination Record the relevant information of the implementation procedure of the test case;Determination unit is configured to be determined according to pending test case number Whether the pending several test cases of test case, which execute, terminates;Transmission unit is configured in response to determine pending test The several test case execution of use-case terminate, and send newest file destination.
In some embodiments, above-mentioned determination unit is further configured to: tests several for pending test case Test case in use-case terminates in response to determining that the test case executes the second replacement method, by current pending test Subtract one with number of cases to update pending test case number;Be zero in response to the newest pending test case number of determination, determine to The several test case execution of implementation of test cases terminate.
In some embodiments, the relevant information of the implementation procedure of the test case includes execution result information, wherein is held Row result information includes executing failure for characterizing information that the test case runs succeeded or for characterizing the test case The information of failure cause.
In some embodiments, above-mentioned recording unit is further configured to: in response to detecting that target application is dodged It moves back, obtains the relevant information that the sudden strain of a muscle that target application occurs is moved back, and save what target application occurred in newest file destination Dodge the relevant information moved back.
In some embodiments, above-mentioned recording unit is further configured to: determining the execution time of the first replacement method The test time started as target application;Determine that the several test cases of pending test case execute the time terminated as mesh Mark the test end time of application;Record test time started and test end time in newest file destination.
In some embodiments, above-mentioned transmission unit is further configured to: sending newest file destination to server-side To execute following steps by server-side: being parsed to newest file destination, obtain parsing result information, and show parsing Result information.
The third aspect, embodiment of the disclosure provide a kind of electronic equipment, which includes: one or more places Manage device;Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, So that one or more processors realize the method as described in implementation any in first aspect.
Fourth aspect, embodiment of the disclosure provide a kind of computer-readable medium, are stored thereon with computer program, The method as described in implementation any in first aspect is realized when the computer program is executed by processor.
The method and apparatus for sending information that embodiment of the disclosure provides, by before test case executes, elder generation Replacement is each so as to be recorded according to application demand for configuring test parameter and for two methods of implementation of test cases The details of test case implementation procedure.It can determine the execution end time of test case, simultaneously so as at this Before test terminates, the file destination of record test relevant information can be sent in time effectively to be saved.
It, can be according to the detailed test information pair recorded in the file destination of preservation after this test terminates as a result, The place that target application goes wrong adjustment in time, later, can continue to test to target application adjusted.This mode is logical The amount of storage for increasing and testing obtained validity test information every time is crossed, to shorten the test period of entire target application, to mention Rise testing efficiency.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the disclosure is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the disclosure can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for sending information of the disclosure;
Fig. 3 is according to an embodiment of the present disclosure for sending the schematic diagram of an application scenarios of the method for information;
Fig. 4 is the flow chart according to another embodiment of the method for sending information of the disclosure;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for sending information of the disclosure;
Fig. 6 is adapted for the structural schematic diagram for realizing the electronic equipment of embodiment of the disclosure.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure can phase Mutually combination.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the method for sending information of the disclosure or the implementation of the device for sending information The exemplary architecture 100 of example.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
Terminal device 101,102,103 is interacted by network 104 with server 105, to receive or send message etc..Terminal Various clients can be installed to answer or tool in equipment 101,102,103.For example, for test application application or tool, For the application of development and application, the application of browser class, searching class application etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard When part, it can be with display screen and support using the various electronic equipments tested, including but not limited to smart phone, plate Computer, pocket computer on knee and desktop computer etc..When terminal device 101,102,103 is software, can install In above-mentioned cited electronic equipment.Multiple softwares or software module may be implemented into (such as providing distributed clothes in it The multiple softwares or software module of business), single software or software module also may be implemented into.It is not specifically limited herein.
Server 105 can be to provide the server of various services, for example, to be measured on terminal device 101,102,103 The application of examination provides the back-end server supported.Server 105 can receive the transmission of terminal device 101,102,103, record There is the file destination of the relevant information of the test process of application to be tested.Further, server 105 can also be to received Record has the file destination of test information to be parsed, to understand the problem of application to be tested may currently exist, and to Family is shown, in order to which user adjusts application to be tested in time.
It should be noted that for sending the method for information generally by terminal device provided by embodiment of the disclosure 101, it 102,103 executes, correspondingly, the device for sending information is generally positioned in terminal device 101,102,103.
It should be noted that server 105 can be hardware, it is also possible to software.It, can when server 105 is hardware To be implemented as the distributed server cluster that multiple servers form, individual server also may be implemented into.When server 105 is When software, multiple softwares or software module may be implemented into (such as providing multiple softwares of Distributed Services or software mould Block), single software or software module also may be implemented into.It is not specifically limited herein.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, it illustrates the processes according to one embodiment of the method for sending information of the disclosure 200.This be used for send information method the following steps are included:
Step 201, in response to detect target application test environment initialization, use the first replacement method replacement use In the first object method of configuration test parameter, and the second mesh using the replacement of the second replacement method for implementation of test cases Mark method.
In the present embodiment, for send the method for information executing subject (terminal device as shown in Figure 1 101,102, 103) it can use the application installed thereon for test application or tool test target application.Wherein, target is answered With can be by the preassigned application to be tested of technical staff.
Generally, when application starts, there is the process for initialization test environment.This process is commonly used in standard It is standby to test necessary some data.Such as initial assignment, some data manipulations relevant to database are carried out to some parameters Deng.
The initialization of usually test environment is executed by a method.In this case, it can detect pair When the method for initialization test environment answered executes, first object method and the second goal approach are replaced.
Wherein, first object method and the second goal approach can be the side of application or tool offer for test application Method.First replacement method and the second replacement method can be configured by technical staff according to actual application demand in advance.
First object method can be used for configuring test parameter.Wherein, test parameter may include that test process is relevant Arbitrary parameter.For example, test parameter may include that this is tested where the number for the test case for including, each test case Position etc..
Second goal approach can be used for implementation of test cases.The execution of i.e. each test case may require calling Two goal approach.
Optionally, first object method may be implemented in the first replacement method, may be implemented second in the second replacement method Goal approach.
It can achieve modification first object method and second by the replacement to first object method and the second goal approach The purpose of goal approach.So that replaced first object method (i.e. the first replacement method) is in addition to first object side Except the function that method is realized, function needed for can also realizing other some application demands.Equally it is also possible that replacement The second goal approach (i.e. the second replacement method) afterwards can also realize it other than the function that the second goal approach is realized Function needed for his some application demands.
Specifically, can be based on the technologies such as existing Hook (hook) technology, rewrite method to first object method and the Two goal approach are replaced.
Herein, it replaces first object method and the first purpose of the second goal approach is to be able in first object side Before method and the second goal approach execute, some customized functions are completed.Therefore, first object method and the second target are replaced As long as the specific opportunity of method is before the execution time of first object method and the second goal approach.
Step 202, the first replacement method is executed to obtain pending test case number.
In the present embodiment, the first replacement method can be used for obtaining pending test case number.Wherein, pending test With the total number for the test case that number of cases can indicate to apply for test target.It, can as a result, when executing the first replacement method To get pending test case number.
Step 203, the test case in test cases several for pending test case, in response to detecting the test Use-case executes the second replacement method, and the relevant information of the implementation procedure of the test case is recorded in file destination.
In the present embodiment, it since each test case is by calling the second goal approach to be executed, can replace Change the second goal approach in the implementation procedure of each test case (including execute before, execute after, execute it is medium) complete institute The function of needing.
Second replacement method can be used in the implementation procedure of each test case, record the execution of each test case The relevant information of process.For any test case, the relevant information of the implementation procedure of the test case may include and the survey The relevant arbitrary information of example implementation procedure on probation.
For example, for a test case, the relevant information of the implementation procedure of the test case may include the test Test operation performed by use-case (such as logging in application) and the execution time of each test operation etc..
Optionally, the relevant information of the implementation procedure of the test case may include execution result information.Wherein, knot is executed Fruit information may include executing failure for characterizing information that the test case runs succeeded or for characterizing the test case The information of failure cause.As a result, when test case execution fails, in addition to recognizing that the test case executes failure, Specific failure cause can also be recorded (such as time-out, function are unavailable).
Wherein, file destination can be by technical staff preassigned one for recording the file of information.
Step 204, according to pending test case number, determine whether the several test cases of pending test case execute knot Beam.
In the present embodiment, terminate since each test case is intended to execute, just can consider all test cases all Execution terminates.Therefore, it can be determined by the number for the test case for judging currently to have executed and using the first replacement method Whether pending test case number (i.e. the total number of test case) is identical, to determine whether all test cases have all executed Terminate.
If the number of the test case currently executed and the pending test case number determined using the first replacement method It is identical, it may be considered that whether all test cases, which have all executed, terminates.On the contrary, if the test case currently executed Number is different with the pending test case number determined using the first replacement method, it may be considered that there are also test cases to be not carried out Terminate.
For example, the second replacement method can also be further used for exporting preset at the end of each test case executes Prompt information (such as prints a preassigned additional character).At this point it is possible to count the preset prompt information currently exported Number whether be equal to the first replacement method determine pending test case number.
If the pending test case number that the number of the preset prompt information currently exported and the first replacement method determine It is identical, it may be considered that all test cases, which have all executed, to be terminated.On the contrary, if the preset prompt information that currently exports The pending test case number that number and the first replacement method determine is different, it may be considered that still there is test case to be not carried out knot Beam.
Optionally, the test case in test cases several for pending test case, in response to determining that the test is used Example, which executes the second replacement method, to be terminated, and subtracts one for current pending test case number to update pending test case number;It rings It should determine that the several test case execution of pending test case terminate in determining that newest pending test case number is zero.
This mode is terminated by updating pending test case number to determine whether all test cases execute.Specifically Ground, if detecting, a test case executes the second replacement method and terminates, it may be considered that the test case, which has executed, to be terminated, later Pending test case number can be subtracted one to obtain newest pending test case number.In this way, newest When pending test case number is zero, it may be considered that all use-cases to be tested have all executed completion.
Step 205, terminate in response to the several test case execution of the pending test case of determination, send newest target text Part.
In the present embodiment, at the end of all test cases execute, newest file destination can timely be sent To be saved to file destination.The preservation address of the destination address of transmission, i.e., newest file destination can be by technical staff It presets.
Since some applications for test application or tool are at the end of test, a method can be executed and returned for resource The operation such as receipts.For example, removing some data in test process, including parameter reduction or destruction, the reduction of database restores etc..
Therefore, at the end of detecting that all test case executes, timely send newest file destination to avoid The case where file destination may be disposed of at the end of test.So as to obtain each test case test process compared with Detailed information.File destination is saved in time by detecting the execution end time of test case, to avoid file destination quilt The case where removing or recycling so that avoiding flogging a dead horse leads to the wasting of resources, and then promotes testing efficiency.
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for sending information of the present embodiment Figure 30 0.In the application scenarios of Fig. 3, the executing subject of the method for sending information is a computer 301.In computer 301 On be equipped with for test mobile terminal application XCTest frame tested with treating test application.
Detecting XCTest frame, "+Load () for initialization test environment " method is when starting to execute, and it can be with Using the first replacement method replacement XCTest frame, for configuring test parameter TestSuiteForTestConfiguration () method (as shown in figure label 302) is replaced using the second replacement method XCTest frame, InvokeTest () method for implementation of test cases (as shown in figure label 303).
In the first replacement method, the method for obtaining test case can be preset, thus going to first When replacement method, obtaining use number of cases to be tested is 3 (as shown in figure labels 304).
As shown in the figure, three use-cases to be tested are respectively test case " 01 " 3051, test case " 02 " 3052, test Use-case " 03 " 3053.In the second replacement method, the phase of the implementation procedure for obtaining each test case can be preset The method for closing information.
To when test case " 01 " 3051 executes the second replacement method, get survey as shown in figure label 3061 The relevant information of the implementation procedure of example " 01 " 3051 on probation is " running succeeded ", while obtained information is recorded in file destination In 307.
As shown in figure label 3062, when test case " 02 " 3052 executes the second replacement method, gets test and use The relevant information of the implementation procedure of example " 02 " 3052 is " running succeeded ", while obtained information is recorded in newest target text In part 307.
As shown in figure label 3063, when test case " 03 " 3053 executes the second replacement method, gets test and use The relevant information of the implementation procedure of example " 03 " 3053 is " login-timeout failure ", while obtained information is recorded in newest mesh It marks in file 307.It include the test to application to be tested is logged in test case " 03 " 3053, but it is super due to logging in When, login failure.
Meanwhile global variable " C " can be preset in the second replacement method, at the end of each test case executes By global variable " C " plus 1.To when calculating variable " C " equal to (being equal to 3) to be tested with number of cases, it is believed that three surveys Example on probation is carried out end.
Later, at the end of detecting that three test cases are carried out, as shown in figure label 307, record can be had The relevant information of the implementation procedure of three test cases, newest file destination 307 send and store in database 308.
The method provided by the above embodiment of the disclosure is by replacing for configuring test parameter before test case executes Method with obtain this test pending test case sum.And then it can be according to the sum of obtained use-case to be tested Determine that all test cases execute the time point terminated.So as to timely save at the end of all test cases execute Current newest file destination, to avoid resource reclaim operation etc. of the test or tool for test application before terminating test The case where disposing file destination avoids the wasting of resources, promote testing efficiency.
In addition, replacement gets each test for the method for implementation of test cases and uses before test case execution The details of the implementation procedure of example.It is being generated with the application in the prior art by for test application or tool, simple Test report (such as only success count comprising test case and unsuccessfully number information) is compared, and is effectively increased and is got Test the amount of storage of information.
Later, according to obtained more detailed test information, to be tested can be applied in this survey by technical staff The problem of finding in examination is adjusted, and then can continue to test to application to be tested adjusted.In the prior art It can only obtain each test case execution failure every time or successfully simple information compared, due to having obtained more tests letters Breath to accelerate the speed of problem reparation, and carries out next time so as to solve this test problem faster The speed of test, and then can effectively shorten the test period of application to be tested, test speed is promoted, to the greatest extent may be used with reaching to use Resource that can be few is completed to treat the test of test application.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for sending information.The use In the process 400 for the method for sending information, comprising the following steps:
Step 401, in response to detect target application test environment initialization, use the first replacement method replacement use In the first object method of configuration test parameter, and the second mesh using the replacement of the second replacement method for implementation of test cases Mark method.
Step 402, the first replacement method is executed to obtain pending test case number.
Step 403, the test case in test cases several for pending test case, in response to detecting the test Use-case executes the second replacement method, and the relevant information of the implementation procedure of the test case is recorded in file destination.
The specific implementation procedure of above-mentioned steps 401,402 and 403 can refer to step 201 in Fig. 2 corresponding embodiment, 202 and 203 related description, details are not described herein.
Step 404, it is moved back in response to detecting that target application occurs to dodge, obtains the related letter that the sudden strain of a muscle that target application occurs is moved back Breath, and the relevant information that the sudden strain of a muscle of preservation target application generation is moved back in newest file destination.
In the present embodiment, situation is moved back since application often has sudden strain of a muscle caused by a variety of causes.For example, network speed is unstable It is fixed, lack data packet, insufficient memory with the problems such as all may result in using dodging the case where moving back.
Therefore, can situation be moved back to sudden strain of a muscle and detect simultaneously recording-related information during the test.Wherein, the phase moved back is dodged Closing information may include moving back relevant any information to the sudden strain of a muscle occurred.For example, dodging the relevant information moved back may include dodging the original moved back Cause occurs to dodge time moved back etc..
Step 405, test time started of the execution time of the first replacement method as target application is determined;It determines wait hold The several test cases of row test case execute test end time of the time terminated as target application;In newest target text Record test time started and test end time in part.
In the present embodiment, as the test time started at the time of can starting to execute the first replacement method, will own As the test end time at the time of test case is carried out end.Thus it is apparent that the length of testing speech entirely tested, and It is recorded in newest file destination.
It should be appreciated that during the test, the various information for needing to record can be constantly be generated, and therefore, target text The content of part is always in update.
Step 406, according to pending test case number, determine whether the several test cases of pending test case execute knot Beam.
The specific implementation procedure of this step 406 can refer to the related description of the step 204 in Fig. 2 corresponding embodiment, This is repeated no more.
Step 407, terminate in response to the several test case execution of the pending test case of determination, sent to server-side newest File destination to execute following steps by server-side: newest file destination is parsed, parsing result information is obtained, with And show parsing result information.
In the present embodiment, server-side (server 105 as shown in Figure 1) can be communicated to connect with above-mentioned executing subject. Server-side is when receiving newest file destination, due to the detailed letter that record has this to test in the file destination that receives Breath, so server-side can use various analytical tools and parse to file destination, obtains parsing result information.Specific solution Analysis tool and analytic method can be arranged according to the format of pre-set file destination.
Wherein, parsing result information can be used to indicate that this test target application there are the problem of.In turn, server-side is also Parsing result information can be shown, consequently facilitating user intuitively understands the problems of target application.It shows Mode can according to different application scenarios flexible setting.For example, where test case of problems can be highlighted Position etc..
Figure 4, it is seen that the method for sending information compared with the corresponding embodiment of Fig. 2, in the present embodiment Process 400 can also record the sudden strain of a muscle occurred in test process and move back relevant information and execute the various letters such as start and end time Breath, to further increase the amount of storage of obtained test information.
In addition, the process 400 of the method for sending information in the present embodiment in all test cases also by terminating When, newest file destination is sent to server-side.To be parsed by server-side to file destination and show parsing result Information intuitively understands convenient for technical staff, and positions the position of this test generation problem, is repaired with further accelerating problem Multiple speed, and the speed tested next time, and then can effectively shorten the test period of application to be tested, thus Reduce the resource of entire test period consuming.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, present disclose provides for sending information One embodiment of device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to In various electronic equipments.
As shown in figure 5, the device 500 provided in this embodiment for sending information includes replacement unit 501, acquiring unit 502, recording unit 503, determination unit 504 and transmission unit 505.Wherein, replacement unit 501 is configured in response to detect The initialization of the test environment of target application, replaces the first object side for configuring test parameter using the first replacement method Method, and the second goal approach using the replacement of the second replacement method for implementation of test cases;Acquiring unit 502 is configured to The first replacement method is executed to obtain pending test case number, wherein pending test case number indicates to be used for test target The number of the test case of application;Recording unit 503 is configured to the survey in test cases several for pending test case Example on probation records holding for the test case in response to detecting that the test case executes the second replacement method in file destination The relevant information of row process;Determination unit 504 is configured to determine pending test case number according to pending test case number Whether a test case, which executes, terminates;Transmission unit 505 is configured in response to determine that the several tests of pending test case are used Example, which executes, to be terminated, and newest file destination is sent.
In the present embodiment, in the device 500 for sending information: replacement unit 501, acquiring unit 502, recording unit 503, the specific processing of determination unit 504 and transmission unit 505 and its brought technical effect can be corresponding real with reference to Fig. 2 respectively Step 201, step 202, step 203, the related description of step 204 and step 205 in example are applied, details are not described herein.
In some optional implementations of the present embodiment, above-mentioned determination unit 504 is further configured to: for Test case in the several test cases of implementation of test cases, in response to determining that the test case executes the second replacement method knot Current pending test case number is subtracted one to update pending test case number by beam;It is newest pending in response to determination Test case number is zero, determines that the several test case execution of pending test case terminate.
In some optional implementations of the present embodiment, the relevant information of the implementation procedure of the test case includes holding Row result information, wherein execution result information includes for characterizing information that the test case runs succeeded or for characterizing this Test case executes the information of the failure cause of failure.
In some optional implementations of the present embodiment, above-mentioned recording unit 503 is further configured to: in response to It detects that target application occurs to dodge to move back, obtains the relevant information that the sudden strain of a muscle that target application occurs is moved back, and in newest file destination The middle relevant information for saving the sudden strain of a muscle that target application occurs and moving back.
In some optional implementations of the present embodiment, above-mentioned recording unit 503 is further configured to: determining Test time started of the execution time of one replacement method as target application;Determine the several test cases of pending test case Execute test end time of the time terminated as target application;In newest file destination record test the time started and Test the end time.
In some optional implementations of the present embodiment, above-mentioned transmission unit 505 is further configured to: to service End sends newest file destination to execute following steps by server-side: parsing, is parsed to newest file destination Result information, and show parsing result information.
The device provided by the above embodiment of the disclosure, by replacement unit 501 in response to detecting the survey of target application The initialization in test ring border replaces the first object method for configuring test parameter using the first replacement method, and uses the The replacement of two replacement methods is used for the second goal approach of implementation of test cases;Acquiring unit 502 executes the first replacement method to obtain Take pending test case number, wherein pending test case number indicates the number of the test case for test target application; Test case in the test cases several for pending test case of recording unit 503, in response to detecting the test case The second replacement method is executed, the relevant information of the implementation procedure of the test case is recorded in file destination;Determination unit 504 According to pending test case number, determining whether the several test cases of pending test case execute terminates;Transmission unit 505 is matched Being set to terminates in response to the several test case execution of the pending test case of determination, sends newest file destination, so as to The details of each test case implementation procedure are recorded according to application demand.It can determine that the execution of test case terminates simultaneously Time, so as to which the file destination of record test relevant information before this test terminates, can be sent in time to carry out Effectively save.
It, can be according to the detailed test information pair recorded in the file destination of preservation after this test terminates as a result, The place that target application goes wrong adjustment in time, later, can continue to test to target application adjusted.This mode is logical The amount of storage for increasing and testing obtained validity test information every time is crossed, to shorten the test period of entire target application, to mention Rise testing efficiency.
Below with reference to Fig. 6, it illustrates the electronic equipment that is suitable for being used to realize embodiment of the disclosure, (example is as shown in figure 1 Terminal device) 600 structural schematic diagram.Terminal device in embodiment of the disclosure can include but is not limited to such as move electricity The mobile terminal of words, laptop, PAD (tablet computer) etc. and the fixed terminal of such as desktop computer etc..Fig. 6 The terminal device shown is only an example, should not function to embodiment of the disclosure and use scope bring any limit System.
As shown in fig. 6, electronic equipment 600 may include processing unit (such as central processing unit, graphics processor etc.) 601, random access can be loaded into according to the program being stored in read-only memory (ROM) 602 or from storage device 608 Program in memory (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with electronic equipment Various programs and data needed for 600 operations.Processing unit 601, ROM 602 and RAM603 are connected with each other by bus 604. Input/output (I/O) interface 605 is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 606 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 607 of dynamic device etc.;Storage device 608 including such as tape, hard disk etc.;And communication device 609.Communication device 609, which can permit electronic equipment 600, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 6 shows tool There is the electronic equipment 600 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.Each box shown in Fig. 6 can represent a device, can also root According to needing to represent multiple devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 609, or from storage device 608 It is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, the implementation of the disclosure is executed The above-mentioned function of being limited in the method for example.
It should be noted that computer-readable medium described in embodiment of the disclosure can be computer-readable signal Medium or computer readable storage medium either the two any combination.Computer readable storage medium for example can be with System, device or the device of --- but being not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than Combination.The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires Electrical connection, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type are programmable Read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic are deposited Memory device or above-mentioned any appropriate combination.In embodiment of the disclosure, computer readable storage medium, which can be, appoints What include or the tangible medium of storage program that the program can be commanded execution system, device or device use or and its It is used in combination.And in embodiment of the disclosure, computer-readable signal media may include in a base band or as carrier wave The data-signal that a part is propagated, wherein carrying computer-readable program code.The data-signal of this propagation can be adopted With diversified forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal is situated between Matter can also be any computer-readable medium other than computer readable storage medium, which can be with It sends, propagate or transmits for by the use of instruction execution system, device or device or program in connection.Meter The program code for including on calculation machine readable medium can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more A program by the electronic equipment execute when so that the electronic equipment: in response to detect target application test environment it is initial Change, replaces the first object method for configuring test parameter using the first replacement method, and replace using the second replacement method Use the second goal approach in implementation of test cases instead;The first replacement method is executed to obtain pending test case number, wherein Pending test case number indicates the number of the test case for test target application;Surveys several for pending test case Test case in example on probation, in response to detecting that the test case executes the second replacement method, record should in file destination The relevant information of the implementation procedure of test case;According to pending test case number, the several tests of pending test case are determined Whether use-case, which executes, terminates;Terminate in response to the several test case execution of the pending test case of determination, sends newest target File.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof The computer program code of work, programming language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet Include local area network (LAN) or wide area network (WAN) --- it is connected to subscriber computer, or, it may be connected to outer computer (such as It is connected using ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in embodiment of the disclosure can be realized by way of software, can also be passed through The mode of hardware is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor Including replacement unit, acquiring unit, recording unit, determination unit and transmission unit.Wherein, the title of these units is in certain feelings The restriction to the unit itself is not constituted under condition, for example, transmission unit is also described as " in response to the pending survey of determination Number of cases test case execution on probation terminates, and sends the unit of newest file destination ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member it should be appreciated that embodiment of the disclosure involved in invention scope, however it is not limited to the specific combination of above-mentioned technical characteristic and At technical solution, while should also cover do not depart from foregoing invention design in the case where, by above-mentioned technical characteristic or its be equal Feature carries out any combination and other technical solutions for being formed.Such as disclosed in features described above and embodiment of the disclosure (but It is not limited to) technical characteristic with similar functions is replaced mutually and the technical solution that is formed.

Claims (10)

1. a kind of method for sending information, comprising:
In response to detecting the initialization of the test environment of target application, using the replacement of the first replacement method for configuring test ginseng Several first object methods, and the second goal approach using the replacement of the second replacement method for implementation of test cases;
First replacement method is executed to obtain pending test case number, wherein the pending test case number indicates For testing the number of the test case of the target application;
Test case in test cases several for pending test case, in response to detecting described in test case execution Second replacement method records the relevant information of the implementation procedure of the test case in file destination;
According to pending test case number, determining whether the several test cases of pending test case execute terminates;
Terminate in response to the determination pending several test case execution of test case, sends newest file destination.
2. according to the method described in claim 1, wherein, described according to the pending test case number, determination is described wait hold Whether the several test cases of row test case, which execute, terminates, comprising:
For the test case in the pending several test cases of test case, in response to determining that the test case executes institute Stating the second replacement method terminates, and subtracts one for current pending test case number to update pending test case number;
It is zero in response to the newest pending test case number of determination, determines that the several test cases of pending test case are held Row terminates.
3. according to the method described in claim 1, wherein, the relevant information of the implementation procedure of the test case includes executing Result information, wherein the execution result information includes for characterizing information that the test case runs succeeded or for characterizing The test case executes the information of the failure cause of failure.
4. according to the method described in claim 1, wherein, the method also includes:
It is moved back in response to detecting that the target application occurs to dodge, obtains the relevant information that the sudden strain of a muscle that the target application occurs is moved back, with And the relevant information that the sudden strain of a muscle that the target application occurs is moved back is saved in newest file destination.
5. according to the method described in claim 1, wherein, the method also includes:
Determine test time started of the execution time of first replacement method as the target application;
Determine that the several test cases of the pending test case execute test knot of the time terminated as the target application The beam time;
The test time started and the test end time are recorded in newest file destination.
6. described to send newest file destination according to the method described in claim 1, wherein, comprising:
Newest file destination is sent to execute following steps by the server-side to server-side: to the newest file destination It is parsed, obtains parsing result information, and show the parsing result information.
7. a kind of for sending the device of information, comprising:
Replacement unit is configured in response to detect the initialization of the test environment of target application, uses the first replacement method The first object method for configuring test parameter is replaced, and using the replacement of the second replacement method for implementation of test cases Second goal approach;
Acquiring unit is configured to execute first replacement method to obtain pending test case number, wherein described wait hold Row test case number indicates the number for testing the test case of the target application;
Recording unit, the test case being configured in test cases several for pending test case, in response to detecting The test case executes second replacement method, and the related letter of the implementation procedure of the test case is recorded in file destination Breath;
Determination unit is configured to determine the several test cases of pending test case according to pending test case number Whether execution terminates;
Transmission unit is configured in response to determine that the several test case execution of the pending test case terminate, send most New file destination.
8. device according to claim 7, wherein the determination unit is further configured to:
For the test case in the pending several test cases of test case, in response to determining that the test case executes institute Stating the second replacement method terminates, and subtracts one for current pending test case number to update pending test case number;
It is zero in response to the newest pending test case number of determination, determines that the several test cases of pending test case are held Row terminates.
9. a kind of electronic equipment, comprising:
One or more processors;
Storage device is stored thereon with one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 6.
10. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Such as method as claimed in any one of claims 1 to 6.
CN201910264557.9A 2019-04-03 2019-04-03 Method and apparatus for transmitting information Active CN110022244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910264557.9A CN110022244B (en) 2019-04-03 2019-04-03 Method and apparatus for transmitting information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910264557.9A CN110022244B (en) 2019-04-03 2019-04-03 Method and apparatus for transmitting information

Publications (2)

Publication Number Publication Date
CN110022244A true CN110022244A (en) 2019-07-16
CN110022244B CN110022244B (en) 2020-08-28

Family

ID=67190437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910264557.9A Active CN110022244B (en) 2019-04-03 2019-04-03 Method and apparatus for transmitting information

Country Status (1)

Country Link
CN (1) CN110022244B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040225935A1 (en) * 2003-05-09 2004-11-11 Jay Tsao System and method for testing memory at full bandwidth
US20070168734A1 (en) * 2005-11-17 2007-07-19 Phil Vasile Apparatus, system, and method for persistent testing with progressive environment sterilzation
CN104699598A (en) * 2013-12-09 2015-06-10 腾讯科技(深圳)有限公司 Automatic testing method, device, equipment and system
US20150179280A1 (en) * 2013-12-23 2015-06-25 International Business Machines Corporation Detecting defective connections in stacked memory devices
CN104794050A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Application program test method, device and system
CN104951400A (en) * 2015-07-13 2015-09-30 百度在线网络技术(北京)有限公司 Method and device for testing product
CN105005532A (en) * 2015-08-05 2015-10-28 广东欧珀移动通信有限公司 System for automatically testing stability of application program interface and method
US20160042191A1 (en) * 2014-08-11 2016-02-11 North Carolina State University Programmable interface for extending security of application-based operating system, such as android
CN106484622A (en) * 2016-10-18 2017-03-08 网易(杭州)网络有限公司 Method of testing, apparatus and system
CN106557424A (en) * 2016-11-18 2017-04-05 腾讯科技(深圳)有限公司 Internal storage testing method, measured terminal, test client and system
CN106569949A (en) * 2016-11-03 2017-04-19 北京奇鱼时代科技有限公司 Method and device used for executing test case
CN106919489A (en) * 2016-08-02 2017-07-04 阿里巴巴集团控股有限公司 Monitoring method and device that the application interface of application program is exited extremely
CN107704395A (en) * 2017-10-24 2018-02-16 武大吉奥信息技术有限公司 One kind is based on cloud platform automatic test implementation and system under Openstack
CN107861862A (en) * 2017-06-27 2018-03-30 陆金所(上海)科技服务有限公司 UI automated testing methods, device and computer-readable recording medium
CN108153672A (en) * 2017-12-25 2018-06-12 苏州蜗牛数字科技股份有限公司 The automatization test system and test method of a kind of mobile application
CN108829585A (en) * 2018-05-24 2018-11-16 广东睿江云计算股份有限公司 A kind of case management system test data automatic generation method and device
CN109376074A (en) * 2018-09-14 2019-02-22 浙江口碑网络技术有限公司 Obtain method and device, the storage medium, electronic device of log

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040225935A1 (en) * 2003-05-09 2004-11-11 Jay Tsao System and method for testing memory at full bandwidth
US20070168734A1 (en) * 2005-11-17 2007-07-19 Phil Vasile Apparatus, system, and method for persistent testing with progressive environment sterilzation
CN104699598A (en) * 2013-12-09 2015-06-10 腾讯科技(深圳)有限公司 Automatic testing method, device, equipment and system
US20150179280A1 (en) * 2013-12-23 2015-06-25 International Business Machines Corporation Detecting defective connections in stacked memory devices
CN104794050A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Application program test method, device and system
US20160042191A1 (en) * 2014-08-11 2016-02-11 North Carolina State University Programmable interface for extending security of application-based operating system, such as android
CN104951400A (en) * 2015-07-13 2015-09-30 百度在线网络技术(北京)有限公司 Method and device for testing product
CN105005532A (en) * 2015-08-05 2015-10-28 广东欧珀移动通信有限公司 System for automatically testing stability of application program interface and method
CN106919489A (en) * 2016-08-02 2017-07-04 阿里巴巴集团控股有限公司 Monitoring method and device that the application interface of application program is exited extremely
CN106484622A (en) * 2016-10-18 2017-03-08 网易(杭州)网络有限公司 Method of testing, apparatus and system
CN106569949A (en) * 2016-11-03 2017-04-19 北京奇鱼时代科技有限公司 Method and device used for executing test case
CN106557424A (en) * 2016-11-18 2017-04-05 腾讯科技(深圳)有限公司 Internal storage testing method, measured terminal, test client and system
CN107861862A (en) * 2017-06-27 2018-03-30 陆金所(上海)科技服务有限公司 UI automated testing methods, device and computer-readable recording medium
CN107704395A (en) * 2017-10-24 2018-02-16 武大吉奥信息技术有限公司 One kind is based on cloud platform automatic test implementation and system under Openstack
CN108153672A (en) * 2017-12-25 2018-06-12 苏州蜗牛数字科技股份有限公司 The automatization test system and test method of a kind of mobile application
CN108829585A (en) * 2018-05-24 2018-11-16 广东睿江云计算股份有限公司 A kind of case management system test data automatic generation method and device
CN109376074A (en) * 2018-09-14 2019-02-22 浙江口碑网络技术有限公司 Obtain method and device, the storage medium, electronic device of log

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BOBOPENG: ""HOOK技术之API拦截(API HOOK)"", 《CSDN》 *
张芳涛: ""XCTest-9-用户界面测试"", 《简书》 *

Also Published As

Publication number Publication date
CN110022244B (en) 2020-08-28

Similar Documents

Publication Publication Date Title
US9602598B2 (en) Coordinating application migration processes
US11750444B2 (en) Implementation of compliance settings by a mobile device for compliance with a configuration scenario
CN108614774A (en) Automated testing method and device
CN110601952A (en) Multi-channel message notification sending method and device
CN108038051A (en) Dissemination method, device, computer equipment and the storage medium of micro services
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN107277153A (en) Method, device and server for providing voice service
CN109815105A (en) Applied program testing method and device based on Btrace
CN108958992A (en) test method and device
CN109684188A (en) Test method and device
CN110011875B (en) Dial testing method, device, equipment and computer readable storage medium
EP1955482A1 (en) Integrated mobile diagnostics and electronic customer care test script with browser
CN110377440A (en) Information processing method and device
CN106792784B (en) A kind of method, server and system carrying out data check in server side
CN107644075A (en) The method and apparatus for collecting page info
CN108933695A (en) Method and apparatus for handling information
CN109218041A (en) Request processing method and device for server system
CN109818994A (en) Information processing method and device for agent side
CN108694120A (en) The method and apparatus of testing service component
CN109828830A (en) Method and apparatus for managing container
CN109800020A (en) A kind of code automatic adjusting method, device, equipment and the medium of program development
CN111786939B (en) Method, device and system for testing management platform of Internet of things
CN110022244A (en) Method and apparatus for sending information
CN114285774B (en) Flow recording method and device, electronic equipment and storage medium
CN111488268A (en) Dispatching method and dispatching device for automatic test

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

CP01 Change in the name or title of a patent holder