CN110334004A - A kind of test data building method and device, electronic equipment and storage medium - Google Patents

A kind of test data building method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110334004A
CN110334004A CN201910441368.4A CN201910441368A CN110334004A CN 110334004 A CN110334004 A CN 110334004A CN 201910441368 A CN201910441368 A CN 201910441368A CN 110334004 A CN110334004 A CN 110334004A
Authority
CN
China
Prior art keywords
test
data
test data
code
construction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910441368.4A
Other languages
Chinese (zh)
Inventor
吕小立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910441368.4A priority Critical patent/CN110334004A/en
Publication of CN110334004A publication Critical patent/CN110334004A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

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

Abstract

The present invention relates to software testing technology field, a kind of test data building method and device, electronic equipment and storage medium are disclosed.The described method includes: searching affiliated party's node corresponding with test assignment title included by testing process, obtain journal entry included by the corresponding history log of affiliated party's node, obtain code performed by the test operation of journal entry pair, and code is successively synthesized according to sequence of the journal entry in history log to obtain test data construction code, test data is obtained by executing test data construction code constructs.Business operation, functional unit as involved in testing process and data flow are embodied in the form of test data constructs code, it can construct to obtain test data by executing test data construction code, to simplify data configuration process, the construction efficiency of test data is improved.

Description

A kind of test data building method and device, electronic equipment and storage medium
Technical field
The present invention relates to software testing technology field, in particular to a kind of test data building method and device, electronics are set Standby and storage medium.
Background technique
When testing project, it will usually be constructed according to the operation flow of project to test data.Work as needs When testing mega project, since the server architecture of mega project is complicated and operation flow is related to more affiliated parties, in structure It needs to coordinate more affiliated parties when making test data and carries out manual operation, the UI operation of application program, the transmission of service end data and number According to each generic operations such as library storages, to cause the construction inefficiency of test data.As it can be seen that when facing mega project, it is existing Some test data building method processes are cumbersome and inefficiency, need a kind of new test data building method.
Summary of the invention
In order to solve the problems, such as that process existing for existing test data building method is cumbersome and inefficiency, the present invention mention A kind of test data building method and device, electronic equipment and storage medium are supplied.
First aspect of the embodiment of the present invention discloses a kind of test data building method, which comprises
The test assignment title according to included by testing process searches the corresponding affiliated party's section of the test assignment title Point;
Obtain the corresponding history log of affiliated party's node;Wherein, the history log includes corresponding to several tests The journal entry of operation;
Obtain code performed by the corresponding test operation of the journal entry;
According to sequence of the journal entry in the history log, several test operation institutes corresponding to the journal entry The code of execution is successively synthesized to obtain test data construction code;
The test data construction code is executed, construction obtains test data.
Second aspect of the embodiment of the present invention discloses a kind of test data constructing apparatus, the test data constructing apparatus packet It includes:
Node searching unit searches the test assignment name for the test assignment title according to included by testing process Claim corresponding affiliated party's node;
Log acquisition unit, for obtaining the corresponding history log of affiliated party's node;Wherein, the history log packet Include the journal entry corresponding to several test operations;
Code obtaining unit, for obtaining code performed by the corresponding test operation of the journal entry;
Code synthesis unit, for the sequence according to the journal entry in the history log, to the journal entry pair Code performed by several test operations answered successively is synthesized to obtain test data construction code;
Data configuration unit, for executing the test data construction code, construction obtains test data.
The third aspect of the embodiment of the present invention discloses a kind of electronic equipment, and the electronic equipment includes:
Processor;
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is by the processing When device executes, a kind of test data building method disclosed in first aspect of the embodiment of the present invention is realized.
Fourth aspect of the embodiment of the present invention discloses a kind of computer readable storage medium, stores computer program, institute Stating computer program makes computer execute a kind of test data building method disclosed in first aspect of the embodiment of the present invention.
The technical solution that the embodiment of the present invention provides can include the following benefits:
A kind of test data building method provided by the present invention includes the following steps: the survey according to included by testing process Task names are tried, the corresponding affiliated party's node of test assignment title is searched;Obtain the corresponding history log of affiliated party's node;It obtains The corresponding code of journal entry;According to sequence of the journal entry in history log, the corresponding code of journal entry is successively synthesized Obtain history log code;It executes test data and constructs code, construction obtains test data.
Under the method, test data construction is obtained by being synthesized the corresponding code of journal entry included by testing process Code executes test data construction code constructs and obtains test data, and carrying out participation without the more affiliated parties of coordination can be complete It is constructed at test data, simplifies test data construction process, improve test data construction efficiency.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited Invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and in specification together principle for explaining the present invention.
Fig. 1 is the functional block diagram of one embodiment of test data constructing apparatus of the present invention;
Fig. 2 is the flow diagram of one embodiment of test data building method of the present invention;
Fig. 3 is the flow diagram of another embodiment of test data building method of the present invention;
Fig. 4 is the functional block diagram of another embodiment of test data constructing apparatus of the present invention;
Fig. 5 is the functional block diagram of the another embodiment of test data constructing apparatus of the present invention.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Implementation environment of the invention can be electronic equipment, such as laptop, desktop computer, terminal process equipment.
Fig. 1 is the functional block diagram of one embodiment of test data constructing apparatus disclosed by the embodiments of the present invention.Test Data structuring apparatus 100 can be above-mentioned electronic equipment.As shown in Figure 1, test data constructing apparatus 100 may include with next A or multiple components: processing component 102, memory 104, power supply module 106, multimedia component 108, audio component 110, sensing Device assembly 114 and communication component 116.
Processing component 102 usually control test data constructing apparatus 100 integrated operation, such as with display, call, Data communication, camera operation and the associated operation of record operation etc..Processing component 102 may include one or more processing Device 118 executes instruction, to complete all or part of the steps of following methods.In addition, processing component 102 may include one Or multiple modules, for convenient for the interaction between processing component 102 and other assemblies.For example, processing component 102 may include more Media module, for facilitate the interaction between multimedia component 108 and processing component 102.
Memory 104 is configured as storing various types of data to support the operation in test data constructing apparatus 100. The example of these data includes the instruction of any application or method for operating on test data constructing apparatus 100. Memory 104 can realize by any kind of volatibility or non-volatile memory device or their combination, it is such as static with Machine accesses memory (StaticRandomAccessMemory, abbreviation SRAM), electrically erasable programmable read-only memory (Ele CtricallyErasableProgrammable Read-OnlyMemory, abbreviation EEPROM), erasable programmable is read-only to be deposited Reservoir (Erasable ProgrammableReadOnlyMemory, abbreviation EPROM), programmable read only memory (ProgrammableRed-OnlyMemory, abbreviation PROM), read-only memory (Read-Only Memory, abbreviation ROM), magnetic Memory, flash memory, disk or CD.It is also stored with one or more modules in memory 104, is used for this or more A module is configured to be executed by the one or more processors 118, all or part of in method as follows to complete Step.
Power supply module 106 provides electric power for the various assemblies of test data constructing apparatus 100.Power supply module 106 can wrap Include power-supply management system, one or more power supplys and other with for test data constructing apparatus 100 generate, manage, and distribute electricity The associated component of power.
Multimedia component 108 includes one output interface of offer between test data constructing apparatus 100 and user Screen.In some embodiments, screen may include liquid crystal display (LiquidCrystalDisplay, abbreviation LCD) and touching Touch panel.If screen includes touch panel, screen may be implemented as touch screen, to receive input signal from the user. Touch panel includes one or more touch sensors to sense the gesture on touch, slide, and touch panel.Touch sensor The boundary of a touch or slide action can be not only sensed, but also detects duration relevant to touch or slide and pressure Power.Screen can also include display of organic electroluminescence (OrganicLightEmittingDisplay, abbreviation OLED).
Audio component 110 is configured as output and/or input audio signal.For example, audio component 110 includes a Mike Wind (Microphone, abbreviation MIC), when test data constructing apparatus 100 is in operation mode, such as call model, logging mode When with speech recognition mode, microphone is configured as receiving external audio signal.The received audio signal can be further It is stored in memory 104 or is sent via communication component 116.In some embodiments, audio component 110 further includes a loudspeaking Device is used for output audio signal.
Sensor module 114 includes one or more sensors, for providing each side for test data constructing apparatus 100 The status assessment in face.For example, sensor module 114 can detecte test data constructing apparatus 100 open/close state, The relative positioning of component, sensor module 114 can also detect test data constructing apparatus 100 or test data constructing apparatus The position change of 100 1 components and the temperature change of test data constructing apparatus 100.In some embodiments, the sensing Device assembly 114 can also include Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 116 is configured to facilitate wired or wireless side between test data constructing apparatus 100 and other equipment The communication of formula.Test data constructing apparatus 100 can access the wireless network based on communication standard, such as WiFi (Wireless- Fidelity, Wireless Fidelity).In embodiments of the present invention, communication component 116 receives via broadcast channel and comes from external broadcasting pipe The broadcast singal or broadcast related information of reason system.In embodiments of the present invention, communication component 116 further includes near-field communication (NearFieldCommunication, abbreviation NFC) module, for promote short range communication.For example, can be based in NFC module Radio frequency identification (RadioFrequency Identification, abbreviation RFID) technology, Infrared Data Association (InfraredDataAssociation, abbreviation IrDA) technology, ultra wide band (UltraWideband, abbreviation UWB) technology, bluetooth Technology and other technologies are realized.
In the exemplary embodiment, test data constructing apparatus 100 can be by one or more application specific integrated circuit (ApplicationSpecificIntegratedCircuit, abbreviation ASIC), digital signal processor, Digital Signal Processing are set Standby, programmable logic device, field programmable gate array, controller, microcontroller, microprocessor or other electronic components are real It is existing, for executing following methods.
Referring to Fig. 2, Fig. 2 is the process signal of one embodiment of test data building method disclosed by the embodiments of the present invention Figure.Wherein, test data building method described in Fig. 2 is suitable for the electricity such as laptop, desktop computer, terminal process equipment Sub- equipment.The embodiment of the present invention describes test data building method by taking electronic equipment as an example, should not constitute the restriction to this method. The test data building method as shown in Figure 2 may comprise steps of:
201, the test assignment title according to included by testing process searches the corresponding affiliated party's section of test assignment title Point.
In the embodiment of the present invention, numerous business modules and functional unit that testing process is covered are known as affiliated party's section Point, test assignment title included by testing process correspond to several affiliated party's nodes.
As an alternative embodiment, corresponding test keyword is arranged for each affiliated party's node, and according to every One affiliated party's node and the corresponding test keyword of each affiliated party's node construct linked database, so as to be flowed according to test Test assignment title included by journey searches the corresponding affiliated party's node of test assignment title in linked database.For example, surveying Examination process includes following affiliated party's node: affiliated party node a is that user application end submits application and subscriber data to connect Mouthful, then it can be affiliated party's node a setting test keyword (application is submitted at user application end, submits subscriber data), association Fang Jiedian b is the interface for receiving application and subscriber data that user is submitted, then can be affiliated party's node b setting test keyword (receiving application, receive subscriber data), affiliated party node c is according to the business mould of subscriber data audit the submitted application of user Block can be then affiliated party's node c setting test keyword (audit application), by above-mentioned affiliated party's node and the test being correspondingly arranged Keyword is associated storage, can construct to obtain linked database, so that affiliated party's node and test keyword be carried out pair It answers, convenient for searching corresponding affiliated party's node according to the corresponding test keyword of test assignment title.
In the embodiment of the present invention, tester's business operation according to performed by test assignment title and the business mould being related to Block is correspondingly arranged test assignment description for test assignment title, thus according to test assignment describe included in test it is crucial Word matches affiliated party's node.
As an alternative embodiment, the corresponding test assignment of test assignment title for obtaining tester's input is retouched It states, the included test keyword of test assignment description is searched in linked database, and search test assignment description and wrapped The corresponding affiliated party's node of the test keyword included, by the included corresponding affiliated party of test keyword of test assignment description Node is set as the corresponding affiliated party's node of test assignment title.For example, the first test assignment of testing process is entitled " to submit Shen Please and submit subscriber data ", tester is that the test assignment of test assignment title input is described as " in user using journey Submit application and submit subscriber data in sequence end ", it is crucial test can be found according to test assignment description in linked database Word (application is submitted at user application end, submits subscriber data), and the test of above-mentioned test keyword and affiliated party's node a Keyword matches, so affiliated party node a is set as the corresponding affiliated party's node of the first test assignment title.As it can be seen that passing through Test keyword can accurately match test assignment title with affiliated party node.
202, the corresponding history log of affiliated party's node is obtained.
In the embodiment of the present invention, history log includes the journal entry corresponding to several test operations, and history log is with text Format is stored.Such as the corresponding affiliated party's node a of first test assignment title corresponds in history log in step 201 Following journal entry: subscriber data is read;Read the application that user is submitted at user application end;To next affiliated party's node The application that transmission subscriber data and user are submitted, to clearly know operation involved in affiliated party's node.
203, code performed by the corresponding test operation of journal entry is obtained.
In the embodiment of the present invention, if code will generate corresponding day after executing dry run involved in affiliated party's node Will item.After step 202 has known journal entry corresponding to affiliated party node a, life can be got according to the record of journal entry At the code of the journal entry, such as affiliated party node a, according to its corresponding several journal entry, correspond to if can get The code of dry journal entry, as reading subscriber data, reading application and send subscriber data and user institute that user is submitted The code of the application of submission, above-mentioned code also record the path for having storage subscriber data and for sending subscriber data and user The Internet protocol address of the next affiliated party's node for the application submitted, so that analysis obtains industry included in testing process Business module, functional unit and data flow.
204, the sequence according to journal entry in history log, generation performed by several test operations corresponding to journal entry Code is successively synthesized to obtain test data construction code.
In the embodiment of the present invention, by the way that the corresponding code of journal entries several in testing process is combined construction Obtain the test data construction code of the testing process.For example, for the testing process in step 201, by step 202 with After the analysis of step 203, the code that the testing process includes following functions has been got: reading subscriber data;Read user The application submitted;The application that transmission subscriber data and user are submitted;Receive subscriber data;Receive the Shen that user is submitted Please;The application that audit user is submitted.According to sequence of the corresponding journal entry of above-mentioned code in history log, by above-mentioned code It is successively synthesized, can be realized and test data construction code is synthesized according to testing process.
205, it executes test data and constructs code, construction obtains test data.
In the embodiment of the present invention, test data construction code completely embodies each business module and function in testing process The function that component is realized.
As an alternative embodiment, executing test data constructs code, so that test data construction code includes Several test operations performed by code treated according to sequence of the corresponding journal entry of test operation in history log Test data carries out test processes, so that construction obtains test data.The operation of the application program UI as included by testing process, The business operations such as database access operation, data transfer operation have all been embodied by code, by executing test data construction Code can be completed originally to need operate and several test operations by being manually performed UI in sequence, and construction obtains testing number According to so that the tester without coordinating more affiliated parties participates in test, and surveys when be related to the project testing of more affiliated parties The efficiency that efficiency depends on test data construction code is tried, is not influenced by more affiliated parties, simplifies the construction stream of test data Journey greatly improves the construction efficiency of test data.
As it can be seen that implementing method described in Fig. 2, by searching for included by history log corresponding with test assignment title Journal entry, and code performed by the corresponding test operation of journal entry is obtained, accessed code is being gone through according to journal entry Sequence in history log is successively synthesized, and can be synthesized to obtain the test data construction code corresponding to testing process, will be surveyed Business operation, functional unit and data flow involved in examination process construct code with test data and are embodied, and execute survey Examination data configuration code constructs obtain test data, to be not necessarily to coordinate the people of more affiliated parties in the construction process of test data Member participates in test data construction, simplifies data configuration process, improves the construction efficiency of test data.
Referring to Fig. 3, Fig. 3 is the process signal of another embodiment of test data building method disclosed by the embodiments of the present invention Figure.As shown in figure 3, the test data building method may comprise steps of:
301, the test assignment title according to included by testing process searches the corresponding affiliated party's section of test assignment title Point.
In the embodiment of the present invention, numerous business modules and functional unit that testing process is covered are known as affiliated party's section Point, test assignment title included by testing process correspond to several affiliated party's nodes.
302, the corresponding history log of affiliated party's node is obtained.
In the embodiment of the present invention, history log includes the journal entry corresponding to several test operations, and history log is with text Format is stored.
303, code performed by the corresponding test operation of journal entry is obtained.
In the embodiment of the present invention, if code will generate corresponding day after executing dry run involved in affiliated party's node Will item.
304, the sequence according to journal entry in history log, generation performed by several test operations corresponding to journal entry Code is successively synthesized to obtain test data construction code.
In the embodiment of the present invention, by the way that the corresponding code of journal entries several in testing process is successively combined construction, It can be obtained the test data construction code of the testing process.
305, it executes test data and constructs code, construction obtains test data.
In the embodiment of the present invention, test data construction code completely embodies each business module and function in testing process The function that component is realized.
It is appreciated that can be the item tested for constructing the data to be tested of test data in testing process The user data that mesh was collected in day-to-day operation is also possible to the number to be tested for fc-specific test FC project of arteface According to.
As an alternative embodiment, in the sequence according to journal entry in history log, it is corresponding to journal entry Code performed by several test operations is synthesized after obtaining test data construction code, and is executing testing process packet The test data construction code included acquires the institute of code performed by several test operations before construction obtains test data The data type of several historical datas of test processes, and if the institute of the code according to performed by several test operations test processes The data type of dry historical data constructs to obtain data to be tested.Specifically, it is assumed that the history number of testing process institute test processes According to the personal data for user, then can according to included by personal data data type such as name, age and working condition and on It states the corresponding data of data type and limits range, construction obtains the number to be tested for meeting data type and limiting range in data According to if construction obtains data to be tested (Zhang San 20 years old, has no property), due to can in high volume construct data to be tested, so test stream Without being limited to collected data to be tested in journey;
It still optionally further, can in the case where the data type and data for acquiring data to be tested limit range Specifically data to be tested are used for specific test item to Mass production, such as testing process can be according to default age bracket to user Age audited, produce a collection of age data at this time and be not at the user data of default age bracket or generate a collection of year Age data are in the user data of default age bracket to construct test data, to detect testing process to above-mentioned specific user's number According to test processes situation, thus realize qualifications carry out data configuration.
306, the construction duration for constructing each test data is obtained, test number of the duration greater than pre-set configuration duration will be constructed According to being set as abnormality test data.
In the embodiment of the present invention, after synthesis obtains test data construction code, surveyed as involved in testing process Examination operation is only executed by code, under the conditions of efficiency of code execution is consistent, the theoretically construction duration of each data to be tested It should be less than pre-set configuration duration.
As an alternative embodiment, constructing code executing the test data that testing process includes, construction is obtained After test data, the construction duration for constructing each test data is obtained, and survey of the duration greater than pre-set configuration duration will be constructed Examination data are set as abnormality test data.For example, when each section of code tester handles the operation of data to be tested in detection testing process It is long, get the operation that test data construction code reads user data, sends user data, user data is waited to receive audit Duration, to get the construction duration of the test data;It is appreciated that the case where test data construction code normally executes Under, the operation duration of above steps should not fluctuate it is excessive, so that the construction duration of test data should be less than pre-set configuration duration, If detecting, construction duration is greater than the test data of pre-set configuration duration, illustrates that the test data or the test data are corresponding There are problems in this testing process for data to be tested, the test data are set as abnormality test data at this time, so as to timely It was found that the problem of in the presence of test process.
Still optionally further, will construct duration be greater than pre-set configuration duration test data be set as abnormality test data it Afterwards, operation duration of several test operations in test processes abnormality test data in testing process is obtained, and to tester Several test operations are being tested in push abnormality test data, the corresponding data to be tested of abnormality test data and testing process Handle the operation duration when abnormality test data.By by abnormality test data and data relevant to abnormality test data It is pushed to tester, tester can analyze testing process according to above-mentioned data, or check test data construction Code, and then solve the problems, such as testing process.
As it can be seen that method described in implementing Fig. 3, can specifically be tested by constructing specific data to be tested;This Outside, abnormality test data are got by detecting the construction duration of test data, convenient for being solved present in testing process in time Problem.
Referring to Fig. 4, Fig. 4 is the functional module of another embodiment of test data constructing apparatus disclosed by the embodiments of the present invention Schematic diagram.As shown in figure 4, the test data constructing apparatus may include: association construction unit 401, node searching unit 402, Log acquisition unit 403, Code obtaining unit 404, Code synthesis unit 405 and data configuration unit 406, wherein
It is associated with construction unit 401, for corresponding test keyword to be arranged for each affiliated party's node, and according to each pass Join Fang Jiedian and the corresponding test keyword of each affiliated party's node, constructs linked database;
Node searching unit 402 searches test assignment title for the test assignment title according to included by testing process Corresponding affiliated party's node;
Log acquisition unit 403, for obtaining the corresponding history log of affiliated party's node;Wherein, the history log packet Include the journal entry corresponding to several test operations;
Code obtaining unit 404, for obtaining code performed by the corresponding test operation of journal entry;
Code synthesis unit 405, for the sequence according to journal entry in history log, several surveys corresponding to journal entry The performed code of examination operation is successively synthesized to obtain test data construction code;
Data configuration unit 406, for executing test data construction code, construction obtains test data;
Wherein, node searching unit 402 specifically includes:
Subelement 4021 is obtained, the corresponding test assignment description of the test assignment title for obtaining tester's input;
Subelement 4022 is searched, for searching the included test keyword of test assignment description in linked database, And search the included corresponding affiliated party's node of test keyword of test assignment description;
Subelement 4023 is set, for setting the included corresponding affiliated party's node of test keyword of test assignment description For the corresponding affiliated party's node of test assignment title.
In the embodiment of the present invention, the linked database according to constructed by association construction unit 401 of node searching unit 402 is looked into Affiliated party's node corresponding to test assignment title is looked for, log acquisition unit 403 obtains the corresponding history of above-mentioned affiliated party's node Journal entry in log, Code obtaining unit 404 obtains the corresponding code of journal entry, so that Code synthesis unit 405 will be above-mentioned Code synthesis is that test data constructs code, and data configuration unit 406 constructs code by executing test data, and construction is surveyed Try data.
As an alternative embodiment, association construction unit 401 is that corresponding test is arranged in each affiliated party's node Keyword, and according to each affiliated party's node and the corresponding test keyword of each affiliated party's node, linked database is constructed, from And node searching unit 402 can search test in linked database and appoint according to the test assignment title included by testing process The corresponding affiliated party's node of title of being engaged in.For example, testing process includes following affiliated party's node: affiliated party node a answers for user The interface that application and subscriber data are submitted with program end, then being associated with construction unit 401 can be crucial for affiliated party's node a setting test Word (application is submitted at user application end, submits subscriber data), affiliated party node b be the application submitted of reception user and The interface of subscriber data, then be associated with construction unit 401 (can receive application, receive and use for affiliated party's node b setting test keyword Family data), affiliated party node c is the business module that the submitted application of user is audited according to subscriber data, then is associated with construction unit 401 can be affiliated party's node c setting test keyword (audit application), and above-mentioned affiliated party's node and the test being correspondingly arranged are closed Keyword is associated storage, can construct to obtain linked database, thus by affiliated party's node with test keyword carry out it is corresponding, Convenient for searching corresponding affiliated party's node according to the corresponding test keyword of test assignment title.
As an alternative embodiment, obtaining the test assignment title pair that subelement 4021 obtains tester's input The test assignment description answered searches subelement 4022 and searches the included test key of test assignment description in linked database Word, and the included corresponding affiliated party's node of test keyword of test assignment description is searched, setting subelement 4023 will be surveyed The corresponding affiliated party's node of test keyword included by examination task description is set as the corresponding affiliated party's node of test assignment title. For example, the first test assignment of testing process is entitled " submit application and submit subscriber data ", tester appoints for the test The test assignment of business title input is described as " submit application at user application end and submit subscriber data ", and it is single to search son Member 4022 can find test keyword according to test assignment description in linked database, and (user application end is submitted Subscriber data is submitted in application), and the test keyword of above-mentioned test keyword and affiliated party node a matches, so setting Affiliated party node a is set as the corresponding affiliated party's node of the first test assignment title by unit 4023.As it can be seen that crucial by test Word, node searching unit 402 can accurately match test assignment title with affiliated party node.
As an alternative embodiment, data configuration unit 406, which executes test data, constructs code, so that test number Code performed by several test operations for including according to construction code is according to the corresponding journal entry of test operation in history day Sequence in will treats test data and carries out test processes, so that construction obtains test data.As included by testing process The business operations such as application program UI operation, database access operation, data transfer operation have all been embodied by code, data structure Making unit 406 can complete originally to need to be operated by being manually performed UI in sequence by executing test data construction code And several test operations, construction obtain test data, thus when be related to the project testing of more affiliated parties, it is more without coordinating The tester of affiliated party participates in test, and testing efficiency depends on the efficiency of test data construction code, not by more affiliated parties Influence, simplify the construction process of test data, greatly improve the construction efficiency of test data.
As it can be seen that implementing method described in Fig. 4, searches and survey by node searching unit 402 and log acquisition unit 403 Journal entry included by the corresponding history log of task names is tried, and has Code obtaining unit 404 to obtain the corresponding survey of journal entry The performed code of examination operation, Code synthesis unit 405 are suitable in history log according to journal entry by accessed code Sequence is synthesized, and can synthesize to obtain the test data construction code corresponding to testing process, by industry involved in testing process Business operation, functional unit and data flow construct code with test data and are embodied, and data configuration unit 406 executes test number Test data is obtained according to construction code constructs, to join in the construction process of test data without coordinating the personnel of more affiliated parties It is constructed with test data, simplifies data configuration process, improve the construction efficiency of test data.
Referring to Fig. 5, Fig. 5 is the functional module of the another embodiment of test data constructing apparatus disclosed by the embodiments of the present invention Schematic diagram.Test data constructing apparatus shown in fig. 5 is that test data constructing apparatus as shown in Figure 4 optimizes. Compared with test data constructing apparatus shown in Fig. 4, test data constructing apparatus shown in fig. 5 can also include: number to be measured According to structural unit 407, abnormality detecting unit 408 and abnormal push unit 409, wherein
Testing data structural unit 407, for suitable in history log according to journal entry in Code synthesis unit 405 Sequence, code performed by several test operations corresponding to journal entry are synthesized after obtaining test data construction code, with And execute the test data that testing process includes in data configuration unit 406 and construct code, before construction obtains test data, point Analysis obtain the institute of code performed by several test operations test processes several historical datas data type, with according to do survey The data type of several historical datas of the performed code institute test processes of examination operation constructs to obtain data to be tested;
Abnormality detecting unit 408 constructs generation for executing the test data that testing process includes in data configuration unit 406 Code after construction obtains test data, obtains the construction duration for constructing each test data, and construction duration is greater than default structure The test data for making duration is set as abnormality test data;
Abnormal push unit 409, for test of the duration greater than pre-set configuration duration will to be constructed in abnormality detecting unit 408 Data are set as after abnormality test data, obtain in testing process several test operations in test processes abnormality test data Duration is operated, and pushes abnormality test data, the corresponding data to be tested of abnormality test data and test stream to tester Operation duration of several test operations described in test processes when abnormality test data in journey.
In the embodiment of the present invention, testing data structural unit 407 is configured to the data to be tested of testing process;Abnormal inspection The abnormality test data in the detection test data of unit 408 are surveyed, and different with this from abnormal push unit 409 to tester's push The relevant test content of normal test data.
As an alternative embodiment, the sequence in Code synthesis unit 405 according to journal entry in history log, Code performed by several test operations corresponding to journal entry is synthesized after obtaining test data construction code, Yi Ji Data configuration unit 406 executes the test data construction code that testing process includes, before construction obtains test data, number to be measured The data class of several historical datas of the institute of code performed by several test operations test processes is acquired according to structural unit 407 Type, and the data type of several historical datas of the institute of the code according to performed by several test operations test processes construct to obtain to Test data.Specifically, it is assumed that the historical data of testing process institute test processes is the personal data of user, then testing data structure Making unit 407 can be according to the data type included by personal data such as name, age and working condition and above-mentioned data type, structure Make to obtain the data to be tested for meeting data type and limiting range in data, as construction obtain data to be tested (Zhang San, 20 Have no property in year), due to can in high volume construct data to be tested, so collected to be tested without being limited in testing process Data.
Still optionally further, the data type and data of data to be tested are acquired in testing data structural unit 407 In the case where limiting range, can Mass production specifically data to be tested are used for specific test item, such as testing process meeting It is audited according to age of the default age bracket to user, produces the use that a collection of age data is not at default age bracket at this time User data generates user data of a collection of age data in default age bracket to construct test data, to detect test Process is to the test processes situations of above-mentioned specific user's data, so that realizing qualifications carries out data configuration.
As an alternative embodiment, executing the test data structure that testing process includes in data configuration unit 406 Code is made, after construction obtains test data, abnormality detecting unit 408 obtains the construction duration for constructing each test data, and Test data of the duration greater than pre-set configuration duration will be constructed and be set as abnormality test data.For example, abnormality detecting unit 408 detects Each section of code tester handles the operation duration of data to be tested in testing process, gets test data construction code and reads user Data, the operation duration for sending user data, user data being waited to receive audit, thus when getting the construction of the test data It is long;It is appreciated that the operation duration of above steps should not fluctuate in the case where test data construction code normally executes Greatly, so that the construction duration of test data should be less than pre-set configuration duration, if detecting, construction duration is greater than pre-set configuration duration Test data, illustrate the test data or the corresponding data to be tested of the test data in this testing process exist ask Topic, the test data is set as abnormality test data by abnormality detecting unit 408 at this time, so as to find institute in test process in time There are the problem of.
Still optionally further, test data of the duration greater than pre-set configuration duration will be constructed in abnormality detecting unit 408 to set After abnormality test data, abnormal push unit 409 obtains several test operations in testing process and surveys extremely in test processes Operation duration when data is tried, and pushes abnormality test data, the corresponding data to be tested of abnormality test data to tester And operation duration of several test operations described in test processes when abnormality test data in testing process.Pass through abnormal push For unit 409 by abnormality test data and data-pushing relevant to abnormality test data to tester, tester can basis Above-mentioned data analyze testing process, or check that test data constructs code, and then solve present in testing process Problem.
As it can be seen that implementing method described in Fig. 5, specific number to be tested can be constructed by testing data structural unit 407 According to specifically being tested;In addition, getting abnormality test by the construction duration that abnormality detecting unit 408 detects test data Data, convenient for solving the problems, such as testing process in time.
The present invention also provides a kind of electronic equipment, which includes:
Processor;
Memory is stored with computer-readable instruction on the memory, when which is executed by processor, Realize a kind of test data building method as previously shown.
The electronic equipment can be test data constructing apparatus shown in Fig. 1 100.
In one exemplary embodiment, the present invention also provides a kind of computer readable storage mediums, are stored thereon with calculating Machine program when the computer program is executed by processor, realizes a kind of test data building method as previously shown.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of test data building method characterized by comprising
The test assignment title according to included by testing process searches the corresponding affiliated party's node of the test assignment title;
Obtain the corresponding history log of affiliated party's node;Wherein, the history log includes corresponding to several test operations Journal entry;
Obtain code performed by the corresponding test operation of the journal entry;
According to sequence of the journal entry in the history log, performed by several test operations corresponding to the journal entry Code successively synthesized to obtain test data construction code;
The test data construction code is executed, construction obtains test data.
2. test data building method according to claim 1, which is characterized in that the method also includes:
For each affiliated party's node, corresponding test keyword is set;
According to each affiliated party's node and the corresponding test keyword of each affiliated party's node, associated data is constructed Library;
The test assignment title according to included by testing process searches the corresponding affiliated party's section of the test assignment title Point, comprising:
According to test assignment title included by the testing process, the test assignment name is searched in the linked database Claim corresponding affiliated party's node.
3. test data building method according to claim 2, which is characterized in that described according to included by testing process Test assignment title searches the corresponding affiliated party's node of the test assignment title, comprising:
Obtain the corresponding test assignment description of the test assignment title of tester's input;
The included test keyword of the test assignment description is searched in the linked database, and searches the test The corresponding affiliated party's node of test keyword included by task description;
The included corresponding affiliated party's node of test keyword of test assignment description is set as the test assignment title Corresponding affiliated party's node.
4. test data building method according to claim 1, which is characterized in that it is described according to the journal entry in institute The sequence in history log is stated, code performed by several test operations corresponding to the journal entry, which is synthesized, to be tested After data configuration code, and in the test data construction code for executing the testing process and including, construction is surveyed Before examination data, which comprises
Acquire the data type of several historical datas of code institute test processes performed by several test operations;
It is configured to according to the data type of several historical datas of code institute test processes performed by several test operations To data to be tested.
5. test data building method according to any one of claims 1 to 4, which is characterized in that described to execute the survey The test data construction code that examination process includes, construction obtain test data, comprising:
The test data construction code is executed, so that performed by several test operations that test data construction code includes Code according to sequence of the corresponding journal entry of the test operation in the history log to the data to be tested Test processes are carried out, so that construction obtains the test data.
6. test data building method according to claim 1, which is characterized in that execute the testing process packet described The test data construction code included, after construction obtains test data, the method also includes:
Obtain the construction duration for constructing each test data;
The test data that the construction duration is greater than pre-set configuration duration is set as abnormality test data.
7. test data building method according to claim 6, which is characterized in that default the construction duration to be greater than The test data of construction duration is set as after abnormality test data, the method also includes:
Obtain operation duration of several test operations described in the testing process described in test processes when abnormality test data;
The abnormality test data, the corresponding data to be tested of the abnormality test data and the survey are pushed to tester Try operation duration of several test operations described in test processes when abnormality test data described in process.
8. a kind of test data constructing apparatus, which is characterized in that the test data constructing apparatus includes:
Node searching unit searches the test assignment title pair for the test assignment title according to included by testing process The affiliated party's node answered;
Log acquisition unit, for obtaining the corresponding history log of affiliated party's node;Wherein, the history log includes pair It should be in the journal entry of several test operations;
Code obtaining unit, for obtaining code performed by the corresponding test operation of the journal entry;
Code synthesis unit, it is corresponding to the journal entry for the sequence according to the journal entry in the history log Code performed by several test operations is successively synthesized to obtain test data construction code;
Data configuration unit, for executing the test data construction code, construction obtains test data.
9. a kind of electronic equipment, including memory and processor, the memory are stored with computer program, which is characterized in that The processor realizes test data building method according to any one of claims 1 to 7 when executing the computer program The step of.
10. a kind of computer readable storage medium, which is characterized in that it stores computer program, and the computer program makes Computer perform claim requires 1~6 described in any item test data building methods.
CN201910441368.4A 2019-05-24 2019-05-24 A kind of test data building method and device, electronic equipment and storage medium Pending CN110334004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910441368.4A CN110334004A (en) 2019-05-24 2019-05-24 A kind of test data building method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910441368.4A CN110334004A (en) 2019-05-24 2019-05-24 A kind of test data building method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110334004A true CN110334004A (en) 2019-10-15

Family

ID=68139429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910441368.4A Pending CN110334004A (en) 2019-05-24 2019-05-24 A kind of test data building method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110334004A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559320A (en) * 2020-11-17 2021-03-26 贝壳技术有限公司 Test data construction method and device
CN112788640A (en) * 2021-03-04 2021-05-11 惠州Tcl移动通信有限公司 Communication equipment testing method and device, storage medium and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063314A (en) * 2014-05-20 2014-09-24 中国工商银行股份有限公司 Test data automatic generation device and test data automatic generation method
CN104410546A (en) * 2014-11-27 2015-03-11 北京国双科技有限公司 Testing method and device of real-time processing system
US20180046569A1 (en) * 2016-08-09 2018-02-15 International Business Machines Corporation Association between a test case and source code
CN107861870A (en) * 2017-11-02 2018-03-30 平安科技(深圳)有限公司 Interface testing and test data generating method, device, terminal and storage medium
CN109614308A (en) * 2018-10-16 2019-04-12 深圳壹账通智能科技有限公司 Test data generating method, device and computer equipment based on crawler log
CN109726105A (en) * 2018-05-15 2019-05-07 平安普惠企业管理有限公司 Test data building method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063314A (en) * 2014-05-20 2014-09-24 中国工商银行股份有限公司 Test data automatic generation device and test data automatic generation method
CN104410546A (en) * 2014-11-27 2015-03-11 北京国双科技有限公司 Testing method and device of real-time processing system
US20180046569A1 (en) * 2016-08-09 2018-02-15 International Business Machines Corporation Association between a test case and source code
CN107861870A (en) * 2017-11-02 2018-03-30 平安科技(深圳)有限公司 Interface testing and test data generating method, device, terminal and storage medium
CN109726105A (en) * 2018-05-15 2019-05-07 平安普惠企业管理有限公司 Test data building method, device, equipment and storage medium
CN109614308A (en) * 2018-10-16 2019-04-12 深圳壹账通智能科技有限公司 Test data generating method, device and computer equipment based on crawler log

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559320A (en) * 2020-11-17 2021-03-26 贝壳技术有限公司 Test data construction method and device
CN112788640A (en) * 2021-03-04 2021-05-11 惠州Tcl移动通信有限公司 Communication equipment testing method and device, storage medium and terminal
CN112788640B (en) * 2021-03-04 2022-08-05 惠州Tcl移动通信有限公司 Communication equipment testing method and device, storage medium and terminal

Similar Documents

Publication Publication Date Title
CN107861870B (en) Interface test and test data generation method, device, terminal and storage medium
CN105553769B (en) A kind of data acquisition and analysis system and method
JP6419206B2 (en) Measuring multi-screen Internet user profiles, trading behavior, and user population structure with mixed census-based and user-based measurement techniques
US10742753B2 (en) Measurement of multi-screen internet user profiles, transactional behaviors and structure of user population through a hybrid census and user based measurement methodology
CN107341187B (en) Search processing method, device, equipment and computer storage medium
CN104980580B (en) Short message inspection method and device
CN108780463A (en) Social map generalization and management
CN104461899B (en) The method, test terminal and system of consumed resource are analyzed in test process
CN109247070A (en) Use the positive action in energy unique identification and the mobile device of unlabelled position
CN107330019A (en) Searching method and device
CN108920364A (en) Software defect positioning method, device, terminal and computer readable storage medium
CN105095081B (en) The function test method and device of application program
CN110334007A (en) A kind of functional interface calls verification method and device, electronic equipment and storage medium
Eid et al. A novel ontology for sensor networks data
CN106326211B (en) Determination of distance method and apparatus between the keyword of alternate statement
Jaroucheh et al. Recognize contextual situation in pervasive environments using process mining techniques
CN109359056A (en) A kind of applied program testing method and device
CN110334004A (en) A kind of test data building method and device, electronic equipment and storage medium
CN110347672A (en) Verification method and device, the electronic equipment and storage medium of tables of data related update
CN106790895A (en) A kind of fault handling method and device
CN111506900A (en) Vulnerability detection method and device, electronic equipment and computer storage medium
CN108848276A (en) Telephone number method for detecting availability, system, equipment and storage medium
CN108133357A (en) A kind of talent recommendation method and computing device
CN110119354A (en) Method for testing software, device and electronic equipment based on Test cases technology
US10853332B2 (en) Discovering schema using anchor attributes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 201, room 518000, building A, No. 1, front Bay Road, Qianhai Shenzhen Guangdong Shenzhen Hong Kong cooperation zone (Qianhai business secretary)

Applicant after: Shenzhen one ledger Intelligent Technology Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A

Applicant before: Shenzhen one ledger Intelligent Technology Co., Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination