CN110134612A - UI test data generating method, device, equipment and readable storage medium storing program for executing - Google Patents

UI test data generating method, device, equipment and readable storage medium storing program for executing Download PDF

Info

Publication number
CN110134612A
CN110134612A CN201910421677.5A CN201910421677A CN110134612A CN 110134612 A CN110134612 A CN 110134612A CN 201910421677 A CN201910421677 A CN 201910421677A CN 110134612 A CN110134612 A CN 110134612A
Authority
CN
China
Prior art keywords
case
test
variable name
interface testing
testing use
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
CN201910421677.5A
Other languages
Chinese (zh)
Inventor
骆春光
王惠惠
曾庆熙
曾波
晋晓峰
李晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201910421677.5A priority Critical patent/CN110134612A/en
Publication of CN110134612A publication Critical patent/CN110134612A/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

Abstract

The invention discloses a kind of UI test data generating method, device, equipment and readable storage medium storing program for executing, method includes the following steps: executing when executing instruction of UI test case receiving, the mark with the interface testing use-case of the mark phase mapping of the UI test case is obtained according to default mapping relations;The mark of the interface testing use-case is sent to server so that the server executes the interface testing use-case, and feeds back the first variate-value corresponding with the first variable name of the interface testing use-case;The second variate-value corresponding with the second variable name of the UI test case is obtained according to the first variable name of the interface testing use-case and the first variate-value, using the second variable name of the UI test case and corresponding second variate-value as test data.The present invention realizes the whole process automation of UI test case execution, and then improves efficiency, accuracy and the maintainability of UI test.

Description

UI test data generating method, device, equipment and readable storage medium storing program for executing
Technical field
The present invention relates to field of artificial intelligence more particularly to a kind of UI test data generating method, device, equipment and Readable storage medium storing program for executing.
Background technique
With the development of computer technology, more and more technology (big data, distribution, block chain Blockchain, people Work intelligence etc.) it applies in financial field, traditional financial industry gradually changes to financial technology (Fintech), but due to finance The safety of industry, requirement of real-time, also to technology, more stringent requirements are proposed.
After the completion of application development, need to carry out UI (User Interface, user interface) to application program to survey Examination, to be found the problem according to test result and modified to application program in time and perfect.The application service of some large sizes It can be related to the external interface of multiple third party softwares in project software exploitation to realize the data interaction with different business systems, because This, generally requires to carry out interface testing when carrying out UI test.
In existing UI testing process, need manually to select interface testing use-case corresponding with UI test case, it is whole A test case is managed not over configuration mapping, only relies on the business experience of tester, and test case is maintainable Difference may not know quickly to go which interface testing executed if new tester needs to prepare data again Use-case is to prepare data.Moreover, the data returned after the completion of executing for interface testing use-case, need manually to use needs Variate-value be filled up in UI test case, can not accomplish full-range automation, cause in a large amount of use-case compiling procedure In be easy error, test case execution efficiency is low.
Summary of the invention
The main purpose of the present invention is to provide a kind of UI test data generating method, device, equipment and readable storage mediums Matter, it is intended to realize the efficiency and accuracy for automating by whole process and promoting UI test.
To achieve the above object, the present invention provides a kind of UI test data generating method, the Test data generation side UI Method the following steps are included:
When executing instruction of UI test case is executed receiving, is obtained according to default mapping relations and is used with UI test The mark of the interface testing use-case of the mark phase mapping of example;
The mark of the interface testing use-case is sent to server to use so that the server executes the interface testing Example, and feed back the first variate-value corresponding with the first variable name of the interface testing use-case;
The with the UI test case is obtained according to the first variable name of the interface testing use-case and the first variate-value Corresponding second variate-value of two variable names, using the second variable name of the UI test case and corresponding second variate-value as survey Try data.
Optionally, it is described receiving execute when executing instruction of UI test case, according to default mapping relations obtain with Before the step of mark of the interface testing use-case of the mark phase mapping of the UI test case, further includes:
When receiving mapping relations setting instruction, the UI test case that the mapping relations setting instruction carries is obtained The mark of mark and interface testing use-case;
The mark of the UI test case is associated with the mark of the interface testing use-case and saves as default mapping relations.
Optionally, the mark by the UI test case be associated with the mark of the interface testing use-case save as it is pre- If after the step of mapping relations, further includes:
When receiving variable name inquiry instruction, the first variable name of the interface testing use-case is obtained, and by described One variable name is shown in current page, so that tester checks;
When receiving variable name setting instruction, the variable name that instruction carries is arranged in the variable name and is set as the UI Second variable name of test case, first variable name include second variable name.
Optionally, described obtained according to the first variable name of the interface testing use-case and the first variate-value is surveyed with the UI The step of second variable name of example on probation corresponding second variate-value includes:
By the first variable name of the interface testing use-case and the first variate-value associated storage to variable pond;
It is extracted from the variable pond according to the second variable name of the UI test case corresponding to second variable name The second variate-value.
Optionally, described using the second variable name of the UI test case and corresponding second variate-value as test data The step of after, further includes:
Functional verification is carried out to user interface according to the test data.
Optionally, before described the step of carrying out functional verification to user interface according to the test data, further includes:
Judge whether the numerical value of the test data exceeds preset range;
If the numerical value of the test data is thened follow the steps without departing from preset range: according to the test data to user Interface carries out functional verification.
Optionally, it is described receiving execute when executing instruction of UI test case, according to default mapping relations obtain with After the step of mark of the interface testing use-case of the mark phase mapping of the UI test case, further includes:
If it is getting be greater than with the interface testing use-case of the mark phase mapping of UI test case mark quantity or Person is equal to 1, thens follow the steps: the mark of the interface testing use-case is sent to server for described in server execution Interface testing use-case, and feed back the first variate-value corresponding with the first variable name of the interface testing use-case.
Further, to achieve the above object, the present invention also provides a kind of UI Test data generation device, the UI tests Data generating device includes:
Identifier acquisition module, for receiving when executing instruction of UI test case of execution, according to default mapping relations Obtain the mark with the interface testing use-case of the mark phase mapping of the UI test case;
Sending module is identified, for the mark of the interface testing use-case to be sent to server so that the server is held The row interface testing use-case, and feed back the first variate-value corresponding with the first variable name of the interface testing use-case;
Data acquisition module, for according to the first variable name of the interface testing use-case and the acquisition of the first variate-value and institute Corresponding second variate-value of the second variable name for stating UI test case, by the second variable name of the UI test case and accordingly Second variate-value is as test data.
Further, to achieve the above object, the present invention also provides a kind of UI Test data generation equipment, the UI tests Data generating apparatus includes memory, processor and is stored in the UI that can be run on the memory and on the processor Test data generator, the UI test data generator realize that UI as described above is surveyed when being executed by the processor The step of trying data creation method.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers UI test data generator is stored on readable storage medium storing program for executing, it is real when the UI test data generator is executed by processor Now the step of UI test data generating method as described above.
The present invention is by receiving when executing instruction of UI test case of execution, according to the acquisition of default mapping relations and institute State the mark of the interface testing use-case of the mark phase mapping of UI test case;The mark of the interface testing use-case is sent to clothes Device be engaged in so that the server executes the interface testing use-case, and feeds back the first variable famous prime minister with the interface testing use-case The first variate-value answered;It is obtained according to the first variable name of the interface testing use-case and the first variate-value and is used with UI test Corresponding second variate-value of the second variable name of example, by the second variable name of the UI test case and corresponding second variate-value As test data.It realizes to execute automatically by UI test case and the default mapping relations of interface testing use-case and be tested with UI The corresponding interface testing use-case of use-case, and UI test case will be obtained from the result data for executing interface testing use-case automatically Test data to realize the whole process automation of UI test case execution, and then improves the efficiency of UI test, accuracy And maintainability.
Detailed description of the invention
Fig. 1 is that the structure for the device hardware running environment that UI Test data generation apparatus embodiments scheme of the present invention is related to is shown It is intended to;
Fig. 2 is the flow diagram of UI test data generating method first embodiment of the present invention;
Fig. 3 is the functional block diagram of UI Test data generation device of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
It should be noted that needing manually to select connect corresponding with UI test case in existing UI testing process Mouth test case, entire test case are managed not over configuration mapping, only rely on the business experience of tester, are tested Use-case is maintainable poor, if new tester needs to prepare data again, may not know quickly will go to execute Which interface testing use-case is to prepare data.Moreover, the data returned after the completion of executing for interface testing use-case, need people The variate-value that work uses needs is filled up in UI test case, can not be accomplished full-range automation, be caused a large amount of Error is easy in use-case compiling procedure, test case execution efficiency is low.
Based on drawbacks described above, the present invention provides a kind of UI Test data generation equipment, and referring to Fig.1, Fig. 1 is UI of the present invention survey The structural schematic diagram for the device hardware running environment that examination data generating apparatus example scheme is related to.
As shown in Figure 1, the UI Test data generation equipment may include: processor 1001, such as CPU, communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 for realizing these components it Between connection communication.User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), Optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include Standard wireline interface and wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to steady Fixed memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of The storage equipment of aforementioned processor 1001.
It will be understood by those skilled in the art that the not structure of the hardware configuration of UI Test data generation equipment shown in Fig. 1 The restriction of pairs of UI Test data generation equipment may include components more more or fewer than diagram, or combine certain components, Or different component layout.
As shown in Figure 1, as may include operating system, net in a kind of memory 1005 of computer readable storage medium Network communication module, Subscriber Interface Module SIM and UI test data generator.Wherein, operating system is to manage and control UI test The program of data generating apparatus and software resource supports network communication module, Subscriber Interface Module SIM, UI test data generator And the operation of other programs or software;Network communication module is for managing and controlling network interface 1004;Subscriber Interface Module SIM For managing and controlling user interface 1003.
In UI Test data generation device hardware structure shown in Fig. 1, network interface 1004 is mainly used for connection backstage Server carries out data communication with background server;User interface 1003 is mainly used for connecting client (user terminal), with client End carries out data communication;Processor 1001 can call the UI test data generator stored in memory 1005, and execute It operates below:
When executing instruction of UI test case is executed receiving, is obtained according to default mapping relations and is used with UI test The mark of the interface testing use-case of the mark phase mapping of example;
The mark of the interface testing use-case is sent to server to use so that the server executes the interface testing Example, and feed back the first variate-value corresponding with the first variable name of the interface testing use-case;
The with the UI test case is obtained according to the first variable name of the interface testing use-case and the first variate-value Corresponding second variate-value of two variable names, using the second variable name of the UI test case and corresponding second variate-value as survey Try data.
Further, described to receive when executing instruction of UI test case of execution, it is obtained according to default mapping relations Before the step of the mark of the interface testing use-case of the mark phase mapping of the UI test case, processor 1001 is also used to adjust With the UI test data generator stored in memory 1005, and execute following operation:
When receiving mapping relations setting instruction, the UI test case that the mapping relations setting instruction carries is obtained The mark of mark and interface testing use-case;
The mark of the UI test case is associated with the mark of the interface testing use-case and saves as default mapping relations.
Further, described be associated with the mark of the UI test case with the mark of the interface testing use-case saves as After the step of default mapping relations, processor 1001 is also used to call the UI Test data generation journey stored in memory 1005 Sequence, and execute following operation:
When receiving variable name inquiry instruction, the first variable name of the interface testing use-case is obtained, and by described One variable name is shown in current page, so that tester checks;
When receiving variable name setting instruction, the variable name that instruction carries is arranged in the variable name and is set as the UI Second variable name of test case, first variable name include second variable name.
Further, described to be obtained and the UI according to the first variable name of the interface testing use-case and the first variate-value The step of second variable name of test case corresponding second variate-value includes:
By the first variable name of the interface testing use-case and the first variate-value associated storage to variable pond;
It is extracted from the variable pond according to the second variable name of the UI test case corresponding to second variable name The second variate-value.
Further, described using the second variable name of the UI test case and corresponding second variate-value as test number According to the step of after, processor 1001 is also used to call the UI test data generator stored in memory 1005, and executes It operates below:
Functional verification is carried out to user interface according to the test data.
Further, the characteristic parameter further includes decision critical value, it is described according to the test data to user interface Before the step of carrying out functional verification, processor 1001 is also used to call the UI Test data generation journey stored in memory 1005 Sequence, and execute following operation:
Judge whether the numerical value of the test data exceeds preset range;
If the numerical value of the test data without departing from preset range, execute according to the test data to user interface into Row functional verification.
Further, described to receive when executing instruction of UI test case of execution, it is obtained according to default mapping relations After the step of the mark of the interface testing use-case of the mark phase mapping of the UI test case, processor 1001 is also used to adjust With the UI test data generator stored in memory 1005, and execute following operation:
If it is getting be greater than with the interface testing use-case of the mark phase mapping of UI test case mark quantity or Person is equal to 1, then executes the mark of the interface testing use-case being sent to server so that the server executes the interface Test case, and feed back the first variate-value corresponding with the first variable name of the interface testing use-case.
The specific embodiment of UI Test data generation equipment of the present invention is respectively implemented with following UI test data generating methods Example is essentially identical, and details are not described herein.
The present invention also provides a kind of UI test data generating methods.
The embodiment of the invention provides the embodiments of UI test data generating method, it should be noted that although in process Logical order is shown in figure, but in some cases, it can be to be different from shown or described by sequence execution herein Step.
In each embodiment of UI test data generating method, for ease of description, omits executing subject and be illustrated Each embodiment.It is the flow diagram of UI test data generating method first embodiment of the present invention, the UI referring to Fig. 2, Fig. 2 Test data generating method includes:
Step S10, receiving execute when executing instruction of UI test case, according to default mapping relations obtain with it is described The mark of the interface testing use-case of the mark phase mapping of UI test case;
In existing UI testing process, need manually to select interface testing use-case corresponding with UI test case, it is whole A test case is managed not over configuration mapping, only relies on the business experience of tester, and test case is maintainable Difference may not know quickly to go which interface testing executed if new tester needs to prepare data again Use-case is to prepare data.Moreover, the data returned after the completion of executing for interface testing use-case, need manually to use needs Variate-value be filled up in UI test case, can not accomplish full-range automation, cause in a large amount of use-case compiling procedure In be easy error, test case execution efficiency is low.
It cannot unify the technical issues of configuring mapping management to solve prior art UI test case and interface testing use-case, It further include the setting steps to the mapping relations of UI test case and interface testing use-case before step S10 in the present embodiment, That is: when receiving mapping relations setting instruction, the mark for the UI test case that the mapping relations setting instruction carries is obtained With the mark of interface testing use-case;The mark of the UI test case is associated with the mark of the interface testing use-case and is saved as Default mapping relations.By the setting of the mapping relations to UI test case and interface testing use-case, make each UI test case There is corresponding interface testing use-case.Wherein, the quantity of the corresponding interface testing use-case of some UI test case can be 1 It is a or multiple.
When executing instruction of UI test case is executed receiving, obtains the mark of the UI test case for executing instruction carrying Know, the mark with the interface testing use-case of the mark phase mapping of the UI test case can be got further according to default mapping relations Know.Wherein, the generation executed instruction for executing UI test case, which can be, to be provided with by tester in default mapping relations Afterwards, it selects some UI test case to execute, generates and execute executing instruction for UI test case;It is also possible to tester and sets UI The test case execution time executes in batches, and when server detection reaches the default execution time, automatically generates execution UI test and uses Example executes instruction.The generation method that both the above executes instruction can select one implementation, can also combine implementation, this Embodiment is with no restrictions.
The mark of the interface testing use-case is sent to server for connecing described in server execution by step S20 Mouth test case, and feed back the first variate-value corresponding with the first variable name of the interface testing use-case;
In the complete entrance test phase of application development, the function and property to be achieved realized according to application program One group or multiple groups interface testing use-case can be designed, external interface can be called during runnable interface test case, to make Interface testing use-case can completely test independent operating in environment, build the server for executing interface testing use-case, The server analog external interface feedback data.
In the present embodiment, test machine is getting the mark with the interface testing use-case of the mark phase mapping of UI test case After knowledge, the interface testing use-case for carrying the mark of interface testing use-case is executed into request and is sent to server, server is connecing After receiving the interface testing use-case execution request, that is, the interface testing use-case can be performed, held in the interface testing use-case The corresponding variate-value of the exportable each variable of interface testing use-case, i.e. first with the interface testing use-case after the completion of row Corresponding first variate-value of variable name, and the first variate-value corresponding with the first variable name of the interface testing use-case is returned To test machine.Wherein, the variable name of interface testing use-case be by tester when writing interface testing use-case according to the interface The output setting of test case.
Step S30 is obtained according to the first variable name of the interface testing use-case and the first variate-value and is tested with the UI Corresponding second variate-value of second variable name of use-case, by the second variable name of the UI test case and corresponding second variable Value is used as test data.
In the present embodiment, the corresponding with the first variable name of the interface testing use-case of server return is being received After first variate-value, test machine extracts the second variable of UI test case from the first variable name and its corresponding first variate-value Corresponding second variate-value of name, using the second variable name of the UI test case and corresponding second variate-value as test number According to.
The present embodiment by receiving execute when executing instruction of UI test case, according to default mapping relations obtain with The mark of the interface testing use-case of the mark phase mapping of the UI test case;The mark of the interface testing use-case is sent to Server executes the interface testing use-case for the server, and feeds back the first variable name with the interface testing use-case Corresponding first variate-value;It is obtained according to the first variable name of the interface testing use-case and the first variate-value and is tested with the UI Corresponding second variate-value of second variable name of use-case, by the second variable name of the UI test case and corresponding second variable Value is used as test data.It realizes to execute automatically by UI test case and the default mapping relations of interface testing use-case and be surveyed with UI The corresponding interface testing use-case of example on probation, and UI test case will be obtained from the result data for executing interface testing use-case automatically Test data, to realize the whole process automation of UI test case execution, and then improve the efficiency, accurate of UI test Property and maintainability.
Further, it proposes UI test data generating method second embodiment of the present invention, is also wrapped before above-mentioned steps S10 It includes:
Step S11 obtains the UI that the mapping relations setting instruction carries and surveys when receiving mapping relations setting instruction The mark of example on probation and the mark of interface testing use-case;
In the present embodiment, before step S10 further include mapping relations to UI test case and interface testing use-case Setting steps, the factors such as function scene that tester is related to according to UI test case are that UI test case configuration is corresponding Interface testing use-case makes each UI test case have corresponding interface testing use-case.Wherein, some UI test case pair The quantity for the interface testing use-case answered can be 1 or multiple.
Step S12, the mark of the UI test case is associated with the mark of the interface testing use-case save as it is default Mapping relations.
Specifically, tester sends mapping relations setting instruction to test machine, and mapping relations setting instruction carries The factors such as the function scene that the mark of UI test case to be configured and tester are related to according to UI test case are UI survey Example on probation configures the mark of corresponding interface testing use-case, and test machine is getting UI test use from mapping relations setting instruction After the mark of example and the mark of interface testing use-case, the mark of UI test case is associated with preservation with the mark of interface testing use-case To preset mapping relations.
Further, after above-mentioned steps S12 further include:
Step S13 obtains the first variable name of the interface testing use-case when receiving variable name inquiry instruction, and First variable name is shown in current page, so that tester checks;
In the present embodiment, due to the variable that interface testing use-case has executed output may have it is multiple, for phase mapping UI test case may not need to obtain whole output variables of the interface testing use-case, but can be according to UI test case Function the variables of needs is selectively obtained from whole output variables of interface testing use-case.Therefore to UI test case After being provided with the mapping relations of interface testing use-case, the variable name to UI test case is also needed to be configured.
The variable name is arranged the variable name that instruction carries and is arranged by step S14 when receiving variable name setting instruction For the second variable name of the UI test case, first variable name includes second variable name.
Specifically, tester sends the variable name for carrying out variable name setting to the UI test case to test machine and inquires Instruction, when receiving variable name inquiry instruction, test machine obtains all changes of interface testing use-case when receiving the instruction Measure name, i.e. then the first variable name shows first variable name in current page, so that tester checks, tester Member can obtain the variable chosen and needed after checking the first variable name according to the function of UI test case from the first variable name Name, and the variable name for carrying variable name in need setting instruction is sent to test machine, test machine refers to variable name setting The variable name carried is enabled to be set as the second variable name of UI test case.Wherein, first variable name includes second change Name is measured, i.e. the second variable name is obtained from the first variable name;The variable name of interface testing use-case is being compiled by tester What output when writing interface testing use-case according to the interface testing use-case was set.
Further, become described in above-mentioned steps S30 according to the first variable name of the interface testing use-case and first Magnitude obtain the second variate-value corresponding with the second variable name of the UI test case the step of include:
Step S31, by the first variable name of the interface testing use-case and the first variate-value associated storage to variable pond;
In the present embodiment, application development is complete enter test phase when, the function realized according to application program And one group of performance design to be achieved or multiple groups interface testing use-case, it can be called during runnable interface test case External interface is built to allow interface testing use-case independent operating in completely test environment for executing interface testing The server of use-case, the server analog external interface feedback data.
Server after the completion of executing interface testing use-case by with the first variable name corresponding first of interface testing use-case Variate-value returns to test machine, and test machine deposits the first variable name and the association of the first variate-value after receiving the first variate-value Storage is to variable pond, for calling when UI test case.
Step S32 is extracted from the variable pond according to the second variable name of the UI test case and is become with described second Measure corresponding second variate-value of name.
Identical first variable name is searched from variable pond according to the second variable name of the UI test case being arranged, and is mentioned Take value of the value of the first variable name identical with the second variable name as the second variable name, i.e., it will identical with the second variable name Second variate-value of first variate-value of one variable name as the second variable name.
The present embodiment is by being pre-configured with the default mapping relations of UI test case and interface testing use-case, and sets in advance The variable name of UI test case is set, the whole process automation to realize that UI test case executes is laid a good foundation.
Further, it proposes UI test data generating method 3rd embodiment of the present invention, is also wrapped after above-mentioned steps S30 It includes:
Step S40 carries out functional verification to user interface according to the test data.
In the present embodiment, after test machine gets the test data of UI test case, according to the test data pair User interface carries out functional verification.For example, obtaining the test if test data is the account name and password of social application program After data, input the account name and password in social application program login page, judge after logging in the page that shows whether with Whether the expected display page, i.e., page elements (such as control) whether there is;If page elements exist, the page is judged Whether whether element can be used, normal with the function of verifying user interface.
Further, the test data of current UI test case is also used as the input of other UI test cases.
Further, before above-mentioned steps S40 further include:
Judge whether the numerical value of the test data exceeds preset range;
If the numerical value of the test data is thened follow the steps without departing from preset range: according to the test data to user Interface carries out functional verification.
When test data includes numerical information, in order to avoid the data of mistake cause processing abnormal, need to test number Numerical information in carries out abnormality detection, to find UI test case code or interface testing use-case code itself in advance The mistake of mistake or server analog interface avoids obtaining incorrect test result.For the preset range of test data Setting can be specific value, be also possible to numberical range, in both cases, test machine require according to test number According to preset range to test data carry out abnormality detection.Specifically, if the numerical value of test data is said without departing from preset range Bright test data has passed through abnormality detection, and subsequent functional verification step can be performed;If the numerical value of test data is beyond default Range illustrates test data exception, can be in the current page display alarm information of test machine.
Further, after above-mentioned steps S10, further includes:
If it is getting be greater than with the interface testing use-case of the mark phase mapping of UI test case mark quantity or Person is equal to 1, thens follow the steps: the mark of the interface testing use-case is sent to server for described in server execution Interface testing use-case, and feed back the first variate-value corresponding with the first variable name of the interface testing use-case.
In the present embodiment, when executing instruction of UI test case of execution is being received, is being obtained according to default mapping relations With the mark of the interface testing use-case of the mark phase mapping of the UI test case, if get with the UI test case The mark quantity for identifying the interface testing use-case of phase mapping is more than or equal to 1, then is sent to the mark of interface testing use-case Server executes the interface testing use-case for the server, and feeds back the first variable name with the interface testing use-case Corresponding first variate-value;If the mark number with the interface testing use-case of the mark phase mapping of the UI test case got Amount is 0, that is, illustrates that the UI test case is not related to the calling of external interface, without executing interface testing use-case, then without executing Subsequent step.
In the efficiency, accuracy and maintainability tested embodiment improves UI.
The present invention also provides a kind of UI Test data generation devices.
It is the functional block diagram of UI Test data generation device first embodiment of the present invention referring to Fig. 3, Fig. 3, it is described UI Test data generation device is applied to the end Ranger, and the UI Test data generation device includes:
Identifier acquisition module 10 is closed for receiving when executing instruction of UI test case of execution according to default mapping System obtains the mark with the interface testing use-case of the mark phase mapping of the UI test case;
Sending module 20 is identified, for the mark of the interface testing use-case to be sent to server for the server The interface testing use-case is executed, and feeds back the first variate-value corresponding with the first variable name of the interface testing use-case;
Data acquisition module 30, for according to the first variable name of the interface testing use-case and the first variate-value obtain with Corresponding second variate-value of second variable name of the UI test case, by the second variable name of the UI test case and accordingly The second variate-value as test data.
UI Test data generation device specific embodiment of the present invention and above-mentioned each embodiment of UI test data generating method Essentially identical, details are not described herein.
In addition, the embodiment of the present invention also proposes a kind of readable storage medium storing program for executing (i.e. computer readable storage medium).
UI test data generator is stored on readable storage medium storing program for executing, UI test data generator is executed by processor The step of Shi Shixian UI test data generating method as described above.
Readable storage medium storing program for executing specific embodiment of the present invention and the basic phase of above-mentioned each embodiment of UI test data generating method Together, details are not described herein.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, it is all using equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, directly or indirectly Other related technical areas are used in, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of user interface UI test data generating method, which is characterized in that the UI test data generating method include with Lower step:
When executing instruction of UI test case is executed receiving, is obtained and the UI test case according to default mapping relations Identify the mark of the interface testing use-case of phase mapping;
The mark of the interface testing use-case is sent to server so that the server executes the interface testing use-case, and Feed back the first variate-value corresponding with the first variable name of the interface testing use-case;
It is obtained according to the first variable name of the interface testing use-case and the first variate-value and is become with the second of the UI test case Corresponding second variate-value of name is measured, using the second variable name of the UI test case and corresponding second variate-value as test number According to.
2. UI test data generating method as described in claim 1, which is characterized in that described to receive execution UI test use When executing instruction of example obtains the interface testing use-case with the mark phase mapping of the UI test case according to default mapping relations Mark the step of before, further includes:
When receiving mapping relations setting instruction, the mark for the UI test case that the mapping relations setting instruction carries is obtained With the mark of interface testing use-case;
The mark of the UI test case is associated with the mark of the interface testing use-case and saves as default mapping relations.
3. UI test data generating method as described in claim 1, which is characterized in that the mark by the UI test case Knowledge is associated with after the step of saving as default mapping relations with the mark of the interface testing use-case, further includes:
When receiving variable name inquiry instruction, the first variable name of the interface testing use-case is obtained, and described first is become Amount name is shown in current page, so that tester checks;
When receiving variable name setting instruction, the UI is set by the variable name that instruction carrying is arranged in the variable name and is tested Second variable name of use-case, first variable name include second variable name.
4. UI test data generating method as claimed in claim 3, which is characterized in that described according to the interface testing use-case The first variable name and the first variate-value obtain the step of corresponding with the second variable name of the UI test case the second variate-value Suddenly include:
By the first variable name of the interface testing use-case and the first variate-value associated storage to variable pond;
Corresponding with second variable name is extracted from the variable pond according to the second variable name of the UI test case Two variate-values.
5. UI test data generating method as claimed in claim 3, which is characterized in that described by the of the UI test case After the step of two variable names and corresponding second variate-value are as test data, further includes:
Functional verification is carried out to user interface according to the test data.
6. UI test data generating method as claimed in claim 5, which is characterized in that it is described according to the test data to Family interface carried out before the step of functional verification, further includes:
Judge whether the numerical value of the test data exceeds preset range;
If the numerical value of the test data is thened follow the steps without departing from preset range: according to the test data to user interface Carry out functional verification.
7. such as UI test data generating method as claimed in any one of claims 1 to 6, which is characterized in that described to hold receiving When executing instruction of row UI test case obtains according to default mapping relations and connects with the mark phase mapping of the UI test case After the step of mark of mouth test case, further includes:
If getting be greater than or wait with the interface testing use-case of the mark phase mapping of UI test case mark quantity It in 1, thens follow the steps: the mark of the interface testing use-case is sent to server so that the server executes the interface Test case, and feed back the first variate-value corresponding with the first variable name of the interface testing use-case.
8. a kind of UI Test data generation device, which is characterized in that the UI Test data generation device includes:
Identifier acquisition module is obtained for receiving when executing instruction of UI test case of execution according to default mapping relations With the mark of the interface testing use-case of the mark phase mapping of the UI test case;
Sending module is identified, for the mark of the interface testing use-case to be sent to server so that the server executes institute Interface testing use-case is stated, and feeds back the first variate-value corresponding with the first variable name of the interface testing use-case;
Data acquisition module, for being obtained and the UI according to the first variable name of the interface testing use-case and the first variate-value Corresponding second variate-value of second variable name of test case, by the second variable name of the UI test case and corresponding second Variate-value is as test data.
9. a kind of UI Test data generation equipment, which is characterized in that the UI Test data generation equipment includes memory, processing Device and it is stored in the UI test data generator that can be run on the memory and on the processor, the UI test Such as the Test data generation side UI of any of claims 1-7 is realized when data generator is executed by the processor The step of method.
10. a kind of readable storage medium storing program for executing, which is characterized in that be stored with UI Test data generation journey on the readable storage medium storing program for executing Sequence realizes that UI of any of claims 1-7 such as is tested when the UI test data generator is executed by processor The step of data creation method.
CN201910421677.5A 2019-05-17 2019-05-17 UI test data generating method, device, equipment and readable storage medium storing program for executing Pending CN110134612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910421677.5A CN110134612A (en) 2019-05-17 2019-05-17 UI test data generating method, device, equipment and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910421677.5A CN110134612A (en) 2019-05-17 2019-05-17 UI test data generating method, device, equipment and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN110134612A true CN110134612A (en) 2019-08-16

Family

ID=67571944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910421677.5A Pending CN110134612A (en) 2019-05-17 2019-05-17 UI test data generating method, device, equipment and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN110134612A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569198A (en) * 2019-09-18 2019-12-13 北京搜狐新媒体信息技术有限公司 Method and device for automatically testing service function
CN110704304A (en) * 2019-09-06 2020-01-17 平安普惠企业管理有限公司 Application program testing method and device, storage medium and server
CN110908909A (en) * 2019-11-21 2020-03-24 望海康信(北京)科技股份公司 Automatic testing method and device, storage medium and equipment
CN112711525A (en) * 2019-10-25 2021-04-27 中国移动通信集团浙江有限公司 UI test and interface test cooperative test method and device and computing equipment
CN115687140A (en) * 2022-11-10 2023-02-03 江苏衫数科技集团有限公司 Test case compiling method and system based on automatic test

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704304A (en) * 2019-09-06 2020-01-17 平安普惠企业管理有限公司 Application program testing method and device, storage medium and server
CN110569198A (en) * 2019-09-18 2019-12-13 北京搜狐新媒体信息技术有限公司 Method and device for automatically testing service function
CN112711525A (en) * 2019-10-25 2021-04-27 中国移动通信集团浙江有限公司 UI test and interface test cooperative test method and device and computing equipment
CN112711525B (en) * 2019-10-25 2023-12-26 中国移动通信集团浙江有限公司 Collaborative testing method and device for UI test and interface test and computing equipment
CN110908909A (en) * 2019-11-21 2020-03-24 望海康信(北京)科技股份公司 Automatic testing method and device, storage medium and equipment
CN110908909B (en) * 2019-11-21 2023-09-22 望海康信(北京)科技股份公司 Automatic test method, device, storage medium and equipment
CN115687140A (en) * 2022-11-10 2023-02-03 江苏衫数科技集团有限公司 Test case compiling method and system based on automatic test
CN115687140B (en) * 2022-11-10 2024-01-30 江苏衫数科技集团有限公司 Test case writing method and system based on automatic test

Similar Documents

Publication Publication Date Title
CN110134612A (en) UI test data generating method, device, equipment and readable storage medium storing program for executing
US20160170867A1 (en) Exposing method related data calls during testing in an event driven, multichannel architecture
CN110147320A (en) Interface test method, device and electronic equipment
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
CN108446221A (en) System detection method, device, computer equipment and storage medium
CN107506303A (en) Method, apparatus and system for automatic test
CN111124919A (en) User interface testing method, device, equipment and storage medium
CA2845059A1 (en) Test script generation system
US20180357143A1 (en) Testing computing devices
CN105204991A (en) Internet of things test method and device
CN109669859A (en) Service test method, device, computer equipment and storage medium
CN112463467B (en) Automated integrated test system and method thereof
CN111130922A (en) Airborne information safety automatic test method and test platform
CN107608902A (en) Routine interface method of testing and device
CN110221845A (en) Using dispositions method, device, equipment and medium
Tung et al. Test as a Service: A framework for Web security TaaS service in cloud environment
CN109558328A (en) A kind of test method of code coverage, system, device and readable storage medium storing program for executing
CN107562623A (en) A kind of REST API automated testing methods and system
CN112433944A (en) Service testing method, device, computer equipment and storage medium
CN108874649A (en) Generation method, device and its computer equipment of automatic test script
CN111782317A (en) Page testing method and device, storage medium and electronic device
CN109977012A (en) Joint debugging test method, device, equipment and the computer readable storage medium of system
CN113986733A (en) Jar package based performance test method, device, equipment and storage medium
CN111258881B (en) Intelligent test system for workflow test
CN116166525A (en) Method and device for generating test script

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