CN109062780A - The development approach and terminal device of automatic test cases - Google Patents

The development approach and terminal device of automatic test cases Download PDF

Info

Publication number
CN109062780A
CN109062780A CN201810658805.3A CN201810658805A CN109062780A CN 109062780 A CN109062780 A CN 109062780A CN 201810658805 A CN201810658805 A CN 201810658805A CN 109062780 A CN109062780 A CN 109062780A
Authority
CN
China
Prior art keywords
test case
test
user
page
data
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
CN201810658805.3A
Other languages
Chinese (zh)
Other versions
CN109062780B (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.)
Shenzhen Travel Polytron Technologies Inc
Original Assignee
Shenzhen Travel Polytron Technologies Inc
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 Shenzhen Travel Polytron Technologies Inc filed Critical Shenzhen Travel Polytron Technologies Inc
Priority to CN201810658805.3A priority Critical patent/CN109062780B/en
Publication of CN109062780A publication Critical patent/CN109062780A/en
Application granted granted Critical
Publication of CN109062780B publication Critical patent/CN109062780B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

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

Abstract

The present invention is suitable for field of computer technology, provides the development approach and terminal device of a kind of automatic test cases, wherein the described method includes: obtaining user's characteristic information if monitoring has user to log in production system;If user has carried out page operation in production system, user's operation track is recorded, and obtains page inputoutput data;The operation trace is matched with page operation metadata, generates page operation code;According to page inputoutput data and associated data, determine that user carries out page operation data subset;According to the characteristic information of user, page operation code and data subset and pre-set user operating process, test case is generated, and determines the corresponding data subset of test case;Test case and data subset are distributed to the implementation of test cases of multiple dry run ends, receive test result, realizes from use-case and is generated to the automatic flow for executing and completing, mitigates tester's working strength, achievees the purpose that improve test effect.

Description

The development approach and terminal device of automatic test cases
Technical field
The invention belongs to the development approaches and terminal of field of computer technology more particularly to a kind of automatic test cases to set It is standby.
Background technique
Experience of Software Testing Work traditional at present, mainly by tester, document preparation test case, manual according to demand Test assignment is completed, and records test result.Although with advances in technology, being gradually introducing automatic test hand now Section, repeated regression test work can be carried out by way of automatic test, but under test frame of today, test work Make to complete a large amount of manual operations there is still a need for tester, be mainly reflected in following two aspect:
First, when formulating test case, need requirement documents being converted into test case by hand.This working method is deposited The possibility of information distortion during requirement documents are to test case, and there is also fail to reflect that user is true for requirement documents itself The possibility being intended to is operated, to avoid above-mentioned possible appearance, current test case is the institute by covering user as far as possible There is operation, carry out the operating habit of analog subscriber, the availability of checking system increases the workload of tester, and true Upper this method can not really reflect the true operation habit of different type user and individual operation is accustomed to and particular field Operating process under scape, to affect test effect.
Second, in setup test data, need to simulate a large amount of test data so that test uses.Typically A test environment as production environment is established for testing, this mode causes test data huge first, and cannot Realize effective focusing to data needed for specific test case;Secondly because data do not have independence, cause to work as test case Cross-reference data carry out abnormal conditions occur when multiple regression test, affect test effect.And if test is all every time It was solved originally by the returning full of data, this virtually increases testing time and the workload of tester.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of development approach of automatic test cases and terminal device, with Solving existing test case exploitation needs tester to carry out a large amount of manual operationss, and test effect is bad, and increases tester The problem of member's workload.
The first aspect of the embodiment of the present invention provides a kind of development approach of automatic test cases, comprising:
If having listened to user logs in production system, the feature of the user is obtained according to the log-on message of the user Whether information monitors the user in production system progress page operation;
If the user has carried out page operation in the production system, the operation trace of the user is recorded, and is obtained The inputoutput data of the page during taking the user to carry out page operation;
The operation trace is matched with the page operation metadata prestored, generates page operation code;
According to the associated data of the inputoutput data of the page and the inputoutput data of the page, determine The user carries out the data subset of the page operation;
It is grasped according to the characteristic information of the user, the page operation code and the data subset and pre-set user Make process, generate test case, and determines the corresponding data subset of test case;
The test case and the corresponding data subset of the test case are distributed to the multiple dry runs managed Implementation of test cases is held, the test result that multiple dry run ends return is received.
Optionally, it is described the test case and the corresponding data subset of the test case are distributed to managed it is more The implementation of test cases of a dry run end includes:
According to the test case and the corresponding data subset of the test case, operation needed for determining operation test case Ability and memory space;
According to operational capability needed for the operating condition at the multiple dry run ends managed and the operation test case And memory space, the test case and the corresponding data subset of the test case are distributed to corresponding dry run end and held Row test case.
Optionally, the corresponding data subset of the test case includes test case anticipated output data;
The development approach of above-mentioned automatic test cases further include:
According to the test result that the test case anticipated output data and multiple dry run ends return, the survey is determined Pass through the test case of test in example on probation.
Optionally, the development approach of above-mentioned automatic test cases, further includes:
Using the inputoutput data of the page to inquire the association in the database of keyword to the production system Data.
The second aspect of the embodiment of the present invention provides a kind of development device of automatic test cases, comprising:
User's characteristic information acquiring unit, if production system is logged in for having listened to user, according to the user's Log-on message obtains the characteristic information of the user, whether monitors the user in production system progress page operation;
Page operation processing unit records institute if having carried out page operation in the production system for the user The operation trace of user is stated, and obtains the inputoutput data that the user carries out the page during page operation;
A page operation code generating unit, for carrying out the operation trace and the page operation metadata that prestores Match, generates page operation code;
Data subset determination unit, the input for inputoutput data and the page according to the page are defeated The associated data of data out determines that the user carries out the data subset of the page operation;
Use-case generation unit, for characteristic information, the page operation code and the data according to the user Collection and pre-set user operating process generate test case, and determine the corresponding data subset of test case;
Task Dispatching Unit, for the test case and the corresponding data subset of the test case to be distributed to and be managed Multiple dry run ends implementation of test cases of reason receives the test result that multiple dry run ends return.
Optionally, the task Dispatching Unit includes:
Resource determination unit needed for test case, for according to the test case and the corresponding data of the test case Subset, operational capability and memory space needed for determining operation test case;
Test case Dispatching Unit, for the operating condition and the fortune according to the multiple dry run ends managed Operational capability needed for row test case and memory space, by the test case and the corresponding data subset point of the test case It is dealt into the implementation of test cases of corresponding dry run end, receives the test result that multiple dry run ends return.
Optionally, the corresponding data subset of the test case includes test case anticipated output data;
The development device of above-mentioned automatic test cases further include:
Test case detection unit, for being returned according to the test case anticipated output data and multiple dry run ends Test result, determine in the test case by test test case.
Optionally, the development device of above-mentioned automatic test cases, further includes:
Associated data query unit, for using the inputoutput data of the page as keyword to the production system The associated data is inquired in database.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor executes the computer program It realizes such as the step of the above method.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, realizes when the computer program is executed by processor such as the step of the above method.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the embodiment of the present invention is in production system Operation trace and page inputoutput data during the characteristic information of all users, page operation, are effectively acquired, The operating characteristic of regular processing different type user generates page operation code in conjunction with page operation metadata, determine user into Then the data subset of row page operation simulates different scenes, the user's operation process of different characteristics, form test case, And test case and the corresponding data subset of test case are deployed on independent multiple dry run ends, complete test work Make, obtain test result, realize that test job is generated to the automatic flow for executing and completing from use-case, mitigates tester's work Intensity improves the purpose of test effect to reach raising testing efficiency.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of schematic flow diagram of the development approach of automatic test cases provided in an embodiment of the present invention;
Fig. 2 be another embodiment of the present invention provides a kind of automatic test cases development approach schematic flow diagram;
Fig. 3 is a kind of schematic flow diagram of the development approach for automatic test cases that yet another embodiment of the invention provides;
Fig. 4 is a kind of schematic flow diagram of the development approach for automatic test cases that further embodiment of this invention provides;
Fig. 5 is a kind of schematic block diagram of the development device of automatic test cases provided in an embodiment of the present invention;
Fig. 6 be another embodiment of the present invention provides a kind of automatic test cases development device schematic block diagram;
Fig. 7 is a kind of schematic block diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
It is a kind of exemplary flow of the development approach of automatic test cases provided in an embodiment of the present invention referring to Fig. 1, Fig. 1 Figure is illustrated by taking the triggering of the angle of big data analysis platform as an example in this embodiment, here, big data analysis platform base In big data framework, collects data acquisition, data analysis etc. and be applied to one.As shown in Figure 1, in this embodiment, big data point The treatment process of analysis platform may comprise steps of:
S101: if having listened to user logs in production system, the user is obtained according to the log-on message of the user Characteristic information, monitor the user whether the production system carry out page operation.
Here, build first big data analysis platform to production system the page and database real time monitoring and acquisition it is logical Road, wherein production system refer under normal circumstances support routine work running information system, may include creation data, Creation data processing system and production network etc..
Whether the monitoring of big data analysis platform has user to log in production system, if there is user logs in production system, then obtains The log-on message of login user is taken, the feature of user can be inquired into the database of production system according to the log-on message of acquisition Information, here, the database of production system can be with the corresponding relationship of prestored user log-on message and user's characteristic information, according to this Relationship determines the characteristic information of the corresponding user of the log-on message of above-mentioned acquisition, wherein the characteristic information of user may include using Family role, user gradation, area, user's gender, age of user, login time, log duration belonging to user etc..
S102: if the user has carried out page operation in the production system, recording the operation trace of the user, And obtain the inputoutput data that the user carries out the page during page operation.
Specifically, page operation has been carried out in production system if listening to above-mentioned user, big data analysis platform is real-time Record the operation trace of user, including such as: input text clicks button, dragging mouse, a mouse click, double click, right button dish Single choice is selected etc., and here, big data analysis platform has the advantage of the task of computation-intensive, mainly for the treatment of the production of this step Raw a large amount of page operation information.The conversion operations such as flexible calculating, merging, fractionation can be carried out to the data being drawn into.
Meanwhile big data analysis platform can also obtain user and carry out page behaviour in the operation trace of record user in real time The inputoutput data of the page during work, including such as: the page fills in data, chooses data, inquiry data, modification data, deletes Except data etc..
S103: the operation trace is matched with the page operation metadata prestored, generates page operation code.
Here, big data analysis platform obtain user operation trace after, with the page operation metadata in platform into Row matching, generate page operation code, such as: the code of python, ruby format, wherein metadata be also known as broker data, in The operation or multiple operations in operating to User Page with general character are referred mainly to herein after data for the data for describing data, into The one group of operational motion data obtained after row feature extraction, classification, that is, describe the data or code of user's operation.Code is program The source file that is write out with the language that developing instrument is supported of member, be one group by character, symbol or signal element with discrete form Indicate the specific rule system of information.
Specifically, by taking logging in system by user as an example, the basic operational steps completed in the page are needed, comprising:
1, user name is inputted
2, password is inputted
3, login button is clicked
Firstly, realizing automatic test, the page operation code (development languages such as python, ruby volume user is needed Write) it simulates and, that is, it needs above three step to carry out code conversion.Then, code is packaged, formation one is entitled The function of " login system ", function enter ginseng are as follows: user name, password.And this function is that " page operation metadata " is therein It one, can prestore in systems.In actual application, when user the page carried out above-mentioned three step operation after, system The operation trace that can identify user, as the page capture user in the url of login page, in user name input frame and Password Input Frame input, click login button etc., and system thinks that user completes the operation of login system, and system is user's The operation trace of this section of operation, this page operation metadata is matched with " login system ".Finally, being automated generating When test case code, the code of analog subscriber login system just calls " login system " this page operation metadata, that is, adjusts With the code inside " login system " function.It is when running automatic test cases, then corresponding to execute above-mentioned code.
Similar, different page operations can be taken into page operation metadata, it is independent at a function in other words Module had both facilitated different test cases to call, and had decreased size of code, maintain easily.Same similar page operation metadata, May include:
1, input inquiry condition is chosen query result and is edited
2, input inquiry condition is chosen query result and is deleted
3, new Object, including on the page, object properties are filled in, are chosen, pull down selection etc. operation after, click Confirming button
4, the list content for reading multipage, chooses the record with keyword match
5, file uploads, and clicks navigation button, and transmitting file in selection clicks upload button
......
The page operation of user is decomposed into, the operation looked into is changed to the completion additions and deletions of different objects in the different pages, it is corresponding The operation of all users can be all packaged into page operation metadata.Logging in system by user completes operation, publishes system, can Matching is the combination of multiple page operation metadata.
S104: according to the associated data of the inputoutput data of the page and the inputoutput data of the page, Determine that the user carries out the data subset of the page operation.
Specifically, big data analysis platform obtains the input and output number that above-mentioned user carries out the page during page operation According to using such data as keyword, into the database of production system, bid associated data, formation are directed to user's this time page The data subset of operation.
Here, big data analysis platform can be by the characteristic information of the user of above-mentioned acquisition, the page operation code of generation The data subset of above-mentioned page operation is carried out with determining user, carries out structured asso- ciation storage together, and completion data are regular, pick Equal processing again, facilitates subsequent processing.
S105: according to the characteristic information of the user, the page operation code and the data subset, and default use Family operating process generates test case, and determines the corresponding data subset of test case.
Here, big data analysis platform is based on the characteristic information of above-mentioned user, page operation code, data subset, Customized different scenes, the user's operation process of different characteristic type generate test case and data subset under special scenes.
Specifically, big data analysis platform is according to testing requirement, such as: somewhere VIP level male user operating characteristics, User's operation feature etc. scene under the big complications of certain special time period simulates the user behaviour of different scenes, different characteristics Make process, test case is formed according to the characteristic information of above-mentioned user, page operation code and data subset, and determine that test is used The corresponding data subset of example, the data subset content is based on the above-mentioned data subset acquired, including test case input Data, it is contemplated that output data etc., as test case operation when input and operation after determine whether by standard.
S106: the test case and the corresponding data subset of the test case are distributed to the multiple simulations managed Operation end implementation of test cases receives the test result that multiple dry run ends return.
Here, resource needed for big data analysis Platform Analysis test case acquires the state at each dry run end, determines Whether dry run end resource meets testing requirement, flexibly deploys resource using virtual container technology, distribution test case is to respectively A dry run end, dry run termination Acceptance Tests use-case and corresponding data subset, each dry run end are separately operable survey Example on probation returns to test result to big data analysis platform.
Specifically, big data analysis platform is after generating test case data subset corresponding with test case is determined, root According to the operating condition at the multiple dry run ends managed, operational capability needed for analysis operation test case, such as: CPU core number, interior Size etc. and memory space are deposited, such as: hard drive space carries out scheduling of resource, by test case and corresponding data subset It is distributed to corresponding dry run end, each dry run end is logically independent, and the test case and data subset run is each mould Quasi- operation end is exclusive, does not influence each other.In a particular embodiment, dry run end is not necessarily to physical server, can make full use of Virtual container technology creates docker as dry run end in real time in the cloud computing resource pool of multiple servers composition.Mould Quasi- operation end receives the test case and corresponding data subset that big data analysis platform is distributed, and completes the execution of test case, Obtain test result.After whole test cases are completed at each dry run end, test result is returned to big data analysis platform Summarized, the test case being deployed on dry run end and data subset can be deleted if needed, docker resource is returned It receives, resource allocation after the recovery is used to other dry run ends.Here, dry run end may include use-case distribution tests mould Block and data distribution memory module, the use-case distribution tests module at dry run end receive the test of big data analysis platform distribution Use-case cooperates with the distributed data storage module at dry run end, completes the execution of test case, obtain test result, wherein Distributed data storage module receives the corresponding data subset of test case of big data analysis platform distribution.
It is evidenced from the above discussion that the development approach of automatic test cases of the embodiment of the present invention, to the page operation of user It is acquired with page data, and combines big data analysis, automatically generate the test case of specific user or special scenes and right The test data subset answered does not have to manually generated test case, reduces tester's workload.And the multiple moulds of distributed management Quasi- operation end, the automatic allocation for test task of operational capability and memory space according to needed for test case to dry run end execute, Realize that, to test program, the unified control distributed management automated execution of test data improves testing efficiency, using virtual Change container technique, improves the level of resources utilization.Meanwhile a set of test data of test environment different from the past, the present invention are real It applies example and provides more set test datas according to different test scenes and test case, be isolated by different dry run ends, it can be simultaneously Concurrent test, be independent of each other test effect, improves test accuracy.
Referring to Fig. 2, Fig. 2 be another embodiment of the present invention provides the development approaches of automatic test cases a kind of show Meaning flow chart.The difference of embodiment corresponding with Fig. 1 is: described by the test case and the corresponding number of the test case It is distributed to the multiple dry run ends implementation of test cases managed according to subset, receives the test knot that multiple dry run ends return Fruit may include S206.Wherein S201~S205 is identical as S101~S105 in a upper embodiment, referring specifically to above-mentioned reality The associated description for applying S101~S105 in example, does not repeat herein.Specifically, S206 may include S2061~S2062:
S2061: according to the test case and the corresponding data subset of the test case, operation test case institute is determined Need operational capability and memory space.
S2062: according to fortune needed for the operating condition at the multiple dry run ends managed and the operation test case The test case and the corresponding data subset of the test case are distributed to corresponding simulation fortune by calculation ability and memory space The implementation of test cases of row end receives the test result that multiple dry run ends return.
Here, the resource according to needed for test case and data subset and the state at each dry run end use test Example data subset corresponding with test case is distributed to the implementation of test cases of corresponding dry run end, improves successfully tested rate, It is suitble to practical application.
Referring to Fig. 3, Fig. 3 is a kind of showing for the development approach for automatic test cases that yet another embodiment of the invention provides Meaning flow chart.The difference of the present embodiment and above-described embodiment is S307, wherein in S301~S306 and a upper embodiment S101~S106 is identical, referring specifically to the associated description of S101~S106 in above-described embodiment, does not repeat herein.The present embodiment In the development approaches of automatic test cases can also include:
S307: the corresponding data subset of the test case includes test case anticipated output data, according to the test The test result that use-case anticipated output data and multiple dry run ends return determines in the test case through the survey of test Example on probation.
Here, the test case anticipated output data for including according to the corresponding data subset of test case and multiple moulds The test result that quasi- operation end returns, judges test case, determines whether, if passed through, to stop operation by test, If not over corresponding prompt can be generated, which carries the test case information not over test, meets a variety of answer It is needed with scene.
Referring to Fig. 4, Fig. 4 is a kind of showing for the development approach for automatic test cases that further embodiment of this invention provides Meaning flow chart.The difference of the present embodiment and above-described embodiment is S404, wherein in S401~S403 and a upper embodiment S101~S103 is identical, and S405~S407 is identical as S104~S106 in a upper embodiment, referring specifically to above-described embodiment The associated description of middle S101~S103 and S104~S106, does not repeat herein.Automatic test cases in the present embodiment are opened Forwarding method can also include:
S404: using the inputoutput data of the page as described in inquiry in the database of keyword to the production system Associated data.
Here, the database of production system can with the corresponding relationship of the inputoutput data of pre-existing page and associated data, Big data analysis platform obtains the inputoutput data that above-mentioned user carries out the page during page operation, using such data as Keyword bid associated data into the database of production system, if it is possible to inquire, subsequent step be executed, if cannot look into It askes, corresponding prompt can be generated, meet application request.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Corresponding to the development approach of automatic test cases described in foregoing embodiments, Fig. 5 shows the embodiment of the present invention A kind of schematic block diagram of the development device of the automatic test cases provided.The exploitation of the automatic test cases of the present embodiment The each unit that device 500 includes is used to execute each step in the corresponding embodiment of Fig. 1, corresponding referring specifically to Fig. 1 and Fig. 1 Associated description in embodiment, does not repeat herein.The development device 500 of the automatic test cases of the present embodiment includes that user is special It levies information acquisition unit 501, page operation processing unit 502, page operation code generating unit 503, data subset and determines list Member 504, use-case generation unit 505 and task Dispatching Unit 506.
Wherein, user's characteristic information acquiring unit 501, if production system is logged in for having listened to user, according to institute The log-on message for stating user obtains the characteristic information of the user, whether monitors the user in the production system progress page Operation.Page operation processing unit 502 records institute if having carried out page operation in the production system for the user The operation trace of user is stated, and obtains the inputoutput data that the user carries out the page during page operation.Page operation Code generating unit 503 generates page operation for matching the operation trace with the page operation metadata prestored Code.Data subset determination unit 504, the input for inputoutput data and the page according to the page are defeated The associated data of data out determines that the user carries out the data subset of the page operation.Use-case generation unit 505, is used for It is raw according to the characteristic information of the user, the page operation code and the data subset and pre-set user operating process At test case, and determine the corresponding data subset of test case.Task Dispatching Unit 506, for by the test case and The corresponding data subset of the test case is distributed to the multiple dry run ends implementation of test cases managed, receives multiple moulds The test result that quasi- operation end returns.
It is evidenced from the above discussion that the development device of automatic test cases of the embodiment of the present invention, to the institute in production system There are the operation trace and page inputoutput data during the characteristic information of user, page operation, is effectively acquired, advised The operating characteristic of whole processing different type user generates page operation code in conjunction with page operation metadata, determines that user carries out Then the data subset of page operation simulates different scenes, the user's operation process of different characteristics, form test case, and Test case and the corresponding data subset of test case are deployed on independent multiple dry run ends, test job is completed, Test result is obtained, realizes that test job is generated to the automatic flow for executing and completing from use-case, it is strong to mitigate tester's work Degree, to reach raising testing efficiency, improves the purpose of test effect.
Referring to Fig. 6, Fig. 6 be another embodiment of the present invention provides the development devices of another automatic test cases show Meaning property block diagram.The development device 600 of the automatic test cases of the present embodiment includes user's characteristic information acquiring unit 601, page Face operation processing unit 602, page operation code generating unit 603, data subset determination unit 604, use-case generation unit 605, task Dispatching Unit 606, test case detection unit 607 and associated data query unit 608.
Wherein, user's characteristic information acquiring unit 601, page operation processing unit 602, page operation code generating unit 603, data subset determination unit 604, use-case generation unit 605 and task Dispatching Unit 606 are referring specifically to Fig. 5 and Fig. 5 pairs User's characteristic information acquiring unit 501, page operation processing unit 502, page operation code generating unit in the embodiment answered 503, data subset determination unit 504, the associated description of use-case generation unit 505 and task Dispatching Unit 506, do not go to live in the household of one's in-laws on getting married herein It states.
Further, the task Dispatching Unit 606 includes that resource determination unit 6061 needed for test case and test are used Example Dispatching Unit 6062.
Wherein, resource determination unit 6061 needed for test case, for according to the test case and the test case Corresponding data subset, operational capability and memory space needed for determining operation test case.Test case Dispatching Unit 6062 is used Operational capability and storage needed for according to the operating condition at the multiple dry run ends managed and the operation test case The test case and the corresponding data subset of the test case are distributed to corresponding dry run end and execute test by space Use-case receives the test result that multiple dry run ends return.
Further, the corresponding data subset of the test case includes test case anticipated output data.
The test case detection unit 607, for being transported according to the test case anticipated output data and multiple simulations The test result that row end returns determines in the test case through the test case of test.
Further, associated data query unit 608, for using the inputoutput data of the page as keyword to institute It states and inquires the associated data in the database of production system.
It is evidenced from the above discussion that the embodiment of the present invention is acquired the page operation and page data of user, and combine Big data analysis automatically generates the test case and corresponding test data subset of specific user or special scenes, not manually Test case is generated, tester's workload is reduced.And the multiple dry run ends of distributed management, according to needed for test case Operational capability and the automatic allocation for test task of memory space are executed to dry run end, are realized to test program, test data Unified control distributed management automated execution, improves testing efficiency, using virtualization container technique, improves the utilization of resources Efficiency.Meanwhile a set of test data of test environment different from the past, the embodiment of the present invention is according to different test scenes and survey Example on probation provide cover test datas, be isolated by different dry run ends, can concurrent test simultaneously, be independent of each other test effect, Improve test accuracy.
It is a kind of schematic block diagram of terminal device provided by one embodiment of the present invention referring to Fig. 7, Fig. 7.As shown in fig. 7, The terminal device 70 of the embodiment includes: processor 700, memory 701 and is stored in the memory 701 and can be in institute State the computer program 702 run on processor 700, such as the exploitation program of automatic test cases.The processor 700 is held The step in the development approach embodiment of above-mentioned each automatic test cases is realized when the row computer program 702, such as Step 101 shown in FIG. 1 is to 106.Alternatively, the processor 700 realizes above-mentioned each device when executing the computer program 702 The function of each unit in embodiment, such as the function of unit 601 to 608 shown in Fig. 6.
The computer program 702 can be divided into one or more module/units, one or more of moulds Block/unit is stored in the memory 701, and is executed by the processor 700, to complete the present invention.It is one or Multiple module/units can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing Implementation procedure of the computer program 702 in the terminal device 70.For example, the computer program 702 can be divided It is cut into user's characteristic information acquiring unit, page operation processing unit, page operation code generating unit, data subset and determines list Member, use-case generation unit, task Dispatching Unit, test case detection unit and associated data query unit, the specific function of each unit It can be as follows:
If having listened to user logs in production system, the feature of the user is obtained according to the log-on message of the user Whether information monitors the user in production system progress page operation;
If the user has carried out page operation in the production system, the operation trace of the user is recorded, and is obtained The inputoutput data of the page during taking the user to carry out page operation;
The operation trace is matched with the page operation metadata prestored, generates page operation code;
According to the associated data of the inputoutput data of the page and the inputoutput data of the page, determine The user carries out the data subset of the page operation;
It is grasped according to the characteristic information of the user, the page operation code and the data subset and pre-set user Make process, generate test case, and determines the corresponding data subset of test case;
The test case and the corresponding data subset of the test case are distributed to the multiple dry runs managed Implementation of test cases is held, the test result that multiple dry run ends return is received.
Further, described be distributed to the test case and the corresponding data subset of the test case is managed The implementation of test cases of multiple dry run ends includes:
According to the test case and the corresponding data subset of the test case, operation needed for determining operation test case Ability and memory space;
According to operational capability needed for the operating condition at the multiple dry run ends managed and the operation test case And memory space, the test case and the corresponding data subset of the test case are distributed to corresponding dry run end and held Row test case.
Further, the corresponding data subset of the test case includes test case anticipated output data;
Each unit concrete function further include:
According to the test result that the test case anticipated output data and multiple dry run ends return, the survey is determined Pass through the test case of test in example on probation.
Further, each unit concrete function further include:
Using the inputoutput data of the page to inquire the association in the database of keyword to the production system Data.
Above scheme, to during the characteristic information of all users in production system, page operation operation trace and Page inputoutput data, is effectively acquired, the operating characteristic of regular processing different type user, in conjunction with page operation member Data generate page operation code, determine that user carries out the data subset of page operation, then simulate different scenes, difference The user's operation process of characteristic forms test case, and test case and the corresponding data subset of test case is deployed to solely On vertical multiple dry run ends, test job is completed, obtains test result, realizes that test job is generated to from use-case and has executed At automatic flow, mitigate tester's working strength and to reach raising testing efficiency improve the purpose of test effect.
The terminal device 70 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The terminal device may include, but be not limited only to, processor 700, memory 701.It will be understood by those skilled in the art that Fig. 7 is only the example of terminal device 70, does not constitute the restriction to terminal device 70, may include more more or less than illustrating Component, perhaps combine certain components or different components, such as the terminal device can also be set including input and output Standby, network access equipment, bus etc..
Alleged processor 700 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 701 can be the internal storage unit of the terminal device 70, such as the hard disk of terminal device 70 Or memory.The memory 701 is also possible to the External memory equipment of the terminal device 70, such as on the terminal device 70 The plug-in type hard disk of outfit, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) Card, flash card (Flash Card) etc..Further, the memory 701 can also be both interior including the terminal device 70 Portion's storage unit also includes External memory equipment.The memory 701 is for storing the computer program and the terminal Other programs and data needed for equipment.The memory 701, which can be also used for temporarily storing, have been exported or will be defeated Data out.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical 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, the functional units in various embodiments of the present invention may be integrated into 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 realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the meter The content that calculation machine readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, Such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and electricity Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of development approach of automatic test cases characterized by comprising
If having listened to user logs in production system, believed according to the feature that the log-on message of the user obtains the user Whether breath monitors the user in production system progress page operation;
If the user has carried out page operation in the production system, the operation trace of the user is recorded, and obtains institute State the inputoutput data that user carries out the page during page operation;
The operation trace is matched with the page operation metadata prestored, generates page operation code;
According to the associated data of the inputoutput data of the page and the inputoutput data of the page, determine described in User carries out the data subset of the page operation;
According to the characteristic information of the user, the page operation code and the data subset and pre-set user operation stream Journey generates test case, and determines the corresponding data subset of test case;
The test case and the corresponding data subset of the test case are distributed to the multiple dry run ends managed to hold Row test case receives the test result that multiple dry run ends return.
2. the development approach of automatic test cases as described in claim 1, which is characterized in that described by the test case Data subset corresponding with the test case is distributed to the multiple dry run ends implementation of test cases managed
According to the test case and the corresponding data subset of the test case, operational capability needed for determining operation test case And memory space;
According to operational capability needed for the operating condition at the multiple dry run ends managed and the operation test case and deposit Space is stored up, the test case and the corresponding data subset of the test case are distributed to corresponding dry run end and execute survey Example on probation.
3. the development approach of automatic test cases as described in claim 1, which is characterized in that the test case is corresponding Data subset includes test case anticipated output data;
The method also includes:
According to the test result that the test case anticipated output data and multiple dry run ends return, determine that the test is used Pass through the test case of test in example.
4. the development approach of automatic test cases as described in claim 1, which is characterized in that further include:
Using the inputoutput data of the page to inquire the associated data in the database of keyword to the production system.
5. a kind of development device of automatic test cases characterized by comprising
User's characteristic information acquiring unit, if production system is logged in for having listened to user, according to the login of the user Whether the characteristic information of user described in acquisition of information monitors the user in production system progress page operation;
Page operation processing unit records the use if having carried out page operation in the production system for the user The operation trace at family, and obtain the inputoutput data that the user carries out the page during page operation;
Page operation code generating unit, it is raw for matching the operation trace with the page operation metadata prestored At page operation code;
Data subset determination unit, for according to the inputoutput data of the page and the input and output number of the page According to associated data, determine that the user carries out the data subset of the page operation;
Use-case generation unit, for the characteristic information, the page operation code and the data subset according to the user, with And pre-set user operating process, test case is generated, and determine the corresponding data subset of test case;
Task Dispatching Unit is managed for the test case and the corresponding data subset of the test case to be distributed to The implementation of test cases of multiple dry run ends receives the test result that multiple dry run ends return.
6. the development device of automatic test cases as claimed in claim 5, which is characterized in that the task Dispatching Unit packet It includes:
Resource determination unit needed for test case, for according to the test case and corresponding data of the test case Collection, operational capability and memory space needed for determining operation test case;
Test case Dispatching Unit, for according to the operating condition at the multiple dry run ends managed and operation survey Operational capability and memory space needed for example on probation, the test case and the corresponding data subset of the test case are distributed to Corresponding dry run end implementation of test cases receives the test result that multiple dry run ends return.
7. the development device of automatic test cases as claimed in claim 5, which is characterized in that the test case is corresponding Data subset includes test case anticipated output data;
Described device further include:
Test case detection unit, for the survey according to the test case anticipated output data and the return of multiple dry run ends Test result determines in the test case through the test case of test.
8. the development device of automatic test cases as claimed in claim 5, which is characterized in that further include:
Associated data query unit, for using the inputoutput data of the page as keyword to the data of the production system The associated data is inquired in library.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as Claims 1-4 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as Claims 1-4 of realization the method.
CN201810658805.3A 2018-06-25 2018-06-25 Development method of automatic test case and terminal equipment Active CN109062780B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810658805.3A CN109062780B (en) 2018-06-25 2018-06-25 Development method of automatic test case and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810658805.3A CN109062780B (en) 2018-06-25 2018-06-25 Development method of automatic test case and terminal equipment

Publications (2)

Publication Number Publication Date
CN109062780A true CN109062780A (en) 2018-12-21
CN109062780B CN109062780B (en) 2021-08-17

Family

ID=64821012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810658805.3A Active CN109062780B (en) 2018-06-25 2018-06-25 Development method of automatic test case and terminal equipment

Country Status (1)

Country Link
CN (1) CN109062780B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109828914A (en) * 2018-12-28 2019-05-31 宁波瓜瓜农业科技有限公司 Whole process distributed system automated testing method and test macro
CN110597730A (en) * 2019-09-20 2019-12-20 中国工商银行股份有限公司 Scene method based automatic test case generation method and system
CN110765026A (en) * 2019-10-31 2020-02-07 北京东软望海科技有限公司 Automatic testing method and device, storage medium and equipment
CN111104324A (en) * 2019-12-17 2020-05-05 广州品唯软件有限公司 Test case generation method, test case generation device and computer-readable storage medium
CN111177623A (en) * 2019-12-23 2020-05-19 北京健康之家科技有限公司 Information processing method and device
CN111258879A (en) * 2019-03-25 2020-06-09 深圳市远行科技股份有限公司 Service test scheduling method and device based on page acquisition and intelligent terminal
CN111367791A (en) * 2020-02-19 2020-07-03 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating test case
CN111552634A (en) * 2020-03-30 2020-08-18 深圳壹账通智能科技有限公司 Method and device for testing front-end system and storage medium
CN112115057A (en) * 2020-09-24 2020-12-22 京东数字科技控股股份有限公司 Automatic test method, device and equipment for application program page building process
CN112699040A (en) * 2020-12-30 2021-04-23 深圳前海微众银行股份有限公司 Pressure testing method, device, equipment and computer readable storage medium
CN112783754A (en) * 2019-11-07 2021-05-11 北京沃东天骏信息技术有限公司 Method and device for testing page
CN113342629A (en) * 2021-06-08 2021-09-03 微民保险代理有限公司 Operation track restoration method and device, computer equipment and storage medium
CN117312161A (en) * 2023-10-07 2023-12-29 中国通信建设集团有限公司数智科创分公司 Intelligent detection system and method based on automatic login technology

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123227A (en) * 2014-08-13 2014-10-29 广东电网公司信息中心 Method for automatically generating testing cases
US20160342501A1 (en) * 2015-05-18 2016-11-24 Hcl Technologies Limited Accelerating Automated Testing
US20170192882A1 (en) * 2016-01-06 2017-07-06 Hcl Technologies Limited Method and system for automatically generating a plurality of test cases for an it enabled application
US20170322874A1 (en) * 2015-02-20 2017-11-09 Vmware, Inc. Generating test cases
CN107943683A (en) * 2017-10-30 2018-04-20 北京奇虎科技有限公司 A kind of test script generation method, device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123227A (en) * 2014-08-13 2014-10-29 广东电网公司信息中心 Method for automatically generating testing cases
US20170322874A1 (en) * 2015-02-20 2017-11-09 Vmware, Inc. Generating test cases
US20160342501A1 (en) * 2015-05-18 2016-11-24 Hcl Technologies Limited Accelerating Automated Testing
US20170192882A1 (en) * 2016-01-06 2017-07-06 Hcl Technologies Limited Method and system for automatically generating a plurality of test cases for an it enabled application
CN107943683A (en) * 2017-10-30 2018-04-20 北京奇虎科技有限公司 A kind of test script generation method, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
董昕: "一种自动生成软件测试用例的新方法", 《计算机应用与软件》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109828914A (en) * 2018-12-28 2019-05-31 宁波瓜瓜农业科技有限公司 Whole process distributed system automated testing method and test macro
CN111258879A (en) * 2019-03-25 2020-06-09 深圳市远行科技股份有限公司 Service test scheduling method and device based on page acquisition and intelligent terminal
CN110597730A (en) * 2019-09-20 2019-12-20 中国工商银行股份有限公司 Scene method based automatic test case generation method and system
CN110597730B (en) * 2019-09-20 2023-08-22 中国工商银行股份有限公司 Automatic test case generation method and system based on scene method
CN110765026A (en) * 2019-10-31 2020-02-07 北京东软望海科技有限公司 Automatic testing method and device, storage medium and equipment
CN110765026B (en) * 2019-10-31 2023-08-01 望海康信(北京)科技股份公司 Automatic test method, device, storage medium and equipment
CN112783754A (en) * 2019-11-07 2021-05-11 北京沃东天骏信息技术有限公司 Method and device for testing page
CN111104324A (en) * 2019-12-17 2020-05-05 广州品唯软件有限公司 Test case generation method, test case generation device and computer-readable storage medium
CN111104324B (en) * 2019-12-17 2023-08-18 广州品唯软件有限公司 Method and device for generating test cases and computer readable storage medium
CN111177623A (en) * 2019-12-23 2020-05-19 北京健康之家科技有限公司 Information processing method and device
CN111367791A (en) * 2020-02-19 2020-07-03 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating test case
CN111367791B (en) * 2020-02-19 2023-08-01 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating test case
CN111552634A (en) * 2020-03-30 2020-08-18 深圳壹账通智能科技有限公司 Method and device for testing front-end system and storage medium
CN112115057A (en) * 2020-09-24 2020-12-22 京东数字科技控股股份有限公司 Automatic test method, device and equipment for application program page building process
CN112699040A (en) * 2020-12-30 2021-04-23 深圳前海微众银行股份有限公司 Pressure testing method, device, equipment and computer readable storage medium
CN112699040B (en) * 2020-12-30 2024-02-23 深圳前海微众银行股份有限公司 Pressure testing method, device, equipment and computer readable storage medium
CN113342629B (en) * 2021-06-08 2023-03-07 微民保险代理有限公司 Operation track restoration method and device, computer equipment and storage medium
CN113342629A (en) * 2021-06-08 2021-09-03 微民保险代理有限公司 Operation track restoration method and device, computer equipment and storage medium
CN117312161A (en) * 2023-10-07 2023-12-29 中国通信建设集团有限公司数智科创分公司 Intelligent detection system and method based on automatic login technology

Also Published As

Publication number Publication date
CN109062780B (en) 2021-08-17

Similar Documents

Publication Publication Date Title
CN109062780A (en) The development approach and terminal device of automatic test cases
CN106067080B (en) Configurable workflow capabilities are provided
CN104954453A (en) Data mining REST service platform based on cloud computing
CN110083455B (en) Graph calculation processing method, graph calculation processing device, graph calculation processing medium and electronic equipment
CN106547882A (en) A kind of real-time processing method and system of big data of marketing in intelligent grid
CN109240688A (en) Interface development method, electronic device and readable storage medium storing program for executing
CN104391697B (en) The cloud resource management system and method for application program
CN113900958A (en) Test case script generation method, system, medium and electronic device
CN112416369B (en) Intelligent deployment method oriented to heterogeneous mixed environment
CN111159897B (en) Target optimization method and device based on system modeling application
CN108416568A (en) Government affairs business data processing method, device and terminal device
CN107911251A (en) A kind of method for configuring network equipment, device and medium
CN113778871A (en) Mock testing method, device, equipment and storage medium
CN109344066A (en) A kind of test method of browser page, system and terminal
CN115392501A (en) Data acquisition method and device, electronic equipment and storage medium
CN110868324A (en) Service configuration method, device, equipment and storage medium
CN112559525B (en) Data checking system, method, device and server
CN110019501A (en) A kind of collecting method, device and terminal device
CN107480189A (en) A kind of various dimensions real-time analyzer and method
CN113918534A (en) Policy processing system and method
CN115713216A (en) Robot scheduling method and related equipment
CN114090021A (en) System deployment method, device, electronic equipment and storage medium
Di Martino et al. A platform for mbdaaas based on patterns and skeletons: The python based algorithms compiler
CN114756301A (en) Log processing method, device and system
CN111159203B (en) Data association analysis method, platform, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant