CN108415826A - Test method, terminal device and the computer readable storage medium of application - Google Patents

Test method, terminal device and the computer readable storage medium of application Download PDF

Info

Publication number
CN108415826A
CN108415826A CN201810029705.4A CN201810029705A CN108415826A CN 108415826 A CN108415826 A CN 108415826A CN 201810029705 A CN201810029705 A CN 201810029705A CN 108415826 A CN108415826 A CN 108415826A
Authority
CN
China
Prior art keywords
test
script file
target
mark
crossover tool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810029705.4A
Other languages
Chinese (zh)
Other versions
CN108415826B (en
Inventor
王庆丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201810029705.4A priority Critical patent/CN108415826B/en
Publication of CN108415826A publication Critical patent/CN108415826A/en
Application granted granted Critical
Publication of CN108415826B publication Critical patent/CN108415826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

The present invention is suitable for applying technical field of measurement and test, provides a kind of test method of application, terminal device and computer readable storage medium.Wherein, a kind of test method of application, by the type information for obtaining the test script file being loaded into, the mark of script file crossover tool is searched according to type information, further according to the mark of script file crossover tool, script file crossover tool is called to convert test script file, obtain target script file, target script file is suitable for current test platform, performance objective script file, to test application, so that when being tested application on different test platforms, test script is reconfigured without the difference because of test platform, the development cost of test script is saved.

Description

Test method, terminal device and the computer readable storage medium of application
Technical field
The invention belongs to apply a kind of technical field of measurement and test more particularly to test method of application, terminal device and calculating Machine readable storage medium storing program for executing.
Background technology
As the popularity of the terminals such as mobile phone, computer is higher and higher, the application program for being suitable for terminal is also more and more.
In the prior art when testing application, the test script file configured is configured to remote testing and is put down In the platforms such as platform, mobile test platform, the test to application is realized by executing the test script file.Due to different Test script file frame used by test platform is different so that it applies in carrying out test process, it can not be in different surveys It tries to use the same script file on platform, needs to configure different script files for different test platforms, increase out Send out cost.
Invention content
In view of this, an embodiment of the present invention provides a kind of test method of application, terminal device and computer-readable depositing Storage media improves testing efficiency when can carry out operation test to multiple terminals at the same time.
The first aspect of the embodiment of the present invention provides a kind of test method of application, including:
It is loaded into test script file;
Obtain the type information of the test script file;
The mark of script file crossover tool is searched according to the type information;
According to the mark of the script file crossover tool, call script file crossover tool to the test script file It is converted, obtains target script file, the target script file is suitable for current test platform;
The target script file is executed, to test application.
The second aspect of the embodiment of the present invention provides a kind of test device of application, including is used to execute first aspect institute State the unit of method.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including:It memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor executes the computer program The step of realizing above-mentioned first aspect the method.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, and the computer program is located The step of reason device realizes above-mentioned first scheme the method when executing.
The type information for the test script file that the embodiment of the present invention is loaded by acquisition searches script according to type information The mark of file crossover tool calls script file crossover tool to testing foot further according to the mark of script file crossover tool This document is converted, and target script file is obtained, and target script file is suitable for current test platform, performance objective script text Part, to test application so that when being tested application on different test platforms, without because of test platform It is different and reconfigure test script, save the development cost of test script.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some Embodiment for those of ordinary skill in the art without having to pay creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation process schematic diagram of the test method of application provided in an embodiment of the present invention;
Fig. 2 is a kind of implementation process schematic diagram of the test method for application that another embodiment of the present invention provides;
Fig. 3 is the specific implementation flow chart of the test method step S25 for application that another embodiment of the present invention provides a kind of;
Fig. 4 is the specific implementation flow chart of the test method step S27 for application that another embodiment of the present invention provides a kind of;
Fig. 5 is a kind of structural schematic diagram of the test device of application provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram of terminal device provided in an embodiment of the present invention.
Specific implementation mode
In being described below, for illustration and not for limitation, it is proposed that such as tool of particular system structure, technology etc Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention can also be realized in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
Referring to Fig. 1, it is that the embodiment of the present invention provides a kind of implementation flow chart of the test method of application, answers as shown in Figure 1 Test method may include:
S11:It is loaded into test script file.
In step s 11, test script file is used to carry out operation test to application, describes and is tested to application Mode of operation in the process and operation target, wherein mode of operation includes:Click, sliding, long-press or side dragging etc.;Behaviour Include as target:Virtual key, icon, window or web page interlinkage etc..
In the present embodiment, test script file is pre-configured script file, and server is loaded into the test script File can be after application to be tested is determined, according to the operation testing requirement of application to be tested, from preset database Selection obtains.
As for when test script file is loaded into, it may include but be not limited only to following scene.
According to the attribute information of application to be tested, it is loaded into test script file.
By taking application to be tested is game application A as an example, it is used to describe to apply any boundary of A at this using the attribute information of A In face, the movement content that needs user to be operated.
For example, in any interface using A, word input, user can be provided to the user by dummy keyboard Clicking operation and slide are carried out on the virtual keyboard, carry out the input of word.It is loaded into selection test script file When, then selection is for the test script file that the dummy keyboard using A carries out clicking operation and slide is tested.
S12:Obtain the type information of the test script file.
In step s 12, type information is used to describe the control targe information or testing process information of test script file, Wherein, control targe information refers to the programming mode of test script file, for example, object-oriented or procedure-oriented;Testing process Refer to that the sequence that process is lined up is generated during executing test script file.
Parallel multiple host processes can be generated during test platform executes test script file, each host process exists In operational process, it is also possible to generate subprocess.Process lines up the institute for referring to generating during executing test script file There is the set of host process, and in process is lined up, putting in order between process is related with the genesis sequence of process.
In the present embodiment, the type information of test script file and the target script text that can be performed on test platform The type information of part is different.
The type information of test script file can be carried in the attribute information of test script file, or held When the row test script file, the process during test script file is executed by analysis, and then determines test script text The type information of part.
For example, after being loaded into test script file, it is read out by the attribute information to the test script file, in turn Recognize the type information of the test script file.
For another example after being loaded into test script file, by being compiled to the test script file, the test foot is analyzed The process queue that this document may will produce in the process of implementation, and the process queue is analyzed, and then determine the test The type information of script file.
It should be noted that test script file is led to the manageable instruction of virtual machine is parsed into compilation process It crosses calling compiling function pair instruction to be executed, and then analyzes what the test script file may will produce in the process of implementation Process queue.
S13:The mark of script file crossover tool is searched according to the type information.
In step s 13, the mark of script file crossover tool is for distinguishing different script file crossover tools.
In the present embodiment, script file crossover tool can be according to the type information of different test script files, The assembler language crossover tool being respectively configured.
Since test script file is that the test logic feature based on test platform is configured, in different surveys When running same test script file on examination platform, the phenomenon that being susceptible to test process entanglement or can not be tested.For Above-mentioned phenomenon is avoided, by comparing the otherness between different test platforms, can know and execute on different test platforms Using the otherness between test script, according to the difference between different test platforms test script file be converted to Purpose, configuration script file crossover tool, and after the mark for finding script file crossover tool, by calling mark signified To script file crossover tool test script file is converted, the overlapping development to test script file can be removed from, Reduce the cost using test.
It should be noted that when user tests application by current test platform, in current test platform After being loaded into test script file, by current test platform by calling script file crossover tool to turn test script file It changes.During calling script file crossover tool, the type information of test script file is obtained first, further according to the type The mark of information searching script file crossover tool, since the mark is for distinguishing different script file crossover tools, The mark of different script file crossover tools can be determined according to different type informations, and then according to different script files The mark of crossover tool calls different script file crossover tools to convert test script file.
As a kind of possible realization method of the present embodiment, turned according to the type information of test script file and script file The mark for changing tool corresponds to generation list, the mark of script file crossover tool is searched according to type information, specifically, according to class Type information searches the mark of script file crossover tool from list.
S14:According to the mark of the script file crossover tool, call script file crossover tool to the test script File is converted, and target script file is obtained.
In step S14, target script file is suitable for current test platform.Call script file crossover tool to test Script is converted, and is to carry out content analysis and Content Transformation to test script file, and then obtain can be used for other surveys Try the target script file performed by platform.
In practical applications, it when user needs to test application, can be answered by voluntarily building on the server With test environment, test script file is edited, and the test script file is loaded into using in test platform, while will also wait for The application of test uploads to this and applies test platform, to test script file execute by application test platform and then to be measured Application tested.
When carrying out operation test to application, it can be distinguished by building interface logic test platform or pressure test platform Operation test is carried out to application, for example, Appium or Monkey.
It should be noted that when being tested respectively application by interface logic test platform and pressure test platform, It is that analog subscriber carries out sequence of operations in the interface of application, and records response results of the application to operation, by dividing The operation that accordingly result is completed to application is analysed to test.The exploitation being based on due to interface logic test platform and pressure test platform Frame is different, so test script file used by two platforms can not share, it is therefore desirable to script file be called to convert work Tool converts test script file, obtains target script file.
For example, test script file B is provided in advance for interface logic test platform, when needs carry out pressure to application When test, then the test script file C that can be performed in pressure test platform is needed to configure, by calling script file to turn It changes tool to convert test script file B, and then obtains target script file C, wherein target script file C is used for quilt Pressure test platform executes, to carry out pressure test to application.
It is understood that calling script file crossover tool to convert test script file, target foot is obtained It is not the execution content for calling script file crossover tool to distort test script file during this document, but according to The test content of test script file generates another target script file, which can be performed in other On test platform.
S15:The target script file is executed, to test application.
In step S15, target script file is to carry out conversion institute to test script file by script file crossover tool It obtains.The test platform of performance objective script file is not same test platform with the test platform of test script file is executed.
In the present embodiment, in target script file include all test events in test script file.Using can With including all types of applications that can be run in terminal, for example, native applications, web application or mixing application, In, native applications refer to that the base application of the operating system exploitation exclusively for terminal, the hardware that can directly invoke terminal are set It is standby;Web application is to be based on global wide area network Web (World Wide Web, Web), and supertext text is configured according to application demand Part making language document, and the hypertext document making language document is configured to the application obtained in the frame of browser; Mixing application is the frame based on native applications, the embedded hypertext document label language configured in the frame of native applications It says obtained by file.
It is understood that during performance objective script file tests application, application can loaded While target script file, by the way that the installation kit of the application to be uploaded in server, by test platform pseudo-terminal environment The installation kit is loaded, and completes to install.
Above as can be seen that the embodiment of the present invention by obtain be loaded into test script file type information, according to class The mark of type information searching script file crossover tool calls script file to turn further according to the mark of script file crossover tool It changes tool to convert test script file, obtains target script file, target script file is suitable for current test platform Performance objective script file, to test application so that when being tested application on different test platforms, be not necessarily to Test script is reconfigured because of the difference of test platform, has saved the development cost of test script.
It is that another embodiment of the present invention provides a kind of schematic flow diagram of the test method of application referring to Fig. 2, Fig. 2.This reality Applying example is done to the operating procedure before the step of being loaded into test script file and further limits on the basis of a upper embodiment It is fixed.As shown in Fig. 2, the test method for the application that another embodiment of the present invention provides may include:
S21:Obtain the control targe information or testing process information of all kinds of test scripts.
S22:According to the control targe information or the testing process information, the respectively all kinds of script file conversions Tool distributes the mark.
S23:It is corresponding with the mark to store to target database by the type information of script file described in every class In.
In step S23, the data stored in target database are used to describe the type information and mark of every class script file Relationship between knowledge.
In the present embodiment, mark is for distinguishing script file crossover tool, in target database, per class script file Type information be corresponding with the mark of corresponding script file crossover tool respectively.
S24:It is loaded into test script file.
S25:Obtain the type information of the test script file.
In step s 25, type information and the type information of target script file that can be performed on test platform be not Together.
In the present embodiment, the type information of test script file is used to describe the control targe information of test script file Or testing process information, wherein control targe information refers to the programming mode of test script file, for example, object-oriented or face To process;Testing process refers to that the sequence that process is lined up is generated during executing test script file.
As a kind of mode in the cards of the present embodiment, on the basis of above-mentioned each embodiment, foot is tested to obtaining The mode of the type information of this document, which is done, further to be limited.As shown in figure 3, step S25 is specifically included:
S251:The test script file is parsed, test case data and Workflow messages are obtained.
In step S251, test case data is to be used for some function or mould of test application in test script file The sub- script of block.
It should be noted that test case data can be one or more groups of, Workflow messages can be one group or more Group.In practical applications, the logical performance of test can be configured in test script file so that a test script File can test multiple test cases.
S252:According to the Workflow messages, the test case data is tested, obtains test process row Team.
In step S252, test process lines up, for reacting according to Workflow messages, to carry out test case data The whole processes generated in test process.
In the present embodiment, when being tested test case data according to Workflow messages, by test process The progress information of middle generation is recorded, and the progress information for being obtained recording by modes such as process reproduction or process migrations It is arranged in an orderly manner, obtains test process and line up.
For example, carried out in test process to test case data according to Workflow messages, generate process X, process Y and Process Z reappears to obtain test process and line up by process, which lines up to include process X, process Y and process Z.
S253:The header file that the test process is lined up is parsed, the type information is obtained.
In step S253, the header file that process is lined up is for describing the attribute that process is lined up, the header file that process is lined up Described in the attribute lined up of process include:Each process file during the number of process, the classification of process and process are lined up Title.By parsing the header file lined up of test process, obtain the content description of each process of process row centering, genesis sequence and Execute sequence.
In the present embodiment, type information includes the control targe information or testing process for describing test script file Information, wherein control targe information refers to the programming mode of test script file, for example, object-oriented or procedure-oriented;Test Flow refers to that the sequence that process is lined up is generated during executing test script file.
After parsing the header file that test process is lined up, content description, genesis sequence and the execution of each process are obtained Sequentially, it describes to determine control targe information in conjunction with the content of each process.According to process genesis sequence and execution sequence into Row analysis, determines testing process.
For example, the content in conjunction with each process describes, if content description is directed to the test process of test case, Determine that control targe information is procedure-oriented.
For another example the content in conjunction with each process describes, if content description is directed to the test object of test case, Then determine that control mesh information is object-oriented.
It is understood that when being parsed to the description of the content of each process, can by searching for process name list, And then determine that the content of the process describes according to process title.
S26:The mark of script file crossover tool is searched according to the type information.
It can be from target database when searching the mark of script file crossover tool according to type information in conjunction with step S23 The middle mark for searching script file crossover tool corresponding with type information.
S27:According to the mark of the script file crossover tool, call script file crossover tool to the test script File is converted, and target script file is obtained, and the target script file is suitable for current test platform.
As a kind of mode in the cards of the present embodiment, on the basis of above-mentioned a embodiment, to the test script The mode that file is converted, which is done, further to be limited.As shown in figure 4, step S27 is specifically included:
S271:The extraction test primitive from the test script file.
S272:Orderly control instruction queue is generated according to the test primitive.
S273:The control instruction queue is converted, target detection sentence is obtained.
S274:By the target detection sentence according to the sequential consistent with the control instruction queue, it is configured to preset In Bean, the target script file is obtained.
Test primitive be test platform during executing test script file, to application progress test process control language Sentence, for being reflected in the control action carried out to application in test process.
In practical applications, the test primitive extracted from test script file may include multiple, and every test Primitive at least corresponds to a control instruction.
Orderly control instruction queue is generated according to test primitive, it can be according to test primitive, in the volume pre-set Corresponding encoding and decoding are searched in decoding list, by test primitive progress code conversion, obtaining orderly control instruction queue, By the way that the orderly control instruction queue is carried out block encapsulation, target detection sentence is obtained.
It should be noted that before being converted to test primitive, need corresponding for different test primitive configurations Encoding and decoding, and establish test primitive and corresponding encoding and decoding correspondence, i.e., each test platform correspond to one test The correspondence of primitive and corresponding encoding and decoding;I.e. when test script is run in current test platform, in the test script The encoding and decoding that are encoded of test primitive be to be closed according to the corresponding test primitive of the current test platform is corresponding with encoding and decoding What system determined, so that the orderly control instruction queue encoded to the test primitive in test script more accords with Test platform before being fated, run the orderly control instruction queue can more accurately using current test platform to application into Row test.
It is understood that when calling script file crossover tool to change test script file into luggage, can pass through Static analysis is carried out to test script file, obtains testing primitive accordingly, wherein static point is carried out to test script file Analysis, refer under conditions of not executing test script file under, operation is scanned by the content to test script file.
According to the different pre-configured Beans of test platform, by target detection sentence according to control instruction queue Consistent sequential is configured in preset Bean, and then obtains target script file.
S28:The target script file is executed, to test application.
As a kind of mode in the cards of the present embodiment, on the basis of above-mentioned each embodiment, to executing the mesh The mode of mark script file, which is done, further to be limited.As shown in figure 5, step S28 is specifically included:
S281:According to the target script file, simulated operation is triggered at random in any operation interface of the application Instruction.
S282:Record the response message applied and instructed according to the simulated operation.
In the present embodiment, the process that performance objective script file tests application, is any operation in application Simulated operation test instruction, i.e. trigger event in simulated target script file are triggered in interface at random, in any behaviour of application Make in interface simulated operation to test, using in the process of running when detecting simulated operation test instruction, according to this will being referred to Order is responded or is not responding to, by recording the response message of application, and using the response message in test process as application The result of test.
Above as can be seen that the embodiment of the present invention by obtain be loaded into test script file type information, according to class The mark of type information searching script file crossover tool calls script file to turn further according to the mark of script file crossover tool It changing tool to convert test script file, obtains target script file, target script file is suitable for current test platform, Performance objective script file, to test application so that when being tested application on different test platforms, be not necessarily to Test script is reconfigured because of the difference of test platform, has saved the development cost of test script.
By obtaining the control targe information or testing process information of all kinds of test scripts, further according to control targe information or Testing process information, respectively all kinds of script file crossover tool allocation identifications, and by the type information of every class script file, with Mark correspondence is stored into target database so that, can when searching the mark of script file crossover tool according to type information It is obtained with being searched directly from target database, improves the calling efficiency of script file crossover tool.
It is a kind of schematic block diagram of the test device of application provided in an embodiment of the present invention referring to Fig. 5, Fig. 5.This implementation The each unit that a kind of test device 30 of application of example includes is used to execute each step in the corresponding embodiments of Fig. 2, specifically asks Refering to the associated description in the corresponding embodiments of Fig. 2 and Fig. 2, do not repeat herein.A kind of test device of the application of the present embodiment 30 include:First acquisition unit 31, storage unit 33, is loaded into unit 34, second acquisition unit 35, searches list allocation unit 32 Member 36, call unit 37 and execution unit 38.Specifically:
First acquisition unit 31, the control targe information for obtaining all kinds of test scripts or testing process information.
Allocation unit 32 is used for according to the control targe information or the testing process information, respectively all kinds of described Script file crossover tool distributes the mark.
Storage unit 33, for by the type information of script file described in every class, it is corresponding with the mark store to In target database.
It is loaded into unit 34, for being loaded into test script file.
Second acquisition unit 35, the type information for obtaining the test script file.
Further, as a kind of mode in the cards of the present embodiment, second acquisition unit 35 is specifically used for, to described Test script file is parsed, and test case data and Workflow messages are obtained;According to the Workflow messages, to institute It states test case data to be tested, obtains test process and line up;The header file that the test process is lined up is parsed, is obtained described Type information;The header file that the process is lined up is for describing the attribute that process is lined up.
Searching unit 36, the mark for searching script file crossover tool according to the type information.
Call unit 37 calls script file crossover tool pair for the mark according to the script file crossover tool The test script file is converted, and target script file is obtained, and the target script file is suitable for current test platform.
Further, as a kind of mode in the cards of the present embodiment, call unit 37 is specifically used for, from the test Extraction test primitive in script file;Orderly control instruction queue is generated according to the test primitive;To the control instruction Queue is converted, and target detection sentence is obtained;By the target detection sentence according to consistent with the control instruction queue Sequential is configured in preset Bean, obtains the target script file.
Execution unit 38, for executing the target script file, to test application.
Further, as a kind of mode in the cards of the present embodiment, execution unit 38 is specifically used for, according to the mesh Script file is marked, operational order is simulated in triggering at random in any operation interface of the application;The application is recorded according to institute State the response message of simulated operation instruction.
Above as can be seen that the embodiment of the present invention by obtain be loaded into test script file type information, according to class The mark of type information searching script file crossover tool calls script file to turn further according to the mark of script file crossover tool It changes tool to convert test script file, obtains target script file, target script file is suitable for current test platform Performance objective script file, to test application so that when being tested application on different test platforms, be not necessarily to Test script is reconfigured because of the difference of test platform, has saved the development cost of test script.
By obtaining the control targe information or testing process information of all kinds of test scripts, further according to control targe information or Testing process information, respectively all kinds of script file crossover tool allocation identifications, and by the type information of every class script file, with Mark correspondence is stored into target database so that, can when searching the mark of script file crossover tool according to type information It is obtained with being searched directly from target database, improves the calling efficiency of script file crossover tool.
It is a kind of terminal schematic block diagram that another embodiment of the present invention provides referring to Fig. 6.In the present embodiment as shown in the figure Terminal device 400 may include:One or more processors 401;One or more input equipments 402, it is one or more defeated Go out equipment 403 and memory 404.Above-mentioned processor 401, input equipment 402, output equipment 403 and memory 404 pass through bus 405 connections.Memory 402 is for storing, and computer program includes instruction, and processor 401 is by calling memory 402 to store Computer program executes following operation:
Processor 401 is used for:It is loaded into test script file.
Processor 401 is used for:Obtain the type information of the test script file.
Processor 401 is used for:The mark of script file crossover tool is searched according to the type information.
Processor 401 is used for:According to the mark of the script file crossover tool, call script file crossover tool to institute It states test script file to be converted, obtains target script file, the target script file is suitable for current test platform.
Processor 401 is used for:The target script file is executed, to test application.
Processor 401 is additionally operable to:Obtain the control targe information or testing process information of all kinds of test scripts.
Processor 401 is additionally operable to:It is respectively all kinds of described according to the control targe information or the testing process information Script file crossover tool distributes the mark.
Processor 401 is additionally operable to:By the type information of script file described in every class, it is corresponding with the mark store to In target database.
Processor 401 is specifically used for:The test script file is parsed, test case data and Business Stream are obtained Journey information;According to the Workflow messages, the test case data is tested, test process is obtained and lines up;Parsing The header file that the test process is lined up obtains the type information;The header file that the process is lined up is for describing process row The attribute of team.
Processor 401 is specifically used for:The extraction test primitive from the test script file;It is given birth to according to the test primitive At orderly control instruction queue;The control instruction queue is converted, target detection sentence is obtained;The target is surveyed Sentence is tried according to the sequential consistent with the control instruction queue, is configured in preset Bean, obtains the target foot This document.
Processor 401 is specifically used for:It is random in any operation interface of the application according to the target script file Triggering simulation operational order;Record the response message applied and instructed according to the simulated operation.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at It can also be any conventional processor etc. to manage device.
Input equipment 402 may include that Trackpad, fingerprint adopt sensor (finger print information and fingerprint for acquiring user Directional information), microphone etc., output equipment 403 may include display (LCD etc.), loud speaker etc..
The memory 404 may include read-only memory and random access memory, and to processor 401 provide instruction and Data.The a part of of memory 404 can also include nonvolatile RAM.For example, memory 404 can also be deposited Store up the information of device type.
In the specific implementation, processor 401 described in the embodiment of the present invention, input equipment 402, output equipment 403 can The first embodiment and the reality described in second embodiment for executing a kind of test method of application provided in an embodiment of the present invention Existing mode, also can perform the realization method of equipment described in the embodiment of the present invention, details are not described herein.
A kind of computer readable storage medium, the computer-readable storage medium are provided in another embodiment of the invention Matter is stored with computer program, and the computer program is realized when being executed by processor:
It is loaded into test script file;
Obtain the type information of the test script file;
The mark of script file crossover tool is searched according to the type information;
According to the mark of the script file crossover tool, call script file crossover tool to the test script file It is converted, obtains target script file, the target script file is suitable for current test platform;
The target script file is executed, to test application.
The computer program is also realized when being executed by processor:
Obtain the control targe information or testing process information of all kinds of test scripts;
According to the control targe information or the testing process information, the respectively all kinds of script file crossover tools Distribute the mark;
It is corresponding with the mark to store into target database by the type information of script file described in every class.
The computer program is also realized when being executed by processor:
The test script file is parsed, test case data and Workflow messages are obtained;
According to the Workflow messages, the test case data is tested, test process is obtained and lines up;
The header file that the test process is lined up is parsed, the type information is obtained;The header file that the process is lined up is used In the attribute that description process is lined up.
The computer program is also realized when being executed by processor:
The extraction test primitive from the test script file;
Orderly control instruction queue is generated according to the test primitive;
The control instruction queue is converted, target detection sentence is obtained;
By the target detection sentence according to the sequential consistent with the control instruction queue, it is configured to preset script frame In frame, the target script file is obtained.
The computer program is also realized when being executed by processor:
According to the target script file, operational order is simulated in triggering at random in any operation interface of the application;
Record the response message applied and instructed according to the simulated operation.
Above as can be seen that the embodiment of the present invention by obtain be loaded into test script file type information, according to class The mark of type information searching script file crossover tool calls script file to turn further according to the mark of script file crossover tool It changing tool to convert test script file, obtains target script file, target script file is suitable for current test platform, Performance objective script file, to test application so that when being tested application on different test platforms, be not necessarily to Test script is reconfigured because of the difference of test platform, has saved the development cost of test script.
By obtaining the control targe information or testing process information of all kinds of test scripts, further according to control targe information or Testing process information, respectively all kinds of script file crossover tool allocation identifications, and by the type information of every class script file, with Mark correspondence is stored into target database so that, can when searching the mark of script file crossover tool according to type information It is obtained with being searched directly from target database, improves the calling efficiency of script file crossover tool.
The computer readable storage medium can be the internal storage unit of the equipment described in aforementioned any embodiment, example Such as the hard disk or memory of computer.The computer readable storage medium can also be the External memory equipment of the equipment, example Such as the plug-in type hard disk being equipped in the equipment, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the computer readable storage medium can also be wrapped both The internal storage unit for including the equipment also includes External memory equipment.The computer readable storage medium is described for storing Other programs needed for computer program and the equipment and data.The computer readable storage medium can be also used for temporarily When store the data that has exported or will export.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Stating embodiment, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these Modification or replacement, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of test method of application, which is characterized in that including:
It is loaded into test script file;
Obtain the type information of the test script file;
The mark of script file crossover tool is searched according to the type information;
According to the mark of the script file crossover tool, script file crossover tool is called to carry out the test script file Conversion, obtains target script file, and the target script file is suitable for current test platform;
The target script file is executed, to test application.
2. test method as described in claim 1, which is characterized in that the method further includes:
Obtain the control targe information or testing process information of all kinds of test scripts;
According to the control targe information or the testing process information, the respectively all kinds of script file crossover tool distribution The mark;
It is corresponding with the mark to store into target database by the type information of script file described in every class.
3. test method as described in claim 1, which is characterized in that the type information for obtaining test script file, packet It includes:
The test script file is parsed, test case data and Workflow messages are obtained;
According to the Workflow messages, the test case data is tested, test process is obtained and lines up;
The header file that the test process is lined up is parsed, the type information is obtained;The header file that the process is lined up is for retouching The attribute that the process of stating is lined up.
4. test method as described in claim 1, which is characterized in that the mark according to the script file crossover tool Know, calls script file crossover tool to convert the test script file, obtain target script file, including:
The extraction test primitive from the test script file;
Orderly control instruction queue is generated according to the test primitive;
The control instruction queue is converted, target detection sentence is obtained;
By the target detection sentence according to the sequential consistent with the control instruction queue, it is configured to preset Bean In, obtain the target script file.
5. test method as described in claim 1, which is characterized in that it is described to execute the target script file, with to application It is tested, including:
According to the target script file, operational order is simulated in triggering at random in any operation interface of the application;
Record the response message applied and instructed according to the simulated operation.
6. a kind of terminal device, including memory, processor and it is stored in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes following steps when executing the computer program:
It is loaded into test script file;
Obtain the type information of the test script file;
The mark of script file crossover tool is searched according to the type information;
According to the mark of the script file crossover tool, script file crossover tool is called to carry out the test script file Conversion, obtains target script file, and the target script file is suitable for current test platform;
The target script file is executed, to test application.
7. terminal device as claimed in claim 6, which is characterized in that the processor goes back reality when executing the computer program Existing following steps:
Obtain the control targe information or testing process information of all kinds of test scripts;
According to the control targe information or the testing process information, the respectively all kinds of script file crossover tool distribution The mark;
It is corresponding with the mark to store into target database by the type information of script file described in every class.
8. terminal device as claimed in claim 6, which is characterized in that the type information for obtaining test script file, packet It includes:
The test script file is parsed, test case data and Workflow messages are obtained;
According to the Workflow messages, the test case data is tested, test process is obtained and lines up;
The header file that the test process is lined up is parsed, the type information is obtained;The header file that the process is lined up is for retouching The attribute that the process of stating is lined up.
9. the terminal device as described in claim 8, which is characterized in that the mark according to the script file crossover tool Know, calls script file crossover tool to convert the test script file, obtain target script file, including:
The extraction test primitive from the test script file;
Orderly control instruction queue is generated according to the test primitive;
The control instruction queue is converted, target detection sentence is obtained;
By the target detection sentence according to the sequential consistent with the control instruction queue, it is configured to preset Bean In, obtain the target script file.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, feature to exist In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201810029705.4A 2018-01-12 2018-01-12 Application testing method, terminal device and computer readable storage medium Active CN108415826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810029705.4A CN108415826B (en) 2018-01-12 2018-01-12 Application testing method, terminal device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810029705.4A CN108415826B (en) 2018-01-12 2018-01-12 Application testing method, terminal device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108415826A true CN108415826A (en) 2018-08-17
CN108415826B CN108415826B (en) 2021-10-29

Family

ID=63125491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810029705.4A Active CN108415826B (en) 2018-01-12 2018-01-12 Application testing method, terminal device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108415826B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684195A (en) * 2018-10-26 2019-04-26 平安科技(深圳)有限公司 Electronic device, script conversion method and storage medium
CN110231935A (en) * 2019-06-12 2019-09-13 上海达梦数据库有限公司 A kind of method, apparatus, equipment and the storage medium of script execution and update
CN111309326A (en) * 2020-02-12 2020-06-19 深圳壹账通智能科技有限公司 Path script generation method, device, equipment and computer readable storage medium
CN111488731A (en) * 2020-04-15 2020-08-04 深圳前海环融联易信息科技服务有限公司 File generation method and device, computer equipment and storage medium
WO2020258674A1 (en) * 2019-06-28 2020-12-30 平安科技(深圳)有限公司 Script file verification method and apparatus, server and storage medium
CN112749083A (en) * 2020-12-10 2021-05-04 中国农业银行股份有限公司 Test script generation method and device
CN117056241A (en) * 2023-10-13 2023-11-14 彩讯科技股份有限公司 Application program testing method and device for mobile terminal

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719096A (en) * 2009-12-29 2010-06-02 北京航空航天大学 Method for improving executing speed of test script of real-time embedded system
CN102426534A (en) * 2011-11-02 2012-04-25 大唐移动通信设备有限公司 Method and system for converting test script language into executable instruction
CN102467448A (en) * 2010-11-16 2012-05-23 安凯(广州)微电子技术有限公司 Test method and system of test case
CN102486749A (en) * 2010-12-03 2012-06-06 中兴通讯股份有限公司 Method and system for data driving test
CN104298595A (en) * 2014-09-29 2015-01-21 百视通网络电视技术发展有限责任公司 Automatic testing method and testing system
CN104572431A (en) * 2013-10-24 2015-04-29 阿里巴巴集团控股有限公司 Test method and test device
CN104850498A (en) * 2015-06-05 2015-08-19 上海斐讯数据通信技术有限公司 Filling information testing method and filling information testing system
CN105260309A (en) * 2015-10-21 2016-01-20 上海斐讯数据通信技术有限公司 Automatic test platform unrelated to test tool
CN105279090A (en) * 2015-11-17 2016-01-27 中国建设银行股份有限公司 Test script generating method and test script generating device applied in financial field
CN106383784A (en) * 2016-09-20 2017-02-08 上海爱数信息技术股份有限公司 Software automated test method and system
CN107341098A (en) * 2017-07-13 2017-11-10 携程旅游信息技术(上海)有限公司 Software performance testing method, platform, equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719096A (en) * 2009-12-29 2010-06-02 北京航空航天大学 Method for improving executing speed of test script of real-time embedded system
CN102467448A (en) * 2010-11-16 2012-05-23 安凯(广州)微电子技术有限公司 Test method and system of test case
CN102486749A (en) * 2010-12-03 2012-06-06 中兴通讯股份有限公司 Method and system for data driving test
CN102426534A (en) * 2011-11-02 2012-04-25 大唐移动通信设备有限公司 Method and system for converting test script language into executable instruction
CN104572431A (en) * 2013-10-24 2015-04-29 阿里巴巴集团控股有限公司 Test method and test device
CN104298595A (en) * 2014-09-29 2015-01-21 百视通网络电视技术发展有限责任公司 Automatic testing method and testing system
CN104850498A (en) * 2015-06-05 2015-08-19 上海斐讯数据通信技术有限公司 Filling information testing method and filling information testing system
CN105260309A (en) * 2015-10-21 2016-01-20 上海斐讯数据通信技术有限公司 Automatic test platform unrelated to test tool
CN105279090A (en) * 2015-11-17 2016-01-27 中国建设银行股份有限公司 Test script generating method and test script generating device applied in financial field
CN106383784A (en) * 2016-09-20 2017-02-08 上海爱数信息技术股份有限公司 Software automated test method and system
CN107341098A (en) * 2017-07-13 2017-11-10 携程旅游信息技术(上海)有限公司 Software performance testing method, platform, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王雪: "基于逆向工程的测试脚本转换框架的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑(月刊)》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684195A (en) * 2018-10-26 2019-04-26 平安科技(深圳)有限公司 Electronic device, script conversion method and storage medium
CN110231935A (en) * 2019-06-12 2019-09-13 上海达梦数据库有限公司 A kind of method, apparatus, equipment and the storage medium of script execution and update
WO2020258674A1 (en) * 2019-06-28 2020-12-30 平安科技(深圳)有限公司 Script file verification method and apparatus, server and storage medium
CN111309326A (en) * 2020-02-12 2020-06-19 深圳壹账通智能科技有限公司 Path script generation method, device, equipment and computer readable storage medium
CN111488731A (en) * 2020-04-15 2020-08-04 深圳前海环融联易信息科技服务有限公司 File generation method and device, computer equipment and storage medium
CN111488731B (en) * 2020-04-15 2023-09-29 深圳前海环融联易信息科技服务有限公司 File generation method, device, computer equipment and storage medium
CN112749083A (en) * 2020-12-10 2021-05-04 中国农业银行股份有限公司 Test script generation method and device
CN117056241A (en) * 2023-10-13 2023-11-14 彩讯科技股份有限公司 Application program testing method and device for mobile terminal
CN117056241B (en) * 2023-10-13 2024-01-26 彩讯科技股份有限公司 Application program testing method and device for mobile terminal

Also Published As

Publication number Publication date
CN108415826B (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN108415826A (en) Test method, terminal device and the computer readable storage medium of application
CN100492316C (en) System and method for test automation
CN107861870A (en) Interface testing and test data generating method, device, terminal and storage medium
CN111367976B (en) Method and device for exporting EXCEL file data based on JAVA reflection mechanism
CN103984626B (en) A kind of method and device for generating test case script
CN107908543A (en) Applied program testing method, device, computer equipment and storage medium
CN112256321A (en) Static library packaging method and device, computer equipment and storage medium
CN104899132B (en) Application software testing method, apparatus and system
CN104991763A (en) Universal game interface behavior control system
CN112199296B (en) Page testing method and device, computer equipment and storage medium
CN102999419B (en) A kind of Android test incident record back method and device
CN104899016A (en) Call stack relationship obtaining method and call stack relationship obtaining device
CN106406999A (en) A computing system and a method for controlling thereof
CN108874649A (en) Generation method, device and its computer equipment of automatic test script
Pimentel et al. Tracking and analyzing the evolution of provenance from scripts
CN107315833A (en) Method and apparatus of the retrieval with downloading based on application program
CN108399125A (en) Automated testing method, device, computer equipment and storage medium
CN113778890A (en) Code testing method and device, electronic equipment and storage medium
CN109492039A (en) A kind of recording method of daily record data, device, electronic equipment and readable medium
CN113485909A (en) Test method, test device, computing device, and medium
CN117290250A (en) Automatic test framework establishment method, computer equipment and computer storage medium
CN116028108A (en) Method, device, equipment and storage medium for analyzing dependent package installation time
CN108733566A (en) A kind of virtualization system automatization test system and method based on python
CN110276443A (en) Model conversion consistency checking and analysis method, device and storage medium
CN109992514B (en) Mobile application dynamic analysis method based on visual content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant