CN108255706A - Edit methods, device, terminal device and the storage medium of automatic test script - Google Patents

Edit methods, device, terminal device and the storage medium of automatic test script Download PDF

Info

Publication number
CN108255706A
CN108255706A CN201711207570.8A CN201711207570A CN108255706A CN 108255706 A CN108255706 A CN 108255706A CN 201711207570 A CN201711207570 A CN 201711207570A CN 108255706 A CN108255706 A CN 108255706A
Authority
CN
China
Prior art keywords
case
action
basis
management platform
test
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
CN201711207570.8A
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 Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201711207570.8A priority Critical patent/CN108255706A/en
Priority to PCT/CN2018/081058 priority patent/WO2019100635A1/en
Publication of CN108255706A publication Critical patent/CN108255706A/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
    • 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)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention discloses a kind of edit methods of automatic test script, device, terminal device and storage medium.The edit methods of the automatic test script include:Sequentially show that at least two use-cases perform number on the configuration interface of use-case editorial management platform;Each use-case is performed number to be associated with a basis action, forms original test case, and the original test case is sent to use-case test management platform;On the configuration interface of the use-case test management platform, the display order of number is performed according at least two use-cases in the original test case, the action of basis associated with use-case execution number action is called to perform code, forms target detection script;Wherein, the use-case editorial management platform is connected with the use-case test management platform by B/S frameworks.The advantages of edit methods of the automatic test script have simple operation, and real time synchronization is strong, raising working efficiency.

Description

Edit methods, device, terminal device and the storage medium of automatic test script
Technical field
The present invention relates to automatic test field more particularly to a kind of edit methods of automatic test script, device, ends End equipment and storage medium.
Background technology
In the editing process of current automatic test script, test case editor and based on test case editor's test script It is two mutual indepedent steps, i.e., test case need to be editted according to user demand, then opened by script by use-case editorial staff Hair personnel are based on the test case edit code editted, to obtain test script.With the continuous variation of user demand, right When test case and test script are updated, since test case is mutual indepedent with test script, synchronized update can not be realized; In addition, when based on test case editor's test script, need script developer that there is higher Code Edit ability.And And when editing corresponding test script respectively based on different test cases, there are function identical portions between different test cases Point, if editing test script respectively, working efficiency may be caused low due to repeated work.
Invention content
The embodiment of the present invention provides a kind of edit methods of automatic test script, device, terminal device and storage medium, The step of to solve current test case editor and cause to survey independently of each other the step of based on test case editor's test script The problem of this editorial efficiency of training is low.
In a first aspect, the embodiment of the present invention provides a kind of edit methods of automatic test script, including:
Sequentially show that at least two use-cases perform number on the configuration interface of use-case editorial management platform;
Each use-case is performed number to be associated with a basis action, forms original test case, and will be described original Test case is sent to use-case test management platform;
On the configuration interface of the use-case test management platform, according at least two institutes in the original test case The display order that use-case performs number is stated, the action of basis associated with use-case execution number action is called to perform generation Code forms target detection script;
Wherein, the use-case editorial management platform is connected with the use-case test management platform by B/S frameworks.
Second aspect, the embodiment of the present invention provide a kind of editing device of automatic test script, including:
Use-case performs number display module, for sequentially showing at least two on the configuration interface of use-case editorial management platform A use-case performs number;
Original test case acquisition module is associated with a basis action for each use-case to be performed number, is formed Original test case, and the original test case is sent to use-case test management platform;
Target detection script acquisition module, in the configuration interface in the use-case test management platform, foundation institute The display order that at least two use-cases in original test case perform number is stated, calls and performs number phase with the use-case The action of associated basis action performs code, forms target detection script.
The third aspect, the embodiment of the present invention provide a kind of terminal device, including memory, processor and are stored in described In memory and the computer program that can run on the processor, the processor are realized when performing the computer program The step of edit methods of the automatic test script.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer-readable storage medium Matter is stored with computer program, and the computer program realizes the editing side of the automatic test script when being executed by processor The step of method.
In the edit methods of automatic test script provided in an embodiment of the present invention, device, terminal device and storage medium, Sequentially show that at least two use-cases perform number on the configuration interface of use-case editorial management platform first, then by each use-case It performs number to be associated with a basis action, forms original test case, so that dynamic based on the associated basis of number is performed with use-case The original test case for making to be formed in follow-up test, hold by display and execution sequence that number can be performed in strict accordance with use-case Row.Original test case is sent to by use-case test management platform based on B/S frameworks later, is applied with reaching user without downloading The i.e. workable purpose of software, sharing is high and maintenance cost is low.Finally, on the configuration interface of use-case test management platform, Number is performed according at least two use-cases in original test case, sequentially calls basis associated with use-case execution number dynamic The action of work performs code, forms target detection script, and user need to only call pre-stored in the test script editing process Action associated with basic action performs code, and without developer, edit code obtains test script again, improves work Efficiency.
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 edit methods of the automatic test script provided in the embodiment of the present invention 1.
Fig. 2 is a specific schematic diagram of step S20 in Fig. 1.
Fig. 3 is another specific schematic diagram of step S20 in Fig. 1.
Fig. 4 is the another specific schematic diagram of step S20 in Fig. 1.
Fig. 5 is a specific schematic diagram of step S30 in Fig. 1.
Fig. 6 is a schematic diagram of the editing device of the automatic test script provided in the embodiment of the present invention 2.
Fig. 7 is a schematic diagram of the terminal device provided 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 creative efforts Example, shall fall within the protection scope of the present invention.
Embodiment 1
Fig. 1 shows the flow chart of the edit methods of automatic test script in the present embodiment.The automatic test script Edit methods can be applicable to the financial institutions such as bank, security, insurance or other mechanisms for needing to carry out system automatic test Terminal device in, so as to using the automatic test script edit methods test script editorial efficiency, reduce test foot This editor cost.As shown in Figure 1, the edit methods of the automatic test script include the following steps:
S10:Sequentially show that at least two use-cases perform number on the configuration interface of use-case editorial management platform.
Wherein, use-case editorial management platform refers to that tester is used for creating the management platform of test case.Use-case editor The configuration interface of management platform is the tester interface shown when editing test case, in particular to tester in point During the use-case edit instruction for hitting use-case Edit button and inputting, use-case editorial management platform is jumped to based on use-case edit instruction Interface.Use-case performs number and refers to that the execution of each test execution step in the original test case that tester is edited is suitable The number of sequence.
In the present embodiment, when terminal device jumps to the configuration interface of use-case editorial management platform, due to interface resources Limited, which can perform number according to the use-case for showing preset quantity, such as be shown according to the sequence of Arabic numerals 10 use-cases such as 1-10 perform number.When tester want add test case when, can select batch addition manner or Addition manner one by one reduces interface resources occupation rate, promotes loading speed.Specifically, it is used when tester wants addition test During the test execution step of example, can click " addition number " button in the configuration interface of the use-case editorial management platform and to The platform input of example editorial management performs number addition instruction, and it is to be added to can customize input institute in execution number addition instruction Use-case performs the quantity of number;When such as selecting batch addition manner, then it is whole more than 1 to define the use-case and perform the quantity numbered Number;Addition manner one by one is selected, then it is 1 to define the use-case and perform the quantity numbered, to reach addition easily purpose.
S20:It each use-case is performed into number is acted with a basis and is associated with, form original test case, and by original test Use-case is sent to use-case test management platform.
Wherein, original test case refers to tester according to the demand of test system to be measured obtained one group into edlin Include the testing scheme of test execution step.Basis action is the test action on some pre-stored bases of server, such as The action of " login ".Use-case test management platform is the management platform based on test case editor's test script.It specifically, will be every One use-case performs basis action needed for one chosen during number is acted with tester on pre-stored basis (hereinafter referred to as For target action) it is associated, it forms one group and is acted comprising at least two bases, and the execution between at least two basis actions is suitable Sequence performs with use-case and numbers corresponding testing scheme, i.e., original test case.
It sequentially shows and sequentially performs since at least two use-cases perform number so that based on performing number with use-case It is associated basis action formed original test case in follow-up test, can in strict accordance with use-case perform number display and Execution sequence performs, and ensureing can be according to basis action each in the designed original test case of user to the test of system to be tested Sequence perform, enhance the accuracy of test.In the present embodiment, original test case that use-case editorial management platform can will obtain Use-case test management platform is sent to, and sends prompting message to test and management mailbox, enhances the reality of test script editing process When synchronism.
In the present embodiment, use-case editorial management platform is connected with use-case test management platform by B/S frameworks.Wherein, B/S Framework, that is, browser and server structure, under this configuration, user job interface are realized by web browser, seldom Partial transaction logic is realized in browser (Browser), but major affairs logic is realized in server (Server).B/S framves Structure is a kind of network structure pattern after WEB rises, and web browser is the most important application software of client.User is without under It carries, as long as installation browser can be used, substantially reduces maintenance cost.
In the present embodiment, sequentially show that at least two use-cases perform on the configuration interface of use-case editorial management platform first Then each use-case is performed number and is associated with a basis action, original test case formed, so that based on being held with use-case by number The original test case that the associated basis action of row number is formed can perform number in follow-up test in strict accordance with use-case Display and execution sequence perform.Original test case is sent to by use-case test management platform based on B/S frameworks later, to use Family has real time synchronization without individually sending test case to use-case test management platform.
As shown in Fig. 2, in step S20, each use-case is performed into number and is associated with a basis action, original test is formed and uses Example, specifically comprises the following steps:
S211:In each use-case performs and numbers corresponding input frame, action selection instruction input by user is obtained, is acted Selection instruction includes action ID and/or denomination of dive.
Wherein, action selection instruction is the instruction for selecting to act needed for user.Action ID is taken for unique identification The mark of pre-stored basis action in business device.Denomination of dive refers to that tester inputs title or the service of target action The title of pre-stored basis action in device.Specifically, each use-case performs all corresponding input frame of number so that tester Member's input target action, tester can merely enter action ID, can also merely enter denomination of dive or can input simultaneously ID and denomination of dive are acted, and click confirming button after the completion of input to input corresponding action selection instruction, so as to base Basis action needed for being obtained in the action selection instruction.
S212:Based on action ID and/or denomination of dive, number is performed with use example and is associated with basis action.
Specifically, the mode that tester obtains target action can have the following two kinds situation:First, tester knows When the action ID and/or denomination of dive of target action are prestored in server, the action ID of target action can be directly inputted And/or denomination of dive, to obtain target action.Second is that tester does not know the action that target action is prestored in server ID and/or during denomination of dive, can input the target action title to be realized of target action, use-case editorial management platform can root The target action title inputted according to tester is provided to tester and is acted to the corresponding similar basis of target action, For tester, selection target acts from the similar basis action provided, i.e., user can be by putting down to use-case editorial management Platform input action selection instruction, to determine target action based on the similar basis action in the action selection instruction.It can manage Xie Di, if the similar basis that use-case editorial management platform is recommended acts no user institute target action to be used, use-case is compiled Volume management platform, which can be generated to, reminds developer to load the prompting message of the target action, and be sent to the use-case editorial management The client of the developer of platform carries out basis action exploitation, so that should so that developer to be reminded to be based on prompting message Use-case editorial management platform has more practicability, meets the needs of tester.
Further, key may be used when similar basis being recommended to act to tester in use-case editorial management platform Word matching algorithm is obtained and is acted to the corresponding similar basis of target action.Wherein, Keywords matching algorithm includes but not limited to Cnut-Mo Lisi-Alexandre Desplat (Knuth-Morris-Pratt, hereinafter referred to as KMP) algorithm.Specifically, KMP algorithms are a kind of Improved string matching algorithm, the keys of KMP algorithms are using the information after it fails to match, reduce pattern string and main string to the greatest extent Matching times to achieve the purpose that Rapid matching.In the present embodiment, the target that KMP algorithms input tester is selected to move Make to carry out Keywords matching with the denomination of dive stored in database, obtain similar basis action, save the time, raising efficiency.
Specifically, server can prestore key word information table, and the dynamic of basis action is stored in the key word information table Make title, each denomination of dive corresponds to one or more keywords, passes through KMP algorithmic match target action and key word information table In keyword, with determine it is similar basis act.Such as the keyword of " opening browser " can be browser, work as tester During input " clicking browser ", server can be in pre-stored key word information table, by matching keyword " browsing Device " and be the action that tester recommends " open browser ", tester is facilitated to use, promotes user experience.
In a specific embodiment, as shown in figure 3, before step S20, the edit methods of the automatic test script are also Including being pre-configured with basic action lists.Wherein, to the configuration of basic action lists, specifically comprise the following steps:
S221:The request of at least two motion editings is obtained in use-case editorial management platform, motion editing request includes basis Act corresponding denomination of dive.
Specifically, developer can input at least two basic motion editing requests on use-case editorial management platform, with Basis of formation action lists, use-case editorial management platform can call pre-stored after basic motion editing request is received Basic motion editing template.The basis motion editing template includes the denomination of dive of basis action and corresponding action performs generation Code.Developer need to only edit the denomination of dive of basis action and corresponding action performs code, you can complete to act basis Editor, to reach streamline operation, save the time, put forward efficient purpose.
S222:Clustering processing is carried out at least two denomination of dive using clustering algorithm, with use example editorial management platform Corresponding denomination of dive is acted to basis and carries out Classification Management, basis of formation action lists.
Specifically, the basis for at least two denomination of dive obtain after clustering processing using K-means clustering algorithms Action lists include at least two cluster class clusters, and each cluster class cluster corresponds to a behavior type, and each cluster class cluster includes One barycenter.Each denomination of dive is calculated to the distance of barycenter using cosine similarity algorithm, by the distance being calculated minimum Classification of the cluster class cluster as the denomination of dive belonging to barycenter.Wherein, K-MEANS algorithms are input cluster number k and packet Database containing n data object, output meet a kind of algorithm of k cluster of variance minimum sandards, and the complexity of the algorithm is low, Mass data can be handled in a short time, improve efficiency.
Further, the step of carrying out clustering processing at least two denomination of dive using K-maens clustering algorithms is as follows: K are randomly selected from least two denomination of dive first as barycenter, wherein, k represents the quantity of cluster class cluster.It uses and divides again Word technology segments each denomination of dive (including barycenter), and each word is calculated in corresponding denomination of dive using TF-IDF Weights formed feature vector.Such as " opening browser " is segmented, it obtains " opening " " browser " formation feature vector (vector dimension of this feature vector is 2);If the dimension of the feature vector of two denomination of dive is different, the spy of maximum dimension is taken The corresponding dimension of sign vector is as final dimension, insufficient 0 polishing of other feature vector dimensions.Finally use cosine Similarity algorithm calculates the corresponding feature vector of each denomination of dive and the distance of barycenter, by the matter of the distance being calculated minimum Classification of the cluster class cluster as the denomination of dive belonging to the heart.Wherein, the number of barycenter is determined by the quantity K of cluster class cluster, tool The K values of body are self-defined by developer.In the present embodiment, participle technique can be used stammerer participle tool and be segmented, stammerer point Word tool is a kind of common Chinese word segmentation tool, has the advantages that accuracy rate is high, efficient.
Specifically, in step S20, each use-case is performed into number and is associated with a basis action, forms original test case, Specifically comprise the following steps:
S231:The display base action lists on the configuration interface of use-case editorial management platform, basic action lists include At least one basis action.
Wherein, basic action lists refer to pre-stored comprising at least one basis action in use-case editorial management platform Action lists.In the present embodiment, display base moves in the form of grading list on the configuration interface of use-case editorial management platform Make list.Specifically, tester also can choose target action according to basic action lists, so that tester faster looks into It sees all basis actions of server storage, promotes user experience.
S232:The basis action in basic action lists is dragged to using pulling mode and performs number pair with a use-case In the input frame answered, number is performed with use example and is associated with basis action.
Specifically, tester may be used pulling mode and choose target action in basic action lists, be pulled It is performed in the corresponding input frame of number to use-case, so that the target action that tester chooses performs number phase with use-case Association.In the present embodiment, the target action that tester chooses is input to using pulling mode and performs number institute with use-case In corresponding input frame, the operating process is simple, improves work efficiency.
In another specific embodiment, as shown in figure 4, in step S20, each use-case is performed into number and a basis is dynamic It is associated with, forms original test case, specifically comprise the following steps:
S241:Action search instruction input by user is obtained, action search instruction includes target action title.
Wherein, action search instruction refers to the instruction acted needed for user's image processor.Target action title refers to user The denomination of dive acted needed for selection.Specifically, user can exist when clicking specific use-case and performing the input frame corresponding to numbering Pop-up action search box on the configuration interface of case management platform, user can be inputted in search box is acted target action title into Row search, and the keyword that the use-case editorial management platform can also recommend searching times to come preceding N (N >=1) position to user supplies User selects, and promotes user experience.
Further, " searching times " field, server meeting are further included in the pre-stored key word information table of server The keyword in target action title input by user and matching keywords information table is read, when matching keyword, meeting exists In " searching times " field corresponding to keyword in the key word information table of successful match plus 1, and according to searching times from The keyword in key word information table is ranked up to small sequence greatly, searching times is recommended to come N (N to be reached for user >=1) purpose of the keyword of position, it is user-friendly.
S242:It whether there is target action title in judgement basis action lists.
Wherein, use-case editorial management platform can be inputted according to user in the action lists of target action name query basis whether It is acted in the presence of with the corresponding basis of target action title.Specifically, it is calculated in basic action lists by cosine similarity Basic denomination of dive is with whether there is target action title in the similarity judgement basis action lists of target action title.Cosine Similarity algorithm, also known as cosine similarity algorithm are to assess their phase by calculating two vectorial included angle cosine values Like the algorithm of degree.It is to be appreciated that the action name acted by calculating target action title with the basis in basic action lists The cosine similarity of title chooses cosine similarity and reaches the basic denomination of dive of threshold value as target action title.
S243:If there are target action titles in basic action lists, obtain and the corresponding base of target action title Plinth acts, and each use-case is performed number is associated with a basis action.
Specifically, it chooses cosine similarity in the basic action lists in basis and reaches the basic denomination of dive of threshold value as target Denomination of dive, and target action title is automatically filled in and is performed in the corresponding input frame of number with use-case, to reach simple operation Purpose.
S244:If in basic action lists, there is no target action titles, export prompting message.
Specifically, if the basic action lists in use-case editorial management platform do not have user institute target action to be used, I.e. be not present with the corresponding target action of target action title, then use-case editorial management platform can generate remind developer add The prompting message of the target action is carried, and is sent to the client of the developer of the use-case editorial management platform, is opened with reminding Hair personnel are based on prompting message and carry out basis action exploitation, so that the use-case editorial management platform has more practicability, it is full The demand of sufficient tester.
S30:On the configuration interface of use-case test management platform, held according at least two use-cases in original test case The display order of row number calls the action of basis associated with use-case execution number action to perform code, forms target survey Training sheet.
Wherein, the configuration interface of use-case test management platform refers to that tester inputs in click scripting editing button When scripting editing instructs, use-case test management platform can instruct jumped to interface based on scripting editing.Target detection script It is the test script for handling the progress scripting of target detection use-case.Specifically, server can be prestored and be moved with basis Make corresponding action and perform code for tester's use, improve user experience.
As shown in figure 5, in step S30, the display that number is performed according at least two use-cases in original test case is suitable Sequence calls the action of basis associated with use-case execution number action to perform code, forms target detection script, specifically include Following steps:
S31:The display order of number is performed according at least two use-cases in original test case, calls and is performed with use-case The action for numbering associated basis action performs code, forms original test script.
Wherein, use-case performs number and is associated with basis action, and ID pairs of the action of each basis action is stored in database The action answered performs code.Specifically, use-case test management platform is in the original survey for receiving the transmission of use-case editorial management platform After example on probation, the scripting editing instruction of tester's input can be obtained.Scripting editing instruction includes holding at least two use-cases The associated action ID of row number.Use-case test management platform can sequentially be called based on action ID and each be used in original test case Example performs the corresponding action of number and performs code, to form original test script.The process is without tester again according to original Beginning test case writes test script, can directly invoke stored action and perform code, save the time, improve working efficiency.
S32:Scripting editing instruction input by user is obtained, scripting editing instruction includes acting ID and adjustment parameter.
Wherein, adjustment parameter refers to what is inputted when tester modifies to original test script according to system requirements Parameter.Specifically, action performs code and includes being used to implement the method function of basis action and corresponding initial parameter.User can Script edit instruction is inputted to use-case editorial management platform, the adjusting that initial parameter is revised as in scripting editing instruction is joined Number.Such as when the basis action that tester selects is " opening browser ", corresponding action perform script includes being used for It realizes the method function of printing browser function and corresponding initial parameter, the network address of browser can be modified, inputted Required adjustment parameter (network address needed for i.e.), so that original test case more closes the demand for meeting test system to be measured.
S33:Based on adjustment parameter, code is performed to the corresponding actions of action ID and is modified, to form target detection foot This.
Specifically, the corresponding adjustment parameter of code is performed by each action that step S32 is obtained and changes original test foot Action corresponding with action ID performs code in this, to form target detection script, target detection script is uploaded to use-case and is surveyed Test tube platform.In the present embodiment, reception is can also be configured before target detection script to use-case test management platform is uploaded and is surveyed The tester ID and corresponding mailbox of test result so that test system to be measured corresponds to a tester, to enhance work management stream Journey logic.
In the present embodiment, sequentially show that at least two use-cases perform on the configuration interface of use-case editorial management platform first Then each use-case is performed number and is associated with a basis action, original test case formed, so that based on being held with use-case by number The original test case that the associated basis action of row number is formed can perform number in follow-up test in strict accordance with use-case Display and execution sequence perform.Original test case is uploaded to by use-case test management platform based on B/S frameworks later, to use Also may be used without individually uploading test case to use-case test management platform when subsequently being tested based on test script at family The execution state for checking test script is synchronized in use-case editorial management platform, there is real time synchronization.Finally, it is tested in use-case On the configuration interface of management platform, number is performed according at least two use-cases in original test case, sequentially calling and use-case The action for performing the associated basis action of number performs code, forms target detection script.In the test script editing process User need to only call pre-stored action associated with basic action to perform code, without developer's edit code again Test script is obtained, improves working 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. 6 is shown and the one-to-one automatic test script of the edit methods of automatic test script in embodiment 1 The functional block diagram of editing device.As shown in fig. 6, the editing device of the automatic test script, which includes use-case, performs number display mould Block 10, original test case acquisition module 20, target detection script acquisition module 30.Wherein, use-case performs number display module 10th, it automates and surveys in the realization function and embodiment of original test case acquisition module 20, target detection script acquisition module 30 The corresponding step of edit methods of training sheet corresponds, and is repeated to avoid, the present embodiment is not described in detail one by one.
Use-case performs number display module 10, for sequentially being shown at least on the configuration interface of use-case editorial management platform Two use-cases perform number.
Original test case acquisition module 20 is associated with a basis action for each use-case to be performed number, is formed former Beginning test case, and original test case is sent to use-case test management platform.
Target detection script acquisition module 30, in the configuration interface of the use-case test management platform, foundation institute The display order that at least two use-cases in original test case perform number is stated, calls and performs number phase with the use-case The action of associated basis action performs code, forms target detection script.
Preferably, original test case acquisition module 20 includes action selection instruction acquiring unit 211 and use-case performs volume Number associative cell 212.
Selection instruction acquiring unit 211 is acted, used in performing in each use-case and numbering corresponding input frame, obtains user The action selection instruction of input, action selection instruction include action ID and/or denomination of dive.
Use-case performs number associative cell 212, and for being based on action ID and/or denomination of dive, number is performed with use example It is associated with basis action.
Preferably, original test case acquisition module 20 includes motion editing acquisition request unit 221 and basic action column Table acquiring unit 222, basic action lists display unit 231 and use-case perform number associative cell 232.
Motion editing acquisition request unit 221, please for obtaining at least two motion editings in use-case editorial management platform It asks, motion editing request includes basis and acts corresponding denomination of dive.
Basic action lists acquiring unit 222, for being carried out at cluster at least two denomination of dive using clustering algorithm Reason acts corresponding denomination of dive to basis with use example editorial management platform and carries out Classification Management, basis of formation action lists.
Basic action lists display unit 231, on the configuration interface of use-case editorial management platform display base move Make list, basic action lists include at least one basis and act.
Use-case performs number associative cell 232, for being acted the basis in basic action lists using pulling mode It is dragged to and is performed in the corresponding input frame of number with a use-case, perform number with use example is associated with basis action.
Preferably, original test case acquisition module 20 includes action search instruction acquiring unit 241, target action title Acquiring unit 242, basis action acquiring unit 243 and reminding information acquisition unit 244.
Search instruction acquiring unit 241 is acted, for obtaining action search instruction input by user, acts search instruction packet Include target action title.
Target action name acquiring unit 242, for whether there is target action title in judgement basis action lists.
Action acquiring unit 243 in basis for there are target action titles in basic action lists, is then obtained and is moved with target Make the corresponding basis action of title, each use-case is performed number is associated with a basis action.
Reminding information acquisition unit 244 for target action title to be not present in basic action lists, then exports prompting letter Breath.
Preferably, target detection script acquisition module 30 includes original test script acquiring unit 31, scripting editing instructs Acquiring unit 32 and target detection script acquiring unit 33.
Original test script acquiring unit 31, for performing number according at least two use-cases in original test case Display order calls the action of basis associated with use-case execution number action to perform code, forms original test script.
Scripting editing instructs acquiring unit 32, for obtaining scripting editing instruction input by user, scripting editing instruction packet Include action ID and adjustment parameter.
Target detection script acquiring unit 33, for being based on adjustment parameter, to action ID it is corresponding action perform code into Row modification, to form target detection script.
Embodiment 3
The present embodiment provides a computer readable storage medium, computer journey is stored on the computer readable storage medium Sequence realizes the edit methods of automatic test script in embodiment 1 when the computer program is executed by processor, to avoid weight Multiple, which is not described herein again.Alternatively, automatic test script 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 editing device.
Embodiment 4
Fig. 7 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in fig. 7, the terminal of the embodiment is set Standby 70 include:Processor 71, memory 72 and it is stored in the computer journey that can be run in memory 72 and on processor 71 Sequence 73.Processor 71 is realized when performing computer program 73 in the edit methods embodiment of above-mentioned each automatic test script Step, such as step S10 to S30 shown in FIG. 1.Alternatively, processor 71 realizes above-mentioned each device when performing computer program 73 The function of each module/unit in embodiment, such as the function of module 10 to 30 shown in Fig. 6.
Illustratively, computer program 73 can be divided into one or more module/units, one or more mould Block/unit is stored in memory 72, and is performed by processor 71, to complete the present invention.One or more module/units can To be the series of computation machine program instruction section that can complete specific function, the instruction segment is for describing computer program 73 at end Implementation procedure in end equipment 70.For example, computer program 73, which can be divided into use-case, performs number display module 10, original Test case acquisition module 20 and target detection script acquisition module 30, each module concrete function as described in Example 2, herein not It repeats one by one.
Terminal device 70 can be the computing devices such as desktop PC, notebook, palm PC and cloud server.Eventually End equipment may include, but be not limited only to, processor 71, memory 72.It will be understood by those skilled in the art that Fig. 7 is only eventually The example of end equipment 70 does not form the restriction to terminal device 70, can include than illustrate more or fewer components or Combine certain components or different components, for example, terminal device can also include input-output equipment, network access equipment, Bus etc..
Alleged processor 71 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 72 can be the internal storage unit of terminal device 70, such as the hard disk or memory of terminal device 70.It deposits Reservoir 72 can also be the plug-in type hard disk being equipped on the External memory equipment of terminal device 70, such as terminal device 70, intelligence Storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) Deng.Further, memory 72 can also both include the internal storage unit of terminal device 70 or including External memory equipment.It deposits Reservoir 72 is used to store computer program and other programs and data needed for terminal device.Memory 72 can be also used for temporarily When store 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 described device are divided into different functional units or module, more than completion The all or part of function of description.
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 the integrated module/unit realized in the form of SFU software functional unit and be independent product sale or In use, it can be stored in a computer read/write memory medium.Based on such understanding, the present invention realizes above-mentioned implementation All or part of flow in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It can include:Any entity of the computer program code or device, recording medium, USB flash disk, mobile hard disk, magnetic can be carried Dish, CD, computer storage, 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 is it should be noted that described The content that computer-readable medium includes can carry out appropriate increasing according to legislation in jurisdiction and the requirement of patent practice Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and Telecommunication signal.
Above-described embodiment is merely illustrative of the technical solution 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 edit methods of automatic test script, which is characterized in that including:
Sequentially show that at least two use-cases perform number on the configuration interface of use-case editorial management platform;
It each use-case is performed into number is acted with a basis and is associated with, form original test case, and by the original test Use-case is sent to use-case test management platform;
On the configuration interface of the use-case test management platform, according at least two use in the original test case Example performs the display order of number, and the action of basis associated with use-case execution number action is called to perform code, shape Into target detection script;
Wherein, the use-case editorial management platform is connected with the use-case test management platform by B/S frameworks.
2. the edit methods of automatic test script according to claim 1, which is characterized in that described by each use Example performs number and is associated with a basis action, including:
In each use-case performs and numbers corresponding input frame, action selection instruction input by user, the action are obtained Selection instruction includes action ID and/or denomination of dive;
Based on the action ID and/or denomination of dive, so that the use-case performs number and is associated with the basis action.
3. the edit methods of automatic test script according to claim 1, which is characterized in that described by each use Example performs number and is associated with a basis action, including:
The display base action lists on the configuration interface of the use-case editorial management platform, the basis action lists are included extremely The action of a few basis;
The basis action in the basic action lists is dragged to using pulling mode and performs number pair with a use-case In the input frame answered, so that the use-case performs number and is associated with the basis action.
4. the edit methods of automatic test script according to claim 3, which is characterized in that described by each use Example performs number and is associated with a basis action, further includes:
Action search instruction input by user is obtained, the action search instruction includes target action title;
Judge in the basic action lists with the presence or absence of the target action title;
If in the basis action lists, there are the target action titles, obtain corresponding with the target action title Each use-case is performed number and is associated with a basis action by basis action;
If in the basis action lists, there is no the target action titles, export prompting message.
5. the edit methods of automatic test script according to claim 1, which is characterized in that described according to described original At least two use-cases in test case perform the display order of number, call associated with use-case execution number The action of basis action performs code, forms target detection script, including:
The display order of number is performed according at least two use-cases in the original test case, is called and the use-case The action for performing the associated basis action of number performs code, forms original test script;
Scripting editing instruction input by user is obtained, the scripting editing instruction includes acting ID and adjustment parameter;
Based on the adjustment parameter, code is performed to the corresponding actions of the action ID and is modified, to form target detection foot This.
6. the edit methods of automatic test script according to claim 1, which is characterized in that the basis action includes Denomination of dive;
Before described the step of being associated with a basis action, form original test case each use-case execution number, The edit methods of the automatic test script further include:
The request of at least two motion editings is obtained in the use-case editorial management platform, the motion editing request includes the base Plinth acts corresponding denomination of dive;
Using clustering algorithm, at least two, the denomination of dive carries out clustering processing, so that the use-case editorial management platform pair The basis acts corresponding denomination of dive and carries out Classification Management, basis of formation action lists.
7. a kind of editing device of automatic test script, which is characterized in that including:
Use-case performs number display module, for sequentially showing at least two use on the configuration interface of use-case editorial management platform Example performs number;
Original test case acquisition module is associated with a basis action for each use-case to be performed number, is formed original Test case, and the original test case is sent to use-case test management platform;
Target detection script acquisition module, in the configuration interface in the use-case test management platform, according to the original At least two use-cases in beginning test case perform the display order of number, call associated with use-case execution number Basis action action perform code, formed target detection script.
8. the editing device of automatic test script according to claim 7, which is characterized in that further include:
Motion editing acquisition request unit, for obtaining the request of at least two motion editings in the use-case editorial management platform, The motion editing request includes the basis and acts corresponding denomination of dive;
Basic action lists acquiring unit, for using clustering algorithm, at least two, the denomination of dive to carry out clustering processing, So that the use-case editorial management platform acts the basis corresponding denomination of dive and carries out Classification Management, basis of formation action List.
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 6 when performing the computer program The step of edit methods of any one automatic test script.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the volume of realization automatic test script as described in any one of claim 1 to 6 when the computer program is executed by processor The step of method collected.
CN201711207570.8A 2017-11-27 2017-11-27 Edit methods, device, terminal device and the storage medium of automatic test script Pending CN108255706A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711207570.8A CN108255706A (en) 2017-11-27 2017-11-27 Edit methods, device, terminal device and the storage medium of automatic test script
PCT/CN2018/081058 WO2019100635A1 (en) 2017-11-27 2018-03-29 Editing method and apparatus for automated test script, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711207570.8A CN108255706A (en) 2017-11-27 2017-11-27 Edit methods, device, terminal device and the storage medium of automatic test script

Publications (1)

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

Family

ID=62721601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711207570.8A Pending CN108255706A (en) 2017-11-27 2017-11-27 Edit methods, device, terminal device and the storage medium of automatic test script

Country Status (2)

Country Link
CN (1) CN108255706A (en)
WO (1) WO2019100635A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542795A (en) * 2018-12-13 2019-03-29 平安科技(深圳)有限公司 Recommend method, apparatus, the medium, electronic equipment of test action for user
CN109753437A (en) * 2019-01-11 2019-05-14 平安科技(深圳)有限公司 Method of generating test program and device, storage medium, electronic equipment
CN110404263A (en) * 2019-07-26 2019-11-05 网易(杭州)网络有限公司 A kind of visualizing editing method and device
CN110704305A (en) * 2019-09-07 2020-01-17 创新奇智(合肥)科技有限公司 Text-based automatic test case design method and system
CN112506756A (en) * 2020-11-11 2021-03-16 东风汽车集团有限公司 Vehicle controller test case script generation method and device
CN112596972A (en) * 2020-12-23 2021-04-02 文思海辉智科科技有限公司 Vehicle-mounted equipment testing method, device and system and computer equipment
CN113742238A (en) * 2021-09-14 2021-12-03 南方电网深圳数字电网研究院有限公司 Test case generation method and device
CN112596972B (en) * 2020-12-23 2024-05-03 文思海辉智科科技有限公司 Test method, device and system of vehicle-mounted equipment and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631590A (en) * 2013-11-29 2014-03-12 广东明创软件科技有限公司 Method for editing automated testing script
GB2508643A (en) * 2012-12-07 2014-06-11 Ibm Method for Performing a Regression Test after Modifying Source Code File
CN104298595A (en) * 2014-09-29 2015-01-21 百视通网络电视技术发展有限责任公司 Automatic testing method and testing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1677197A1 (en) * 2004-12-31 2006-07-05 ST Incard S.r.l. Test case automatic generation method for testing proactive GSM applications on SIM card
CN101025686A (en) * 2007-03-22 2007-08-29 中兴通讯股份有限公司 Automation test system and test script generating and operating method
CN101339534B (en) * 2008-06-17 2010-10-13 金蝶软件(中国)有限公司 Software test apparatus and test method
CN106547689B (en) * 2016-10-20 2019-03-01 金航数码科技有限责任公司 A kind of automatic test cases development system and method based on web

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2508643A (en) * 2012-12-07 2014-06-11 Ibm Method for Performing a Regression Test after Modifying Source Code File
CN103631590A (en) * 2013-11-29 2014-03-12 广东明创软件科技有限公司 Method for editing automated testing script
CN104298595A (en) * 2014-09-29 2015-01-21 百视通网络电视技术发展有限责任公司 Automatic testing method and testing system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542795A (en) * 2018-12-13 2019-03-29 平安科技(深圳)有限公司 Recommend method, apparatus, the medium, electronic equipment of test action for user
CN109753437A (en) * 2019-01-11 2019-05-14 平安科技(深圳)有限公司 Method of generating test program and device, storage medium, electronic equipment
CN110404263A (en) * 2019-07-26 2019-11-05 网易(杭州)网络有限公司 A kind of visualizing editing method and device
CN110404263B (en) * 2019-07-26 2023-04-07 网易(杭州)网络有限公司 Visual editing method and device
CN110704305A (en) * 2019-09-07 2020-01-17 创新奇智(合肥)科技有限公司 Text-based automatic test case design method and system
CN112506756A (en) * 2020-11-11 2021-03-16 东风汽车集团有限公司 Vehicle controller test case script generation method and device
CN112596972A (en) * 2020-12-23 2021-04-02 文思海辉智科科技有限公司 Vehicle-mounted equipment testing method, device and system and computer equipment
CN112596972B (en) * 2020-12-23 2024-05-03 文思海辉智科科技有限公司 Test method, device and system of vehicle-mounted equipment and computer equipment
CN113742238A (en) * 2021-09-14 2021-12-03 南方电网深圳数字电网研究院有限公司 Test case generation method and device

Also Published As

Publication number Publication date
WO2019100635A1 (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN108255706A (en) Edit methods, device, terminal device and the storage medium of automatic test script
US11574201B2 (en) Enhancing evolutionary optimization in uncertain environments by allocating evaluations via multi-armed bandit algorithms
CN109325541A (en) Method and apparatus for training pattern
US10395108B1 (en) Automatically identifying and interacting with hierarchically arranged elements
JP2021501382A (en) Automatic code generation
US10769721B2 (en) Intelligent product requirement configurator
JP2019505936A (en) Web interface generation and testing using artificial neural networks
CN107908789A (en) Method and apparatus for generating information
CN104462056B (en) For the method and information handling systems of knouledge-based information to be presented
CN107908566A (en) Automatic test management method, device, terminal device and storage medium
CN106687952A (en) Techniques for similarity analysis and data enrichment using knowledge sources
CN111079015B (en) Recommendation method and device, computer equipment and storage medium
CN108038052A (en) Automatic test management method, device, terminal device and storage medium
US10685062B2 (en) Relational database management
US11556733B2 (en) System and method for auto-completion of ICS flow using artificial intelligence/machine learning
CN109495552A (en) Method and apparatus for updating clicking rate prediction model
CN110909222A (en) User portrait establishing method, device, medium and electronic equipment based on clustering
CN106537423A (en) Adaptive featurization as service
CN110321546A (en) Account identification, display methods, device, server, terminal and storage medium
CN110245310A (en) A kind of behavior analysis method of object, device and storage medium
CN111538852B (en) Multimedia resource processing method, device, storage medium and equipment
US20210271637A1 (en) Creating descriptors for business analytics applications
US11847599B1 (en) Computing system for automated evaluation of process workflows
JP7275591B2 (en) Evaluation support program, evaluation support method, and information processing device
US20230384910A1 (en) Using Attributes for Font Recommendations

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

Application publication date: 20180706

RJ01 Rejection of invention patent application after publication