CN106649073A - Test method and device based on dynamic script template - Google Patents

Test method and device based on dynamic script template Download PDF

Info

Publication number
CN106649073A
CN106649073A CN201510712840.5A CN201510712840A CN106649073A CN 106649073 A CN106649073 A CN 106649073A CN 201510712840 A CN201510712840 A CN 201510712840A CN 106649073 A CN106649073 A CN 106649073A
Authority
CN
China
Prior art keywords
script
testing
test
template
parameter
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
CN201510712840.5A
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.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group 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 China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201510712840.5A priority Critical patent/CN106649073A/en
Publication of CN106649073A publication Critical patent/CN106649073A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a test method and device based on dynamic script template. The test method comprises the steps of receiving a first parameter of a test tool collected by a proxy service client of the test tool and a second parameter of a to-be-tested equipment connected with the test tool, based on the first parameter and the second parameter, screening and querying reusable functions or scripts in a dynamic database, mapping the functions or scripts by using a key word dictionary, encapsulating into script modules, receiving a test request, based on the test request and the script module, generating execution scripts, sending the version number of the execution script and the version number of the key work dictionary to the proxy service client, and ordering the proxy service client to analyze and execute. The test method and the device based on dynamic script template solve the problem that in the prior art, the automatic test engine has bad expansibility, low automation level and high dependence.

Description

A kind of method of testing and device based on dynamic script template
Technical field
The present invention relates to automatic test field, more particularly to a kind of method of testing based on dynamic script template And device.
Background technology
Automatic test is a kind of process that machine execution is converted into the artificial behavioral test for driving.It is existing Automatic test engine, generally sealed by the application programming interfaces (API) to different testing tools Dress, formed testing engine inside base class collection of functions, and by test case in tested function point, be combined into A series of functions are so as to forming test script template.When test is performed, by using combine engine inside one The automatic test script that serial base class function is formed, calls testing tool API, drives test equipment to perform Test.
It, to the process of diversification integration, is automatic test that existing technical scheme is from scratch, from single The accumulation of experience, adaptability, testing time to system under test (SUT), test environment have very big requirement.
In actual applications scope is wider for prior art, but there are some inevitable shortcomings:
Autgmentability is poor.In existing general automation testing engine technology, internal base class collection of functions is based on not With starting point and thinking develop, in the face of different testing tools, different equipment under test, no With test environment when, make a big difference, therefore cause automatic test engine function single and be difficult to Multiplexing.This cause the edition upgrading of automated test tool or measurand business change, be required for weight Newly spend substantial amounts of manpower and materials to develop the base class function encapsulated in testing engine again, reduce testing efficiency.
Automaticity is relatively low.Although can be opened according to the technical characterstic of all kinds of testing requirements and testing tool software Send and lack between diversified testing engine, but each instrument and engine overall mentality of designing, it is difficult to melt Conjunction is used.In prior art, when testing tool carries out the change of instrument version or environment, or test work During the information such as tool, the increase of equipment under test species, testing tool cannot carry out information exchange with testing engine, because This testing engine side cannot automate synchronized update upgrading, easily cause the failure of test execution, cause various The semi-automatic situation of testing procedure.
Dependence is high.Existing technical scheme is only capable of realizing sending out test assignment, then test result is received Collection is returned, it is impossible to the compiling automated to test script according to testing requirement and verification, to test execution The technical merit of personnel's script compiling, there is comprehensive dependence in the familiarity and professional knowledge of system.
The content of the invention
The invention provides a kind of method of testing and device based on dynamic script template, its purpose is to solution Certainly existing automatic test engine expansion is poor, the problem that automaticity is relatively low and dependence is high.
In order to achieve the above object, The embodiment provides a kind of test based on dynamic script template Method, is applied to testing service device, and method of testing includes:
Receive testing tool on agency service client collection testing tool the first parameter and with test Second parameter of the equipment under test of instrument connection;
Screened in dynamic data base according to the first parameter and the second parameter and inquire reusable function or pin This;
Function or script are mapped using Keywords Dictionary, and is packaged into script template;
Testing requirement is received, and perform script is generated according to testing requirement and script template;
The version number of perform script and Keywords Dictionary is sent to agency service client, and is indicated by acting on behalf of Service client is parsed and performed.
Preferably, method of testing also includes:
Receive the access application that testing tool sends;
According to application is accessed, the installation kit of agency service client is sent to testing tool, and in testing tool On be installed and activated agency service client.
Preferably, function or script are mapped using Keywords Dictionary, and is packaged into the step of script template Suddenly, specifically include:
Using test object, test action, test parameter as the set of keyword in Keywords Dictionary, from can Filter out the basic function or script needed for keyword in the function or script of multiplexing, and by basic function or pin Originally it is packaged into script template.
Preferably, after the step of basic function being packaged into into script template, method of testing also includes:
Script template is sent to agency service client, indicates that agency service client is carried out to script template Checking and the feedback of Receiving Agent service client:
If agency service client feedback stores script template to script template storehouse to be verified;
If agency service client feedback does not pass through for checking, the right of the script template that agency feeds back is obtained The basic function answered or script, and again basic function or script be packaged into into script template.
Preferably, the step of receiving testing requirement, and perform script generated according to testing requirement and script template, Specifically include:
Receiving testing requirement and extracting from testing requirement includes test object, test action and test parameter Test keyword;
Script template in test keyword match script template storehouse, and the data of user input are embedded into In the script template of matching, perform script is generated.
Preferably, the version number of perform script and Keywords Dictionary is sent to agency service client, and is referred to Being shown the step of parsed by agency service client and performed, specifically include:
The version number of perform script and Keywords Dictionary is sent to agency service client, agency service visitor is made Family end obtains corresponding Keywords Dictionary according to the version number of Keywords Dictionary;
Instruction is parsed by agency service client and is performed perform script according to corresponding Keywords Dictionary.
To achieve these goals, embodiments of the invention additionally provide a kind of survey based on dynamic script template Method for testing, is applied to testing tool, and method of testing includes:
Second parameter of the first parameter of collecting test instrument and the equipment under test being connected with testing tool, and will First parameter and the second parameter are sent to testing service device;
The perform script of testing service device transmission and the version number of Keywords Dictionary are received, and according to testing service End performs instruction, parses and perform perform script, wherein perform script by testing service device according to test need Summation script template is generated.
Preferably, method of testing also includes:
When receiving the checking instruction verified to script template at testing service end, script template is tested Demonstrate,prove and to testing service device feedback validation result.
Preferably, reception testing service device sends perform script and the version number of Keywords Dictionary, and according to Testing service end performs instruction, the step of parsing and perform perform script, specifically includes:
The perform script of testing service end transmission and the version number of Keywords Dictionary are received, according to Keywords Dictionary Version number obtain corresponding Keywords Dictionary;
Perform script is parsed and performed according to corresponding Keywords Dictionary.
To achieve these goals, embodiments of the invention additionally provide a kind of survey based on dynamic script template Trial assembly is put, and is applied to testing service device, and test device includes:
Receiver module, for receiving the first of the testing tool of the collection of the agency service client on testing tool Second parameter of parameter and the equipment under test being connected with testing tool;
Screening module, inquires and can answer for being screened in dynamic data base according to the first parameter and the second parameter Function or script;
Package module, for mapping using Keywords Dictionary function or script, and is packaged into script mould Plate;
Generation module, for receiving testing requirement, and generates perform script according to testing requirement and script template;
Sending module, for the version number of perform script and Keywords Dictionary to be sent to agency service client, And indicate to be parsed and performed by agency service client.
Preferably, test device also includes:
Application receiver module, for receiving the access application of testing tool transmission;
Starting module, for according to application is accessed, to testing tool the installation kit of agency service client being sent, And it is installed and activated agency service client on testing tool.
Preferably, package module specifically for:
Using test object, test action, test parameter as the set of keyword in Keywords Dictionary, from can Filter out the basic function or script needed for keyword in the function or script of multiplexing, and by basic function or pin Originally it is packaged into script template.
Preferably, test device also includes:
Authentication module is indicated, for after the step of basic function is packaged into script template by package module,
Script template is sent to agency service client, indicates that agency service client is carried out to script template Checking and the feedback of Receiving Agent service client:
If agency service client feedback stores script template to script template storehouse to be verified;
If agency service client feedback does not pass through for checking, the right of the script template that agency feeds back is obtained The basic function answered or script, and again basic function or script be packaged into into script template.
Preferably, generation module is specifically included:
Receiving submodule, for receiving testing requirement and extracting from testing requirement test object, test are included Action and the test keyword of test parameter;
Matched sub-block, for the script template in test keyword match script template storehouse, and by user The data of input are embedded in the script template of matching, generate perform script.
Preferably, sending module is specifically included:
Sending submodule, for the version number of perform script and Keywords Dictionary to be sent to agency service client End, makes agency service client obtain corresponding Keywords Dictionary according to the version number of Keywords Dictionary;
Submodule is indicated, for indicating to be parsed and held according to corresponding Keywords Dictionary by agency service client Row perform script.
To achieve these goals, embodiments of the invention additionally provide a kind of survey based on dynamic script template Trial assembly is put, and is applied to testing tool, and test device includes:
Acquisition module, the first parameter for collecting test instrument and the equipment under test that is connected with testing tool Second parameter, and the first parameter and the second parameter are sent to into testing service device;
Performing module, for receiving the perform script of testing service device transmission and the version number of Keywords Dictionary, And instruction is performed according to testing service end, and parsing and perform perform script, wherein perform script is by testing clothes Business device is generated according to testing requirement and script template.
Preferably, test device also includes:
Authentication module, it is right when indicating for receiving the checking verified to script template at testing service end Script template is verified and to testing service device feedback validation result.
Preferably, performing module is specifically included:
Acquisition submodule, for receiving the perform script of testing service end transmission and the version number of Keywords Dictionary, Corresponding Keywords Dictionary is obtained according to the version number of Keywords Dictionary;
Analyzing sub-module, for perform script to be parsed and performed according to corresponding Keywords Dictionary.
The such scheme of the present invention at least includes following beneficial effect:
The method of testing based on dynamic script and device that the present invention is provided, by being preset at dynamic data base Middle function or script are mapped using Keywords Dictionary, and dynamic generates script template;It is concrete when receiving Testing requirement when, by Keywords Dictionary Map Searching to corresponding script template can generate specifically hold This is traveled far and wide, then perform script is sent to agency service client;Whole process is moved inside testing service device State is completed, the automatic conversion of testing requirement to perform script, improves the automaticity of test, and is reduced Demand to tester's script development technique, greatly reduces the input cost of personnel.
Description of the drawings
The method of testing based on dynamic script template that Fig. 1 is provided for the first embodiment of the present invention it is basic Flow chart of steps;
The method of testing based on dynamic script template that Fig. 2 is provided for the second embodiment of the present invention it is basic Flow chart of steps;
The method of testing based on dynamic script template that Fig. 3 is provided for the third embodiment of the present invention it is basic Flow chart of steps;
The method of testing based on dynamic script template that Fig. 4 is provided for the fourth embodiment of the present invention it is basic Flow chart of steps;
The structure of the test device based on dynamic script template that Fig. 5 is provided for the fifth embodiment of the present invention Schematic diagram;
The method of testing based on dynamic script template that Fig. 6 is provided for the sixth embodiment of the present invention it is basic Flow chart of steps;
The structure of the test device based on dynamic script template that Fig. 7 is provided for the seventh embodiment of the present invention Schematic diagram;
Fig. 8 is first embodiment of the present invention concrete scene schematic diagram;
Fig. 9 is third embodiment of the present invention concrete scene schematic diagram.
Specific embodiment
To make the technical problem to be solved in the present invention, technical scheme and advantage clearer, below in conjunction with attached Figure and specific embodiment are described in detail.
Existing automatic test engine, generally by the application programming interfaces (API) to different testing tools Be packaged, formed testing engine inside base class collection of functions, and by test case in tested function point, A series of functions are combined into so as to form test script template, have that expansion is poor, automaticity it is relatively low with And the problem that dependence is high.The present invention is directed to existing problem, there is provided a kind of based on dynamic script template Method of testing and device.
First embodiment
Referring to Fig. 1, the first embodiment of the present invention provides a kind of method of testing based on dynamic script template, Testing service device is applied to, method of testing includes:
Step 101, receives the first parameter of the testing tool that the agency service client on testing tool is gathered And the second parameter of the equipment under test being connected with testing tool.
Wherein, the first parameter can include the system version information and instrument version of the operating system of testing tool Information, wherein, operating system can be windows systems, linux system or, android system Deng;Second parameter includes the hardware version numbers of equipment under test and the software version number of equipment under test system.
Step 102, screened in dynamic data base according to the first parameter and the second parameter inquire it is reusable Function or script.
Wherein, need in dynamic data base preset current general many kinds of function or script.
Step 103, is mapped function or script using Keywords Dictionary, and is packaged into script template.
Wherein, the reusable function or script to having filtered out in step 102 is carried out using Keywords Dictionary Mapping, makes each reusable function or script form mapping relations with one or more groups of keywords, and encapsulates Into script template to generate specific perform script.
Step 104, receives testing requirement, and generates perform script according to testing requirement and script template.
Wherein, extract keyword from testing requirement, and according to the mapping relations in step 103, matching with The corresponding script template of testing requirement, and the design parameter in testing requirement is embedded in script template, Form the perform script to perform this testing requirement.
Step 105, the version number of perform script and Keywords Dictionary is sent to agency service client, and Instruction is parsed and performed by agency service client.
In the above embodiment of the present invention, testing service device can as soft or hard test probe, instrument and meter, Server computer, hand-held or above-knee property equipment, mobile device (such as mobile phone), minicom, The software systems of mainframe computer, unmanned plane.
Under normal circumstances, in existing general automation testing engine technology, when the version of automated test tool This upgrading or measurand business change, be required for spending substantial amounts of manpower and materials to develop survey again again The base class function encapsulated in examination engine;And in the above embodiment of the present invention, when testing tool is accessed, root Screen in dynamic data base according to the first parameter of testing tool and the second parameter of equipment under test inquire with Corresponding function or script, directly invoke, without the need for developing again, increased automatic test The durability of engine, improves testing efficiency.
In the above embodiment of the present invention, by function in being preset at dynamic data base or script using crucial Words allusion quotation is mapped, and dynamic generates script template;When specific testing requirement is received, by closing Key words allusion quotation Map Searching to corresponding script template can generate specific perform script, then by perform script Send to agency service client;The present invention encapsulates script template using the mode of keyword mapping, realize across Testing tool, across equipment under test, across test environment dynamic change testing engine, substantially reduce test work Tool, equipment under test, the degree of coupling of test environment, improve the reusability of test system, are significantly lifted and are surveyed Examination efficiency and success rate.Whole process is completed in testing service device internal dynamic, and testing requirement is to perform script Automatic conversion, improve the automaticity of test, and reduce to tester's script development technique Demand, greatly reduces the input cost of personnel.
Preferably, in the above embodiment of the present invention, the method for testing also includes:
Receive the access application that testing tool sends;
According to application is accessed, the installation kit of agency service client is sent to testing tool, and in testing tool On be installed and activated agency service client.
Referring to Fig. 8, Fig. 8 is a concrete scene schematic diagram of the above embodiment of the present invention, wherein, when Testing service device receives the access application that testing tool sends, that is to say, that when testing tool is linked into first During testing service device, the installation kit of agency service client is sent to testing tool first, it should be noted that Testing service device need to be from the version information and instrument for accessing the operating system that testing tool is obtained in application Essential information, and select the installation kit matched with the version information of the operating system of testing tool and to test Instrument sends.
Second embodiment
As shown in Fig. 2 the second embodiment of the present invention provides a kind of test side based on dynamic script template Method, is applied to testing service device, and the method for testing includes:
Step 201, receives the first parameter of the testing tool that the agency service client on testing tool is gathered And the second parameter of the equipment under test being connected with testing tool;Wherein, the first parameter is the operation of testing tool The version information of system, the second parameter is the software and hardware version number of equipment under test.
Step 202, screened in dynamic data base according to the first parameter and the second parameter inquire it is reusable Function or script.
Step 203, using test object, test action, test parameter as one group of pass in Keywords Dictionary Key word, filters out the basic function or script needed for keyword from reusable function or script, and by base Plinth function or script are packaged into script template.
Step 204, receives testing requirement, and generates perform script according to testing requirement and script template.
Step 205, the version number of perform script and Keywords Dictionary is sent to agency service client, and Instruction is parsed and performed by agency service client.
Below by taking PING functions as an example, the present embodiment is introduced, wherein PING is Windows, Unix Order with linux system.PING falls within a communication protocol, is the one of ICP/IP protocol Part, utilizes " PING " order to check whether network connects, and can well help customer analysis With judgement network failure.Wherein, it is using form:Ping spaces IP address.
The script template of PING functions is as follows:
That is, when with " xxxx (test object) ", PING (test operation), IP address (survey Examination parameter) for a set of keyword when, the basis needed for keyword is filtered out from reusable function or script Function or script, and basic function or script are packaged into into above-mentioned script template.
In the above embodiment of the present invention, using test object, test action, test parameter as crucial words A set of keyword in allusion quotation, filter out from reusable function or script basic function needed for keyword or Script, and basic function or script are packaged into into script template.That is, keyword is Keywords Dictionary Index, corresponding is the corresponding script template of the set of keyword;Wherein, one group of (or multigroup) keyword One script template of correspondence, on the one hand makes the encapsulation of script template more targeted, improves testing efficiency; Another aspect improves the durability of the function in dynamic data base or script.
3rd embodiment
As shown in figure 3, the third embodiment of the present invention provides a kind of test side based on dynamic script template Method, is applied to testing service device, and the method for testing includes:
Step 301, receives the first parameter of the testing tool that the agency service client on testing tool is gathered And the second parameter of the equipment under test being connected with testing tool.Wherein, the first parameter is the operation of testing tool The version information of system, the second parameter is the software and hardware version number of equipment under test.
Step 302, screened in dynamic data base according to the first parameter and the second parameter inquire it is reusable Function or script.
Step 303, using test object, test action, test parameter as one group of pass in Keywords Dictionary Key word, filters out the basic function or script needed for keyword from reusable function or script, and by base Plinth function or script are packaged into script template.
Step 304, script template is sent to agency service client, indicates agency service client to pin This template carries out verifying the feedback of simultaneously Receiving Agent service client;
Step 305, if agency service client feedback stores script template to script to be verified ATL;
Step 306, if agency service client feedback does not pass through for checking, obtains the pin of agency's feedback The corresponding basic function of this template or script, and again basic function or script be packaged into into script template.
Step 307, receives testing requirement, and generates perform script according to testing requirement and script template;
Step 308, the version number of perform script and Keywords Dictionary is sent to agency service client, and Instruction is parsed and performed by agency service client.
Referring to Fig. 9, Fig. 9 is a concrete scene schematic diagram of the above embodiment of the present invention, wherein, work as shape Into after the script template in Keywords Dictionary, by script template, (Keywords Dictionary is used for Keywords Dictionary Agency service client is verified) send together to agency service client, indicate agency service client Carry out verifying the feedback of simultaneously Receiving Agent service client to script template;
If reason service client is fed back to be verified, script template is stored to script template storehouse;
If agency service client feedback does not pass through for checking, if by the pin of agency service client feedback The error code of this template, searches corresponding basic function or script, and again by basic function or script envelope Dress up script template.
It is that testing tool is provided with automatic Verification flow process in the above embodiment of the present invention, when script template life Into after, in addition it is also necessary to through agency service client checking and could store to script template when being verified In storehouse, for later automatic test;And testing the script template not passed through also needs to Reseal, until Till being verified.The setting of automatic Verification flow process, it is to avoid test execution failure caused by functional issues. In the above embodiment of the present invention, step 307 is specifically included:
Receiving testing requirement and extracting from testing requirement includes test object, test action and test parameter Test keyword;
Script template in test keyword match script template storehouse, and the data of user input are embedded into In the script template of matching, perform script is generated.
Wherein, when testing requirement is received, test keyword is directly extracted from testing requirement, and to survey In script template in examination keyword match script template storehouse, and the data of user input are embedded into into matching In script template, the perform script of the testing requirement is generated.
Still the present embodiment is introduced by taking PING functions as an example below, when testing requirement is received, from Extract in testing requirement pingAddress.txt, PING and " 1,60,1, F, 1,5,32 (use The keyword of the test parameter of family input ", is first the crucial matching script template of the group;Again by user input Data be embedded in script template, generate perform script it is as follows:
In the above embodiment of the present invention, operational staff is input into comprising test keyword in testing service device Testing requirement, the automatic Complied executing script of testing service device, by artificial compiling, reduces without the need for again The dependence of the workload of operational staff and whole automatic test course to operational staff.
Fourth embodiment
As shown in figure 4, the fourth embodiment of the present invention provides a kind of test side based on dynamic script template Method, is applied to testing service device, and the method for testing includes:
Step 401, receives the first parameter of the testing tool that the agency service client on testing tool is gathered And the second parameter of the equipment under test being connected with testing tool;Wherein, the first parameter is the operation of testing tool The version information of system, the second parameter is the software and hardware version number of equipment under test.
Step 402, screened in dynamic data base according to the first parameter and the second parameter inquire it is reusable Function or script.
Step 403, using test object, test action, test parameter as one group of pass in Keywords Dictionary Key word, filters out the basic function or script needed for keyword from reusable function or script, and by base Plinth function or script are packaged into script template.
Step 404, receives testing requirement, and generates perform script according to testing requirement and script template.
Step 405, the version number of perform script and Keywords Dictionary is sent to agency service client, is made Agency service client obtains corresponding Keywords Dictionary according to the version number of Keywords Dictionary.
Step 406, instruction is parsed and execution by agency service client according to corresponding Keywords Dictionary Script.
In the above embodiment of the present invention, the version number of Keywords Dictionary is sent to agency service client, Purpose is the pass for using same version number in order to ensure the compilation process and resolving of perform script Key words allusion quotation, it is ensured that the information exchange between testing service end and testing tool is effective, it is to avoid perform script Resolving malfunctions, and affects test process.
5th embodiment
Referring to Fig. 5, the fifth embodiment of the present invention provides a kind of test device based on dynamic script template, Testing service device is applied to, the test device includes:
Receiver module 501, for receiving the testing tool that the agency service client on testing tool is gathered Second parameter of the first parameter and the equipment under test being connected with testing tool.
Screening module 502, inquires for being screened in dynamic data base according to the first parameter and the second parameter Reusable function or script.
Package module 503, for mapping using Keywords Dictionary function or script, and is packaged into pin This template.
Generation module 504, performs for receiving testing requirement, and being generated according to testing requirement and script template Script.
Sending module 505, for the version number of perform script and Keywords Dictionary to be sent to agency service visitor Family end, and indicate to be parsed and performed by agency service client.
Preferably, the test device also includes:
Application receiver module, for receiving the access application of testing tool transmission;
Starting module, for according to application is accessed, to testing tool the installation kit of agency service client being sent, And it is installed and activated agency service client on testing tool.
Preferably, package module specifically for:
Using test object, test action, test parameter as the set of keyword in Keywords Dictionary, from can Filter out the basic function or script needed for keyword in the function or script of multiplexing, and by basic function or pin Originally it is packaged into script template.
Preferably, the test device also includes:
Authentication module is indicated, for after the step of basic function is packaged into script template by package module,
Script template is sent to agency service client, indicates that agency service client is carried out to script template Checking and the feedback of Receiving Agent service client:
If agency service client feedback stores script template to script template storehouse to be verified;
If agency service client feedback does not pass through for checking, the right of the script template that agency feeds back is obtained The basic function answered or script, and again basic function or script be packaged into into script template.
Preferably, generation module is specifically included:
Receiving submodule, for receiving testing requirement and extracting from testing requirement test object, test are included Action and the test keyword of test parameter;
Matched sub-block, for the script template in test keyword match script template storehouse, and by user The data of input are embedded in the script template of matching, generate perform script.
Preferably, sending module is specifically included:
Sending submodule, for the version number of perform script and Keywords Dictionary to be sent to agency service client End, makes agency service client obtain corresponding Keywords Dictionary according to the version number of Keywords Dictionary;
Submodule is indicated, for indicating to be parsed and held according to corresponding Keywords Dictionary by agency service client Row perform script.
Sixth embodiment
Referring to Fig. 6, the sixth embodiment of the present invention additionally provides a kind of test side based on dynamic script template Method, is applied to testing tool, and the method for testing includes:
Step 601, the first parameter of collecting test instrument and be connected with testing tool the second of equipment under test Parameter, and the first parameter and the second parameter are sent to into testing service device.
Step 602, receives the perform script of testing service device transmission and the version number of Keywords Dictionary, and root Instruction is performed according to testing service end, perform script is parsed and perform, wherein perform script is by testing service device Generated according to testing requirement and script template.
Preferably, the method for testing also includes:
When receiving the checking instruction verified to script template at testing service end, script template is tested Demonstrate,prove and to testing service device feedback validation result.
Preferably, reception testing service device sends perform script and the version number of Keywords Dictionary, and according to Testing service end performs instruction, the step of parsing and perform perform script, specifically includes:
The perform script of testing service end transmission and the version number of Keywords Dictionary are received, according to Keywords Dictionary Version number obtain corresponding Keywords Dictionary;
Perform script is parsed and performed according to corresponding Keywords Dictionary.
7th embodiment
Referring to Fig. 7, the seventh embodiment of the present invention additionally provides a kind of test based on dynamic script template and fills Put, be applied to testing tool, the test device includes:
Acquisition module 701, the first parameter for collecting test instrument and tested setting of being connected with testing tool The second standby parameter, and the first parameter and the second parameter are sent to into testing service device;
Performing module 702, for receiving the perform script of testing service device transmission and the version of Keywords Dictionary Number, and instruction is performed according to testing service end, parse and perform perform script, wherein perform script is by surveying Examination server is generated according to testing requirement and script template.
Preferably, the test device also includes:
Authentication module, it is right when indicating for receiving the checking verified to script template at testing service end Script template is verified and to testing service device feedback validation result.
Preferably, performing module is specifically included:
Acquisition submodule, for receiving the perform script of testing service end transmission and the version number of Keywords Dictionary, Corresponding Keywords Dictionary is obtained according to the version number of Keywords Dictionary;
Analyzing sub-module, for perform script to be parsed and performed according to corresponding Keywords Dictionary.
It should be noted that the test device based on dynamic script template provided in an embodiment of the present invention is application All embodiments of the device of said method, i.e. said method are applied to the device, and can reach identical Or similar beneficial effect.
The above is the preferred embodiment of the present invention, it is noted that for the common skill of the art For art personnel, on the premise of without departing from principle of the present invention, some improvements and modifications can also be made, These improvements and modifications also should be regarded as protection scope of the present invention.

Claims (18)

1. a kind of method of testing based on dynamic script template, is applied to testing service device, it is characterised in that The method of testing includes:
Receive testing tool on agency service client collection the testing tool the first parameter and with Second parameter of the equipment under test of the testing tool connection;
Screened in dynamic data base according to first parameter and the second parameter and inquire reusable function Or script;
The function or script are mapped using Keywords Dictionary, and is packaged into script template;
Testing requirement is received, and perform script is generated according to the testing requirement and the script template;
The version number of the perform script and the Keywords Dictionary is sent to the agency service client, And indicate to be parsed and performed by the agency service client.
2. method of testing according to claim 1, it is characterised in that the method for testing also includes:
Receive the access application that the testing tool sends;
Application is accessed according to described, to the installation kit of testing tool transmission agency service client, and The agency service client is installed and activated on the testing tool.
3. method of testing according to claim 1, it is characterised in that described to the function or pin This is mapped using Keywords Dictionary, and the step of be packaged into script template, is specifically included:
Using test object, test action, test parameter as the set of keyword in Keywords Dictionary, from institute State and basic function or script needed for the keyword are filtered out in reusable function or script, and will be described Basic function or script are packaged into script template.
4. method of testing according to claim 3, it is characterised in that described by the basic function After the step of being packaged into script template, the method for testing also includes:
The script template is sent to the agency service client, the agency service client pair is indicated The feedback of the agency service client is verified and received to the script template:
If the agency service client feedback stores the script template to script mould to be verified Plate storehouse;
If the agency service client feedback does not pass through for checking, the script of agency's feedback is obtained The corresponding basic function of template or script, and again the basic function or script be packaged into into script template.
5. method of testing according to claim 4, it is characterised in that the reception testing requirement, And according to the step of the testing requirement and script template generation perform script, specifically include:
Receiving testing requirement and extracting from the testing requirement includes test object, test action and test The test keyword of parameter;
Script template described in the test keyword match in script template storehouse, and by the number of user input According to being embedded in the script template of matching, perform script is generated.
6. method of testing according to claim 3, it is characterised in that described by the perform script Send to the agency service client with the version number of the Keywords Dictionary, and indicate to be taken by the agency The step of business client is parsed and performed, specifically includes:
The version number of the perform script and the Keywords Dictionary is sent to the agency service client, The agency service client is set to obtain corresponding Keywords Dictionary according to the version number of the Keywords Dictionary;
Indicate to be parsed and described in performing according to corresponding Keywords Dictionary by the agency service client Perform script.
7. a kind of method of testing based on dynamic script template, is applied to testing tool, it is characterised in that The method of testing includes:
The first parameter for gathering the testing tool and be connected with the testing tool the second of equipment under test Parameter, and first parameter and second parameter are sent to into testing service device;
The perform script of the testing service device transmission and the version number of Keywords Dictionary are received, and according to described Testing service end performs instruction, parses and perform the perform script, wherein the perform script is by described Testing service device is generated according to testing requirement and the script template.
8. method of testing according to claim 7, it is characterised in that the method for testing also includes:
When receiving the checking instruction verified to script template at the testing service end, to the script mould Plate is verified and to the testing service device feedback validation result.
9. method of testing according to claim 7, it is characterised in that the reception test clothes Perform script and the version number of Keywords Dictionary that business device sends, and referred to according to the execution at the testing service end Show, the step of parsing and perform the perform script, specifically include:
The perform script of the testing service end transmission and the version number of Keywords Dictionary are received, according to the pass The version number of key words allusion quotation obtains corresponding Keywords Dictionary;
The perform script is parsed and performed according to corresponding Keywords Dictionary.
10. a kind of test device based on dynamic script template, is applied to testing service device, it is characterised in that The test device includes:
Receiver module, for receiving the testing tool that the agency service client on testing tool is gathered Second parameter of the first parameter and the equipment under test being connected with the testing tool;
Screening module, inquires for being screened in dynamic data base according to first parameter and the second parameter Reusable function or script;
Package module, for mapping using Keywords Dictionary the function or script, and is packaged into pin This template;
Generation module, for receiving testing requirement, and generates according to the testing requirement and the script template Perform script;
Sending module, for the version number of the perform script and the Keywords Dictionary to be sent to the generation Reason service client, and indicate to be parsed and performed by the agency service client.
11. test devices according to claim 10, it is characterised in that the test device is also wrapped Include:
Application receiver module, for receiving the access application that the testing tool sends;
Starting module, for accessing application according to described, to the testing tool agency service client is sent Installation kit, and the agency service client is installed and activated on the testing tool.
12. test devices according to claim 10, it is characterised in that the package module is concrete For:
Using test object, test action, test parameter as the set of keyword in Keywords Dictionary, from institute State and basic function or script needed for the keyword are filtered out in reusable function or script, and will be described Basic function or script are packaged into script template.
13. test devices according to claim 12, it is characterised in that the test device is also wrapped Include:
Authentication module is indicated, for the basic function to be packaged into the step of script template in the package module After rapid,
The script template is sent to the agency service client, the agency service client pair is indicated The feedback of the agency service client is verified and received to the script template:
If the agency service client feedback stores the script template to script mould to be verified Plate storehouse;
If the agency service client feedback does not pass through for checking, the script of agency's feedback is obtained The corresponding basic function of template or script, and again the basic function or script be packaged into into script template.
14. test devices according to claim 13, it is characterised in that the generation module is concrete Including:
Receiving submodule, for receive testing requirement and from the testing requirement extract include test object, Test action and the test keyword of test parameter;
Matched sub-block, for the script template in the script template storehouse described in the test keyword match, And the data of user input are embedded in the script template of matching, generate perform script.
15. test devices according to claim 12, it is characterised in that the sending module is concrete Including:
Sending submodule, for the version number of the perform script and the Keywords Dictionary to be sent to described Agency service client, makes the agency service client obtain phase according to the version number of the Keywords Dictionary The Keywords Dictionary answered;
Submodule is indicated, for indicating by the agency service client according to corresponding Keywords Dictionary Parse and perform the perform script.
A kind of 16. test devices based on dynamic script template, are applied to testing tool, it is characterised in that The test device includes:
Acquisition module, the quilt being connected for the first parameter for gathering the testing tool and with the testing tool Second parameter of measurement equipment, and first parameter and second parameter are sent to into testing service device;
Performing module, for receiving the perform script of the testing service device transmission and the version of Keywords Dictionary Number, and instruction is performed according to the testing service end, the perform script is parsed and performs, wherein described Perform script is generated by the testing service device according to testing requirement and the script template.
17. test devices according to claim 16, it is characterised in that the test device is also wrapped Include:
Authentication module, when indicating for receiving the checking verified to script template at the testing service end, The script template is verified and to the testing service device feedback validation result.
18. test devices according to claim 16, it is characterised in that the performing module is specifically wrapped Include:
Acquisition submodule, for receiving the perform script of the testing service end transmission and the version of Keywords Dictionary This number, corresponding Keywords Dictionary is obtained according to the version number of the Keywords Dictionary;
Analyzing sub-module, for parsing according to corresponding Keywords Dictionary and performs the perform script.
CN201510712840.5A 2015-10-28 2015-10-28 Test method and device based on dynamic script template Pending CN106649073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510712840.5A CN106649073A (en) 2015-10-28 2015-10-28 Test method and device based on dynamic script template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510712840.5A CN106649073A (en) 2015-10-28 2015-10-28 Test method and device based on dynamic script template

Publications (1)

Publication Number Publication Date
CN106649073A true CN106649073A (en) 2017-05-10

Family

ID=58815022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510712840.5A Pending CN106649073A (en) 2015-10-28 2015-10-28 Test method and device based on dynamic script template

Country Status (1)

Country Link
CN (1) CN106649073A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943635A (en) * 2017-11-30 2018-04-20 郑州云海信息技术有限公司 A kind of test method of storage device, device and medium
CN110019294A (en) * 2017-09-19 2019-07-16 北京国双科技有限公司 A kind of generation method, data base query method and the device of data base querying script
CN111124893A (en) * 2019-12-05 2020-05-08 深圳市任子行科技开发有限公司 Automatic testing method and system based on Android device
CN111338935A (en) * 2020-02-17 2020-06-26 支付宝(杭州)信息技术有限公司 Method and system for joint debugging
CN111352850A (en) * 2020-03-31 2020-06-30 中国建设银行股份有限公司 On-line editing method and device based on non-functional test
CN112463510A (en) * 2021-01-25 2021-03-09 卡斯柯信号(北京)有限公司 Deployment method and device of temporary speed limiting server test system
CN113806229A (en) * 2021-09-27 2021-12-17 工银科技有限公司 Interface change test script multiplexing method, device, equipment, medium and product
CN114721748A (en) * 2022-04-11 2022-07-08 广州宇中网络科技有限公司 Data query method, system, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515250A (en) * 2009-04-09 2009-08-26 腾讯科技(深圳)有限公司 Method for testing software system and device thereof
US20090234717A1 (en) * 2002-10-15 2009-09-17 Wiggins Randall T Targeted information content delivery using a combination of environmental and demographic information
CN102693183A (en) * 2012-05-30 2012-09-26 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
US8881040B2 (en) * 2008-08-28 2014-11-04 Georgetown University System and method for detecting, collecting, analyzing, and communicating event-related information
CN104778124A (en) * 2015-04-13 2015-07-15 上海新炬网络信息技术有限公司 Automatic testing method for software application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090234717A1 (en) * 2002-10-15 2009-09-17 Wiggins Randall T Targeted information content delivery using a combination of environmental and demographic information
US8881040B2 (en) * 2008-08-28 2014-11-04 Georgetown University System and method for detecting, collecting, analyzing, and communicating event-related information
CN101515250A (en) * 2009-04-09 2009-08-26 腾讯科技(深圳)有限公司 Method for testing software system and device thereof
CN102693183A (en) * 2012-05-30 2012-09-26 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
CN104778124A (en) * 2015-04-13 2015-07-15 上海新炬网络信息技术有限公司 Automatic testing method for software application

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019294A (en) * 2017-09-19 2019-07-16 北京国双科技有限公司 A kind of generation method, data base query method and the device of data base querying script
CN107943635A (en) * 2017-11-30 2018-04-20 郑州云海信息技术有限公司 A kind of test method of storage device, device and medium
CN111124893A (en) * 2019-12-05 2020-05-08 深圳市任子行科技开发有限公司 Automatic testing method and system based on Android device
CN111124893B (en) * 2019-12-05 2024-03-29 深圳市任子行科技开发有限公司 Automatic testing method and system based on Android device
CN111338935A (en) * 2020-02-17 2020-06-26 支付宝(杭州)信息技术有限公司 Method and system for joint debugging
CN111338935B (en) * 2020-02-17 2023-02-28 支付宝(杭州)信息技术有限公司 Method and system for joint debugging
CN111352850A (en) * 2020-03-31 2020-06-30 中国建设银行股份有限公司 On-line editing method and device based on non-functional test
CN112463510A (en) * 2021-01-25 2021-03-09 卡斯柯信号(北京)有限公司 Deployment method and device of temporary speed limiting server test system
CN113806229A (en) * 2021-09-27 2021-12-17 工银科技有限公司 Interface change test script multiplexing method, device, equipment, medium and product
CN114721748A (en) * 2022-04-11 2022-07-08 广州宇中网络科技有限公司 Data query method, system, equipment and readable storage medium
CN114721748B (en) * 2022-04-11 2024-02-27 广州宇中网络科技有限公司 Data query method, system, device and readable storage medium

Similar Documents

Publication Publication Date Title
CN106649073A (en) Test method and device based on dynamic script template
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
CN102141962B (en) Safety distributed test framework system and test method thereof
CN104699616B (en) The method of a kind of application test, Apparatus and system
CN106330593B (en) Protocol detection method and device
CN107315679A (en) A kind of embedded software automation exact p-value method and test system
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
CN109902017A (en) A kind of method and terminal based on RobotFramework test Dubbo interface
CN108920364A (en) Software defect positioning method, device, terminal and computer readable storage medium
CN113706110B (en) FPGA test tool integrated test management platform
CN109344053A (en) Interface coverage test method, system, computer equipment and storage medium
CN107562623A (en) A kind of REST API automated testing methods and system
CN110134582A (en) The processing of test case and data processing method and device
CN102707712B (en) Electronic equipment fault diagnosis method and system
CN102915303A (en) Method and device for ETL (extract-transform-load) tests
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN110532779A (en) A kind of method, apparatus of Hole Detection, terminal and storage medium
CN106776346A (en) The method of testing and device of CCMTS equipment
CN106991045A (en) Page method of calibration and device
CN107844411A (en) A kind of method of testing and relevant apparatus
Cha et al. Service mesh based distributed tracing system
CN108897686A (en) It is complete to record separately automated testing method and device
CN112583663B (en) Automatic network performance testing method based on domestic operating system
CN107122307B (en) Internet of things execution system
CN114816980A (en) Automatic testing device and method for embedded communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510