CN109800149A - Application interface method for generating test case and server - Google Patents

Application interface method for generating test case and server Download PDF

Info

Publication number
CN109800149A
CN109800149A CN201811530816.XA CN201811530816A CN109800149A CN 109800149 A CN109800149 A CN 109800149A CN 201811530816 A CN201811530816 A CN 201811530816A CN 109800149 A CN109800149 A CN 109800149A
Authority
CN
China
Prior art keywords
test
test case
testing requirement
field
requirement document
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
CN201811530816.XA
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811530816.XA priority Critical patent/CN109800149A/en
Publication of CN109800149A publication Critical patent/CN109800149A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of application interface method for generating test case, this method comprises: receiving the testing requirement document that the test assignment that user sends is requested and uploaded;The test case template for corresponding to the test object is called according to the content of the test object field in the testing requirement document, obtains the element parameter of the element parameter field in the testing requirement document;The test template is generated into test case in conjunction with the element parameter.The present invention also provides a kind of device, server and computer readable storage mediums.Application interface method for generating test case, device, server and computer readable storage medium provided by the invention can obtain the test object classification in testing requirement document and call corresponding test case template, then the element parameter in the testing requirement document is obtained again, the test case template is integrated to automatically generate test case, to simply and rapidly generate test case, and error rate can be effectively reduced.

Description

Application interface method for generating test case and server
Technical field
The present invention relates to the field of test technology more particularly to a kind of application interface method for generating test case, device, service Device and computer readable storage medium.
Background technique
With the extensive use of mobile phone, mobile phone application software is also more and more abundant.And the development process of software be unable to do without it is soft Part test, therefore, the testing requirement of the corresponding application interface of mobile phone application software is also more and more.However different application software Corresponding application interface is also different, so that needing the test case quantity of different application interfaces very more.For mobile phone The a large amount of window and field of application interface write test case and are on the one hand easy to omit, and on the other hand consuming time is long.Moreover, Even if writing out so much test case, it is also difficult to guarantee the high coverage rate of test point.Although having in the industry at present based on tested The tool of Code automatic build white-box testing use-case, but functional test is then not suitable for.
Summary of the invention
In view of this, the present invention proposes a kind of user application interface method for generating test case, device, server and calculating Machine readable storage medium storing program for executing can obtain the test pair in the testing requirement document after the testing requirement document received As classification and corresponding test case template is called, the element parameter in the testing requirement document is then obtained again, is integrated to The test case template is to automatically generate test case, to simply and rapidly generate test case, and can effectively reduce out Error rate.
Firstly, to achieve the above object, the present invention provides a kind of application interface method for generating test case, this method application In testing service device, which comprises
The test assignment request that user sends is received, and the testing requirement text for the correspondence test assignment request uploaded Shelves;The test case for corresponding to the test object is called according to the content of the test object field in the testing requirement document Template;And obtain the element parameter of the element parameter field in the testing requirement document;By the test template combination institute Element parameter is stated to generate test case.
Optionally, the test object includes windows units and field unit;Wherein, the windows units include: window Field in size, the window's position, pop-up mode, embedded window and window;The field unit includes: text information, field sample Formula, display mode and field location.
Optionally, after " receive test assignment request corresponding testing requirement document " the step of, comprising steps of The testing requirement document is verified according to preset testing requirement document format;When the testing requirement document is not met When the document format, the prompt for uploading testing requirement document again is sent.
Optionally, the step of described " test template is generated into test case in conjunction with the element parameter ", tool Body includes: the default position for searching the element parameter of the test case template;Each element parameter is filled into described Corresponding element parameter default position is in test case template to form complete test case.
In addition, to achieve the above object, the present invention also provides a kind of application interface Test cases technology device, described devices Include:
Receiving module, the test assignment for receiving user's transmission is requested, and the correspondence test assignment uploaded is asked The testing requirement document asked;Calling module, for being called according to the content of the test object field in the testing requirement document Test case template corresponding to the test object;Module is obtained, for obtaining the ginseng of the element in the testing requirement document The element parameter of number field;Generation module, for the test template to be generated test case in conjunction with the element parameter.
Optionally, the test object includes windows units and field unit;Wherein, the windows units include: window Field in size, the window's position, pop-up mode, embedded window and window;The field unit includes: text information, field sample Formula, display mode and field location.
Optionally, described device further include: correction verification module is also used to according to preset testing requirement document format to described Testing requirement document is verified;When the testing requirement document does not meet the document format, test is uploaded in transmission again The prompt of requirement documents.
Optionally, the generation module, is also used to: searching the default position of the element parameter of the test case template; It is complete to be formed that each element parameter is filled into corresponding element parameter default position in the test case template Test case.
Further, the present invention also proposes that a kind of server, the server include memory, processor, the storage The application interface test case generator that can be run on the processor, the application interface test case are stored on device It generates when program is executed by the processor and realizes such as the step of above-mentioned application interface method for generating test case.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers Readable storage medium storing program for executing is stored with application interface test case generator, and the application interface test case generator can be by extremely A few processor executes, so that at least one described processor is executed such as above-mentioned application interface method for generating test case Step.
Compared to the prior art, application interface method for generating test case, device, server and meter proposed by the invention Calculation machine readable storage medium storing program for executing can obtain the test in the testing requirement document after the testing requirement document received Object type simultaneously calls corresponding test case template, then obtains the element parameter in the testing requirement document again, in conjunction with To the test case template to automatically generate test case, to simply and rapidly generate test case, and can effectively reduce Error rate.
Detailed description of the invention
Fig. 1 is the schematic diagram of the optional hardware structure of server one of the present invention;
Fig. 2 is the program module schematic diagram of one embodiment of application interface test case generator of the present invention;
Fig. 3 is the flow diagram of one embodiment of application interface method for generating test case of the present invention.
Appended drawing reference:
The object of the invention is realized, the embodiments will be further described with reference to the accompanying drawings for functional characteristics and advantage.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
As shown in fig.1, being the schematic diagram of the optional hardware structure of testing service device 1 one of the present invention.
The testing service device 1 can be rack-mount server, blade server, tower server or cabinet-type service Device etc. calculates equipment, which can be independent testing service device, be also possible to multiple testing service devices and formed Testing service device cluster.
In the present embodiment, the testing service device 1 may include, but be not limited only to, and company can be in communication with each other by system bus Connect memory 11, processor 12, network interface 13.
The testing service device 1 connects network (Fig. 1 is not marked) by network interface 13, passes through network connection to other clothes Business device or terminal such as database server or the end PC etc..The network can be intranet (Intranet), internet (Internet), global system for mobile communications (Global System of Mobile communication, GSM), broadband code Divide multiple access (Wideband Code Division Multiple Access, WCDMA), 4G network, 5G network, bluetooth (Bluetooth), the wirelessly or non-wirelessly network such as Wi-Fi, speech path network.
It should be pointed out that Fig. 1 illustrates only the testing service device 1 with component 11-13, it should be understood that simultaneously All components shown realistic are not applied, the implementation that can be substituted is more or less component.
Wherein, the memory 11 includes at least a type of readable storage medium storing program for executing, and the readable storage medium storing program for executing includes Flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), it is static with Machine accesses memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable Read memory (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 11 can be the survey Try the internal storage unit of server 1, such as the hard disk or memory of the testing service device 1.In further embodiments, described to deposit Reservoir 11 is also possible to the External memory equipment of the testing service device 1, such as the plug-in type that the testing service device 1 is equipped with is hard Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, the memory 11 can also both include the internal storage unit of the testing service device 1 or wrap Include its External memory equipment.In the present embodiment, the memory 11 is installed on the behaviour of the testing service device 1 commonly used in storage Make system and types of applications software, such as the program code of application interface test case generator 200 etc..In addition, described deposit Reservoir 11 can be also used for temporarily storing the Various types of data that has exported or will export.
The processor 12 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 12 is commonly used in the control survey The overall operation of server 1 is tried, such as executes data interaction or the relevant control of communication and processing etc..In the present embodiment, institute It states processor 12 and is used to run the program code stored in the memory 11 or processing data, such as run the application Interface detection use-case generates program 200 etc..
The network interface 13 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the testing service device 1 and other servers or terminal such as database server or the end PC.
In the present embodiment, when being installed in the testing service device 1 and run application interface test case generator 200 When, when the application interface test case generator 200 operation, the testing service device 1 can be in the test received After requirement documents, obtains the test object classification in the testing requirement document and call corresponding test case template, so It obtains the element parameter in the testing requirement document again afterwards, is integrated to the test case template to automatically generate test and use Example, to simply and rapidly generate test case, and can effectively reduce error rate.
So far, oneself is through describing the application environment of each embodiment of the present invention and the hardware configuration and function of relevant device in detail Energy.In the following, above-mentioned application environment and relevant device will be based on, each embodiment of the invention is proposed.
Firstly, the present invention proposes a kind of application interface test case generator 200.
As shown in fig.2, being the Program modual graph of 200 1 embodiment of application interface test case generator of the present invention.
In the present embodiment, the application interface test case generator 200 is stored in memory 11 including a series of On computer program instructions, when the computer program instructions by processor 12 execute when, various embodiments of the present invention may be implemented Application interface Test cases technology operation.In some embodiments, it is realized based on the computer program instructions each section Specific operation, application interface test case generator 200 can be divided into one or more modules.For example, in Fig. 2 In, the application interface test case generator 200 can be divided into receiving module 201, correction verification module 202, call mould Block 203 obtains module 204 and generation module 205.Wherein:
The receiving module 201, for receiving the test assignment request of user's transmission, and the correspondence test uploaded The testing requirement document of task requests.
Specifically, it is defeated can directly to receive user by the interactive interface of the testing service device 1 for the receiving module 201 The test assignment request entered.Alternatively, when other terminals such as end PC that user is connected by the testing service device 1 makes requests letter When breath input, the receiving module 201 then can receive the test assignment request for being obtained and being sended over by the end PC.Its In, it, can also be by the corresponding software version of the test assignment while user sends test assignment request to the testing service device 1 This and testing requirement file upload are to the testing service device 1.In the present embodiment, the receiving module 201 receives user The corresponding testing requirement document of the test assignment is inputted, the testing requirement document includes at least test object and element is joined Number.For example, for the test assignment of mobile phone application interface, then the test object of the testing requirement document include windows units and Field unit.Wherein, the windows units include: window size, the window's position, pop-up mode, embed word in window and window Section;The field unit includes: text information, field pattern, display mode and field location.
The correction verification module 202, for being carried out according to preset testing requirement document format to the testing requirement document Verification.
Specifically, after the receiving module 201 receives the testing requirement document, the correction verification module 202 is then Can the testing requirement document is verified according to preset testing requirement document format, and the testing requirement document not When meeting the document format, the prompt for uploading testing requirement document again is sent.
Since the testing service device 1 is required to according to the content and test case template life in testing requirement document At test case, therefore, it is necessary to preset being associated between the format content of testing requirement document and test case template System.In the present embodiment, testing requirement document includes test object type, and the corresponding various elements with test object type Parameter, therefore, the server 1, which only has, is associated it with test case template for the field in testing requirement document in advance Afterwards, subsequent will to be written to corresponding test case mould with the element parameter for corresponding to test object in the testing requirement document To automatically generate test case in plate.
In the present embodiment, for example, the testing requirement document is Excel form, include in the Excel table The field of row, column.Therefore every a line can be set in advance as accordingly to be associated with a test case template, wherein every a line The fields of different lines be set as corresponding to different meanings, such as: the 1st column indicate test serial number;2nd column indicate test object class Not (such as windows units or field unit);3-7 column indicate the element parameter in windows units, such as are corresponding in turn to window (for example window size includes size to the element parameter of field in size, the window's position, pop-up mode, embedded window and window;Window Mouth position includes coordinate position;Pop-up mode includes common pop-up and orientation pop-up;Embedded window includes number and coordinate position; Window field includes coordinate position);8-11 column indicate the element parameter in field unit, such as are corresponding in turn to text information, (for example text information includes character string information to the element parameter of field pattern, display mode and field location;Field pattern includes Font;Display mode indicates Dynamically Announce and static status display;Field location includes coordinate position);Wherein, when test object type When for windows units, the corresponding field of element parameter in field unit be then it is unavailable, when test object type is field list When first, the corresponding field of element parameter in windows units is then unavailable.
In other embodiments, it can be set as sequence number with the 1st column of every a line, the serial number includes number and word Mother, wherein digital representation serial number, letter indicate test object classification, such as: " 1 " represents serial number in sequence number 1A, and " A ", which is represented, to be surveyed Examination object type is windows units;" 2 " represent serial number in sequence number 2B, and " B " represents test object classification as field unit.Then For test object be windows units row, 2-6 column indicate windows units in element parameter, be corresponding in turn to window size, The element parameter of field in the window's position, pop-up mode, embedded window and window;It and is field unit for test object Row, 2-5 column indicate the element parameter in field unit, are corresponding in turn to text information, field pattern, display mode and field bit The element parameter set.In other embodiments, it is other fixed content in the field in the testing requirement can also to be carried out Justice, here with no restrictions.
Therefore, after receiving module 201 receives the testing requirement document that user uploads, the correction verification module 202 then into One step verifies the received testing requirement document according to the format of preset testing requirement document;When the test needs It when document being asked to meet the format, then prompts such as: " just a moment,please, next will generate test case ";When the testing requirement text When shelves do not meet preset format, then it will do it miscue such as: " requirement documents format is wrong, uploads again after PLSCONFM ".
Certainly, miscue specifically which column in testing requirement document can also be judged according to preset requirement documents format Filling in for position is wrong, so that user be prompted to carry out corresponding modification.Such as: in preset testing requirement document format, every a line 1st column indicate test serial number;2nd column indicate test object classification (such as windows units or field unit);3-7 column indicate Element parameter in windows units, such as be corresponding in turn to window size, the window's position, pop-up mode, embed in window and window The element parameter of field;8-11 column indicate the element parameter in field unit, such as are corresponding in turn to text information, field sample The element parameter of formula, display mode and field location.Then in testing requirement document, the 2nd column not fill in " windows units " or When person's " field unit ", then carries out miscue and such as " please fill in ' windows units ' or ' field unit ' in the 2nd column ";As 3- 7 column not fill in window size, the window's position, pop-up mode, the element parameter or 8- for embedding field in window and window 11 column not fill in text information, field pattern, the element parameter of display mode and field location, and either rank fills in mistake and can Carry out miscue such as " ' windows units ' corresponding element parameter please be fill in ".
The calling module 203, for according to the content of the test object field in testing requirement document calling pair The test case template of test object described in Ying Yu.
Specifically, after the correction verification module 202 is verified and passed through to the testing requirement document, the calling Then the test case template according to associated by the test object field in the testing requirement document transfers corresponding element to module 203 Test case template.
In the present embodiment, such as: mobile phone application interface test in, test object mainly include constitute application interface window The field unit shown in mouth unit and window, and windows units or field unit are all to be made of respectively corresponding element, Such as: the member that windows units include is known as: field etc. in window size, the window's position, pop-up mode, embedded window and window; The member that field unit includes is known as: text information, field pattern, display mode and field location etc..It therefore, can be according to window Element corresponding to unit and field unit presets corresponding test case template.In the present embodiment, correspond to window Unit can preset window size test case template, the window's position test case template, pop-up mode test case mould Field test case template in plate, embedded window test case template and window;Corresponding to field unit, text can be preset This information test case template, field pattern test case template, display mode test case template and field location test are used Example template.Therefore, the server 1 presets the field in the test document closes with the test case template Connection, then the calling module 203 can be called and be corresponded to according to the content in the field of the testing requirement document by verification Test case template.
Certainly, the test structure that test case template is arranged just for windows units or field unit, is only being surveyed Element parameter corresponding to the corresponding test object is written in example template on probation could be used as category test template later The test case of the corresponding test object.
The acquisition module 204, for obtaining the element parameter of the element parameter field in the testing requirement document.
Specifically, in the calling module 203 according to the content tune of the test object field in the testing requirement document After corresponding to the test case template of the test object, the acquisition module 204 is then further according to the test need The format convention of document is asked to obtain the element parameter of element parameter field in the testing requirement document.
The generation module 205, for the test template to be generated test case in conjunction with the element parameter.
Specifically, in the present embodiment, the generation module 205 first searches the survey that the calling module 203 calls Then the acquisition module 204 each of is got the element parameter by the default position of the element parameter of example template on probation Corresponding element parameter default position in the test case template is filled into form complete test case.
For example, content tune of the calling module 203 according to the test object classification of the 2nd column in the testing requirement document With the test case module for indicating windows units, then the acquisition module 204 is further according to the testing requirement document Obtaining 3-7 column indicates the element parameter of windows units: window size, pop-up mode, embeds in window and window the window's position Field.Then the element parameter that the generation module 205 is searched in the test case module of the windows units of the calling is default Content is not inconsistent, and finally distinguishes the element parameter of field in window size, the window's position, pop-up mode, embedded window and window Corresponding element parameter default position in the test case template is filled into form complete test case.
It will be recalled from above that the testing service device 1 can obtain the test after the testing requirement document received Test object classification in requirement documents simultaneously calls corresponding test case template, then obtains again in the testing requirement document Element parameter, be integrated to the test case template to automatically generate test case, thus simply and rapidly generate test use Example, and error rate can be effectively reduced.
Certainly, in other embodiments, the application interface test case generator 200 also can be set into one and answer With interface detection use-case generating means, which includes all program moulds of the application interface test case generator 200 The one-to-one functional module of block.The application interface Test cases technology device can be used as independent functional unit and be attached to survey It tries on server, in order to which when executing application interface test assignment, document automatically generates test case according to demand.
In addition, the present invention also proposes a kind of application interface method for generating test case, the method is applied to testing service Device.
As shown in fig.3, being the flow diagram of one embodiment of application interface method for generating test case of the present invention.At this In embodiment, the execution sequence of the step in flow chart shown in Fig. 3 be can change according to different requirements, and certain steps can To omit.
Step S500 receives the test assignment request that user sends, and the correspondence test assignment request uploaded Testing requirement document.
Specifically, the testing service device directly receives the test assignment request of user's input by interactive interface, alternatively, When for example the end PC makes requests information input to other terminals that user is connected by the testing service device, the testing service device It then can receive the test assignment request for being obtained and being sended over by the end PC.Wherein, user is to the testing service device While sending test assignment request, the corresponding software version of the test assignment and testing requirement file upload can also be arrived The testing service device.In the present embodiment, the testing service device receives user and inputs the corresponding test of the test assignment Requirement documents, the testing requirement document include at least test object and element parameter.For example, the survey for mobile phone application interface Trial business, then the test object of the testing requirement document includes windows units and field unit.Wherein, the windows units packet It includes: field in window size, the window's position, pop-up mode, embedded window and window;The field unit includes: text information, Field pattern, display mode and field location.
Step S502 verifies the testing requirement document according to preset testing requirement document format.
Specifically, after receiving the testing requirement document, the testing service device can also be according to preset test Requirement documents format verifies the testing requirement document, and does not meet the document format in the testing requirement document When, send the prompt for uploading testing requirement document again.
Since the testing service device is required to according to the content and test case template life in testing requirement document At test case, therefore, it is necessary to preset being associated between the format content of testing requirement document and test case template System.In the present embodiment, testing requirement document includes test object type, and the corresponding various elements with test object type Parameter, therefore, after the field in testing requirement document is only associated by the server with test case template in advance, It is subsequent will to be written to corresponding test case template with the element parameter for corresponding to test object in the testing requirement document In to automatically generating test case.
In the present embodiment, for example, the testing requirement document is Excel form, include in the Excel table The field of row, column.Therefore every a line can be set in advance as accordingly to be associated with a test case template, wherein every a line The fields of different lines be set as corresponding to different meanings, such as: the 1st column indicate test serial number;2nd column indicate test object class Not (such as windows units or field unit);3-7 column indicate the element parameter in windows units, such as are corresponding in turn to window (for example window size includes size to the element parameter of field in size, the window's position, pop-up mode, embedded window and window;Window Mouth position includes coordinate position;Pop-up mode includes common pop-up and orientation pop-up;Embedded window includes number and coordinate position; Window field includes coordinate position);8-11 column indicate the element parameter in field unit, such as are corresponding in turn to text information, (for example text information includes character string information to the element parameter of field pattern, display mode and field location;Field pattern includes Font;Display mode indicates Dynamically Announce and static status display;Field location includes coordinate position);Wherein, when test object type When for windows units, the corresponding field of element parameter in field unit be then it is unavailable, when test object type is field list When first, the corresponding field of element parameter in windows units is then unavailable.
In other embodiments, it can be set as sequence number with the 1st column of every a line, the serial number includes number and word Mother, wherein digital representation serial number, letter indicate test object classification, such as: " 1 " represents serial number in sequence number 1A, and " A ", which is represented, to be surveyed Examination object type is windows units;" 2 " represent serial number in sequence number 2B, and " B " represents test object classification as field unit.Then For test object be windows units row, 2-6 column indicate windows units in element parameter, be corresponding in turn to window size, The element parameter of field in the window's position, pop-up mode, embedded window and window;It and is field unit for test object Row, 2-5 column indicate the element parameter in field unit, are corresponding in turn to text information, field pattern, display mode and field bit The element parameter set.In other embodiments, it is other fixed content in the field in the testing requirement can also to be carried out Justice, here with no restrictions.
Therefore, after receiving the testing requirement document that user uploads, then further according to preset testing requirement document Format the received testing requirement document is verified;When the testing requirement document meets the format, then mention Show such as: " just a moment,please, next will generate test case ";It, then can be into when the testing requirement document does not meet preset format Row miscue is such as: " requirement documents format is wrong, uploads again after PLSCONFM ".
Certainly, miscue specifically which column in testing requirement document can also be judged according to preset requirement documents format Filling in for position is wrong, so that user be prompted to carry out corresponding modification.Such as: in preset testing requirement document format, every a line 1st column indicate test serial number;2nd column indicate test object classification (such as windows units or field unit);3-7 column indicate Element parameter in windows units, such as be corresponding in turn to window size, the window's position, pop-up mode, embed in window and window The element parameter of field;8-11 column indicate the element parameter in field unit, such as are corresponding in turn to text information, field sample The element parameter of formula, display mode and field location.Then in testing requirement document, the 2nd column not fill in " windows units " or When person's " field unit ", then carries out miscue and such as " please fill in ' windows units ' or ' field unit ' in the 2nd column ";As 3- 7 column not fill in window size, the window's position, pop-up mode, the element parameter or 8- for embedding field in window and window 11 column not fill in text information, field pattern, the element parameter of display mode and field location, and either rank fills in mistake and can Carry out miscue such as " ' windows units ' corresponding element parameter please be fill in ".
Step S504 is called according to the content of the test object field in the testing requirement document and is corresponded to the test The test case template of object.
Specifically, after the testing requirement document is verified and passed through, the testing service device is then according to institute State the test case template that test case template associated by the test object field in testing requirement document transfers corresponding element.
In the present embodiment, such as: mobile phone application interface test in, test object mainly include constitute application interface window The field unit shown in mouth unit and window, and windows units or field unit are all to be made of respectively corresponding element, Such as: the member that windows units include is known as: field etc. in window size, the window's position, pop-up mode, embedded window and window; The member that field unit includes is known as: text information, field pattern, display mode and field location etc..It therefore, can be according to window Element corresponding to unit and field unit presets corresponding test case template.In the present embodiment, correspond to window Unit can preset window size test case template, the window's position test case template, pop-up mode test case mould Field test case template in plate, embedded window test case template and window;Corresponding to field unit, text can be preset This information test case template, field pattern test case template, display mode test case template and field location test are used Example template.Therefore, the server 1 presets the field in the test document closes with the test case template Connection, then the calling module 203 can be called and be corresponded to according to the content in the field of the testing requirement document by verification Test case template.
Certainly, the test structure that test case template is arranged just for windows units or field unit, is only being surveyed Element parameter corresponding to the corresponding test object is written in example template on probation could be used as category test template later The test case of the corresponding test object.
Step S506 obtains the element parameter of the element parameter field in the testing requirement document.
Specifically, it calls according to the content of the test object field in the testing requirement document corresponding to the test After the test case template of object, also the test need further can be obtained according to the format convention of the testing requirement document Seek the element parameter of element parameter field in document.
The test template is generated test case in conjunction with the element parameter by step S508.
Specifically, in the present embodiment, the test case that testing service device elder generation finding step S504 is called Then step S506 each of is got the element parameter and is filled into the test by the default position of the element parameter of template Corresponding element parameter default position is in use-case template to form complete test case.
For example, step S504 has invoked table according to the content of the test object classification of the 2nd column in the testing requirement document Show the test case module of windows units, then step S506 further obtains 3-7 list according to the testing requirement document Show the element parameter of windows units: field in window size, the window's position, pop-up mode, embedded window and window.Then step S508 searches the element parameter default contents in the test case module of the windows units of the calling and is not inconsistent, finally that window is big The element parameter of field is filled into the test case template respectively in small, the window's position, pop-up mode, embedded window and window In corresponding element parameter default position to forming complete test case.
The application interface method for generating test case that the present embodiment is proposed, can the testing requirement document received it Afterwards, it obtains the test object classification in the testing requirement document and calls corresponding test case template, then obtain institute again The element parameter in testing requirement document is stated, is integrated to the test case template to automatically generate test case, thus simply, It is quickly generated test case, and error rate can be effectively reduced.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of application interface method for generating test case is applied to testing service device, which is characterized in that the method includes steps It is rapid:
The test assignment request that user sends is received, and the testing requirement document for the correspondence test assignment request uploaded;
The test for corresponding to the test object is called to use according to the content of the test object field in the testing requirement document Example template;And
Obtain the element parameter of the element parameter field in the testing requirement document;
The test template is generated into test case in conjunction with the element parameter.
2. application interface method for generating test case as described in claim 1, which is characterized in that the test object includes window Mouth unit and field unit;Wherein, the windows units include: window size, the window's position, pop-up mode, embedded window and Field in window;The field unit includes: text information, field pattern, display mode and field location.
3. application interface method for generating test case as described in claim 1, which is characterized in that " receive test to appoint described After the step of corresponding testing requirement document of business request ", comprising steps of
The testing requirement document is verified according to preset testing requirement document format;
When the testing requirement document does not meet the document format, the prompt for uploading testing requirement document again is sent.
4. application interface method for generating test case as described in any one of claims 1-3, which is characterized in that described " by institute Test template is stated in conjunction with the element parameter to generate test case " the step of, it specifically includes:
Search the default position of the element parameter of the test case template;
Each element parameter is filled into corresponding element parameter default position in the test case template to be formed Complete test case.
5. a kind of application interface Test cases technology device, which is characterized in that described device includes:
Receiving module, the test assignment for receiving user's transmission are requested, and the correspondence the uploaded test assignment request Testing requirement document;
Calling module corresponds to the test for calling according to the content of the test object field in the testing requirement document The test case template of object;
Module is obtained, for obtaining the element parameter of the element parameter field in the testing requirement document;
Generation module, for the test template to be generated test case in conjunction with the element parameter.
6. application interface Test cases technology device as claimed in claim 5, which is characterized in that the test object includes window Mouth unit and field unit;Wherein, the windows units include: window size, the window's position, pop-up mode, embedded window and Field in window;The field unit includes: text information, field pattern, display mode and field location.
7. application interface Test cases technology device as claimed in claim 5, which is characterized in that described device further include:
Correction verification module is also used to verify the testing requirement document according to preset testing requirement document format;Work as institute When stating testing requirement document and not meeting the document format, the prompt for uploading testing requirement document again is sent.
8. such as the described in any item application interface Test cases technology devices of claim 5-7, which is characterized in that the generation mould Block is also used to:
Search the default position of the element parameter of the test case template;
Each element parameter is filled into corresponding element parameter default position in the test case template to be formed Complete test case.
9. a kind of testing service device, which is characterized in that the testing service device includes memory, processor, on the memory It is stored with the application interface test case generator that can be run on the processor, the application interface Test cases technology Program realizes application interface method for generating test case according to any one of claims 1-4 when being executed by the processor Step.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has application interface Test case generator, the application interface test case generator can be executed by least one processor, so that described At least one processor is executed such as the step of application interface method for generating test case of any of claims 1-4.
CN201811530816.XA 2018-12-14 2018-12-14 Application interface method for generating test case and server Pending CN109800149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811530816.XA CN109800149A (en) 2018-12-14 2018-12-14 Application interface method for generating test case and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811530816.XA CN109800149A (en) 2018-12-14 2018-12-14 Application interface method for generating test case and server

Publications (1)

Publication Number Publication Date
CN109800149A true CN109800149A (en) 2019-05-24

Family

ID=66556624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811530816.XA Pending CN109800149A (en) 2018-12-14 2018-12-14 Application interface method for generating test case and server

Country Status (1)

Country Link
CN (1) CN109800149A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704317A (en) * 2019-09-26 2020-01-17 凡普数字技术有限公司 Method, device and storage medium for testing parameter rule of interface parameter
CN112181835A (en) * 2020-09-29 2021-01-05 中国平安人寿保险股份有限公司 Automatic testing method and device, computer equipment and storage medium
CN112416746A (en) * 2020-01-21 2021-02-26 上海哔哩哔哩科技有限公司 Test case generation method, device, equipment and medium
CN112579466A (en) * 2020-12-25 2021-03-30 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN112597034A (en) * 2020-12-25 2021-04-02 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN112667494A (en) * 2020-12-08 2021-04-16 上海纳恩汽车技术股份有限公司 Automobile UDS automatic testing method and system based on configuration table and storage medium
CN113032275A (en) * 2021-04-08 2021-06-25 平安国际智慧城市科技股份有限公司 Method and device for testing field, electronic equipment and storage medium
CN112579466B (en) * 2020-12-25 2024-06-07 深圳证券交易所 Method and device for generating test cases and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829574A (en) * 2018-04-13 2018-11-16 深圳壹账通智能科技有限公司 Test data laying method, testing service device and computer readable storage medium
CN108920382A (en) * 2018-07-31 2018-11-30 惠州市德赛西威汽车电子股份有限公司 Method for generating test case, device, storage medium and server

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829574A (en) * 2018-04-13 2018-11-16 深圳壹账通智能科技有限公司 Test data laying method, testing service device and computer readable storage medium
CN108920382A (en) * 2018-07-31 2018-11-30 惠州市德赛西威汽车电子股份有限公司 Method for generating test case, device, storage medium and server

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704317A (en) * 2019-09-26 2020-01-17 凡普数字技术有限公司 Method, device and storage medium for testing parameter rule of interface parameter
CN112416746A (en) * 2020-01-21 2021-02-26 上海哔哩哔哩科技有限公司 Test case generation method, device, equipment and medium
CN112181835A (en) * 2020-09-29 2021-01-05 中国平安人寿保险股份有限公司 Automatic testing method and device, computer equipment and storage medium
CN112181835B (en) * 2020-09-29 2024-04-26 中国平安人寿保险股份有限公司 Automatic test method, device, computer equipment and storage medium
CN112667494A (en) * 2020-12-08 2021-04-16 上海纳恩汽车技术股份有限公司 Automobile UDS automatic testing method and system based on configuration table and storage medium
CN112579466A (en) * 2020-12-25 2021-03-30 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN112597034A (en) * 2020-12-25 2021-04-02 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN112579466B (en) * 2020-12-25 2024-06-07 深圳证券交易所 Method and device for generating test cases and computer readable storage medium
CN113032275A (en) * 2021-04-08 2021-06-25 平安国际智慧城市科技股份有限公司 Method and device for testing field, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109800149A (en) Application interface method for generating test case and server
CN107766940B (en) Method and apparatus for generating a model
EP2799995A1 (en) Information interaction test device and method based on automatic generation of associated test cases
CN109474578A (en) Message method of calibration, device, computer equipment and storage medium
CN108133007A (en) A kind of method of data synchronization and system
CN110413269A (en) Interface coding method, server and computer readable storage medium
CN108462760A (en) Electronic device, cluster access domain name automatic generation method and storage medium
CN107911401A (en) Application plug-in expansion function methods and application server
CN109165266A (en) List generation method, device, computer equipment and storage medium
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN108255513A (en) Electronic device, the data-interface based on springmvc and its illustrate automatic generation method and storage medium
CN110287098A (en) Automatically create test script method, server and computer readable storage medium
CN110083526A (en) Applied program testing method, device, computer installation and storage medium
CN109857404A (en) The packaging method and device of SDK interface, storage medium, electronic equipment
CN109800594A (en) Document access authority management method, device and computer equipment
CN108449313A (en) Electronic device, Internet service system method for prewarning risk and storage medium
CN111352851A (en) Program testing method and device, computer equipment and storage medium
CN108306921A (en) Call external service method and application server
CN106873970A (en) The installation method and device of a kind of operating system
CN107798064A (en) Page processing method, electronic equipment and computer-readable recording medium
CN113626223A (en) Interface calling method and device
CN114465937B (en) Network card testing method, device, server and medium
CN108170551A (en) Front and back end error handling method, server and storage medium based on crawler system
CN110503089A (en) OCR identification model training method, device and computer equipment based on crowdsourcing technology
CN110806979B (en) Interface return value checking method, device, equipment and storage medium

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