CN109726107A - Test method, device, equipment and storage medium - Google Patents

Test method, device, equipment and storage medium Download PDF

Info

Publication number
CN109726107A
CN109726107A CN201810566453.9A CN201810566453A CN109726107A CN 109726107 A CN109726107 A CN 109726107A CN 201810566453 A CN201810566453 A CN 201810566453A CN 109726107 A CN109726107 A CN 109726107A
Authority
CN
China
Prior art keywords
test
script
error
information
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810566453.9A
Other languages
Chinese (zh)
Inventor
刘子牧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201810566453.9A priority Critical patent/CN109726107A/en
Publication of CN109726107A publication Critical patent/CN109726107A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a kind of test method, device, equipment and storage mediums.This method comprises: obtaining test triggering command, determining terminal to be tested according to test triggering command and obtaining the test script to be modified locally prestored;Then the corresponding facility information of terminal to be tested is obtained, is modified according to facility information to test script to be modified, target detection script is obtained;Operational objective test script, record the test information in target detection script operational process, test file is generated according to test information, due to being when receiving test triggering command, it modifies automatically according to the facility information of the terminal to be tested got to the test script prestored, then runs modified test script and carry out automatic test, so as to be released effectively manpower, testing efficiency is improved, testing cost is reduced.

Description

Test method, device, equipment and storage medium
Technical field
The present invention relates to software testing technology field more particularly to a kind of test method, device, equipment and storage mediums.
Background technique
Application testing is a very important job, especially for for the industries such as financial circles, internet more It is in this way, because the running quality of application program will directly affect multi-party interests.However, software test in the prior art is big Single-unit operation, manually operated method is mostly used to test application software, this test mode needs staff's moment Test process is monitored, until test is completed, entire test process consumes a large amount of manpower and material resources, also increases test The work load of personnel.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of test method, device, equipment and storage mediums, it is intended to solve existing The technical issues of some software testing technologies can not be released effectively test manpower, reduce test human cost.
To achieve the above object, it the present invention provides a kind of test method, the described method comprises the following steps:
Obtain test triggering command, according to the test triggering command determine that terminal to be tested and obtaining locally prestores to Modify test script;
The corresponding facility information of the terminal to be tested is obtained, according to the facility information to the test script to be modified It modifies, obtains target detection script;
The target detection script is run, records the test information in the target detection script operational process, and according to The test information generates test file.
Preferably, triggering command is tested in the acquisition, is determined terminal to be tested according to the test triggering command and is obtained The step of test script to be modified locally prestored, comprising:
Test triggering command is obtained, the equipment identification information for including in the test triggering command and script mark letter are extracted Breath;
Corresponding terminal to be tested is determined according to the equipment identification information;
Corresponding with script identification information test script to be modified is searched in mapping relations, in the mapping relations Storage has the corresponding relationship between script identification information and test script to be modified.
Preferably, described to obtain the corresponding facility information of the terminal to be tested, according to the facility information to it is described to The step of modification test script modifies, obtains target detection script, comprising:
The corresponding facility information of the terminal to be tested is obtained, the facility information includes current device title, current system System version number and current user name;
According to the current device title, the current system version number and the current user name, respectively to described Historical Device title, legacy system version number and the historical user's name for including in test script to be modified are replaced, and are obtained Target detection script.
Preferably, triggering command is tested in the acquisition, is determined terminal to be tested according to the test triggering command and is obtained Before the step of test script to be modified locally prestored, the method also includes:
In response to the power-on instruction of user's input, the task triggering configuration file locally prestored is read;
When determining the task triggering corresponding timed task of configuration file and the corresponding triggering of the timed task Between;
When detecting that current time reaches the triggered time, executes the timed task and generate test triggering command.
Preferably, the target detection script includes: that script calls file and multiple pending script files;
The operation target detection script, records the test information in the target detection script operational process, and The step of generating test file according to the test information, comprising:
File is called according to the script, calls each pending script file to loading in the terminal to be tested respectively Application program is tested, and records test information;
It whether detects in the test information comprising the mark that reports an error;
When not identifying comprising reporting an error in detecting the test information, test file is generated according to the test information.
It preferably, whether include after reporting an error the step of identifying in the detection test information, the method is also wrapped It includes:
When being identified in detecting the test information comprising reporting an error, reports an error described in determination and identify the affiliated classification that reports an error;
It reports an error described in acquisition and identifies corresponding detailed error information, and according to classification and the letter that reports an error in detail of reporting an error Breath, which generates, tests the file that reports an error.
Preferably, it reports an error described in the acquisition and identifies corresponding detailed error information, and according to classification and the institute of reporting an error Detailed error information generation is stated to test after the step of reporting an error file, the method also includes:
Whether the classification that reports an error described in detection belongs to default prompt classification;
When the classification that reports an error belongs to default prompt classification, mail is prompted according to the file generated that reports an error of testing, and The prompt mail is sent to the user terminal and is shown.
In addition, to achieve the above object, the present invention also proposes that a kind of test device, described device include: that script obtains mould Block, script modified module and script running module;
The script obtains module, for obtaining test triggering command, is determined according to the test triggering command to be tested Terminal simultaneously obtains the test script to be modified locally prestored;
The script modified module is believed for obtaining the corresponding facility information of the terminal to be tested according to the equipment Breath modifies to the test script to be modified, obtains target detection script;
The script running module records the target detection script and ran for running the target detection script Test information in journey, and test file is generated according to the test information.
In addition, to achieve the above object, the present invention also proposes a kind of test equipment, the test equipment include: memory, Processor and it is stored in the test program that can be run on the memory and on the processor, the test program is configured to The step of realizing test method as described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, test is stored on the storage medium The step of program, the test program realizes test method as described above when being executed by processor.
The present invention determines terminal to be tested according to test triggering command and obtains local pre- by obtaining test triggering command The test script to be modified deposited;Then the corresponding facility information of terminal to be tested is obtained, according to facility information to test to be modified Script is modified, and target detection script is obtained;Operational objective test script records the survey in target detection script operational process Information is tried, test file is generated according to test information, due to being when receiving test triggering command, automatically according to what is got The facility information of terminal to be tested modifies to the test script prestored, then runs modified test script and carries out automatically Change test, so as to be released effectively manpower, improves testing efficiency, reduce testing cost.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the test equipment for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of test method first embodiment of the present invention;
Fig. 3 is the flow diagram of test method second embodiment of the present invention;
Fig. 4 is the flow diagram of test method 3rd embodiment of the present invention;
Fig. 5 is the structural block diagram of test device first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the test equipment structural schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
As shown in Figure 1, the test equipment may include: processor 1001, such as central processing unit (Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, Communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include that the wired of standard connects Mouth, wireless interface.Network interface 1004 optionally may include standard wireline interface and wireless interface (such as Wireless Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the random access memory (Random of high speed Access Memory, RAM) memory, be also possible to stable nonvolatile memory (Non-Volatile Memory, ), such as magnetic disk storage NVM.Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
It will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the restriction to test equipment, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include operating system, data storage mould in a kind of memory 1005 of storage medium Block, network communication module, Subscriber Interface Module SIM and test program.
In test equipment shown in Fig. 1, network interface 1004 is mainly used for carrying out data communication with network server;With Family interface 1003 is mainly used for carrying out data interaction with user;Processor 1001, memory 1005 in test equipment of the present invention It can be set in a test device, the test equipment calls the test journey stored in memory 1005 by processor 1001 Sequence, and execute test method provided in an embodiment of the present invention.
The embodiment of the invention provides a kind of test methods, and referring to Fig. 2, Fig. 2 is that a kind of test method first of the present invention is real Apply the flow diagram of example.
In the present embodiment, the test method the following steps are included:
Step S10: test triggering command is obtained, terminal to be tested is determined according to the test triggering command and obtains local The test script to be modified prestored;
It should be noted that the executing subject of the present embodiment method can be with network communication, program operation and number According to the computer equipment (hereinafter referred to as test host) of calculation function, it is logical that the test triggering command can be user's current time The human-computer interaction interface input of test host is crossed, is also possible to test host and is generated by the timed task triggering of user preset 's.
In order to discharge manpower as far as possible, the constructive ways of triggering command are tested described in the present embodiment can include: test The power-on instruction that response of host is inputted in user reads the task triggering configuration file locally prestored;Determine the task triggering The corresponding timed task of configuration file and the timed task corresponding triggered time;Detecting that current time reaches institute When stating the triggered time, executes the timed task and generate test triggering command.
It will be appreciated that tester can write a task triggering configuration file, the configuration in advance in the present embodiment It include preset timed task (such as instruction generation task, data configuration task dispatching) and the timed task pair in file The triggered time (such as 9:00,14:00) answered, test host are by obtaining current time in real time, and detecting the current time It is no to reach the triggered time;If reaching, the timed task is executed, generates corresponding test triggering command.
In the concrete realization, test host can first extract the equipment identification information for including in the test triggering command (such as Factory sequence number, device model etc.) and the script identification information of the subsequent test script for needing to call (such as script name is compiled Number, store path etc.), the terminal to be tested is then determined according to the equipment identification information extracted, is identified according to script Information obtains corresponding test script to be modified from local storage space.
Step S20: the corresponding facility information of the terminal to be tested is obtained, according to the facility information to described to be modified Test script is modified, and target detection script is obtained;
It should be noted that the facility information may include the corresponding device name of terminal to be tested, system version number and The information such as user name.Wherein, the device name can be above equipment identification information, be also possible to tester in advance and be to Test the customized terminal number of terminal;Application program currently logged on user to be tested in the entitled terminal to be tested of user User name, the test script to be modified can be the test script that tester writes completion in advance.
It will be appreciated that the terminal of even same model is under different system versions in software test procedure, eventually The corresponding running environment of the application program loaded on end is different from, therefore in the present embodiment, and tester is using preparatory When writing the test script of completion and testing the application program loaded in terminal to be tested, needing targetedly will be to be modified Part raw information in test script is modified, so that modified test script, i.e., the described target script can be directed to Application program to be tested is tested, and avoids test script and application program to be tested is unmatched happens.
Specifically, test host can obtain the corresponding facility information of the terminal to be tested, the facility information includes working as Preceding device name, current system version number and current user name;According to the current device title, the current system version Number and the current user name, respectively to historical Device title, the legacy system version for including in the test script to be modified This number and historical user name be replaced, obtain target detection script.
Step S30: running the target detection script, records the test letter in the target detection script operational process Breath, and test file is generated according to the test information.
In the concrete realization, test host can run the target detection after building the target detection script Script starts to test the application program loaded in terminal to be tested, and in order to further discharge manpower, test host can Recorded during operational objective test script corresponding test information (e.g., length of testing speech, in test process test script with External interaction data, the network interaction data in test environment and test exception information in test environment etc.), then again Final test report (the i.e. described test file) is generated according to the test information of record, for the subsequent examination of tester.
The present embodiment determines terminal to be tested according to test triggering command and obtains local by obtaining test triggering command The test script to be modified prestored;Then the corresponding facility information of terminal to be tested is obtained, according to facility information to survey to be modified Training is originally modified, and target detection script is obtained;Operational objective test script records in target detection script operational process Information is tested, test file is generated according to test information, due to being when receiving test triggering command, automatically according to getting The facility information of terminal to be tested modify to the test script prestored, then run modified test script carry out from Dynamicization test, so as to be released effectively manpower in the case where tester is more busy, improves testing efficiency, reduces Test human cost.
With reference to Fig. 3, Fig. 3 is a kind of flow diagram of test method second embodiment of the present invention.
Based on above-mentioned first embodiment, in the present embodiment, the step 10 be may particularly include:
Step S201: obtain test triggering command, extract it is described test triggering command in include equipment identification information and Script identification information;
In the concrete realization, test host can carry out the test triggering command when getting test triggering command Acquisition instruction data are parsed, included equipment identification information and script identification information are then extracted from the director data, By taking director data " a127.0.0.1-p 4723-U DU2TAN1586029779 " as an example, wherein equipment identification information (herein for Equipment Serial Number) " U DU2TAN1586029779 ", script identification information " a127.0.0.1-p4723 ".
Step S202: corresponding terminal to be tested is determined according to the equipment identification information;
It should be understood that the terminal to be tested of lower test host of usual situation connection may not be one, and same A application program can since the device parameter (e.g., CPU model, the size of memory, screen size etc.) of terminal to be tested is different Cause the running environment of application program not identical, and then brings the same application domain loaded in different terminals to be tested corresponding Test script is not also identical, therefore when a test host is connected with multiple terminals to be tested simultaneously, test host can basis The equipment identification information carried in test triggering command determines that this tests targeted terminal to be tested.
In the concrete realization, test host extracts this from test triggering command and tests targeted terminal to be tested Equipment identification information after corresponding terminal to be tested can be determined according to the equipment identification information.
Step S203: searching test script to be modified corresponding with the script identification information in mapping relations, described Storage has the corresponding relationship between script identification information and test script to be modified in mapping relations.
It should be noted that tester can build in advance in the present embodiment in order to realize the quick obtaining to test script Corresponding relationship between a vertical test script identification information and test script to be modified, i.e., the described mapping relations, so that test Host passes through the mapping after according to the test triggering command received, according to the script identification information that test triggering command carries Relationship quickly finds corresponding test script to be modified.In the mapping relations, end source is mapped for script mark Information, target side source are test script to be modified.
It will be appreciated that the script identification information can be the corresponding store path of test script to be modified, script name The identification information that title and/or number etc. can distinguish different test scripts, concrete form the present embodiment do not do specific limit System.
The present embodiment extracts the equipment identification information and foot for including in test triggering command by obtaining test triggering command This identification information;Corresponding terminal to be tested is determined according to equipment identification information;It searches in mapping relations and believes with script mark Corresponding test script to be modified is ceased, is modified so as to subsequent to test script to be modified, is referred to by then passing through test triggering The equipment identification information for including in order determines that this tests corresponding terminal to be tested and script identification information is pre-establishing Mapping relations in search test script to be modified, to further improve testing efficiency.
With reference to Fig. 4, Fig. 4 is a kind of flow diagram of test method 3rd embodiment of the present invention.
Based on the various embodiments described above, the target detection script in the present embodiment can include: script calls file and more A pending script file.Wherein, the script calls file to can be total execution file (e.g., UI_ that this is tested TestAll.py), it is used to call each pending script file (such as test_public_all41.py, test_public_ All51.py etc.), test file (automatic test report) is exported after the completion of test in a manner of sending out mail.The pending foot This document can be the automatized script file " test_public_ such as test application program homepage and the setting page All41.py " is also possible to the automatized script file such as the test application program a certain submenu page and the account page “test_public_all51.py”。
Certainly, it can also include method package file in the target detection script, can wrap in this method package file Containing the configuration information and several packaging methods (Metho d.py) that are extracted from pending script file and application program The packaged method of public module (CommonModuleMethod.py).
Correspondingly, the step S30 may particularly include following steps:
Step S301: file is called according to the script, calls each pending script file to the end to be tested respectively The application program loaded in end is tested, and records test information;
In this step, test host is modified to test script to be modified, after obtaining target detection script File is called to call each pending script file and method package file respectively according to the script in the target detection script The application program loaded in terminal to be tested is tested, and records test information.For example, test host can be by calling Stating each pending script file has page turn function to what is be arranged in each page of application program loaded in terminal to be tested Each module carry out entrance click jump verifying, it is whether normal to detect each page jump.
In the concrete realization, test host according in target detection script include script call file, call respectively respectively to Perform script file tests the application program loaded in terminal to be tested, and records test information.
Step S302: whether include the mark that reports an error in the detection test information;
If testing the survey that host is got it should be understood that occurring the case where test reports an error or fails during the test Often exist in examination information and reports an error mark (such as " error ", " fail ") accordingly.Therefore, in order to accurately determine this survey The case where in examination with the presence or absence of test error, in the present embodiment test host can by detect in the test information whether include Report an error mark;If it does, then showing that the situation that there is test error shows to be successfully tested if not containing.
Step S303: it when not identified comprising reporting an error in detecting the test information, is generated according to the test information Test file;
In the concrete realization, if test Host Detection is not identified comprising reporting an error into test information, according to testing Test information (such as test environment and configuration, test content, test period, test result, specific tester) in journey is raw It is saved at test file, and to the test file.
Step S304: it when being identified in detecting the test information comprising reporting an error, is reported an error belonging to identifying described in determination Report an error classification;
It should be understood that the different marks that reports an error represents different type of errors under normal circumstances, such as the mark that reports an error The classification that reports an error belonging to " fail " is test crash;The classification that reports an error belonging to the mark that reports an error " error " is test error.To make to survey Examination host identifies the quickly determining type that reports an error belonging to identifying that respectively reports an error according to all kinds of report an error for including in test information, can be preparatory The mapping table to report an error between mark and the classification that reports an error is established, so that test host is in detecting test information comprising reporting an error When mark, then can quickly be determined according to the mapping table described in report an error and identify the affiliated classification that reports an error.
Step S305: reporting an error described in acquisition and identify corresponding detailed error information, and according to the classification and described of reporting an error Detailed error information, which generates, tests the file that reports an error.
In the concrete realization, when test host identifies in detecting test information comprising reporting an error, this can further be obtained Report an error and identify corresponding detailed error information, that is, the specific location to report an error and concrete reason (element that such as finds and it is expected not Match, do not find element etc.), then according to it is predetermined report an error classification and the detailed error information that gets generate it is corresponding Test report an error file and save to the corresponding file that reports an error, for the subsequent access of tester.
Further, it is contemplated that test and report an error or frequently can lead to the case where failure subsequent test process interruption, cause Testing time waste.Tested in the present embodiment host can also determine to report an error identify belonging to report an error classification when, continue to examine Whether the classification that reports an error described in survey belongs to default prompt classification;When the classification that reports an error belongs to default prompt classification, according to described Test report an error file generated prompt mail, and by the prompt mail be sent to the user terminal (such as mobile phone, PC) into Row is shown, to remind tester quickly to perform corresponding processing, is reduced due to the abnormal caused testing time waste of test, is mentioned High testing efficiency.
The present embodiment calls file to call each pending script file respectively according to the script for including in target detection script The application program loaded in terminal to be tested is tested and records test information;Then detection test information in whether include Report an error mark;Test file is generated according to test information when not identifying comprising reporting an error;When identifying comprising reporting an error, determination reports an error The classification that reports an error belonging to mark simultaneously obtains and reports an error and identify corresponding detailed error information, then classification and reports an error in detail according to reporting an error Information, which generates, tests the file that reports an error, and can be realized the no worker monitor to test process, and will not omit any important test letter Breath, to ensure that the accuracy and reliability of test result.
In addition, the embodiment of the present invention also proposes a kind of storage medium, test program is stored on the storage medium, it is described The step of test method as described above is realized when test program is executed by processor.
It is the structural block diagram of test device first embodiment of the present invention referring to Fig. 5, Fig. 5.
As shown in figure 5, the test device that the embodiment of the present invention proposes includes: that script obtains module 501, script modified module 502 and script running module 503;
The script obtains module 501, for obtaining test triggering command, is determined according to the test triggering command to be measured Examination terminal simultaneously obtains the test script to be modified locally prestored;
It should be noted that the test triggering command can be human-computer interaction of user's current time by test device Interface input, it is also possible to what test device was generated by the timed task triggering of user preset.
In order to discharge manpower as far as possible, test device described in the present embodiment further includes task trigger module, and described Business trigger module, the power-on instruction for inputting in response to user read the task triggering configuration file locally prestored;Determine institute State the task triggering corresponding timed task of configuration file and the timed task corresponding triggered time;It is current detecting When time reaches the triggered time, executes the timed task and generate test triggering command.
It will be appreciated that tester can write a task triggering configuration file, the configuration in advance in the present embodiment It include preset timed task (such as instruction generation task, data configuration task dispatching) and the timed task pair in file The triggered time (such as 9:00,14:00) answered, the task trigger module detect and deserve by obtaining current time in real time Whether the preceding time reaches the triggered time;If reaching, the timed task is executed, generates corresponding test triggering command.
In the concrete realization, script, which obtains module 501, can first extract the device identification for including in the test triggering command Script identification information (such as script of information (such as factory sequence number, device model) and the subsequent test script for needing to call Title, number, store path etc.), the terminal to be tested is then determined according to the equipment identification information extracted, according to foot This identification information obtains corresponding test script to be modified from local storage space.
The script modified module 502, for obtaining the corresponding facility information of the terminal to be tested, according to the equipment Information modifies to the test script to be modified, obtains target detection script;
It should be noted that the facility information may include the corresponding device name of terminal to be tested, system version number and The information such as user name.Wherein, the device name can be above equipment identification information, be also possible to tester in advance and be to Test the customized terminal number of terminal;Application program currently logged on user to be tested in the entitled terminal to be tested of user User name, the test script to be modified can be the test script that tester writes completion in advance.
It will be appreciated that the terminal of even same model is under different system versions in software test procedure, eventually The corresponding running environment of the application program loaded on end is different from, therefore in the present embodiment, and tester is using preparatory When writing the test script of completion and testing the application program loaded in terminal to be tested, needing targetedly will be to be modified Part raw information in test script is modified, so that modified test script, i.e., the described target script can be directed to Application program to be tested is tested, and avoids test script and application program to be tested is unmatched happens.
Specifically, script modified module 502 can obtain the corresponding facility information of the terminal to be tested, the facility information Including current device title, current system version number and current user name;According to the current device title, the current system System version number and the current user name, respectively to historical Device title, the history for including in the test script to be modified System version number and historical user's name are replaced, and obtain target detection script.
The script running module 503 records the target detection script operation for running the target detection script Test information in the process, and test file is generated according to the test information.
In the concrete realization, the script modified module 502 is after building the target detection script, the script fortune Row module 503 can run the target detection script and start to test the application program loaded in terminal to be tested, in order to Manpower is further discharged, the script running module 503 can record corresponding survey during operational objective test script Try information (e.g., length of testing speech, the network interaction number in test process in test script and external interaction data, test environment Accordingly and the test exception information etc. in test environment), then generate final test report further according to the test information of record (the i.e. described test file), for the subsequent examination of tester.
The present embodiment determines terminal to be tested according to test triggering command and obtains local by obtaining test triggering command The test script to be modified prestored;Then the corresponding facility information of terminal to be tested is obtained, according to facility information to survey to be modified Training is originally modified, and target detection script is obtained;Operational objective test script records in target detection script operational process Information is tested, test file is generated according to test information, due to being when receiving test triggering command, automatically according to getting The facility information of terminal to be tested modify to the test script prestored, then run modified test script carry out from Dynamicization test, so as to be released effectively manpower in the case where tester is more busy, improves testing efficiency, reduces Test human cost.
Based on the first embodiment of above-mentioned test device, the second embodiment of test device of the present invention is proposed.
In the present embodiment, the script obtains module 501, is also used to obtain test triggering command, extracts the test The equipment identification information and script identification information for including in triggering command;
Specifically, the script obtains module 501 when getting test triggering command, it can be to the test triggering command Parsing acquisition instruction data are carried out, included equipment identification information and script mark letter are then extracted from the director data Breath, by taking director data " a127.0.0.1-p 4723-U DU2TAN1586029779 " as an example, wherein equipment identification information is (herein For equipment Serial Number) " U DU2TAN1586029779 ", script identification information " a127.0.0.1-p4723 ".
Further, the script obtains module 501, is also used to be determined according to the equipment identification information corresponding to be measured Try terminal;
It should be understood that the terminal to be tested of lower test device of usual situation connection may not be one, and same A application program can since the device parameter (e.g., CPU model, the size of memory, screen size etc.) of terminal to be tested is different Cause the running environment of application program not identical, and then brings the same application domain loaded in different terminals to be tested corresponding Test script is not also identical, therefore when a test device is connected with multiple terminals to be tested simultaneously, test device can basis The equipment identification information carried in test triggering command determines that this tests targeted terminal to be tested.
In the concrete realization, it is targeted to extract this test from test triggering command for the script acquisition module 501 Terminal to be tested equipment identification information after corresponding terminal to be tested can be determined according to the equipment identification information.
Further, the script obtains module 501, is also used to search and the script identification information in mapping relations Corresponding test script to be modified.
It should be noted that tester can build in advance in the present embodiment in order to realize the quick obtaining to test script Corresponding relationship between a vertical test script identification information and test script to be modified, i.e., the described mapping relations, so that script Module 501 is obtained after according to the test triggering command received, the script identification information carried according to test triggering command is logical It crosses the mapping relations and quickly finds corresponding test script to be modified.In the mapping relations, mapping end source is described Script identification information, target side source are test script to be modified.
It will be appreciated that the script identification information can be the corresponding store path of test script to be modified, script name The identification information that title and/or number etc. can distinguish different test scripts, concrete form the present embodiment do not do specific limit System.
The present embodiment script obtains module by obtaining test triggering command, extracts the equipment for including in test triggering command Identification information and script identification information;Corresponding terminal to be tested is determined according to equipment identification information;It is searched in mapping relations Test script to be modified corresponding with script identification information modifies to test script to be modified so as to subsequent, due to being logical It crosses the equipment identification information for including in test triggering command and determines that this tests corresponding terminal to be tested and script mark letter Breath searches test script to be modified in the mapping relations pre-established, to further improve testing efficiency.
Each embodiment based on above-mentioned test device proposes the 3rd embodiment of test device of the present invention.
In the present embodiment, the target detection script can include: script calls file and multiple pending script files. Wherein, the script calls file to can be total execution file (e.g., UI_testAll.py) of this test, is used to call Each pending script file (such as test_public_all41.py, test_public_all51.py), after the completion of test Test file (automatic test report) is exported in a manner of sending out mail.The pending script file can be such as test application The automatized script file " test_public_all41.py " of program homepage and the setting page, is also possible to such as test application journey The automatized script file " test_public_all51.py " of a certain submenu page of sequence and the account page.
Certainly, it can also include method package file in the target detection script, can wrap in this method package file Containing the configuration information and several packaging methods (Metho d.py) that are extracted from pending script file and application program The packaged method of public module (CommonModuleMethod.py).
Further, the script running module 503, be also used to according to the script call file, call respectively respectively to Perform script file tests the application program loaded in the terminal to be tested, and records test information;
Specifically, script modified module 502 is modified to test script to be modified, after obtaining target detection script, Script running module 503 can call file to call each pending script text respectively according to the script in the target detection script Part and method package file test the application program loaded in terminal to be tested, and record test information.For example, foot This operation module 503 can be by calling above-mentioned each pending script file to each page of application program loaded in terminal to be tested Each module with page turn function of middle setting carries out entrance click and jumps verifying, whether just to detect each page jump Often.
In the concrete realization, script running module 503 is adjusted respectively according to including that script calls file in target detection script The application program loaded in terminal to be tested is tested with each pending script file, and records test information.
Further, whether the script running module 503 is also used to detect in the test information comprising the mark that reports an error Know;
If script running module 503 obtains it should be understood that occurring the case where test reports an error or fails during the test To test information in often exist and accordingly report an error mark (such as " error ", " fail ").Therefore, in order to accurately determine With the presence or absence of testing the case where malfunctioning in this test, script running module 503, which can pass through, in the present embodiment detects the test Whether include the mark that reports an error in information;If it does, then show exist test error situation, if not containing, show test at Function.
Further, the script running module 503 is also used in detecting the test information not comprising the mark that reports an error When knowledge, test file is generated according to the test information;
In the concrete realization, if script running module 503 detects when not identifying comprising reporting an error in test information, basis Test information in test process is (such as test environment and configuration, test content, test period, test result, specific tester Deng) test file is generated, and the test file is saved.
Further, the script running module 503 is also used in detecting the test information comprising the mark that reports an error When, determine described in report an error and identify the affiliated classification that reports an error;
It should be understood that the different marks that reports an error represents different type of errors under normal circumstances, such as the mark that reports an error The classification that reports an error belonging to " fail " is test crash;The classification that reports an error belonging to the mark that reports an error " error " is test error.To make foot This operation module 503 identifies the quickly determining class that reports an error belonging to identifying that respectively reports an error according to all kinds of report an error for including in test information Type can pre-establish the mapping table to report an error between mark and the classification that reports an error, so that script running module 503 is detecting survey When being identified in examination information comprising reporting an error, then can quickly be determined according to the mapping table described in report an error and identify the affiliated class that reports an error Not.
Further, the script running module 503 is also used to obtain described report an error and identifies the corresponding letter that reports an error in detail Breath, and classification is reported an error and the detailed error information generates test and reports an error file according to described.
It in the concrete realization, can be further when script running module 503 identifies in detecting test information comprising reporting an error It obtains this and reports an error and identify corresponding detailed error information, that is, the specific location to report an error and the concrete reason (element that such as finds and pre- Phase mismatches, does not find element etc.), then classification is reported an error and the detailed error information that gets generates according to predetermined It is corresponding test report an error file and save to the corresponding file that reports an error, for the subsequent access of tester.
Further, it is contemplated that test and report an error or frequently can lead to the case where failure subsequent test process interruption, cause Testing time waste.In the present embodiment script running module 503 can also determine to report an error identify belonging to report an error classification when, Continue to test whether the classification that reports an error belongs to default prompt classification;When the classification that reports an error belongs to default prompt classification, root The file generated prompt mail that reports an error is tested according to described, and the prompt mail is sent to the user terminal (such as mobile phone, PC Deng) be shown, to remind tester quickly to perform corresponding processing, reduce due to the abnormal caused testing time wave of test Take, improves testing efficiency.
The present embodiment script running module according to include in target detection script script call file call respectively respectively to Perform script file tests the application program loaded in terminal to be tested and records test information;Then detection test letter Whether include the mark that reports an error in breath;Test file is generated according to test information when not identifying comprising reporting an error;Including the mark that reports an error Determined when knowledge report an error identify belonging to report an error and classification and obtain and report an error and identify corresponding detailed error information, then according to the class that reports an error It does not generate with detailed error information and tests the file that reports an error, can be realized the no worker monitor to test process, and will not omit any Important test information, to ensure that the accuracy and reliability of test result.
The other embodiments or specific implementation of test device of the present invention can refer to above-mentioned each method embodiment, herein not It repeats again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as read-only memory (Read Only Memory, ROM)/RAM, magnetic disk, CD), including some instructions are used so that one Terminal device (can be mobile phone, computer, server, air conditioner or the network equipment etc.) executes each embodiment of the present invention The method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of test method, which is characterized in that the described method includes:
Test triggering command is obtained, it is to be modified to determine that terminal to be tested and obtaining locally prestores according to the test triggering command Test script;
The corresponding facility information of the terminal to be tested is obtained, the test script to be modified is carried out according to the facility information Modification obtains target detection script;
The target detection script is run, records the test information in the target detection script operational process, and according to described It tests information and generates test file.
2. the method as described in claim 1, which is characterized in that triggering command is tested in the acquisition, is triggered according to the test The step of instruction determines terminal to be tested and obtains the test script to be modified locally prestored, comprising:
Test triggering command is obtained, the equipment identification information and script identification information for including in the test triggering command are extracted;
Corresponding terminal to be tested is determined according to the equipment identification information;
Test script to be modified corresponding with the script identification information is searched in mapping relations, is stored in the mapping relations There is the corresponding relationship between script identification information and test script to be modified.
3. method according to claim 2, which is characterized in that it is described to obtain the corresponding facility information of the terminal to be tested, The step of being modified according to the facility information to the test script to be modified, obtaining target detection script, comprising:
The corresponding facility information of the terminal to be tested is obtained, the facility information includes current device title, current system version This number and current user name;
According to the current device title, the current system version number and the current user name, respectively to described to be repaired Change the historical Device title for including in test script, legacy system version number and historical user's name to be replaced, obtains target Test script.
4. method as claimed in claim 3, which is characterized in that triggering command is tested in the acquisition, is triggered according to the test Before the step of instruction determines terminal to be tested and obtains the test script to be modified locally prestored, the method also includes:
In response to the power-on instruction of user's input, the task triggering configuration file locally prestored is read;
Determine the task triggering corresponding timed task of configuration file and the timed task corresponding triggered time;
When detecting that current time reaches the triggered time, executes the timed task and generate test triggering command.
5. method as claimed in claim 4, which is characterized in that the target detection script includes: that script calls file and more A pending script file;
The operation target detection script, records the test information in the target detection script operational process, and according to The test information generates the step of test file, comprising:
File is called according to the script, calls application of each pending script file to loading in the terminal to be tested respectively Program is tested, and records test information;
It whether detects in the test information comprising the mark that reports an error;
When not identifying comprising reporting an error in detecting the test information, test file is generated according to the test information.
6. method as claimed in claim 5, which is characterized in that whether include the mark that reports an error in the detection test information The step of after, the method also includes:
When being identified in detecting the test information comprising reporting an error, reports an error described in determination and identify the affiliated classification that reports an error;
It reports an error described in acquisition and identifies corresponding detailed error information, and according to report an error classification and the detailed error information life It reports an error file at test.
7. method as claimed in claim 6, which is characterized in that report an error described in the acquisition and identify the corresponding letter that reports an error in detail Breath, and according to it is described report an error classification and the detailed error information generate test report an error file the step of after, the method is also Include:
Whether the classification that reports an error described in detection belongs to default prompt classification;
It when the classification that reports an error belongs to default prompt classification, is reported an error file generated prompt mail according to the test, and by institute Prompt mail is stated to be sent to the user terminal and be shown.
8. a kind of test device, which is characterized in that described device includes: that script obtains module, script modified module and script fortune Row module;
The script obtains module, for obtaining test triggering command, determines terminal to be tested according to the test triggering command And obtain the test script to be modified locally prestored;
The script modified module, for obtaining the corresponding facility information of the terminal to be tested, according to the facility information pair The test script to be modified is modified, and target detection script is obtained;
The script running module records in the target detection script operational process for running the target detection script Test information, and according to the test information generate test file.
9. a kind of test equipment, which is characterized in that the test equipment includes: memory, processor and is stored in the storage On device and the test program that can run on the processor, the test program are arranged for carrying out such as appointed in claim 1 to 7 The step of test method described in one.
10. a kind of storage medium, which is characterized in that be stored with test program on the storage medium, the test program is located The step of reason device realizes test method as described in any one of claim 1 to 7 when executing.
CN201810566453.9A 2018-06-01 2018-06-01 Test method, device, equipment and storage medium Pending CN109726107A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810566453.9A CN109726107A (en) 2018-06-01 2018-06-01 Test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810566453.9A CN109726107A (en) 2018-06-01 2018-06-01 Test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109726107A true CN109726107A (en) 2019-05-07

Family

ID=66294554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810566453.9A Pending CN109726107A (en) 2018-06-01 2018-06-01 Test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109726107A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377517A (en) * 2019-07-17 2019-10-25 中国工商银行股份有限公司 Applied program testing method and device, electronic equipment and readable storage medium storing program for executing
CN110377502A (en) * 2019-06-18 2019-10-25 深圳壹账通智能科技有限公司 Function test method, device and terminal device based on script
CN110377498A (en) * 2019-05-27 2019-10-25 平安银行股份有限公司 Credit card automatic test approach, device, electronic equipment and storage medium
CN111078532A (en) * 2019-11-25 2020-04-28 北京云测信息技术有限公司 Terminal equipment testing method, device and system
CN111260203A (en) * 2020-01-13 2020-06-09 联宝(合肥)电子科技有限公司 Data processing method and device, computer storage medium and electronic equipment
CN111858352A (en) * 2020-07-22 2020-10-30 中国平安财产保险股份有限公司 Method, device, equipment and storage medium for automatic test monitoring
CN112115055A (en) * 2020-09-21 2020-12-22 北京自如信息科技有限公司 Multi-machine automatic testing method and device and computer equipment
CN112133072A (en) * 2020-09-23 2020-12-25 中国兵器工业集团第二一四研究所苏州研发中心 Test system and test method for LoRa wireless data acquisition device
CN112181485A (en) * 2020-10-20 2021-01-05 平安银行股份有限公司 Script execution method and device, electronic equipment and storage medium
CN112214413A (en) * 2020-10-27 2021-01-12 北京字节跳动网络技术有限公司 Application program testing method, device, equipment and storage medium
CN112667505A (en) * 2020-12-25 2021-04-16 杭州群核信息技术有限公司 Terminal testing method and device, storage medium and electronic device
CN113127358A (en) * 2021-04-23 2021-07-16 北京映客芝士网络科技有限公司 Test method, test device, electronic equipment and medium
CN113468007A (en) * 2021-06-30 2021-10-01 完美世界(北京)软件科技发展有限公司 Equipment identification information verification method, device, equipment and storage medium
CN113485945A (en) * 2021-09-07 2021-10-08 深圳市信润富联数字科技有限公司 Method and device for testing mobile phone interface, terminal equipment and storage medium
CN114546535A (en) * 2022-02-28 2022-05-27 中国建设银行股份有限公司 Service configuration method and device of operating system, storage medium and electronic equipment
WO2022183667A1 (en) * 2021-03-04 2022-09-09 深圳创维-Rgb电子有限公司 Method and apparatus for modifying refurbishment package, and terminal device and storage medium
CN115987863A (en) * 2023-01-05 2023-04-18 中国联合网络通信集团有限公司 Testing method and device for optical modem and server
CN113468007B (en) * 2021-06-30 2024-07-12 完美世界(北京)软件科技发展有限公司 Device identification information verification method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360951A (en) * 2014-12-09 2015-02-18 迈普通信技术股份有限公司 Script testing method and device
CN104765678A (en) * 2014-01-08 2015-07-08 阿里巴巴集团控股有限公司 Method and device for testing applications on mobile terminal
CN107273300A (en) * 2017-07-31 2017-10-20 北京云测信息技术有限公司 A kind of applied program testing method and device
CN107491390A (en) * 2017-08-15 2017-12-19 深圳市慧择时代科技有限公司 The method and device of replacement test environment configuration information
CN107632937A (en) * 2017-10-10 2018-01-26 郑州云海信息技术有限公司 A kind of method, apparatus tested cluster virtual machine, readable storage medium storing program for executing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765678A (en) * 2014-01-08 2015-07-08 阿里巴巴集团控股有限公司 Method and device for testing applications on mobile terminal
CN104360951A (en) * 2014-12-09 2015-02-18 迈普通信技术股份有限公司 Script testing method and device
CN107273300A (en) * 2017-07-31 2017-10-20 北京云测信息技术有限公司 A kind of applied program testing method and device
CN107491390A (en) * 2017-08-15 2017-12-19 深圳市慧择时代科技有限公司 The method and device of replacement test environment configuration information
CN107632937A (en) * 2017-10-10 2018-01-26 郑州云海信息技术有限公司 A kind of method, apparatus tested cluster virtual machine, readable storage medium storing program for executing

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377498A (en) * 2019-05-27 2019-10-25 平安银行股份有限公司 Credit card automatic test approach, device, electronic equipment and storage medium
CN110377498B (en) * 2019-05-27 2023-11-03 平安银行股份有限公司 Automatic credit card account testing method and device, electronic equipment and storage medium
CN110377502A (en) * 2019-06-18 2019-10-25 深圳壹账通智能科技有限公司 Function test method, device and terminal device based on script
CN110377517A (en) * 2019-07-17 2019-10-25 中国工商银行股份有限公司 Applied program testing method and device, electronic equipment and readable storage medium storing program for executing
CN111078532A (en) * 2019-11-25 2020-04-28 北京云测信息技术有限公司 Terminal equipment testing method, device and system
CN111260203A (en) * 2020-01-13 2020-06-09 联宝(合肥)电子科技有限公司 Data processing method and device, computer storage medium and electronic equipment
CN111260203B (en) * 2020-01-13 2022-06-10 联宝(合肥)电子科技有限公司 Data processing method and device, computer storage medium and electronic equipment
CN111858352A (en) * 2020-07-22 2020-10-30 中国平安财产保险股份有限公司 Method, device, equipment and storage medium for automatic test monitoring
CN111858352B (en) * 2020-07-22 2024-04-05 中国平安财产保险股份有限公司 Method, device, equipment and storage medium for automatic test monitoring
CN112115055A (en) * 2020-09-21 2020-12-22 北京自如信息科技有限公司 Multi-machine automatic testing method and device and computer equipment
CN112133072A (en) * 2020-09-23 2020-12-25 中国兵器工业集团第二一四研究所苏州研发中心 Test system and test method for LoRa wireless data acquisition device
CN112133072B (en) * 2020-09-23 2021-07-06 中国兵器工业集团第二一四研究所苏州研发中心 Test system and test method for LoRa wireless data acquisition device
CN112181485A (en) * 2020-10-20 2021-01-05 平安银行股份有限公司 Script execution method and device, electronic equipment and storage medium
CN112181485B (en) * 2020-10-20 2024-03-15 平安银行股份有限公司 Script execution method and device, electronic equipment and storage medium
CN112214413A (en) * 2020-10-27 2021-01-12 北京字节跳动网络技术有限公司 Application program testing method, device, equipment and storage medium
CN112214413B (en) * 2020-10-27 2024-01-16 北京字节跳动网络技术有限公司 Application program testing method, device, equipment and storage medium
CN112667505A (en) * 2020-12-25 2021-04-16 杭州群核信息技术有限公司 Terminal testing method and device, storage medium and electronic device
WO2022183667A1 (en) * 2021-03-04 2022-09-09 深圳创维-Rgb电子有限公司 Method and apparatus for modifying refurbishment package, and terminal device and storage medium
CN113127358A (en) * 2021-04-23 2021-07-16 北京映客芝士网络科技有限公司 Test method, test device, electronic equipment and medium
CN113468007A (en) * 2021-06-30 2021-10-01 完美世界(北京)软件科技发展有限公司 Equipment identification information verification method, device, equipment and storage medium
CN113468007B (en) * 2021-06-30 2024-07-12 完美世界(北京)软件科技发展有限公司 Device identification information verification method, device and storage medium
CN113485945A (en) * 2021-09-07 2021-10-08 深圳市信润富联数字科技有限公司 Method and device for testing mobile phone interface, terminal equipment and storage medium
CN114546535A (en) * 2022-02-28 2022-05-27 中国建设银行股份有限公司 Service configuration method and device of operating system, storage medium and electronic equipment
CN115987863A (en) * 2023-01-05 2023-04-18 中国联合网络通信集团有限公司 Testing method and device for optical modem and server

Similar Documents

Publication Publication Date Title
CN109726107A (en) Test method, device, equipment and storage medium
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
CN105094783B (en) method and device for testing stability of android application
CN105630463B (en) For detecting the method and device of JAR packet conflict
US8156475B2 (en) Device and method for testing embedded software using emulator
US10067858B2 (en) Cloud-based software testing
US9684587B2 (en) Test creation with execution
US20140109063A1 (en) Capturing test data associated with error conditions in software item testing
US11327742B2 (en) Affinity recommendation in software lifecycle management
CN111124919A (en) User interface testing method, device, equipment and storage medium
US20140109052A1 (en) Test environment managed within tests
CN111274154A (en) Automatic testing method, device, equipment and storage medium
US20140109058A1 (en) Test language interpreter
US8327191B2 (en) Automatically populating symptom databases for software applications
CN106326120B (en) Regression testing method and device for application software and electronic equipment
CN109471768B (en) Service problem monitoring method and device and electronic equipment
CN110704304A (en) Application program testing method and device, storage medium and server
CN109902005A (en) A kind of method and system of automatic test
CN110928777B (en) Test case processing method, device, equipment and storage medium
CN105653946A (en) Android malicious behavior detection system based on combined event behavior triggering and detection method of Android malicious behavior detection system
KR20210004656A (en) Apparatus and control method for vehicle function test
CN110879781A (en) Program debugging method and device, electronic equipment and computer readable storage medium
CN112650670A (en) Application testing method, device, system, electronic equipment and storage medium
US20140109050A1 (en) Altering a test
US9612944B2 (en) Method and system for verifying scenario based test selection, execution and reporting

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190507

WD01 Invention patent application deemed withdrawn after publication