CN108255709A - Script tests method, apparatus, terminal device and the storage medium of written in code - Google Patents

Script tests method, apparatus, terminal device and the storage medium of written in code Download PDF

Info

Publication number
CN108255709A
CN108255709A CN201711431160.1A CN201711431160A CN108255709A CN 108255709 A CN108255709 A CN 108255709A CN 201711431160 A CN201711431160 A CN 201711431160A CN 108255709 A CN108255709 A CN 108255709A
Authority
CN
China
Prior art keywords
code
function
user
information
edit
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
CN201711431160.1A
Other languages
Chinese (zh)
Inventor
李艳丽
谢生校
廖光明
韩瑞鹏
张宗勇
冯捷
葛旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An One Wallet E Commerce Co Ltd
Original Assignee
Ping An One Wallet E Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An One Wallet E Commerce Co Ltd filed Critical Ping An One Wallet E Commerce Co Ltd
Priority to CN201711431160.1A priority Critical patent/CN108255709A/en
Publication of CN108255709A publication Critical patent/CN108255709A/en
Pending legal-status Critical Current

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
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors

Abstract

The invention discloses method, apparatus, terminal device and the storage mediums of a kind of script test written in code.The method of script test written in code includes:Code Edit platform is run, into Code Edit interface;Symbol lookup instruction input by user is obtained, is instructed based on symbol lookup and obtains and show recommendation code information, code information is recommended to include at least one code function, each code function includes function ID, function name and corresponding function content;Code Selection instruction input by user is obtained, Code Selection instruction includes object function ID and/or object function title;Object function ID and/or the corresponding function content of object function title are increased into Code Edit interface, code has been write in formation.The method of script test written in code can be realized during script tests written in code to be looked into test script code i.e. with property, is conducive to improve the efficiency of script test written in code.

Description

Script tests method, apparatus, terminal device and the storage medium of written in code
Technical field
The present invention relates to script edit technical field more particularly to a kind of method, apparatus of script test written in code, ends End equipment and storage medium.
Background technology
Current code writes the developing instrument class that (such as test script written in code) depends on test event carrying, needs To use the method in the developing instrument class.It need to specifically check the code of developing instrument class in person by written in code person, unlock Send out tool-class in method function and how application method.For example, currently the subsidiary developing instrument class of test script code is JAR packets, written in code person check that the method having in developing instrument class and method are corresponding only by way of reflection The type of parameter and return value.Reflection refers to after establishing method for reflection class, then the correlation of other classes is obtained by method for reflection class Resource, it is difficult to which meet script test code writers looks into the i.e. property used.The side that written in code person is reflected in compiling procedure Formula searches the usage of method and method in developing instrument class, makes troubles to script test written in code.
Invention content
The embodiment of the present invention provides a kind of method, apparatus, terminal device and the storage medium of script test written in code, with The mode that is reflected in compiling procedure of written in code person is solved to search the usage of method and method in developing instrument class, is given The problem of script test written in code is made troubles.
In a first aspect, the embodiment of the present invention provides a kind of method of script test written in code, include the following steps:
Code Edit platform is run, into Code Edit interface;
Symbol lookup instruction input by user is obtained, is instructed based on symbol lookup and obtains and show recommendation code information, pushed away It recommends code information and includes at least one code function, each code function is included in function ID, function name and corresponding function Hold;
Code Selection instruction input by user is obtained, Code Selection instruction includes object function ID and/or object function name Claim;
Object function ID and/or the corresponding function content of object function title are increased into Code Edit interface, formed Write code.
Second aspect, the embodiment of the present invention provide a kind of device of script test written in code, including:
Code console module is run, for running Code Edit platform, into Code Edit interface;
It shows code information module, for obtaining symbol lookup instruction input by user, is instructed and obtained based on symbol lookup And show recommendation code information, code information is recommended to include at least one code function, each code function includes function ID, letter Several titles and corresponding function content;
Code command module is obtained, for obtaining Code Selection instruction input by user, Code Selection instruction includes target Function ID and/or object function title;
Increase function content module, for object function ID and/or the corresponding function content of object function title to be increased To Code Edit interface, code has been write in formation.
The third aspect, the embodiment of the present invention provide a kind of terminal device, including memory, processor and are stored in storage In device and the computer program that can run on a processor, processor realize script test written in code when performing computer program The step of.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, and computer readable storage medium is deposited The step of containing computer program, script test written in code realized when computer program is executed by processor.
In the method, apparatus of script test written in code, terminal device and storage medium that the embodiment of the present invention is provided, It is instructed by obtaining symbol lookup input by user, is instructed based on symbol lookup and obtain and show recommendation code information, Ke Yixun Speed helps user to find the codes of needs;It is instructed by obtaining Code Selection input by user, obtains object function ID and/or mesh Scalar functions title can be accurately located the code function of user's needs;By by object function ID and/or object function name Corresponding function content is claimed to increase to Code Edit interface, can quickly and easily add the code of needs.The script tests generation Method, apparatus, terminal device and the storage medium that code is write can be realized during script tests written in code to test script Code is looked into i.e. with property, is conducive to improve the efficiency of script test written in code.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is a flow chart of the method for script test written in code in the embodiment of the present invention 1.
Fig. 2 is another particular flow sheet of the method for script test written in code in the embodiment of the present invention 1.
Fig. 3 is another particular flow sheet of the method for script test written in code in the embodiment of the present invention 1.
Fig. 4 is a functional block diagram of the device of script test written in code in the embodiment of the present invention 2.
Fig. 5 is a schematic diagram of terminal device in the embodiment of the present invention 4.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without making creative work Example, shall fall within the protection scope of the present invention.
Embodiment 1
Fig. 1 shows the flow chart of the method for script test written in code in the present embodiment.Script test written in code Method is applied in the server of test platform, for user to be made to realize that script tests writing for code by this method.Such as Fig. 1 Shown, the method for script test written in code includes the following steps:
S110, operation Code Edit platform, into Code Edit interface.
Specifically, Code Edit platform is disposed in the server of test platform, and test script code is write for giving Platform, for providing the user with the back-up environment for writing test script code.Code Edit interface is exactly the branch for writing code It is used to carry out interface alternation with user in pushing out ring border, to show a kind of interface of user.It is to be appreciated that user can be in generation Input test scripted code on code editing interface, and the test script code that input can be run on Code Edit interface is looked into See the result of code operation.
The present embodiment provides integrated function, the Code Edit platform and Multiple Code function by Code Edit platform Database be connected, be conducive to the method that the various code functions of subsequent calls define.
S120, symbol lookup instruction input by user is obtained, is instructed based on symbol lookup and obtain and show recommendation code letter Breath, recommends code information to include at least one code function, and each code function includes function ID, function name and corresponding Function content.
Specifically, symbol lookup instruction refers to that user is used to inquire asking for code function to what Code Edit platform inputted It asks.Code information is recommended to refer to the code with the keyword in symbol lookup input by user instruction.When user does not know certain Whens usage or use environment of a code function etc., it can be looked by Code Edit interface to Code Edit platform input code Instruction is ask, obtains recommend code information accordingly in time.Function ID is for the mark of unique identification code function.Correspondingly, Each function ID includes a function name and corresponding function content.It is to be appreciated that because of different code functions Function name is identical or containing identical keyword, and therefore, Code Edit platform needs to specify one to each code function Function ID to the different code function distinguished.
In the present embodiment, Code Edit platform is instructed based on symbol lookup input by user, you can is pushed and is recommended to user Code information, convenient user inquire code information in time, improve the efficiency of script test written in code.
S130, Code Selection instruction input by user is obtained, Code Selection instruction includes object function ID and/or target Function name.
Specifically, Code Selection instruction is user according to the recommendation code information shown on Code Edit interface, selected to draw Enter the instruction for recommending the method for some class in code information.Object function ID is introduced into certain in recommendation code information for what user selected The mark of the corresponding code function of method of a class.What the entitled user of object function selected is introduced into some in recommendation code information The title of the corresponding code function of the method for class.Code Selection instruction can include object function ID, can also include mesh Scalar functions title can also include object function ID and object function title simultaneously.It is to be appreciated that phase is carried in a class Object function with keyword is there may be multiple, and in order to distinguish the method for carrying same keyword, each method has code The corresponding function ID and/or function name of editing platform distribution, the target in being instructed according to Code Selection input by user Function ID and/or object function title determine unique code function.
In the present embodiment, Code Edit platform is instructed according to Code Selection input by user, determine object function ID and/or Object function title, convenient for accurately quoting the object function of user's selection.
S140, object function ID and/or the corresponding function content of object function title are increased into Code Edit interface, shape Into having write code.
Specifically, function content is selected object function ID and/or the corresponding function content of object function title.Into one Step ground, user select the function content of an object function to be automatically added to working as in Code Edit interface in code information is recommended Selected object function without user's typewriting input code, but is directly referred to current editor position by pre-editing position.
In the present embodiment, the function content of the object function of user's choosing is directly increased to Code Edit by Code Edit platform The current editor position at interface, quotes code convenient for user, saves the time of input code in time.
The method of script test written in code that the present embodiment is provided, is referred to by obtaining symbol lookup input by user It enables, is instructed based on symbol lookup and obtain and show recommendation code information, user can be helped to find the code of needs rapidly;Pass through Code Selection instruction input by user is obtained, object function ID and/or object function title is obtained, can be accurately located The code information that user needs;By the way that object function ID and/or the corresponding function content of object function title are increased to code Editing interface can quickly and easily add the code of needs.The method that the script tests written in code can test generation in script It realizes to look into test script code in code compiling procedure and use, be conducive to improve the efficiency of script test written in code.
In a specific embodiment, before operation Code Edit platform (i.e. step S110), script test code The method write further includes following steps:The JAR packets that the reception of Code Edit platform encapsulates in advance, JAR packets include at least one generation Code function, the function content of each code function include function body part and function comment section.
Specifically, JAR (Java Archive, Java archive file) packet be developer write be used to implement difference The set of the class of function, for JAR packets to be introduced into deployment in project and encapsulate library, component and plug-in card program, and directly invoke JAR Class, attribute and the method for definition in packet.Code function is concrete implementation class, attribute and the method defined in JAR packets Jar file form code.Each code function include the realization function performance for operation function body part and The letter of code function ontology is understood for explaining the application method of the code function, background, parametric form etc. convenient for developer Number comment section.
It is to be appreciated that user can import the JAR packets encapsulated in advance to Code Edit platform.JAR is by a series of files It is merged into single compressed file, just as Zip.However, with other in Java as anything, jar file is across flat Platform, it is involved in the problems, such as platform specific so need not be concerned about.When being related to internet application, jar file seems particularly useful. Before jar file, Web browser must be repeated as many times request Web server, to download after form one " slice " (Applet) All Files.In addition to this, each file is uncompressed.But by all these Piece file mergences to one After in a jar file, primary request need to be only sent out to remote server.Simultaneously as compress technique is employed, so Total data can be obtained in the shorter time.
In the specific embodiment, instructed based on symbol lookup and obtain and show that recommendation code information specifically includes following step Suddenly:It is instructed based on symbol lookup, obtains to be used as with the corresponding at least one code function of symbol lookup instruction and recommend code letter Breath, and shown on Code Edit interface and recommend code information, code information is recommended to include at least one code function corresponding Function body part and function comment section.
What symbol lookup instruction specifically referred to that user input at Code Edit interface is used to inquire the code function in JAR packets Request.When user does not know usage or use environment of some code function etc., can be inputted at Code Edit interface Symbol lookup instructs, and obtains corresponding explanation content in time.The method of code function generally reflects in existing inquiry JAR packets Method.So-called reflection refers to take the relevant all resources of some class by reflection.For example class X positions are obtained, pass through Such X creates an object x, obtains all publicly-owned, privately owned attributes of the object x of this class X establishments and publicly-owned, private method. Code function is inquired by the method for reflection, needs to additionally set up the method class of reflection, recalls the function in method class, it is difficult to Meet script test code writers looks into the i.e. property used.The method of script test written in code that the present embodiment proposes, nothing It need to establish the method class of reflection, but the interface polls object function ID and/or target directly provided by Code Edit platform Function name, convenient test script personnel's quick search code.
Wherein, the code function that the present embodiment is inquired includes function body part and function comment section.User is led to The code of function in itself can be checked by crossing function body part, and the application method of the code function is understood by function comment section Or the reform of parameter.
Further, function comment section is distinguished in JAR packets by marking the identifier of each annotation information. Code Edit platform can be put forward each annotation information by each identifier, and is carried out classification encapsulation and formed database. For example, by taking ApiDemo.java classes in the packaging method of JAR packets as an example, including:
* in class head addition@AutoTest;
* in method head addition@AutoTestMethod;
* method for application is described in method head addition@PAFDoc;
* add AutoTestParameter that can be resolved to parameter name in parameter.
It is as follows with regard to this interface code editing platform parsing example:
@AutoTest;
@AutoTestMethod;
@PAFDoc (desc=" creaties directory, and outputDir is master catalogue, and subDir is subdirectory ", title=" wounds Build catalogue ", author=" ptf ");
public_stati_cvoid_createDirectory(@AutoTestParameter("filePat h") String outputDir ,@AutoTestParameter (" subDir ") String subDir) { ... }, this section of code It is interior to be that method " public_stati_cvoid_createDirectory (parameter) " defines, the parameter tool added in this method Body includes:Find out that first parameter name is from AutoTestParameter (" filePath ") String outputDir Master catalogue, from@AutoTestParameter (" subDir ") String subDir) to find out second parameter name be specific item Record.
In the present embodiment, user is by Code Edit platform input code inquiry instruction, you can at Code Edit interface Immediately function body part is viewed, and passes through the usage that function comment section understands the function, to realize to code function It looks into and uses property, improve the efficiency for writing code of user.
In a specific embodiment, as shown in Fig. 2, obtaining symbol lookup instruction (i.e. step S120) tool input by user Body includes the following steps:
S121, frame retrieval or association option list are shown in Code Edit interface.
Specifically, Code Edit interface is provided with frame retrieval or association option list, in order to which user inquires code letter Number.When user determines to need to inquire the code function with certain keywords, frame retrieval that can be at Code Edit interface is direct Input keyword is retrieved, so that Code Edit platform can be based on the corresponding code function of keyword search received.When When user does not know the code function to be checked, Code Edit platform can be recommended according to current code environment to user The association option list that several code functions are formed.
In this implementation, Code Edit platform provides various ways and user is caused to inquire the code function that needs are inquired, to use Family provides number of ways and improves writing for code.
S122, keyword or obtain user's click association option list and select that user input in frame retrieval are obtained Association option.
Specifically, user can be according to whether determining the keyword of the code function to be retrieved and selecting input crucial respectively The mode of word and/or determining association option is retrieved, and provides the user with different selections, is conducive to improve user's selection code The efficiency of function.
S123, based on keyword or association option, form symbol lookup instruction.
Specifically, symbol lookup instruction refers to input type of the code editing platform according to user, in inquiry JAR packets and The request of keyword input by user or the related class of association option.In the present embodiment, Code Edit platform is defeated according to user The simple keyword or association option entered, you can corresponding code content is inquired in JAR packets, it is multiple to simplify user's input The workload of miscellaneous code.
In this specific embodiment, based on symbol lookup instruct obtain and show recommend code information specifically include it is as follows Step:It is instructed based on symbol lookup, acquisition is used as with the corresponding at least one code function of keyword or association option and pushes away Code information is recommended, and code information to be recommended is shown on Code Edit interface.
Specifically, it can be class name that code information is recommended, which to be applied to the present embodiment,.Code Edit platform is according to input by user The symbol lookup instruction that keyword or association option are formed, is found in JAR packets by symbol lookup instruction with key Word or all with the corresponding at least one class of association option.If have containing the keyword or the corresponding class of association option it is multiple, Multiple classes are enumerated to the displaying of Code Edit platform by Code Edit platform together, are selected by users.
In the present embodiment, Code Edit platform can be pushed away according to keyword input by user or association option to user in real time Recommendation code information is sent, the time that script test written in code user finds object function is shortened, improves the effect of Code Edit Rate.
In a specific embodiment, as shown in figure 3, into after Code Edit interface, script test written in code Method can also include:
S151, code hint instructions input by user are obtained on Code Edit platform, code hint instructions include target Character string.
Specifically, code hint instructions refer to it is that user inputs to Code Edit platform, for introducing current editor position Request of the code function to be prompted.Target string be specifically need introduce code function character string, the character string It can be keyword.Applied to the present embodiment, code hint instructions could be provided as through shortcut key activation code hint instructions. When user needs the keyword quoted in the input of some position of Code Edit platform and clicks the shortcut key, Code Edit platform Can situation be quoted according to the code function before and after the position, shown to user can introduce the position and with keyword Target string list, user is helped to select to quote suitable target string.
In the present embodiment, user is during test code is write, you can is inquired by code hint instructions suitable The object function list of current editor position is introduced, can be checked while writing code convenient for user in currently editor position needs The code function to be introduced.
S152, according to target string, the display target function on Code Edit interface.
Specifically, object function is the list of the code function comprising target string input by user.Further, generation Code editing platform inquires the position for quoting the target string according to user, shows to introduce in the position to user and works as pre-editing Position, object function list with target string.
In the present embodiment, user is by checking that Code Edit platform showed includes target string on Code Edit interface Object function, convenient for user judge after introduce suitable code function in time.
Further, display target function specifically comprises the following steps on Code Edit interface:At Code Edit interface On using CodeMirror plug-in unit display target functions function name, using interface function obtain object function category information and Parameter information, and show category information and parameter information on Code Edit interface.
Specifically, CodeMirror is the code editor based on JavaScript, and MIT is used to increase income permission agreement can be with It is embedded into any editing interface for supporting JavaScript.CodeMirror support codes are automatically performed, search/replacement, HTML previews, line number, selection/search result highlight, visualize tab, code automatic format etc..Interface function is applied to this implementation Example can be interface name (interfaceName).Tool-class information in JAR packets includes multiple interface names and interface The corresponding at least one identification information (i.e. method name) for recommending source code of title.
In the present embodiment, by directly quoting CodeMirror plug-in units and interface name, can display target function letter Several titles intuitively quickly select suitable object function convenient for developer.
S153, Code Selection instruction input by user is obtained, Code Selection instruction includes object function ID.
Specifically, Code Selection instruction is list of the user according to the object function shown on Code Edit interface, is selected Introduce the request of some object function.Object function ID is the object function selected of user corresponding letter in Code Edit platform Number ID.It is to be appreciated that the object function with same target character string is there may be multiple in a class, in order to distinguish band There is the object function of same target character string, each object function has the corresponding function ID that Code Edit platform distributes.
In the present embodiment, Code Edit platform instructs according to Code Selection input by user and determines object function ID, is convenient for The accurately code function of reference user selection.
S154, the corresponding function contents of object function ID are increased to Code Edit interface, code has been write in formation.
Specifically, function content is the function body part specifically included in selected object function ID.Further, it uses Family selects an object function to be added to current editor position in object function list, without the manual input code of user, but Selected object function is directly referred into current editor position.
In the present embodiment, the function content that user selects directly is increased to working as Code Edit platform by Code Edit platform Code is quoted in pre-editing position in time convenient for user, saves the time of input code, improves Code Edit efficiency.
It should be understood that the size of the serial number of each step is not meant to the priority of execution sequence, each process in above-described embodiment Execution sequence should determine that the implementation process without coping with the embodiment of the present invention forms any limit with its function and internal logic It is fixed.
Embodiment 2
Fig. 4 is shown and the one-to-one script test written in code of the method for script test written in code in embodiment 1 The functional block diagram of device.The device of script test written in code is applied in the server of test platform.It as shown in figure 4, should The device of script test written in code includes operation code console module 110, display code information module 120, acquisition code and refers to It enables module 130 and increases function content module 140.Wherein, operation code console module 110, display code information module 120, Obtain code command module 130 and the realization function of increasing function content module 140 and script test written in code in embodiment The corresponding step of method correspond, repeated to avoid, the present embodiment is not described in detail one by one.
Code console module 110 is run, for running Code Edit platform, into Code Edit interface.
It shows code information module 120, for obtaining symbol lookup instruction input by user, is obtained based on symbol lookup instruction Take and show recommendation code information, recommend code information include at least one code function, each code function include function ID, Function name and corresponding function content.
Code command module 130 is obtained, for obtaining Code Selection instruction input by user, Code Selection instruction includes mesh Scalar functions ID and/or object function title.
Increase function content module 140, for object function ID and/or the corresponding function content of object function title to be increased Code Edit interface is added to, code has been write in formation.
Preferably, as shown in figure 4, the device of script test written in code can also include importing JAR packets module 100.Its In, it imports the realizations function of JAR packets module 100 and script tests the corresponding step 1 one of method of written in code in embodiment 1 It is corresponding, it is repeated to avoid, the present embodiment is not described in detail one by one.
JAR packets module 100 is imported, for the JAR packets encapsulated in advance to the importing of Code Edit platform, JAR packets are included at least One code function, the function content of each code function include function body part and function comment section.
It shows code information module 120, for being based on symbol lookup instruction, obtains corresponding extremely with symbol lookup instruction A few code function recommends code letter as code information is recommended, and shown on Code Edit interface and recommend code information Breath includes the corresponding function body part of at least one code function and function comment section.
Preferably, as shown in figure 4, script test written in code device can also include input code instruction module 151, Display target function module 152 obtains code command module 153 and increases function content module 154.Wherein, input code refers to Module 151, display target function module 152 are enabled, obtain code command module 153 and increases function content module 154 and realizes work( Step S151-S155 that can be corresponding with the method for script test written in code in embodiment 1 is corresponded, and is repeated to avoid, this Embodiment is not described in detail one by one.
Input code instruction module 151, for obtaining code hint instructions input by user, generation on Code Edit platform Code hint instructions include target string.
Display target function module 152, for according to target string, the display target function on Code Edit interface.
Code command module 153 is obtained, for obtaining Code Selection instruction input by user, Code Selection instruction includes mesh Scalar functions ID.
Increase function content module 154, for the corresponding function contents of object function ID to be increased to Code Edit interface, Code has been write in formation.
Preferably, display target function module 152, for being shown on Code Edit interface using CodeMirror plug-in units Show the function name of object function, the category information and parameter information of object function are obtained using interface function, and in Code Edit Category information and parameter information are shown on interface.
Preferably, as shown in figure 4, display code information module 120 can also include display frame retrieval unit 121, obtain Keyword unit 122 and formation inquiry instruction unit 123.Wherein, display frame retrieval unit 121,122 and of acquisition keyword unit It forms inquiry instruction unit 123 and realizes the function step S121- corresponding with the method for script test written in code in embodiment 1 S123 is corresponded, and is repeated to avoid, the present embodiment is not described in detail one by one.
Frame retrieval unit 121 is shown, for showing frame retrieval or association option list in Code Edit interface.
Keyword unit 122 is obtained, the keyword that input for obtaining user in frame retrieval or user is obtained and clicks pass The association option for joining option list and selecting.
Inquiry instruction unit 123 is formed, for being based on keyword or association option, forms symbol lookup instruction.
It shows code information module 120, for being based on symbol lookup instruction, obtains opposite with keyword or association option At least one code function answered shows code information to be recommended as recommendation code information on Code Edit interface.
Embodiment 3
The present embodiment provides a computer readable storage medium, computer journey is stored on the computer readable storage medium Sequence, the method that script test written in code in embodiment 1 is realized when which is executed by processor, repeats to avoid, Which is not described herein again.Alternatively, the dress of script test written in code in embodiment 2 is realized when the computer program is executed by processor The function of each module/unit, repeats, which is not described herein again to avoid in putting.
Embodiment 4
Fig. 5 is the schematic diagram for the terminal device 500 that one embodiment of the invention provides.As shown in figure 5, the terminal of the embodiment Equipment 500.Including:It processor 510, memory 520 and is stored in memory 520 and can be run on processor 510 Computer program 530, such as 53 processor of program of script test written in code.It is realized when performing computer program 530 above-mentioned Step in the embodiment of the method for each script test written in code, such as step S110 to S140 shown in FIG. 1.Alternatively, place Manage device.Perform computer program.The function of each module/unit in the above-mentioned each device embodiments of Shi Shixian, such as module shown in Fig. 5 Code console module 110 is run to the function of increasing function content module 140.
Illustratively, computer program 530 can be divided into one or more module/units, one or more mould Block/unit is stored in memory 520, and is performed by processor 510, to complete the present invention.One or more module/units Can be the series of computation machine program instruction section that can complete specific function, which is used to describe computer program. Implementation procedure in terminal device 500.For example, computer program 530 can be divided into operation code console module 110, show Show code information module 120, obtain code command module 130 and increase function content module 140 (module in virtual bench), Each module concrete function repeats, herein with being corresponded the step of the method for script test written in code in embodiment 1 to avoid It does not repeat one by one.
Terminal device 500 can be the computing devices such as desktop PC, notebook, palm PC and cloud server. Terminal device 500 may include, but be not limited only to, processor 510, memory 520.It will be understood by those skilled in the art that Fig. 5 is only Only it is the example of terminal device 500, does not form the restriction to terminal device 500, can includes more more or fewer than illustrating Component either combines certain components or different components, such as terminal device 500 can also include input-output equipment, net Network access device, bus etc..
Alleged processor 510 can be central processing unit (Central Processing Unit, CPU), 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) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
Memory 520 can be the internal storage unit of terminal device 500, such as the hard disk or memory of terminal device 500. Memory 520 can also be the plug-in type hard disk being equipped on the External memory equipment of terminal device 500, such as terminal device 500, Intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 520 can also both include the internal storage unit of terminal device 500 or including external storage Equipment.Memory 520 is used to store computer program and other programs and data needed for terminal device 500.Memory 520 It can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each work( Can unit, module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of device are divided into different functional units or module, to complete above description All or part of function.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also That each unit is individually physically present, can also two or more units integrate in a 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 integrated module/unit is realized in the form of SFU software functional unit and is independent product sale or uses When, it can be stored in a computer read/write memory medium.Based on such understanding, the present invention realizes above-described embodiment side All or part of flow in method can also instruct relevant hardware to complete, the computer by computer program Program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each The step of a embodiment of the method.Wherein, computer program includes computer program code, and computer program code can be source generation Code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable medium can include:It can take Any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disc, CD with computer program code, computer storage Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the content that computer-readable medium includes can To carry out appropriate increase and decrease, such as in certain jurisdictions, root according to legislation in jurisdiction and the requirement of patent practice According to legislation and patent practice, it is electric carrier signal and telecommunication signal that computer-readable medium, which does not include,.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to the foregoing embodiments The present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each implementation Technical solution recorded in example modifies or carries out equivalent replacement to which part technical characteristic;And these modification or It replaces, 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 should all include Within protection scope of the present invention.

Claims (10)

  1. A kind of 1. method of script test written in code, which is characterized in that include the following steps:
    Code Edit platform is run, into Code Edit interface;
    Symbol lookup instruction input by user is obtained, is instructed based on the symbol lookup and obtains and show recommendation code information, institute It states and code information is recommended to include at least one code function, each code function includes function ID, function name and corresponding letter Number content;
    Code Selection instruction input by user is obtained, the Code Selection instruction includes object function ID and/or object function name Claim;
    The object function ID and/or the corresponding function content of object function title are increased into the Code Edit interface, shape Into having write code.
  2. 2. the method for script test written in code as described in claim 1, which is characterized in that in the operation Code Edit platform The step of before, the method for script test written in code further includes:
    The JAR packets that the Code Edit platform reception encapsulates in advance, the JAR packets include at least one code function, Mei Yisuo The function content for stating code function includes function body part and function comment section;
    It is described to be obtained based on symbol lookup instruction and show recommendation code information, including:
    It is instructed based on the symbol lookup, obtains and make with the corresponding at least one code function of symbol lookup instruction For the recommendation code information, and the recommendation code information is shown on the Code Edit interface, the recommendation code letter Breath includes the corresponding function body part of at least one code function and function comment section.
  3. 3. the method for script test written in code as described in claim 1, which is characterized in that described to obtain code input by user Inquiry instruction, including:
    Frame retrieval or association option list are shown in the Code Edit interface;
    Obtain the keyword or obtain user's click association option list and select that user input in the frame retrieval Association option;
    Based on the keyword or the association option, the symbol lookup instruction is formed;
    It is described to be obtained based on symbol lookup instruction and show recommendation code information, including:
    It is instructed, obtained corresponding at least one described with the keyword or the association option based on the symbol lookup Code function shows the code information to be recommended as the recommendation code information on the Code Edit interface.
  4. 4. the method for script test written in code as described in claim 1, which is characterized in that the script test written in code Method further includes:
    Code hint instructions input by user are obtained on Code Edit platform, the code hint instructions include target character String;
    According to the target string, the display target function on the Code Edit interface;
    Code Selection instruction input by user is obtained, the Code Selection instruction includes object function ID;
    The corresponding function contents of the object function ID are increased into the Code Edit interface, code has been write in formation.
  5. 5. the method for script test written in code as claimed in claim 4, which is characterized in that shown on the Code Edit interface Show object function, specifically include:On the Code Edit interface object function is shown using CodeMirror plug-in units Function name obtains the category information and parameter information of the object function using interface function, and at the Code Edit interface The upper display category information and the parameter information.
  6. 6. a kind of device of script test written in code, which is characterized in that the device of the script test written in code further includes:
    Code console module is run, for running Code Edit platform, into Code Edit interface;
    It shows code information module, for obtaining symbol lookup instruction input by user, is instructed and obtained based on the symbol lookup And showing recommendation code information, the recommendation code information includes at least one code function, and each code function includes function ID, function name and corresponding function content;
    Code command module is obtained, for obtaining Code Selection instruction input by user, the Code Selection instruction includes target Function ID and/or object function title;
    Increase function content module, for the object function ID and/or the corresponding function content of object function title to be increased To the Code Edit interface, code has been write in formation.
  7. 7. the device of script test written in code as described in claim 1, which is characterized in that the script test written in code Device further includes:
    JAR packet modules are imported, for the JAR packets encapsulated in advance to Code Edit platform importing, the JAR packets are included at least One code function, the function content of each code function include function body part and function comment section;
    The display code information module for being based on the symbol lookup instruction, obtains opposite with symbol lookup instruction At least one code function answered is pushed away as the recommendation code information on the Code Edit interface described in display Code information is recommended, the recommendation code information includes the corresponding function body part of at least one code function and function comment section Point.
  8. 8. the device of script test written in code as described in claim 1, which is characterized in that the script test written in code Device further includes:
    Frame retrieval unit is shown, for showing frame retrieval or association option list in the Code Edit interface;
    Keyword unit is obtained, the keyword that input for obtaining user in the frame retrieval or is obtained described in user's click Association option list and the association option selected;
    Inquiry instruction unit is formed, for being based on the keyword or the association option, forms the symbol lookup instruction;
    The display code information module for being based on the symbol lookup instruction, obtains and the keyword or the pass Join the corresponding at least one code function of option as the recommendation code information, and on the Code Edit interface Show the code information to be recommended.
  9. 9. 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 such as claim 1 to 5 when performing the computer program The step of method of any one script test written in code.
  10. 10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realizing the script test written in code as described in any one of claim 1 to 5 when the computer program is executed by processor The step of method.
CN201711431160.1A 2017-12-26 2017-12-26 Script tests method, apparatus, terminal device and the storage medium of written in code Pending CN108255709A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711431160.1A CN108255709A (en) 2017-12-26 2017-12-26 Script tests method, apparatus, terminal device and the storage medium of written in code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711431160.1A CN108255709A (en) 2017-12-26 2017-12-26 Script tests method, apparatus, terminal device and the storage medium of written in code

Publications (1)

Publication Number Publication Date
CN108255709A true CN108255709A (en) 2018-07-06

Family

ID=62723888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711431160.1A Pending CN108255709A (en) 2017-12-26 2017-12-26 Script tests method, apparatus, terminal device and the storage medium of written in code

Country Status (1)

Country Link
CN (1) CN108255709A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189384A (en) * 2018-07-27 2019-01-11 武汉斗鱼网络科技有限公司 A kind of multiplexing method and device of code
CN109582525A (en) * 2018-10-19 2019-04-05 京信通信系统(中国)有限公司 Test code verification method, verifying device, equipment and storage medium
CN109683944A (en) * 2018-11-16 2019-04-26 平安科技(深圳)有限公司 Application function switch management method, apparatus, equipment and readable storage medium storing program for executing
CN109753437A (en) * 2019-01-11 2019-05-14 平安科技(深圳)有限公司 Method of generating test program and device, storage medium, electronic equipment
CN109783737A (en) * 2019-01-18 2019-05-21 深圳壹账通智能科技有限公司 Information retrieval method, device, computer equipment and storage medium
CN110096435A (en) * 2019-04-09 2019-08-06 平安科技(深圳)有限公司 The automatic write method of code, device, computer equipment and storage medium
CN110334010A (en) * 2019-05-30 2019-10-15 深圳壹账通智能科技有限公司 Sample data generation method, device, computer equipment and storage medium
CN110515827A (en) * 2019-07-05 2019-11-29 中国平安财产保险股份有限公司 Automated testing method, device, computer equipment and storage medium
CN110688103A (en) * 2019-10-10 2020-01-14 北京东软望海科技有限公司 Code writing method and device, electronic equipment and computer readable storage medium
CN110745164A (en) * 2019-10-29 2020-02-04 北京大象科技有限公司 Train overspeed protection online experiment method and system
CN110928551A (en) * 2019-11-29 2020-03-27 山东省国土测绘院 Method for quickly inputting program code
CN112363711A (en) * 2020-11-03 2021-02-12 深圳市大富网络技术有限公司 Code prompting method and device and computer readable storage medium
CN112417271A (en) * 2020-11-09 2021-02-26 杭州讯酷科技有限公司 Intelligent construction method of system with field recommendation
CN112445820A (en) * 2019-08-28 2021-03-05 北京字节跳动网络技术有限公司 Data conversion method and device
CN112527274A (en) * 2020-12-18 2021-03-19 成都泛微网络科技有限公司 Data processing method and related equipment
CN113742249A (en) * 2021-11-05 2021-12-03 麒麟软件有限公司 Test script granulation method and system based on desktop operating system
CN115952103A (en) * 2023-03-10 2023-04-11 北京全路通信信号研究设计院集团有限公司 Test script editing method, device, medium and electronic equipment
CN109683944B (en) * 2018-11-16 2024-05-07 平安科技(深圳)有限公司 Application function switch management method, device, equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572055A (en) * 2013-10-23 2015-04-29 北大方正集团有限公司 Make-up script generation device and make-up script generation method
CN104699519A (en) * 2015-04-03 2015-06-10 四川效率源信息安全技术有限责任公司 Java script editor implemented based on GDI+ (graphics device interface plus) in combination with C# class library
CN105446788A (en) * 2014-08-20 2016-03-30 联想(北京)有限公司 Information processing method and electronic equipment
CN105677306A (en) * 2014-11-18 2016-06-15 中兴通讯股份有限公司 Automation script compiling method and device
CN105930332A (en) * 2016-01-13 2016-09-07 平安科技(深圳)有限公司 Code release and query method and terminal
CN106919374A (en) * 2015-12-28 2017-07-04 北京京东尚科信息技术有限公司 A kind of scenario generation method and device
CN106951261A (en) * 2017-03-27 2017-07-14 武汉斗鱼网络科技有限公司 Data managing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572055A (en) * 2013-10-23 2015-04-29 北大方正集团有限公司 Make-up script generation device and make-up script generation method
CN105446788A (en) * 2014-08-20 2016-03-30 联想(北京)有限公司 Information processing method and electronic equipment
CN105677306A (en) * 2014-11-18 2016-06-15 中兴通讯股份有限公司 Automation script compiling method and device
CN104699519A (en) * 2015-04-03 2015-06-10 四川效率源信息安全技术有限责任公司 Java script editor implemented based on GDI+ (graphics device interface plus) in combination with C# class library
CN106919374A (en) * 2015-12-28 2017-07-04 北京京东尚科信息技术有限公司 A kind of scenario generation method and device
CN105930332A (en) * 2016-01-13 2016-09-07 平安科技(深圳)有限公司 Code release and query method and terminal
CN106951261A (en) * 2017-03-27 2017-07-14 武汉斗鱼网络科技有限公司 Data managing method and device

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189384A (en) * 2018-07-27 2019-01-11 武汉斗鱼网络科技有限公司 A kind of multiplexing method and device of code
CN109582525B (en) * 2018-10-19 2022-06-03 京信网络系统股份有限公司 Test code verification method, verification device, equipment and storage medium
CN109582525A (en) * 2018-10-19 2019-04-05 京信通信系统(中国)有限公司 Test code verification method, verifying device, equipment and storage medium
CN109683944A (en) * 2018-11-16 2019-04-26 平安科技(深圳)有限公司 Application function switch management method, apparatus, equipment and readable storage medium storing program for executing
CN109683944B (en) * 2018-11-16 2024-05-07 平安科技(深圳)有限公司 Application function switch management method, device, equipment and readable storage medium
CN109753437A (en) * 2019-01-11 2019-05-14 平安科技(深圳)有限公司 Method of generating test program and device, storage medium, electronic equipment
CN109783737A (en) * 2019-01-18 2019-05-21 深圳壹账通智能科技有限公司 Information retrieval method, device, computer equipment and storage medium
CN110096435A (en) * 2019-04-09 2019-08-06 平安科技(深圳)有限公司 The automatic write method of code, device, computer equipment and storage medium
CN110096435B (en) * 2019-04-09 2023-08-08 平安科技(深圳)有限公司 Automatic code writing method, device, computer equipment and storage medium
CN110334010A (en) * 2019-05-30 2019-10-15 深圳壹账通智能科技有限公司 Sample data generation method, device, computer equipment and storage medium
CN110515827A (en) * 2019-07-05 2019-11-29 中国平安财产保险股份有限公司 Automated testing method, device, computer equipment and storage medium
CN112445820A (en) * 2019-08-28 2021-03-05 北京字节跳动网络技术有限公司 Data conversion method and device
CN110688103A (en) * 2019-10-10 2020-01-14 北京东软望海科技有限公司 Code writing method and device, electronic equipment and computer readable storage medium
CN110688103B (en) * 2019-10-10 2023-07-04 望海康信(北京)科技股份公司 Code writing method, device, electronic equipment and computer readable storage medium
CN110745164B (en) * 2019-10-29 2021-11-19 北京大象科技有限公司 Train overspeed protection online experiment method and system
CN110745164A (en) * 2019-10-29 2020-02-04 北京大象科技有限公司 Train overspeed protection online experiment method and system
CN110928551A (en) * 2019-11-29 2020-03-27 山东省国土测绘院 Method for quickly inputting program code
CN112363711A (en) * 2020-11-03 2021-02-12 深圳市大富网络技术有限公司 Code prompting method and device and computer readable storage medium
CN112417271A (en) * 2020-11-09 2021-02-26 杭州讯酷科技有限公司 Intelligent construction method of system with field recommendation
CN112417271B (en) * 2020-11-09 2023-09-01 杭州讯酷科技有限公司 Intelligent system construction method with field recommendation
CN112527274A (en) * 2020-12-18 2021-03-19 成都泛微网络科技有限公司 Data processing method and related equipment
CN113742249A (en) * 2021-11-05 2021-12-03 麒麟软件有限公司 Test script granulation method and system based on desktop operating system
CN113742249B (en) * 2021-11-05 2022-02-15 麒麟软件有限公司 Test script granulation method and system based on desktop operating system
CN115952103A (en) * 2023-03-10 2023-04-11 北京全路通信信号研究设计院集团有限公司 Test script editing method, device, medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN108255709A (en) Script tests method, apparatus, terminal device and the storage medium of written in code
US20220121410A1 (en) Technology add-on interface
US11651012B1 (en) Coding commands using syntax templates
US9348482B2 (en) Modeling system for graphic user interface
US10831453B2 (en) Connectors framework
US9519701B2 (en) Generating information models in an in-memory database system
CN108293081A (en) Pass through the program playback deep linking of user interface event to mobile application state
CN107644286A (en) Workflow processing method and device
EP1703379A1 (en) System and method for applying development patterns for component based applications
CN104077137A (en) Integrated design application
CN108345543A (en) A kind of data processing method, device, equipment and storage medium
WO2015085281A1 (en) Visual effects system for "big data" analysis workflow editors, distribution platforms, execution engines, and management systems comprising same
CN109597976A (en) A kind of document edit method and device
CN109636301A (en) Workflow configuration method, system, terminal and the readable storage medium storing program for executing of financial business
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
CN110275826A (en) Automated testing method, device and computer readable storage medium
CN103744647A (en) Java workflow development system and method based on workflow GPD
WO2023051125A1 (en) Structured data version management method, apparatus, and related device
CN115756445A (en) Component generation method and device, electronic equipment and computer storage medium
US20140130008A1 (en) Generating information models
CN113485909B (en) Test method, test device, computing equipment and medium
CN112395108A (en) Calling method and device of BIM (building information modeling) element model
EP1701260A1 (en) System and method for building a deployable component based application
CN103617214A (en) CIM (common information model) path inquiring method and CIM path inquiring device
CN111001157B (en) Method and device for generating reference information, storage medium and electronic device

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: 20180706