CN110188035B - Interface test data generation method, device and storage medium - Google Patents
Interface test data generation method, device and storage medium Download PDFInfo
- Publication number
- CN110188035B CN110188035B CN201910387642.4A CN201910387642A CN110188035B CN 110188035 B CN110188035 B CN 110188035B CN 201910387642 A CN201910387642 A CN 201910387642A CN 110188035 B CN110188035 B CN 110188035B
- Authority
- CN
- China
- Prior art keywords
- data
- test
- specified
- total
- derivative
- 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.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 264
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000003860 storage Methods 0.000 title claims abstract description 14
- 238000012545 processing Methods 0.000 claims abstract description 96
- 230000009467 reduction Effects 0.000 claims abstract description 29
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 230000006872 improvement Effects 0.000 description 7
- 230000008014 freezing Effects 0.000 description 6
- 238000007710 freezing Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 238000011946 reduction process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005284 excitation Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000007670 refining Methods 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000010979 ruby Substances 0.000 description 1
- 229910001750 ruby Inorganic materials 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 238000013522 software testing Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
- Tests Of Electronic Circuits (AREA)
Abstract
The embodiment of the specification discloses a method, a device and a storage medium for generating interface test data, which are suitable for the technical field of interface test, wherein the method can comprise the following steps: acquiring total first data of a test object under a specified test dimension, determining total derivative data of the first data according to the service type of the first data, performing dimension reduction processing on the derivative data according to service processing logic of the derivative data, generating a data set of the test object, and generating a test data set corresponding to the specified test object according to the data set. According to the embodiment of the specification, the full test data can be obtained, and the quality of test data generation and the accuracy of test results are improved.
Description
Technical Field
The present application relates to the field of interface testing technologies, and in particular, to a method and an apparatus for generating interface test data, and a storage medium.
Background
One of the most important tasks in the software testing process is the generation of test data. The process of generating test data is cumbersome, repetitive, and highly error-prone. The test data of the banking application often has a certain product meaning, so the generation of the test data of the banking application is a key of the testing of the banking product.
In the prior art, typical data is mainly selected for generating the bank test data, but the scheme for generating the bank test data does not consider business processing logic, so that the generated bank test data is incomplete, and the full test data is difficult to obtain.
In summary, the insufficient bank test data generated in the prior art results in low quality of test data generation, thereby resulting in low accuracy of test results.
Disclosure of Invention
An object of an embodiment of the present disclosure is to provide a method, an apparatus, and a storage medium for generating interface test data, so as to obtain a total amount of test data and improve the quality of test data generation.
To achieve the above object, an embodiment of the present disclosure provides an interface test data generating method, which may include:
acquiring the total first data of the test object in a designated test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
determining the total derivative data of the first data according to the service type of the first data;
performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
and generating a test data set corresponding to the specified test object according to the data set.
Further, in another embodiment of the method, the acquiring the full first data of the test object in the specified test dimension may include:
acquiring a data calling rule of a test interface;
and determining the total first data of the test object in the appointed test dimension according to the data calling rule.
Further, in another embodiment of the method, the determining the total derivative data of the first data according to the service type of the first data may include:
acquiring a service type corresponding to the first data;
and according to the service type, carrying out refinement treatment on the first data to obtain the total derivative data of the first data.
Further, in another embodiment of the method, the performing, according to the service processing logic of the derivative data, a dimension reduction process on the derivative data to generate a data set of the test object may include:
comparing the business processing logic of the whole amount of derived data, and judging whether the business processing logic of the whole amount of derived data is the same or not;
if the service processing logic of the total derived data is the same, performing dimension reduction processing on the total derived data to obtain specified data; the specified data is any one of the full derived data;
and performing splicing processing on the total first data and the corresponding specified data to obtain a data set of the test object.
Further, in another embodiment of the method, the generating, according to the data set, a test data set corresponding to the specified test object may include:
acquiring test data of a specified test object and SQL query sentences corresponding to the test data;
and executing the SQL query sentences in batches in the data set to obtain the full test data set corresponding to the specified object.
On the other hand, the embodiment of the present specification provides an interface test data generating device, which may include:
the acquisition module can be used for acquiring the total first data of the test object in the appointed test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
the determining module can be used for determining the total derivative data of the first data according to the service type of the first data;
the generation module can be used for carrying out dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
and the query generation module can be used for generating a test data set corresponding to the specified test object according to the data set.
Further, in another embodiment of the apparatus, the acquiring module may include:
the acquisition unit can be used for acquiring the data calling rule of the test interface;
and the determining unit can be used for determining the total first data of the test object under the specified test dimension according to the data calling rule.
Further, in another embodiment of the apparatus, the determining module may include:
the acquisition unit can be used for acquiring the service type corresponding to the first data;
and the service refinement unit can be used for performing refinement processing on the first data according to the service type to obtain the total derivative data of the first data.
Further, in another embodiment of the apparatus, the generating module may include:
the comparison judging unit can be used for comparing the business processing logic of the whole amount of derived data and judging whether the business processing logic of the whole amount of derived data is the same or not;
the dimension reduction unit can be used for carrying out dimension reduction on the whole amount of derivative data to obtain appointed data if the service processing logics of the whole amount of derivative data are the same; the specified data is any one of the full derived data;
and the splicing unit can be used for carrying out splicing processing on the total first data and the corresponding specified data to obtain a data set of the test object.
Further, in another embodiment of the apparatus, the query generation module may further include:
the acquisition unit can be used for acquiring test data of a specified test object and SQL query sentences corresponding to the test data;
and the query execution unit can be used for executing the SQL query sentences in batches in the data set to obtain the full test data set corresponding to the specified object.
In yet another aspect, the embodiment of the present specification further provides an interface test data generating device, which may include a memory, a processor, and a computer program stored on the memory, where the computer program when executed by the processor may perform the steps of:
acquiring the total first data of the test object in a designated test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
determining the total derivative data of the first data according to the service type of the first data;
performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
and generating a test data set corresponding to the specified test object according to the data set.
In yet another aspect, the present description embodiments also provide a computer storage medium having stored thereon a computer program which, when executed by a processor, implements:
acquiring the total first data of the test object in a designated test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
determining the total derivative data of the first data according to the service type of the first data;
performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
and generating a test data set corresponding to the specified test object according to the data set.
According to the interface test data generation method, device and storage medium, through obtaining the total first data of the test object under the specified test dimension, determining the total derivative data of the first data according to the service type of the first data, performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate the data set of the test object, and finally obtaining the test data set corresponding to the specified test object according to the data set. According to the method, dimension reduction processing is carried out on the full-quantity derived data according to business processing logic of the full-quantity derived data, a full-quantity data set can be obtained, and then scripts are executed in batches in the data set, so that the full-quantity test data set corresponding to the specified test object can be obtained, the problems of insufficient generated test data and the like are effectively solved, and the quality of test data generation and the accuracy of test results are improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some of the embodiments described in the application, and that other drawings can be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for generating interface test data according to some embodiments of the present disclosure;
fig. 2 is a schematic diagram of a scenario of an interface test data generating method according to some embodiments of the present disclosure;
fig. 3 is a schematic block diagram of an interface test data generating device according to some embodiments of the present disclosure;
fig. 4 is a schematic structural diagram of an acquisition module in the interface test data generating device according to some embodiments of the present disclosure;
fig. 5 is a schematic structural diagram of a determining module in the interface test data generating device according to some embodiments of the present disclosure;
fig. 6 is a schematic structural diagram of a generating module in the interface test data generating device according to some embodiments of the present disclosure;
fig. 7 is a schematic structural diagram of a query generation module in an interface test data generation device according to some embodiments of the present disclosure;
fig. 8 is a schematic structural diagram of a computer storage medium according to some embodiments of the present disclosure.
Detailed Description
In order to make the technical solution of the present application better understood by those skilled in the art, the technical solution of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
In the process of testing banking products, how to cope with the requirements of preparing test data of different banking products has become an important point in the task of preparing test data. However, in the prior art, typical data is mainly selected for generating the bank test data, but the scheme for generating the bank test data does not consider business processing logic, which can cause the problems of incomplete generated bank test data and the like. In order to solve the problems, the embodiment of the application obtains the total first data of the test object in the appointed test dimension, determines the total derivative data of the first data according to the service type of the first data, performs dimension reduction processing on the total derivative data according to the service processing logic of the derivative data to generate the total data set of the test object, and finally generates the total test data set corresponding to the appointed test object according to the total data set, thereby improving the quality of test data generation and the accuracy of test results.
Fig. 1 is a method flow diagram of an interface test data generating method according to some embodiments of the present disclosure, where the method for generating interface test data according to some embodiments of the present disclosure may include:
s101, acquiring total first data of a test object in a specified test dimension, wherein the specified test dimension is used for identifying different attribute data of the test object, and the first data is used for identifying different business type data in the specified test dimension.
In some embodiments of the present disclosure, the acquiring the total first data of the test object in the specified test dimension may determine the total first data of the test object in the specified test dimension by acquiring a data call rule of each test interface and according to the data call rule. Wherein the test object may be some basic product of a bank, and the basic product may be all kinds of cards supported by the bank, such as: medical insurance cards, social insurance cards, jingdong cards, naughty cards, express cards, debit cards, army insurance cards, and the like. The basic product can also be a private common account, a general account, a public basic account and the like, and the specification does not limit the test objects. The specified test dimension may be different attribute data included by the test object, such as: account numbers, cards, customers, etc., the specification does not limit the specified test dimensions. The full first data may be different traffic function data in a specified test dimension, such as: the service function data under the account number may be: regular deposit, withdrawal, transfer, etc., the present specification does not limit specific first data.
S102, determining the total derivative data of the first data according to the service type of the first data.
In some embodiments of the present disclosure, the determining the total derivative data of the first data may obtain the total derivative data of the first data by obtaining a service type corresponding to the first data and refining the first data according to the service type. Such as: assuming that the first data is a regular deposit, and that sub-category data of the regular deposit phase, i.e., derivative data, may be obtained according to the deposit age of the regular deposit, may be 3 months, 5 months, one year, 5 years, 10 years, etc., further, for example: assuming that the first data is an account state, derivative data of the account state may be obtained, which may be: normally, motionless, waiting for sale, closing, no excitation, total freezing, borrowing freezing, lending freezing, etc., the present specification does not limit the derived data.
S103, performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object, wherein the data set comprises data obtained by splicing the first data and the derivative data.
In some embodiments of the present disclosure, the generating the data set of the test object may determine whether the service processing logic of the total derived data is the same by comparing the service processing logic of the total derived data, if the service processing logic of the total derived data is the same, performing dimension reduction processing on the total derived data, determining one piece of designated data from the total derived data, repeating the above operation until the designated data corresponding to the total first data in the designated test dimension is obtained, and finally performing splicing processing on the total first data and the corresponding designated data to obtain the data set of the test object. In other embodiments of the present disclosure, the generating the data set of the test object may determine whether a plurality of derivative data with the same service processing logic exists in the total derivative data by comparing the service processing logic of the total derivative data, if a plurality of derivative data with the same service processing logic exists in the total derivative data, performing a dimension reduction process on the plurality of derivative data, determining one piece of specified data from the plurality of derivative data, repeating the above operation until the specified data corresponding to the total first data in the specified test dimension is obtained, and finally performing a stitching process on the total first data and the corresponding specified data to obtain the data set of the test object.
In a specific embodiment, the splicing process may be to perform the splicing process on the total amount of the first data and the corresponding specified data according to a cartesian product algorithm, and based on this, other splicing manners may be obtained, which is not limited in this specification. In a specific implementation manner, as shown in fig. 2, fig. 2 is a schematic diagram of a scenario of an interface test data generating method provided in some embodiments of the present disclosure, and assuming that service processing logic of a regular deposit is the same for 3 months, 5 months, one year, 5 years, and 10 years, the service processing logic is a, when test data is prepared, only one of the regular deposit is selected from the regular deposit for 3 months, 5 months, one year, 5 years, and 10 years as test data, so that the test requirement of the regular deposit can be met, and multiple groups of data tests are not required, thereby improving the efficiency of the data test. And, for example: the account state is assumed to be normal, normal and motionless in the processes of standing, waiting for sale, closing, no-excitation, full freezing, borrowing and lending, the business processing logic is the same, the business processing logic a is the business processing logic, the business processing logic b is the business processing logic b, the business processing logic of closing, full freezing, borrowing and lending is the same, the business processing logic c is the business processing logic c, and when test data are prepared, only one of the normal, motionless, waiting for sale, no-excitation and the closing, full freezing, borrowing and lending is selected as test data and used for subsequent interface test, so that the test requirement of the account state can be met, multiple groups of data test are not needed, and the data test efficiency can be improved.
S104, generating a test data set corresponding to the specified test object according to the data set.
In some embodiments of the present disclosure, the test data set corresponding to the specified test object may be obtained by obtaining test data of the specified test object and an SQL query statement corresponding to the test data, and executing the SQL query statement in batch in the data set. Such as: SELECT t_ INVM WHERE ACCT _type= '5501' and int_cat= '0621' is used to find all pairs of private ordinary accounts meeting the requirements, for example: SELECT FROM t_ INVM WHERE curr_status= '00' is used to find all accounts whose account STATUS is normal. In a specific embodiment, a plurality of SQL query sentences can be connected through Union all to realize batch query of test data. Such as: select_from t_ INVM WHERE ACCT _type= '5501' and int_cat= '0621'UNION ALL SELECT*FROM T_INVM WHERE CURR_STATUS = '00' is used to find out all the private ordinary accounts meeting the requirements whose account status is normal. And, for example: SELECT FROM dnf.t_ INVM WHERE ACCT _type= '5509' and routnum < = 5union all SELECT*FROM DNF.T_INVM WHERE ACCT_TYPE = '5506' and int_cat= '0611' and routnum < = 5 is used to find out all the private one-pass and private foreign currency large accounts meeting the requirements. The above embodiment is only for convenience of explaining the technical solution of the present application, based on which all the private ordinary accounts with normal account states can be found out by selecting FROM t_ INVM WHERE ACCT _type= '5501' and int_cat= '0621'AND CURR_STATUS = '00'.
In some embodiments of the present description, the data set may be manually opened when there is no satisfactory data in it. Such as: the method is characterized in that the method is to search a pair of private sub-accounts for three years regularly in a database, and the state is frozen, but the database does not have the account in the state, the pair of private sub-accounts can be found out for three years regularly, and then the account state is modified into the frozen state through manual processing. In some embodiments of the present disclosure, the test data set corresponding to the specified test object may also be implemented in a special data automation open manner, for example: for example, one client number is associated with 100 accounts, and in the scene of page turning of the test interface, the test condition can be met by automatically opening 100 accounts under one client number.
It should be noted that, the foregoing embodiments are merely for convenience of explaining the technical solution of the present application, and other embodiments may be adopted to achieve the same technical effects during specific implementation, which is not limited thereto.
Based on the above-mentioned interface test data generating method, one or more embodiments of the present disclosure further provide an interface test data generating device. The apparatus may include a system (including a distributed system), software (applications), modules, components, servers, clients, etc. that employ the methods described in the embodiments of the present specification in combination with the necessary apparatus to implement the hardware. Based on the same innovative concepts, the embodiments of the present description provide means in one or more embodiments as described in the following embodiments. Because the implementation schemes and methods of the device for solving the problems are similar, the implementation of the device in the embodiment of the present disclosure may refer to the implementation of the foregoing method, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
Specifically, fig. 3 is a schematic block diagram of an interface test data generating device according to some embodiments of the present disclosure. As shown in fig. 3, the interface test data generating apparatus provided in some embodiments of the present specification may include: acquisition module 301, determination module 302, generation module 303, and query generation module 304.
The acquiring module 301 may be configured to acquire a full amount of first data of the test object in a specified test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
a determining module 302, configured to determine total derivative data of the first data according to a service type of the first data;
the generating module 303 may be configured to perform a dimension reduction process on the derivative data according to the service processing logic of the derivative data, to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
the query generation module 304 may be configured to generate a test data set corresponding to the specified test object according to the data set.
Fig. 4 is a schematic structural diagram of an acquisition module in the interface test data generating apparatus according to some embodiments of the present disclosure, as shown in fig. 4, on the basis of the foregoing embodiment, the acquisition module 301 may include: an acquisition unit 401, and a determination unit 402.
An obtaining unit 401, configured to obtain a data calling rule of the test interface;
the determining unit 402 may be configured to determine, according to the data calling rule, a total first data of the test object in the specified test dimension.
Fig. 5 is a schematic structural diagram of a determining module in the interface test data generating device according to some embodiments of the present disclosure, as shown in fig. 5, on the basis of the foregoing embodiment, the determining module 302 may include: an acquisition unit 501 and a traffic refinement unit 502.
An obtaining unit 501, configured to obtain a service type corresponding to the first data;
the service refinement unit 502 may be configured to refine the first data according to the service type, so as to obtain full derivative data of the first data.
Fig. 6 is a schematic structural diagram of a generating module in the interface test data generating device according to some embodiments of the present disclosure, as shown in fig. 6, on the basis of the foregoing embodiment, the generating module 303 may include: a comparison judging unit 601, a dimension reducing unit 602, and a splicing unit 603.
The comparison and judgment unit 601 may be configured to compare service processing logics of the full-scale derived data, and judge whether the service processing logics of the full-scale derived data are the same;
the dimension reduction unit 602 may be configured to perform dimension reduction processing on the full-scale derived data to obtain a specified data if the service processing logic of the full-scale derived data is the same; the specified data is any one of the full derived data;
the splicing unit 603 may be configured to perform a splicing process on the total amount of first data and corresponding specified data, to obtain a data set of the test object.
Fig. 7 is a schematic structural diagram of a query generation module in an interface test data generation device according to some embodiments of the present disclosure, as shown in fig. 7, where, based on the foregoing embodiment, the query generation module 304 may include: the acquisition unit 701 and the query execution unit 702.
An obtaining unit 701, configured to obtain test data of a specified test object and an SQL query statement corresponding to the test data;
the query execution unit 702 may be configured to execute the SQL query statement in batch in a data set, so as to obtain a full test data set corresponding to the specified object.
To achieve the above object, some embodiments of the present disclosure provide a schematic structural diagram of a computer storage medium, as shown in fig. 8, where the apparatus may include a memory, a processor, and a computer program stored on the memory, where the computer program may perform the following steps when executed by the processor:
acquiring the total first data of the test object in a designated test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
determining the total derivative data of the first data according to the service type of the first data;
performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
and generating a test data set corresponding to the specified test object according to the data set.
According to the interface test data generation method, device and storage, through obtaining the total first data of a plurality of test objects in the appointed test dimension, carrying out refinement processing on the first data according to the service type to obtain the total derivative data of the first data, comparing service processing logics of the total derivative data, carrying out dimension reduction processing on the total derivative data to obtain appointed data when the service processing logics of the total derivative data are the same, and carrying out splicing processing on the total first data and the corresponding appointed data to obtain a total data set of the test objects.
The method and the device for generating the interface test data provided by the embodiment of the present disclosure may be implemented in an admitest interface tool, or may be implemented in other interface tools, which is not limited in this disclosure.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips 2. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented with "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but HDL is not only one, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog2 are most commonly used at present. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
Those skilled in the art will also appreciate that, in addition to implementing clients, servers in the form of pure computer readable program code, it is well possible to implement the same functions by logically programming method steps such that clients, servers are implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like. Such clients, servers may therefore be considered as a hardware component, and the means included therein for performing various functions may also be considered as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are referred to each other, and each embodiment is mainly described as different from other embodiments. In particular, for embodiments of the server, client, device, and computer storage medium, reference may be made to the description of embodiments of the foregoing methods for comparison and explanation.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
While the present application has been described by way of embodiments, those of ordinary skill in the art will recognize that there are many variations and modifications of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and modifications as do not depart from the spirit of the application.
Claims (8)
1. A method for generating interface test data, the method comprising:
acquiring the total first data of the test object in a designated test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
determining the total derivative data of the first data according to the service type of the first data;
performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
generating a test data set corresponding to the specified test object according to the data set;
the determining the total derivative data of the first data according to the service type of the first data comprises the following steps:
acquiring a service type corresponding to the first data;
according to the service type, carrying out refinement treatment on the first data to obtain the total derivative data of the first data;
the service processing logic for performing dimension reduction processing on the derivative data according to the derivative data to generate a data set of the test object, including:
comparing the business processing logic of the whole amount of derived data, and judging whether the business processing logic of the whole amount of derived data is the same or not;
if the service processing logic of the total derived data is the same, performing dimension reduction processing on the total derived data to obtain specified data; the specified data is any one of the full derived data;
and performing splicing processing on the total first data and the corresponding specified data to obtain a data set of the test object.
2. The method of claim 1, wherein the acquiring the full first data of the test object in the specified test dimension comprises:
acquiring a data calling rule of a test interface;
and determining the total first data of the test object in the appointed test dimension according to the data calling rule.
3. The method of claim 1, wherein generating a test data set corresponding to a specified test object from the data set comprises:
acquiring test data of a specified test object and SQL query sentences corresponding to the test data;
and executing the SQL query sentences in batches in the data set to obtain the full test data set corresponding to the specified test object.
4. An interface test data generation apparatus, the apparatus comprising:
the acquisition module is used for acquiring the total first data of the test object in the appointed test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
the determining module is used for determining the total derivative data of the first data according to the service type of the first data;
the generation module is used for performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
the query generation module is used for generating a test data set corresponding to the specified test object according to the data set;
the determining module includes:
the acquisition unit is used for acquiring the service type corresponding to the first data;
the business refinement unit is used for performing refinement treatment on the first data according to the business type to obtain the total derivative data of the first data;
the generating module comprises:
the comparison judging unit is used for comparing the business processing logic of the whole derived data and judging whether the business processing logic of the whole derived data is the same or not;
the dimension reduction unit is used for carrying out dimension reduction on the whole derived data to obtain specified data if the service processing logics of the whole derived data are the same; the specified data is any one of the full derived data;
and the splicing unit is used for carrying out splicing processing on the total first data and the corresponding designated data to obtain a data set of the test object.
5. The apparatus of claim 4, wherein the acquisition module comprises:
the acquisition unit is used for acquiring the data calling rule of the test interface;
and the determining unit is used for determining the total first data of the test object under the specified test dimension according to the data calling rule.
6. The apparatus of claim 4, wherein the query generation module comprises:
the acquisition unit is used for acquiring test data of a specified test object and SQL query sentences corresponding to the test data;
and the query execution unit is used for executing the SQL query sentences in batches in the data set to obtain the full test data set corresponding to the specified test object.
7. An interface test data generating device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program when executed by the processor performs the steps of:
acquiring the total first data of the test object in a designated test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
determining the total derivative data of the first data according to the service type of the first data;
performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
generating a test data set corresponding to the specified test object according to the data set;
the determining the total derivative data of the first data according to the service type of the first data comprises the following steps:
acquiring a service type corresponding to the first data;
according to the service type, carrying out refinement treatment on the first data to obtain the total derivative data of the first data;
the service processing logic for performing dimension reduction processing on the derivative data according to the derivative data to generate a data set of the test object, including:
comparing the business processing logic of the whole amount of derived data, and judging whether the business processing logic of the whole amount of derived data is the same or not;
if the service processing logic of the total derived data is the same, performing dimension reduction processing on the total derived data to obtain specified data; the specified data is any one of the full derived data;
and performing splicing processing on the total first data and the corresponding specified data to obtain a data set of the test object.
8. A computer storage medium having a computer program stored thereon, the computer program, when executed by a processor, performing the steps of:
acquiring the total first data of the test object in a designated test dimension; the specified test dimension is used for identifying different attribute data of the test object; the first data is used for identifying different service type data under the specified test dimension;
determining the total derivative data of the first data according to the service type of the first data;
performing dimension reduction processing on the derivative data according to the service processing logic of the derivative data to generate a data set of the test object; the data set comprises data obtained by splicing the first data and the derivative data;
generating a test data set corresponding to the specified test object according to the data set;
the determining the total derivative data of the first data according to the service type of the first data comprises the following steps:
acquiring a service type corresponding to the first data;
according to the service type, carrying out refinement treatment on the first data to obtain the total derivative data of the first data;
the service processing logic for performing dimension reduction processing on the derivative data according to the derivative data to generate a data set of the test object, including:
comparing the business processing logic of the whole amount of derived data, and judging whether the business processing logic of the whole amount of derived data is the same or not;
if the service processing logic of the total derived data is the same, performing dimension reduction processing on the total derived data to obtain specified data; the specified data is any one of the full derived data;
and performing splicing processing on the total first data and the corresponding specified data to obtain a data set of the test object.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910387642.4A CN110188035B (en) | 2019-05-10 | 2019-05-10 | Interface test data generation method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910387642.4A CN110188035B (en) | 2019-05-10 | 2019-05-10 | Interface test data generation method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110188035A CN110188035A (en) | 2019-08-30 |
CN110188035B true CN110188035B (en) | 2023-10-24 |
Family
ID=67716029
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910387642.4A Active CN110188035B (en) | 2019-05-10 | 2019-05-10 | Interface test data generation method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110188035B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6134541A (en) * | 1997-10-31 | 2000-10-17 | International Business Machines Corporation | Searching multidimensional indexes using associated clustering and dimension reduction information |
CN107943694A (en) * | 2017-11-21 | 2018-04-20 | 中国农业银行股份有限公司 | A kind of test data generating method and device |
CN109033322A (en) * | 2018-07-18 | 2018-12-18 | 中国联合网络通信集团有限公司 | A kind of test method and device of multidimensional data |
-
2019
- 2019-05-10 CN CN201910387642.4A patent/CN110188035B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6134541A (en) * | 1997-10-31 | 2000-10-17 | International Business Machines Corporation | Searching multidimensional indexes using associated clustering and dimension reduction information |
CN107943694A (en) * | 2017-11-21 | 2018-04-20 | 中国农业银行股份有限公司 | A kind of test data generating method and device |
CN109033322A (en) * | 2018-07-18 | 2018-12-18 | 中国联合网络通信集团有限公司 | A kind of test method and device of multidimensional data |
Also Published As
Publication number | Publication date |
---|---|
CN110188035A (en) | 2019-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8196126B2 (en) | Methods and systems for dynamically generating and optimizing code for business rules | |
CN108764674B (en) | Risk control method and device based on rule engine | |
CN107819627B (en) | System fault processing method and server | |
CN104615777A (en) | Method and device for real-time data processing based on stream-oriented calculation engine | |
CN103309904A (en) | Method and device for generating data warehouse ETL (Extraction, Transformation and Loading) codes | |
CN108369584B (en) | Information processing system, descriptor creation method, and descriptor creation program | |
CN100362479C (en) | System and method for testing measured object based on automatic test script | |
CN110297955B (en) | Information query method, device, equipment and medium | |
Amin et al. | A comparison of two oversampling techniques (smote vs mtdf) for handling class imbalance problem: A case study of customer churn prediction | |
CN110175156A (en) | The generation method and device of report | |
CN111178701B (en) | Risk control method and device based on feature derivation technology and electronic equipment | |
CN110263817B (en) | Risk grade classification method and device based on user account | |
GB2521637A (en) | Messaging digest | |
CN110188035B (en) | Interface test data generation method, device and storage medium | |
CN111143461B (en) | Mapping relation processing system, method and electronic equipment | |
CN116483707A (en) | Test method, test device, test apparatus, test program, and test program | |
CN109271431A (en) | Data pick-up method, apparatus, computer equipment and storage medium | |
CN104216986A (en) | Device and method for improving data query efficiency through pre-operation according to data update period | |
CN114596044A (en) | Tool and method for project process approval | |
CN112596781A (en) | Service execution and service configuration method and device | |
CN111352940A (en) | Data processing method and system | |
CN112559331A (en) | Test method and device | |
CN113779003B (en) | Information processing method and device | |
CN116431698B (en) | Data extraction method, device, equipment and storage medium | |
CN113344550B (en) | Flow processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |