+

CN110046101A - Page automated testing method, device and computer storage medium - Google Patents

Page automated testing method, device and computer storage medium Download PDF

Info

Publication number
CN110046101A
CN110046101A CN201910302437.3A CN201910302437A CN110046101A CN 110046101 A CN110046101 A CN 110046101A CN 201910302437 A CN201910302437 A CN 201910302437A CN 110046101 A CN110046101 A CN 110046101A
Authority
CN
China
Prior art keywords
case
test
target
functional component
targeted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910302437.3A
Other languages
Chinese (zh)
Other versions
CN110046101B (en
Inventor
但荣
林淙源
张丰麒
孙建武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN201910302437.3A priority Critical patent/CN110046101B/en
Publication of CN110046101A publication Critical patent/CN110046101A/en
Application granted granted Critical
Publication of CN110046101B publication Critical patent/CN110046101B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

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

Abstract

The embodiment of the present application discloses a kind of page automated testing method and Related product, method includes: by obtaining test instruction for the target page, then the N number of targeted functional component for obtaining target pages and including is instructed according to test, and then determine target detection use-case corresponding with targeted functional component each in N number of targeted functional component, obtain N number of target detection use-case, N number of targeted functional component is tested according to N number of target detection use-case, obtain test result, so, target detection use-case can be enable to reuse, without rewriting or modifying the corresponding test case of functional unit again, reduce the maintenance cost of test case, furthermore, it is tested with the corresponding test case of functional unit, all test cases in target pages can be made to be tested parallel, without dependence between functional unit when test, it can So that the speed of automatic test is faster.

Description

Page automated testing method, device and computer storage medium
Technical field
The present invention relates to Internet technical fields, and in particular to automatic test field more particularly to page automation are surveyed Method for testing, device and computer storage medium.
Background technique
Currently, operation activity can all use Web page or the H5 page to realize on line, creation of web face or the H5 page it Afterwards, Web page or the H5 page can be tested, testing scheme in the prior art is to be write by tester for Web Then the page test case of the page or the H5 page tests Web page or the H5 page by page test case, but It is current testing scheme not smart enoughization, and testing scheme takes a long time, and therefore, how to make page automatic test Scheme is more intelligent, and the time-consuming problem for reducing test needs to solve.
Summary of the invention
The embodiment of the present application provides a kind of page automated testing method, page automatic test device and computer storage Medium can solve the problems, such as to repeat to write test case, reduce the maintenance cost of test case, improve page automatic test Test speed.
In a first aspect, the embodiment of the present application provides a kind of page automated testing method, which comprises
Obtain test instruction for the target page, according to the test instruction obtain that the target pages include it is N number of Targeted functional component, N number of targeted functional component are the different component of function, and N is the integer greater than 1;
It determines target detection use-case corresponding with targeted functional component each in N number of targeted functional component, obtains N number of Target detection use-case;
N number of targeted functional component is tested according to N number of target detection use-case, obtains test result, institute It states N number of target detection use-case and N number of targeted functional component corresponds.
Second aspect, the application provide a kind of page automatic test device, and the page automatic test device includes:
Acquiring unit obtains the target according to test instruction for obtaining test instruction for the target page N number of targeted functional component that the page includes, N number of targeted functional component are the different component of function, and N is greater than 1 Integer;
Determination unit, for determining that target corresponding with targeted functional component each in N number of targeted functional component is surveyed Example on probation, obtains N number of target detection use-case;
Test cell is obtained for being tested according to N number of target detection use-case N number of targeted functional component To test result, N number of target detection use-case and N number of targeted functional component are corresponded.
The third aspect, the embodiment of the present application provide a kind of page automatic test device, which includes:
Processor is adapted for carrying out one or one or more instruction;And
Computer storage medium, which is stored with one or one or more is instructed, and above-mentioned one or one Above instructions are suitable for being loaded by processor and executing any feasible embodiment party in above-mentioned first aspect and first aspect Method provided by formula.
Fourth aspect, the embodiment of the present application provide a kind of computer storage medium, which is stored with One or one or more instruction, above-mentioned one or one or more instruction be suitable for loaded by fusion device and execute above-mentioned first aspect with And method provided by any feasible embodiment in first aspect.
5th aspect, the embodiment of the present application provide a kind of computer program product, wherein above-mentioned computer program product Computer readable storage medium including storing computer program, above-mentioned computer program are operable to execute computer such as Method provided by any feasible embodiment in the embodiment of the present application first aspect and first aspect.
As can be seen that, by obtaining test instruction for the target page, then being referred to according to test in the embodiment of the present application It enables and obtains N number of targeted functional component that target pages include, and then each objective function group in determining and N number of targeted functional component The corresponding target detection use-case of part, obtains N number of target detection use-case, according to N number of target detection use-case to N number of targeted functional component It is tested, obtains test result, in this way, being tested by the corresponding target detection use-case of targeted functional component, make target Test case can be reused, if other pages have used identical functional unit, without rewriting or modifying function again The corresponding test case of energy component, if test case functional unit is not modified, without rewriting and safeguarding, so as to solve The problem of writing test case is certainly repeated, the maintenance cost of test case is reduced, in addition, with the corresponding test case of functional unit It is tested, all test cases in target pages can be made to be tested parallel, without dependence between functional unit when test, It can make the speed of automatic test faster.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is provided by the embodiments of the present application a kind of for implementing the system construction drawing of page automated testing method;
Fig. 2 is another page automated testing method flow diagram applying for embodiment and providing;
Fig. 3 is another page automated testing method flow diagram provided by the embodiments of the present application;
Fig. 4 is another page automated testing method flow diagram provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of page automatic test device disclosed in the embodiment of the present application;
Fig. 6 A is a kind of structural schematic diagram of page automatic test device disclosed in the embodiment of the present application;
Fig. 6 B is the modification structures of page automatic test device shown in Fig. 6 A disclosed in the embodiment of the present application;
Fig. 6 C is the modification structures of page automatic test device shown in Fig. 6 B disclosed in the embodiment of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
In Web page or the H5 page, partial function is common function, and reuse rate is high, developer by these Common function is encapsulated as functional unit, when creating the new page, the corresponding functional unit of the function of needs can be added to page In face, the classification for the functional unit that the different pages uses is different, by using common functional unit, is not necessarily to overlapping development phase Same function, but be, for the different pages, to need weight by writing test case to the page in existing testing scheme Test case to be write or modified again, and has dependence to other function when automatic test, execution efficiency is low, therefore, invention People writes the problem lower with testing efficiency for the repetition of test case and proposes this programme.
Page automatic test device described by the embodiment of the present application may include smart phone (such as Android phone, IOS mobile phone, Windows Phone mobile phone etc.), tablet computer, palm PC, laptop, mobile internet device (MID, Mobile Internet Devices) or wearable device etc., above-mentioned is only citing, and non exhaustive, including but not limited to above-mentioned Device, certainly, above-mentioned page automatic test device can also be server.
It describes in detail below to the embodiment of the present application.
Referring to Fig. 1, Fig. 1 is provided by the embodiments of the present application a kind of for implementing the system of page automated testing method Structure chart, the system include active configuration platform and automatic test platform, wherein in the development phase, which can will be developed At functional unit, functional unit can support that component parameter is arranged to it some common function packages of staff development, for example, if Need to provide the function of one " switching account " to user in WEB page or the H5 page, make user click this function by Button can prompt user to switch account, be automatically logged out currently logged account after confirmation, and jump to login interface, allow use Family logs in other numbers, and has designated user and be only capable of being switched to certain account type (QQ or wechat, or do not limit account class Type), then the function for the switching account that developer develops according to this demand can be obtained, and provide the account of option setting switching Number type such as limits and supports type as QQ, then does not have wechat login option when jumping login interface, then by this function package For functional unit, it is integrated into active configuration platform.
In test phase, which can obtain the correspondence that tester writes according to the functional unit in active configuration platform Test case, such as switching account the corresponding test case of functional unit, then, setting functional unit and test case it Between corresponding relationship.
Optionally, the corresponding relationship between functional unit and test case is set, survey corresponding with functional unit can be set The use-case mark of example on probation, thus, test corresponding with functional unit can be obtained by use-case mark after determining functional unit Use-case.
In creation WEB page or the product stage of the H5 page, which can obtain operation personnel and platform is arranged from activity The functional unit of selection, functional unit for example may include login component, image component, chain joint assembly, music component etc., Herein with no restrictions, functional unit is added in WEB page or the H5 page, generates target pages, then, obtain automation The test of test instructs, and notice automatic test platform tests target pages, obtains test result.
Wherein, active configuration platform obtain automatic test test instruction after, can by the address url of target pages, The use-case mark of the corresponding test case of each functional unit in all functional units for including of the target pages, by automatic The interface for changing test platform passes to automatic test platform, and automatic test platform is in the unified resource for receiving target pages It, can basis after all use-cases of the locator address (uniform resoure locator, url) and all test cases mark All use-cases mark received obtains corresponding all test cases, then according to test case creation test assignment, finally, Test assignment is executed, test result is obtained, in the specific implementation, test platform can also obtain the continuous item that movable test platform is sent The identity information of mesh personnel, and test result is sent to relevant item personnel according to identity information.
Referring to Fig. 2, Fig. 2 is a kind of page automated testing method flow diagram provided by the embodiments of the present application, such as Shown in Fig. 2, the step of page automated testing method, is as follows:
201, test instruction for the target page is obtained, obtaining the target pages according to test instruction includes N number of targeted functional component, N number of targeted functional component are the different component of function, and N is the integer greater than 1.
Wherein, WEB page or the H5 page that above-mentioned target pages refer to for realizing specific function, above-mentioned test refer to Enable the test instruction for the target page for referring to and obtaining after target pages have generated.
Optionally, one can be arranged in target pages for triggering the control key of test instruction, thus, it can be touched according to user The control key is sent out, test instruction is received, alternatively, the trigger condition that target pages are tested in triggering can be preset, works as satisfaction When preset trigger condition, the test instruction got for the target page is determined.
Wherein, N number of targeted functional component is that the functional unit for including can by N number of targeted functional component in target pages Target pages are made to realize the corresponding function of N number of targeted functional component.
202, it determines target detection use-case corresponding with targeted functional component each in N number of targeted functional component, obtains To N number of target detection use-case.
Wherein, N number of target detection use-case is pre-set and the one-to-one test case of N number of targeted functional component, Corresponding targeted functional component can be tested by each target detection use-case in N number of target detection use-case.
Optionally, in above-mentioned steps 202, determination is corresponding with each targeted functional component in N number of targeted functional component Target detection use-case, obtain N number of target detection use-case, it may include following steps:
According to preset functional unit and test case and between corresponding relationship, it is determining with N number of objective function group The corresponding target detection use-case of each targeted functional component, obtains N number of target detection use-case in part.
In the embodiment of the present application, the corresponding relationship between functional unit and test case can be preset, thus, in determination After N number of functional unit, mesh corresponding with targeted functional component each in N number of targeted functional component can be determined according to the corresponding relationship Mark test case.
Optionally, in the embodiment of the present application, according to preset functional unit and test case and between corresponding relationship, Before determining corresponding with targeted functional component each in N number of targeted functional component target detection use-case, may also include with Lower step:
A1, by each function package in preset M function at functional unit, obtain M functional unit, M is greater than N's Integer;
A2, test case corresponding with functional unit each in the M functional unit is obtained, obtains M test case;
A3, the use-case mark for generating each test case in the M test case, obtain M use-case mark;
A4, the preset functional unit and test use are created according to the M functional unit and M use-case mark Example and between corresponding relationship.
Wherein, M functional unit be by some common function packages of developer's exploitation at functional unit, M Test case refers to the corresponding test case that the tester of acquisition writes according to functional unit each in M functional unit.
Wherein, above-mentioned use-case mark is for identifying the corresponding pass between affiliated test case and corresponding functional unit System, according to M functional unit and M use-case identify the preset functional unit of creation and test case and between corresponding relationship, To obtain corresponding with targeted functional component each in N number of targeted functional component after obtaining N number of targeted functional component Target use-case mark obtains N number of target use-case mark, in turn, determines each target use-case mark institute in N number of target use-case mark The target detection use-case of category obtains N number of target detection use-case.
Optionally, in the embodiment of the present application, described according to the M functional unit and M use-case mark creation The preset functional unit and test case and between corresponding relationship after, can comprise the further steps of:
B1, N number of targeted functional component is chosen from the M functional unit, be added in preset reference page;
B2, the target element parameter for obtaining each targeted functional component in N number of targeted functional component, obtain N number of mesh Mark component parameter;
B3, corresponding targeted functional component is added according to each target element parameter in N number of target element parameter To the reference page, the target pages are obtained.
In the embodiment of the present application, the selection instruction of user can be obtained, chooses N from M functional unit according to instruction is chosen A targeted functional component, as the functional unit in target pages, wherein target element parameter may include following at least one: It is available by by N number of targeted functional component in the middle position of target pages, size, color parameter, operating parameter etc. Target pages comprising N number of targeted functional component.
203, N number of targeted functional component is tested according to N number of target detection use-case, obtains test knot Fruit, N number of target detection use-case and N number of targeted functional component correspond.
It, can be by each target detection use-case of N number of target detection use-case to corresponding objective function in the embodiment of the present application Component is tested, thus, it only needs to write an automatic test cases for each functional unit, it is subsequent when other pages make It can solve to repeat to write test case all without rewriting or modifying again test case with identical functional unit Problem.
Optionally, in above-mentioned steps 203, N number of targeted functional component is carried out according to N number of target detection use-case Test, obtains test result, it may include following steps:
31, the destination Uniform Resource address locator url of the acquisition target pages and N number of target detection use-case pair The N number of target use-case mark answered, N number of target detection use-case and N number of target use-case mark correspond;
32, according to the address the target url and the mark creation of N number of target use-case according to N number of target detection use-case pair The test assignment that N number of targeted functional component is tested;
33, the test assignment is executed, the test result is obtained.
Wherein, it after the test assignment that N number of targeted functional component is tested in creation, can synchronize to N number of objective function group Part is tested, and will not be interacted when being tested between N number of targeted functional component, thus, test speed can be accelerated, improved Testing efficiency.
Optionally, in the embodiment of the present application, it is contemplated that the numerical value of N may be larger, i.e., may include quantity in target pages More targeted functional component can preset the corresponding relationship between functional unit and priority, determine N number of objective function After component, it may be determined that the corresponding target priority of each targeted functional component in N number of targeted functional component obtains N number of target Priority, the then testing sequence according to the sequence of N number of target priority as N number of targeted functional component, thus, it can be in target When functional unit is more, tested according to the sequence of priority.
It optionally, include the corresponding N number of test elements quantity of N number of targeted functional component, institute in the test instruction It states N number of targeted functional component and N number of test elements quantity corresponds, in above-mentioned steps 33, execute the test assignment, It can comprise the following steps that
C1, corresponding targeted functional component pair is determined according to each test elements quantity in N number of test elements quantity The testing time answered obtains N number of testing time;
C2, according to each testing time in N number of testing time to corresponding target in N number of targeted functional component Functional unit is tested.
C3, wherein, above-mentioned test elements refer to functional element in need of test in a functional unit, for example, sound In frequency player module, three audio files to be tested can be set, that is, when being tested for audio playing function component, Need respectively to test three audio files three times, therefore, for the target page in either objective functional unit, can be true The test elements quantity of test elements in the fixed either objective functional unit, which is corresponding objective function Component number in need of test can determine the corresponding survey of each targeted functional component in N number of targeted functional component in turn Number is tried, N number of testing time is obtained, thus, it can be according to testing time each in N number of testing time to corresponding objective function group Part is tested.
As can be seen that, by obtaining test instruction for the target page, then being referred to according to test in the embodiment of the present application It enables and obtains N number of targeted functional component that target pages include, and then each objective function group in determining and N number of targeted functional component The corresponding target detection use-case of part, obtains N number of target detection use-case, according to N number of target detection use-case to N number of targeted functional component It is tested, obtains test result, in this way, being tested by the corresponding target detection use-case of targeted functional component, make target Test case can be reused, if other pages have used identical functional unit, without rewriting or modifying function again The corresponding test case of energy component, if test case functional unit is not modified, without rewriting and safeguarding, so as to solve The problem of writing test case is certainly repeated, the maintenance cost of test case is reduced, in addition, with the corresponding test case of functional unit It is tested, all test cases in target pages can be made to be tested parallel, without dependence between functional unit when test, It can make the speed of automatic test faster.
Referring to Fig. 3, Fig. 3 is another page automated testing method flow diagram provided by the embodiments of the present application, As shown in figure 3, this method comprises the following steps:
301, test instruction for the target page is obtained, obtaining the target pages according to test instruction includes N number of targeted functional component, N number of targeted functional component are the different component of function, and N is the integer greater than 1.
302, according to preset functional unit and test case and between corresponding relationship, it is determining with N number of target function Can the corresponding target detection use-case of each targeted functional component in component, obtain N number of target detection use-case.
303, the destination Uniform Resource address locator url of the acquisition target pages and N number of target detection use-case Corresponding N number of target use-case mark, N number of target detection use-case and N number of target use-case mark correspond.
304, according to the address the target url and the mark creation of N number of target use-case according to N number of target detection use-case pair The test assignment that N number of targeted functional component is tested.
305, the test assignment is executed, the test result is obtained.
Wherein, the specific descriptions of above-mentioned steps 301- step 305 are referred to page described in figure step 201- step 203 The corresponding description of face automated testing method, details are not described herein.
As it can be seen that, by obtaining test instruction for the target page, then being obtained according to test instruction in application embodiment Take N number of targeted functional component that target pages include, so according to preset functional unit and test case and between it is corresponding Relationship determines target detection use-case corresponding with targeted functional component each in N number of targeted functional component, obtains N number of target and surveys Example on probation, obtains the destination Uniform Resource address locator url and the corresponding N number of target of N number of target detection use-case of target pages Use-case mark, according to the address target url and the mark creation of N number of target use-case according to N number of target detection use-case to N number of objective function The test assignment that component is tested executes the test assignment, obtains test result, in this way, can enable target detection use-case It is enough to reuse, it solves the problems, such as to repeat to write test case, the maintenance cost of test case is reduced, in addition, with functional unit Corresponding test case is tested, and all test cases in target pages can be made to be tested parallel, functional unit when test Between without dependence, the speed of automatic test can be made faster.
Referring to Fig. 4, Fig. 4 is another page automated testing method flow diagram provided by the embodiments of the present application, As shown in figure 4, this method comprises the following steps:
401, each function package in preset M function is obtained into M functional unit at functional unit, M is greater than N Integer.
402, test case corresponding with functional unit each in the M functional unit is obtained, M test is obtained and uses Example.
403, the use-case mark for generating each test case in the M test case obtains M use-case mark.
404, the preset functional unit and test are created according to the M functional unit and M use-case mark Use-case and between corresponding relationship.
405, the test assignment is executed, the test result is obtained.
406, N number of targeted functional component is chosen from the M functional unit, is added to preset reference page In.
407, the target element parameter for obtaining each targeted functional component in N number of targeted functional component, obtains N number of mesh Mark component parameter.
408, corresponding targeted functional component is added according to each target element parameter in N number of target element parameter To the reference page, the target pages are obtained.
409, test instruction for the target page is obtained, obtaining the target pages according to test instruction includes N number of targeted functional component, N number of targeted functional component are the different component of function, and N is the integer greater than 1.
410, according to preset functional unit and test case and between corresponding relationship, it is determining with N number of target function Can the corresponding target detection use-case of each targeted functional component in component, obtain N number of target detection use-case.
411, the destination Uniform Resource address locator url of the acquisition target pages and N number of target detection use-case Corresponding N number of target use-case mark, N number of target detection use-case and N number of target use-case mark correspond.
412, according to the address the target url and the mark creation of N number of target use-case according to N number of target detection use-case pair The test assignment that N number of targeted functional component is tested.
413, the test assignment is executed, the test result is obtained.
Wherein, the specific descriptions of above-mentioned steps 401- step 413 are referred to page described in figure step 201- step 203 The corresponding description of face automated testing method, details are not described herein.
As it can be seen that each function package in preset M function is obtained M function at functional unit in application embodiment Energy component, obtains M test case, and M use-case is arranged and identifies, and creates functional group according to M functional unit and M use-case mark Part and test case and between corresponding relationship, N number of targeted functional component is chosen from M functional unit and is added to reference page In, obtain target pages, obtain for the target page test instruction, according to test instruct obtain target pages include it is N number of Targeted functional component, according to the corresponding relationship between functional unit and test case, determination is corresponding with each targeted functional component Target detection use-case, according to the address target url and N number of target use-case mark creation according to N number of target detection use-case to N number of mesh The test assignment that mark functional unit is tested, executes the test assignment, obtains test result, in this way, can make target detection Use-case can be reused, and solve the problems, such as to repeat to write test case, the maintenance cost of test case is reduced, in addition, with function Can the corresponding test case of component tested, all test cases in target pages can be made to be tested parallel, function when test Without dependence between energy component, the speed of automatic test can be made faster.
Referring to Fig. 5, Fig. 5 is a kind of structural schematic diagram of page automatic test device provided by the embodiments of the present application, As shown in figure 5, the page automatic test device includes processor, communication interface and computer storage medium.Wherein, it handles Device, communication interface and computer storage medium can be connected by bus or other modes, in Fig. 5 shown in the embodiment of the present invention with For communication bus connection.
Communication interface be realize interacted between page automatic test device and external equipment (such as terminal device) and The medium of information exchange.Processor (or central processing unit (Central Processing Unit, CPU)) is server Calculate core and control core, it will be understood that processor here is also possible to be integrated in the processor in fusion device, fits In realizing one or one or more instruction, it is particularly adapted to load and execute one or one or more instructs to realize correlation method Process or corresponding function.Computer storage medium (Memory) is the memory device in page automatic test device, for depositing Put program and data.It is understood that computer storage medium herein both may include page automatic test device Built-in storage medium, naturally it is also possible to the expansion storage medium supported including page automatic test device.Computer storage Medium provides memory space, which stores the operating system of page automatic test device.Also, in storage sky Between in also house and be suitable for by one or more than one instructions that processor load and executes, these instruct can be one or More than one computer program (including program code).It should be noted that computer storage medium herein can be height Fast RAM memory is also possible to non-labile memory (non-volatile memory), and a for example, at least disk is deposited Reservoir;It optionally can also be that at least one is located remotely from the computer storage medium of aforementioned processor.
In embodiments of the present invention, processor load and execute one stored in computer storage medium or one or more Instruction, to realize the corresponding steps in method flow shown in above-mentioned Fig. 2 to Fig. 4;In the specific implementation, in computer storage medium One or one or more instruction are loaded by processor and execute following steps:
Obtain test instruction for the target page, according to the test instruction obtain that the target pages include it is N number of Targeted functional component, N number of targeted functional component are the different component of function, and N is the integer greater than 1;
It determines target detection use-case corresponding with targeted functional component each in N number of targeted functional component, obtains N number of Target detection use-case;
N number of targeted functional component is tested according to N number of target detection use-case, obtains test result, institute It states N number of target detection use-case and N number of targeted functional component corresponds.
In a possible example, one in above-mentioned processor load computer storage medium or one or more instruction It executes and determines target detection use-case corresponding with targeted functional component each in N number of targeted functional component, obtain N number of target During the step of test case, following steps are specifically executed:
According to preset functional unit and test case and between corresponding relationship, it is determining with N number of objective function group The corresponding target detection use-case of each targeted functional component, obtains N number of target detection use-case in part.
In a possible example, one in above-mentioned processor load computer storage medium or one or more instruction It is also used to execute following steps:
By each function package in preset M function at functional unit, M functional unit is obtained, M is whole greater than N Number;
Test case corresponding with functional unit each in the M functional unit is obtained, M test case is obtained;
The use-case mark for generating each test case in the M test case obtains M use-case mark;
The preset functional unit and test case are created according to the M functional unit and M use-case mark Corresponding relationship between.
In a possible example, one in above-mentioned processor load computer storage medium or one or more instruction Execute according to the M functional unit and M use-case mark create the preset functional unit and test case and Between corresponding relationship the step of after, be also used to execute following steps:
N number of targeted functional component is chosen from the M functional unit, is added in preset reference page;
The target element parameter for obtaining each targeted functional component in N number of targeted functional component obtains N number of target group Part parameter;
Corresponding targeted functional component is added to institute according to each target element parameter in N number of target element parameter Reference page is stated, the target pages are obtained.
In a possible example, one in above-mentioned processor load computer storage medium or one or more instruction Execute the step of testing to N number of targeted functional component according to N number of target detection use-case, obtain test result In the process, following steps are specifically executed:
The destination Uniform Resource address locator url and the N number of target detection use-case for obtaining the target pages are corresponding N number of target use-case mark, N number of target detection use-case and N number of target use-case mark correspond;
According to the address the target url and the mark creation of N number of target use-case according to N number of target detection use-case to described The test assignment that N number of targeted functional component is tested;
The test assignment is executed, the test result is obtained.
It include the corresponding N number of test of N number of targeted functional component in the test instruction in a possible example Number of elements, N number of targeted functional component and N number of test elements quantity correspond, and above-mentioned processor load calculates During the step of execution test assignment described in one in machine storage medium or one or more instruction execution, specifically hold Row following steps:
Determine that corresponding targeted functional component is corresponding according to each test elements quantity in N number of test elements quantity Testing time obtains N number of testing time;
According to each testing time in N number of testing time to corresponding target function in N number of targeted functional component Energy component is tested.
The embodiment of the present application can carry out functional unit to page automatic test device according to above method example and draw Point, for example, each functional unit of each function division can be corresponded to, two or more functions can also be integrated in one In a processing unit.Above-mentioned integrated unit both can take the form of hardware realization, can also be using SFU software functional unit Form is realized.It should be noted that being schematical, only a kind of logic function to the division of unit in the embodiment of the present application It divides, there may be another division manner in actual implementation.
Fig. 6 A is please referred to, Fig. 6 A is a kind of structural representation of page automatic test device disclosed in the embodiment of the present application Figure, as shown in Figure 6A, which includes acquiring unit 601, determination unit 602 and test cell 603, In,
The acquiring unit 601 instructs according to the test for obtaining test instruction for the target page and obtains institute N number of targeted functional component that target pages include is stated, N number of targeted functional component is the different component of function, and N is big In 1 integer;
The determination unit 602, it is corresponding with each targeted functional component in N number of targeted functional component for determination Target detection use-case obtains N number of target detection use-case;
The test cell 603, for being carried out according to N number of target detection use-case to N number of targeted functional component Test, obtains test result, and N number of target detection use-case and N number of targeted functional component correspond.
Optionally, the determination unit 602 is specifically used for:
According to preset functional unit and test case and between corresponding relationship, it is determining with N number of objective function group The corresponding target detection use-case of each targeted functional component, obtains N number of target detection use-case in part.
Optionally, such as Fig. 6 B, Fig. 6 B is the modification structures of page automatic test device shown in Fig. 6 A, with Fig. 6 A phase Compare, can also include: encapsulation unit 604 and creating unit 605, wherein
The encapsulation unit 604, for each function package in preset M function to be obtained M function at functional unit Energy component, M are the integer greater than N;
The acquiring unit 601 is also used to obtain test corresponding with functional unit each in the M functional unit and uses Example, obtains M test case;And the use-case mark of each test case in the M test case is generated, obtain M use Example mark;
The creating unit 605, for described default according to the M functional unit and M use-case mark creation Functional unit and test case and between corresponding relationship.
Optionally, such as Fig. 6 C, Fig. 6 C is the modification structures of page automatic test device shown in Fig. 6 B, with Fig. 6 B phase Compare, can also include: adding unit 606, wherein
The adding unit 606 is added to for choosing N number of targeted functional component from the M functional unit In preset reference page;
The acquiring unit 601 is also used to obtain the target of each targeted functional component in N number of targeted functional component Component parameter obtains N number of target element parameter;
The adding unit 606 is also used to be corresponded to according to each target element parameter in N number of target element parameter Targeted functional component be added to the reference page, obtain the target pages.
Optionally, N number of targeted functional component is tested according to N number of target detection use-case described, is obtained In terms of test result, the test cell 603 is specifically used for:
The destination Uniform Resource address locator url and the N number of target detection use-case for obtaining the target pages are corresponding N number of target use-case mark, N number of target detection use-case and N number of target use-case mark correspond;
According to the address the target url and the mark creation of N number of target use-case according to N number of target detection use-case to described The test assignment that N number of targeted functional component is tested;
The test assignment is executed, the test result is obtained.
It optionally, include the corresponding N number of test elements quantity of N number of targeted functional component, institute in the test instruction It states N number of targeted functional component and N number of test elements quantity corresponds, in terms of the execution test assignment, institute Test cell 603 is stated to be specifically used for:
Determine that corresponding targeted functional component is corresponding according to each test elements quantity in N number of test elements quantity Testing time obtains N number of testing time;
According to each testing time in N number of testing time to corresponding target function in N number of targeted functional component Energy component is tested.
As can be seen that, by obtaining test instruction for the target page, then being referred to according to test in the embodiment of the present application It enables and obtains N number of targeted functional component that target pages include, and then each objective function group in determining and N number of targeted functional component The corresponding target detection use-case of part, obtains N number of target detection use-case, according to N number of target detection use-case to N number of targeted functional component It is tested, obtains test result, in this way, being tested by the corresponding target detection use-case of targeted functional component, make target Test case can be reused, if other pages have used identical functional unit, without rewriting or modifying function again The corresponding test case of energy component, if test case functional unit is not modified, without rewriting and safeguarding, so as to solve The problem of writing test case is certainly repeated, the maintenance cost of test case is reduced, in addition, with the corresponding test case of functional unit It is tested, all test cases in target pages can be made to be tested parallel, without dependence between functional unit when test, It can make the speed of automatic test faster.
It is understood that the function of each program module of the Emotion identification device of the present embodiment can be according to above method reality The method specific implementation in example is applied, specific implementation process is referred to the associated description of above method embodiment, herein no longer It repeats.
The embodiment of the present application also provides a kind of computer storage medium, wherein the computer storage medium can be stored with journey Sequence, it includes some or all of any page automated testing method recorded in above method embodiment which, which executes, Step.
The embodiment of the present application also provides a kind of computer program products, wherein the computer program product includes storage The non-transient computer readable storage medium of computer program, above-mentioned computer program are operable to that computer is made to execute packet Include some or all of any page automated testing method recorded in above method embodiment step.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit, It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also be realized in the form of software program module.
If the integrated unit is realized in the form of software program module and sells or use as independent product When, it can store in a computer-readable access to memory.Based on this understanding, the technical solution of the application substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment the method for the application Step.And memory above-mentioned includes: USB flash disk, read-only memory (read-only memory, ROM), random access memory The various media that can store program code such as (random access memory, RAM), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory It may include: flash disk, ROM, RAM, disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the application There is change place, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (10)

1. a kind of page automated testing method, which is characterized in that the described method includes:
Test instruction for the target page is obtained, N number of target that the target pages include is obtained according to the test instruction Functional unit, N number of targeted functional component are the different component of function, and N is the integer greater than 1;
It determines target detection use-case corresponding with targeted functional component each in N number of targeted functional component, obtains N number of target Test case;
N number of targeted functional component is tested according to N number of target detection use-case, obtains test result, it is described N number of Target detection use-case and N number of targeted functional component correspond.
2. the method as described in claim 1, which is characterized in that each mesh in the determination and N number of targeted functional component The corresponding target detection use-case of functional unit is marked, N number of target detection use-case is obtained, comprising:
According to preset functional unit and test case and between corresponding relationship, it is determining in N number of targeted functional component The corresponding target detection use-case of each targeted functional component, obtains N number of target detection use-case.
3. method according to claim 2, which is characterized in that the method also includes:
By each function package in preset M function at functional unit, M functional unit is obtained, M is the integer greater than N;
Test case corresponding with functional unit each in the M functional unit is obtained, M test case is obtained;
The use-case mark for generating each test case in the M test case obtains M use-case mark;
The preset functional unit and test case are created therewith according to the M functional unit and M use-case mark Between corresponding relationship.
4. method as claimed in claim 3, which is characterized in that described according to the M functional unit and the M use-case Mark create the preset functional unit and test case and between corresponding relationship after, the method also includes:
N number of targeted functional component is chosen from the M functional unit, is added in preset reference page;
The target element parameter for obtaining each targeted functional component in N number of targeted functional component obtains N number of target element ginseng Number;
Corresponding targeted functional component is added to the ginseng according to each target element parameter in N number of target element parameter The page is examined, the target pages are obtained.
5. method according to any of claims 1-4, which is characterized in that described according to N number of target detection use-case pair N number of targeted functional component is tested, and test result is obtained, comprising:
The destination Uniform Resource address locator url and the N number of target detection use-case for obtaining the target pages are corresponding N number of Target use-case mark, N number of target detection use-case and N number of target use-case mark correspond;
According to the address the target url and the mark creation of N number of target use-case according to N number of target detection use-case to described N number of The test assignment that targeted functional component is tested;
The test assignment is executed, the test result is obtained.
6. method as claimed in claim 5, which is characterized in that include N number of targeted functional component in the test instruction Corresponding N number of test elements quantity, N number of targeted functional component and N number of test elements quantity correspond, described to hold The row test assignment, comprising:
The corresponding test of corresponding targeted functional component is determined according to each test elements quantity in N number of test elements quantity Number obtains N number of testing time;
According to each testing time in N number of testing time to corresponding objective function group in N number of targeted functional component Part is tested.
7. a kind of page automatic test device, which is characterized in that described device includes:
Acquiring unit obtains the target pages according to test instruction for obtaining test instruction for the target page The N number of targeted functional component for including, N number of targeted functional component are the different component of function, and N is the integer greater than 1;
Determination unit, for determining that target detection corresponding with targeted functional component each in N number of targeted functional component is used Example, obtains N number of target detection use-case;
Test cell is surveyed for being tested according to N number of target detection use-case N number of targeted functional component Test result, N number of target detection use-case and N number of targeted functional component correspond.
8. device as claimed in claim 7, which is characterized in that the determination unit is specifically used for:
According to preset functional unit and test case and between corresponding relationship, it is determining in N number of targeted functional component The corresponding target detection use-case of each targeted functional component, obtains N number of target detection use-case.
9. a kind of computer storage medium, which is characterized in that the computer storage medium is stored with one or one or more refers to Enable, described one or one or more instruction be suitable for loaded by processor and execute image as claimed in any one of claims 1 to 6 Processing method.
10. a kind of page automatic test device, which is characterized in that including processor, memory, the memory is for storing One or more programs, and be configured to be executed by the processor, described program includes appointing for executing claim 1-6 such as The instruction of step in method described in one.
CN201910302437.3A 2019-04-15 2019-04-15 Page automatic testing method and device and computer storage medium Active CN110046101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910302437.3A CN110046101B (en) 2019-04-15 2019-04-15 Page automatic testing method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910302437.3A CN110046101B (en) 2019-04-15 2019-04-15 Page automatic testing method and device and computer storage medium

Publications (2)

Publication Number Publication Date
CN110046101A true CN110046101A (en) 2019-07-23
CN110046101B CN110046101B (en) 2022-08-19

Family

ID=67277251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910302437.3A Active CN110046101B (en) 2019-04-15 2019-04-15 Page automatic testing method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN110046101B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110633219A (en) * 2019-09-24 2019-12-31 网易(杭州)网络有限公司 Page testing method and device, storage medium and electronic equipment
CN110737598A (en) * 2019-10-16 2020-01-31 珠海格力电器股份有限公司 Method and device for testing page content based on page component characteristics
CN110765001A (en) * 2019-09-06 2020-02-07 赛诺贝斯(北京)营销技术股份有限公司 Modularized automatic test method and device for application system
CN110990087A (en) * 2019-11-27 2020-04-10 北京明略软件系统有限公司 Network component nested operation method and device and data processing equipment
CN110990285A (en) * 2019-12-09 2020-04-10 广州品唯软件有限公司 UI automation test method and device
CN111400191A (en) * 2020-03-25 2020-07-10 平安银行股份有限公司 Web page security testing method, device and computer readable storage medium
CN111625447A (en) * 2020-05-06 2020-09-04 Oppo广东移动通信有限公司 Test method and device, electronic equipment and computer readable storage medium
CN111639030A (en) * 2020-05-29 2020-09-08 深圳壹账通智能科技有限公司 Page testing method, device, equipment and storage medium
CN111930629A (en) * 2020-08-14 2020-11-13 工银科技有限公司 Page testing method and device, electronic equipment and storage medium
CN112905449A (en) * 2021-01-27 2021-06-04 长沙市到家悠享网络科技有限公司 Target test method, device, equipment and storage medium
CN113282483A (en) * 2021-02-07 2021-08-20 北京大米科技有限公司 Test method, related device and computer medium
CN113392030A (en) * 2021-07-30 2021-09-14 北京达佳互联信息技术有限公司 Method and device for testing Js bridge and related equipment
CN113505059A (en) * 2021-06-22 2021-10-15 深圳十方融海科技有限公司 Page monitoring method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120204149A1 (en) * 2011-02-03 2012-08-09 International Business Machines Corporation Discovery-based migration correctness testing
CN106991048A (en) * 2017-03-31 2017-07-28 杭州迪普科技股份有限公司 Webpage method of testing and device
CN107256195A (en) * 2017-06-08 2017-10-17 武汉斗鱼网络科技有限公司 Webpage front-end method of testing and device
CN107967207A (en) * 2016-10-20 2018-04-27 腾讯科技(北京)有限公司 The test method and device of user interface interaction function

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120204149A1 (en) * 2011-02-03 2012-08-09 International Business Machines Corporation Discovery-based migration correctness testing
CN107967207A (en) * 2016-10-20 2018-04-27 腾讯科技(北京)有限公司 The test method and device of user interface interaction function
CN106991048A (en) * 2017-03-31 2017-07-28 杭州迪普科技股份有限公司 Webpage method of testing and device
CN107256195A (en) * 2017-06-08 2017-10-17 武汉斗鱼网络科技有限公司 Webpage front-end method of testing and device

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765001A (en) * 2019-09-06 2020-02-07 赛诺贝斯(北京)营销技术股份有限公司 Modularized automatic test method and device for application system
CN110633219A (en) * 2019-09-24 2019-12-31 网易(杭州)网络有限公司 Page testing method and device, storage medium and electronic equipment
CN110633219B (en) * 2019-09-24 2023-09-08 网易(杭州)网络有限公司 Page test method and device, storage medium and electronic equipment
CN110737598A (en) * 2019-10-16 2020-01-31 珠海格力电器股份有限公司 Method and device for testing page content based on page component characteristics
CN110990087B (en) * 2019-11-27 2023-03-21 北京明略软件系统有限公司 Network component nested operation method and device and data processing equipment
CN110990087A (en) * 2019-11-27 2020-04-10 北京明略软件系统有限公司 Network component nested operation method and device and data processing equipment
CN110990285A (en) * 2019-12-09 2020-04-10 广州品唯软件有限公司 UI automation test method and device
CN110990285B (en) * 2019-12-09 2024-02-02 广州品唯软件有限公司 UI (user interface) automatic testing method and device
CN111400191A (en) * 2020-03-25 2020-07-10 平安银行股份有限公司 Web page security testing method, device and computer readable storage medium
CN111400191B (en) * 2020-03-25 2025-09-16 平安银行股份有限公司 Webpage security testing method and device and computer readable storage medium
CN111625447B (en) * 2020-05-06 2023-08-18 Oppo广东移动通信有限公司 Test method and device, electronic equipment, computer-readable storage medium
CN111625447A (en) * 2020-05-06 2020-09-04 Oppo广东移动通信有限公司 Test method and device, electronic equipment and computer readable storage medium
CN111639030A (en) * 2020-05-29 2020-09-08 深圳壹账通智能科技有限公司 Page testing method, device, equipment and storage medium
CN111930629A (en) * 2020-08-14 2020-11-13 工银科技有限公司 Page testing method and device, electronic equipment and storage medium
CN112905449A (en) * 2021-01-27 2021-06-04 长沙市到家悠享网络科技有限公司 Target test method, device, equipment and storage medium
CN112905449B (en) * 2021-01-27 2024-04-23 长沙市到家悠享网络科技有限公司 Target test method, device, equipment and storage medium
CN113282483A (en) * 2021-02-07 2021-08-20 北京大米科技有限公司 Test method, related device and computer medium
CN113505059A (en) * 2021-06-22 2021-10-15 深圳十方融海科技有限公司 Page monitoring method and device, computer equipment and storage medium
CN113392030A (en) * 2021-07-30 2021-09-14 北京达佳互联信息技术有限公司 Method and device for testing Js bridge and related equipment
CN113392030B (en) * 2021-07-30 2023-10-24 北京达佳互联信息技术有限公司 Method and device for testing Js bridge and related equipment

Also Published As

Publication number Publication date
CN110046101B (en) 2022-08-19

Similar Documents

Publication Publication Date Title
CN110046101A (en) Page automated testing method, device and computer storage medium
CN104484273B (en) The method of testing of application program, equipment and system
CN104978261B (en) The test method of application program, apparatus and system
CN104050076B (en) Application software testing method, apparatus and system on mobile terminal
CN102419729B (en) Parallel test execution
CN105205006B (en) multi-platform universal test method, device and system
CN104794049B (en) Applied program testing method and device
CN108427644A (en) Service test method, service testing system and service testing device
CN108255993A (en) Extract method, apparatus, electronic equipment and the storage medium of service fields
CN109542410A (en) Rule engine system, method, equipment and storage medium
CN103365701B (en) Work method of analog card reader and analog communication system
CN106649084A (en) Function call information obtaining method and apparatus, and test device
CN109582517A (en) System application automated testing method, device, system and tool storage end
CN103399814B (en) The method and device of automatic test
CN107943707A (en) Test method, device and the storage medium and terminal of behavior tree
CN109783392A (en) Cloud-network fusion architecture system testing method and device
CN110209569A (en) Interface test method, interface test device and storage medium
CN106980571A (en) The construction method and equipment of a kind of test use cases
CN110046100B (en) Packet testing method, electronic device and medium
CN103049374B (en) Automatic testing method and device
CN109542758A (en) Application program fault-tolerant ability test method, device, computer readable storage medium
CN103440111B (en) The extended method in magnetic disk of virtual machine space, host and platform
CN106293352A (en) Page makeup method, terminal and server
CN103838720B (en) Page file, which is loaded into, executes method and apparatus
CN107133160A (en) Test system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载