CN115421727A - Code data test file generation method, device, equipment and storage medium - Google Patents

Code data test file generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN115421727A
CN115421727A CN202211153290.4A CN202211153290A CN115421727A CN 115421727 A CN115421727 A CN 115421727A CN 202211153290 A CN202211153290 A CN 202211153290A CN 115421727 A CN115421727 A CN 115421727A
Authority
CN
China
Prior art keywords
test
information
tested
code data
code
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
CN202211153290.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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202211153290.4A priority Critical patent/CN115421727A/en
Publication of CN115421727A publication Critical patent/CN115421727A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • 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/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a code data test file generation method, a device, equipment and a storage medium, which relate to the technical field of big data, and the method comprises the following steps: the method comprises the steps of obtaining code data to be tested and configuring a test database matched with the code data to be tested; testing the code data to be tested in the test database according to the configuration information to obtain a test result; and if the test result is the same as a preset numerical value in the test database, generating a test file by the code data to be tested. By adopting the technical scheme, the test work can be carried out on a large scale, and the purpose of saving time can be achieved.

Description

Code data test file generation method, device, equipment and storage medium
Technical Field
The present application relates to the field of big data technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a code data test file.
Background
At present, the existing tester of the big data platform has: the tool TestDFSIO for the HDFS benchmark performance test is carried out by the Hadoop, and the tool MRbench for the operation quick response capability test is carried out by the Hadoop. But the tools to test code logic for big data are essentially none.
However, because the big data test code logic is increasingly complex and the overall workload is large, the test work cannot be carried out on a large scale, the error is easy to occur, and the troubleshooting is very time-consuming after the error occurs.
Therefore, a code data test file generation method is needed to overcome the above problems.
Disclosure of Invention
The application provides a code data test file generation method, a code data test file generation device and a code data test file storage medium, which can realize large-scale test work development and can save time.
In a first aspect, the present application provides a method for generating a code data test file, including:
acquiring code data to be tested and configuring a test database matched with the code data to be tested;
testing the code data to be tested in the test database according to the configuration information to obtain a test result;
and if the test result is the same as a preset numerical value in the test database, generating a test file by the code data to be tested.
In one example, the testing the code data to be tested in the test database according to the configuration information to obtain a test result includes:
determining code script information in the code data to be tested according to the configuration information;
according to the code script information, acquiring metadata information matched with the code script information from the test database;
and generating the test result according to the metadata information and the code data to be tested.
In one example, the generating the test result according to the metadata information and the code data to be tested includes:
calculating the metadata information according to the logic of the code data to be tested to obtain test data information;
and generating the test result according to the type of the test database by using the test data information.
In one example, the obtaining, in the test database according to the code script information, metadata information matching the code script information includes:
establishing a connection relation between the code script information and the test database according to the code script information;
and according to the connection relation, performing data analysis on the code script information to obtain metadata information matched with the code script information in the test database.
In one example, the method further comprises:
and displaying the test file to a user side through an interface for the user side to process.
In one example, the interface display includes the following: configuration information of the code data to be tested; the configuration information comprises process attribute information, node attribute information and connection attribute information; wherein the node attribute information includes one or more of the following items: the system comprises command line execution node attribute information, SQL execution node attribute information, job execution node attribute information, result comparison node attribute information and data node attribute information.
In a second aspect, the present application provides a code data test file generating apparatus, including:
the system comprises an acquisition unit, a test data base and a test data base, wherein the acquisition unit is used for acquiring code data to be tested and configuring the test data base matched with the code data to be tested;
the determining unit is used for testing the code data to be tested in the testing database according to the configuration information to obtain a testing result;
and the generating unit is used for generating a test file from the code data to be tested if the test result is the same as a preset numerical value in the test database.
In one example, a determination unit includes:
the first determining module is used for determining code script information in the code data to be tested according to the configuration information;
the acquisition module is used for acquiring metadata information matched with the code script information from the test database according to the code script information;
and the generating module is used for generating the test result according to the metadata information and the code data to be tested.
In one example, a generation module includes:
the calculation submodule is used for calculating the metadata information according to the logic of the code data to be tested to obtain test data information;
and the generation submodule is used for generating the test result according to the type of the test database by using the test data information.
In one example, an acquisition module includes:
the establishing submodule is used for establishing the connection relation between the code script information and the test database according to the code script information;
and the analysis sub-module is used for carrying out data analysis on the code script information according to the connection relation to obtain metadata information matched with the code script information in the test database.
In one example, the apparatus further comprises:
and the display unit is used for displaying the test file to the user side through an interface for the user side to process.
In one example, the interface display includes the following: configuration information of the code data to be tested; the configuration information comprises process attribute information, node attribute information and connection attribute information; wherein the node attribute information includes one or more of the following items: command line execution node attribute information, SQL execution node attribute information, job execution node attribute information, result comparison node attribute information, and data node attribute information.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the method according to the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method according to the first aspect.
According to the code data test file generation method, the device, the equipment and the storage medium, code data to be tested are obtained, and a test database matched with the code data to be tested is configured; testing the code data to be tested in the test database according to the configuration information to obtain a test result; and if the test result is the same as a preset numerical value in the test database, generating a test file by the code data to be tested. By adopting the technical scheme, the test work can be carried out on a large scale, and the purpose of saving time can be achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flowchart illustrating a method for generating a code data test file according to an embodiment of the present disclosure;
FIG. 2 is a schematic interface diagram of alignment details provided in an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for generating a code data test file according to a second embodiment of the present application;
FIG. 4 is a schematic diagram of a metadata information connection relationship provided according to the second embodiment of the present application;
FIG. 5 is a table diagram of test results provided according to the second embodiment of the present application;
FIG. 6 is a schematic view of an interface provided in accordance with an embodiment II of the present application;
FIG. 7 is a diagram illustrating process attribute information provided in accordance with an embodiment II of the present application;
FIG. 8 is a schematic diagram of attribute information of a command line execution node according to a second embodiment of the present application;
fig. 9 is a schematic diagram of attribute information of an SQL execution node according to the second embodiment of the present application;
FIG. 10 is a diagram illustrating attribute information of a job execution node according to a second embodiment of the present application;
fig. 11 is a schematic diagram of comparing node attribute information with a result according to the second embodiment of the present application;
fig. 12 is a schematic diagram of data node attribute information provided according to the second embodiment of the present application;
fig. 13 is a schematic structural diagram of a code data test file generating apparatus according to a third embodiment of the present application;
fig. 14 is a schematic structural diagram of a code data test file generating apparatus according to a fourth embodiment of the present application;
FIG. 15 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Specific embodiments of the present application have been shown by way of example in the drawings and will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The code data test file generation method provided by the application aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a method for generating a code data test file according to an embodiment of the present application. The first embodiment comprises the following steps:
s101, code data to be tested are obtained, and a test database matched with the code data to be tested is configured.
In one example, the code data to be tested refers to code data of a test database, and the code data can calculate data information to be calculated according to preset data information in the database.
In this embodiment, different code data to be tested correspond to different test databases, where the test databases include: DB2 database, oracle database, sybase database, SQLServer database. In this embodiment, configuring the parameter information of the test database includes: ETL server IP, user name, user password, database user name, database user password and other parameter information. In this embodiment, the parameters configuring the test database may be modified and deleted through the interface of the configuration information of the test database. Further, the configured parameter information of the test database is stored in a test data design interface and a test data management interface of the test database.
And S102, testing the code data to be tested in the test database according to the configuration information to obtain a test result.
In this embodiment, the configuration information is parameter information of the test database and data path information of the test database, and according to the data path information, data information required by the code data to be tested can be determined, and the code data to be tested is tested through the determined data information to obtain a test result.
And S103, if the test result is the same as the preset numerical value in the test database, generating a test file from the code data to be tested.
In this embodiment, the test result is a csv file, the preset value in the test database is also stored in the csv file, and the two are compared to obtain comparison details, which are then checked in the comparison details in the test data management interface. In particular, an interface diagram of an alignment detail shown in FIG. 2 can be seen. If the test result is the same as the preset numerical value in the test database, the comparison detail interface displays that the operation is successful, the comparison is passed, and a test file is generated.
According to the code data test file generation method, the device, the equipment and the storage medium, code data to be tested are obtained, and a test database matched with the code data to be tested is configured; testing code data to be tested in a test database according to the configuration information to obtain a test result; and if the test result is the same as the preset numerical value in the test database, generating a test file by the code data to be tested. By adopting the technical scheme, the test work can be carried out on a large scale, and the purpose of saving time can be achieved.
Fig. 3 is a schematic flowchart of a method for generating a code data test file according to a second embodiment of the present application. The second embodiment comprises the following steps:
s301, code data to be tested are obtained, and a test database matched with the code data to be tested is configured.
For example, this step may refer to step S101 described above, and is not described again.
S302, according to the configuration information, code script information in the code data to be tested is determined.
In this embodiment, the code script information may be SQL script information, the position of the code script information is determined by the data path information in the configuration information, and the code script information is executed.
And S303, acquiring metadata information matched with the code script information from the test database according to the code script information.
In one example, according to the code script information, obtaining metadata information matched with the code script information in a test database includes:
establishing a connection relation between the code script information and a test database according to the code script information;
and according to the connection relation, performing data analysis on the code script information to obtain metadata information matched with the code script information in the test database.
In this embodiment, after the code script information is connected to the test database and the connection relationship is established, the code script information is executed to obtain the connection relationship between the metadata information. Specifically, referring to a schematic diagram of a metadata information connection relationship shown in fig. 4, it can be seen from fig. 4 that two upper and lower nodes DB _01.Table_01 and DB _02.Table_02 on the left side. Wherein, DB refers to the library name of the test database, TABLE refers to the data TABLE name in the test database, and is the source of the calculation of the metadata information in the SQL script information. The right-side node DB _01.Table 03 is a target data table obtained by calculating SQL script information, and result data obtained by calculating SQL script information from metadata information acquired from both the DB _01.Table 01 and the DB _02.Table 02 is stored in the DB _01.Table 03 data table.
And S304, generating a test result according to the metadata information and the code data to be tested.
In one example, generating a test result according to the metadata information and the code data to be tested comprises:
calculating the metadata information according to the logic of the code data to be tested to obtain test data information;
and generating a test result according to the type of the test database by using the test data information.
In this embodiment, the types of the database include: HIVE or MPPD, wherein, the order of obtaining the metadata information through the MPPD is as follows: gsql-h $ { DBHOST } -d $ { DBNAME } -p 25308-U $ { USERNAME } -W $ { PASSSWORD } -c "\ d + $ { SCHEMANAME } $ { TABLENAME }".
In this embodiment, the test result may refer to a table diagram of the test result shown in fig. 5.
S305, if the test result is the same as the preset numerical value in the test database, generating a test file from the code data to be tested.
And displaying the test file to the user side through the interface for the user side to process.
In this embodiment, the test file may be downloaded and viewed by the user side, specifically, refer to fig. 6.
In one example, the interface display includes the following: configuration information of code data to be tested; the configuration information comprises process attribute information, node attribute information and connection attribute information; wherein the node attribute information includes one or more of the following items: command line execution node attribute information, SQL execution node attribute information, job execution node attribute information, result comparison node attribute information, and data node attribute information.
In this embodiment, fig. 6 shows a schematic diagram of an interface, where the interface includes multiple attribute information, specifically, the interface includes: process attribute information, node attribute information, and link attribute information. Specifically, the process attribute information may display an ID without being edited by the user, and specifically, refer to a schematic diagram of the process attribute information shown in fig. 7.
Further, for the node attribute information, the user needs to click the node dragged into the process layout canvas, and after clicking, the attribute information required to be configured by the currently selected node is displayed in the node attribute TAB page, and the attribute information required to be configured by each type of node is as follows:
the command line execution node attribute information is, as shown in fig. 8, seven pieces of attribute information are in the attribute configuration box, where ID is a unique node ID automatically generated by the system when the user drags the node into the process canvas layout, the environment name is information of the currently executed test database, the name is "command line execution", the above 3 pieces are all automatically generated, and the user does not need to configure. A user may enter a custom command execution node description utterance in the node description input box. When the command to be executed is a shell command, a shell file needs to be input, uploaded to the ETL scheduling server of the test environment, and a script execution command is input in a lower 'linux command' input box. If only a simple linux command needs to be executed, only the command needs to be written in the "linux command" input box.
The SQL execution node attribute information, as shown in fig. 9, has five pieces of attribute information in the attribute configuration box, where ID is the only node ID automatically generated by the system when the user drags the node into the process canvas, the environment name is the information of the currently executed test database, the name is "SQL execution", the above 3 pieces are all automatically generated, and the user does not need to configure. A user may enter a custom command execution node description utterance in the node description input box.
Further, the method further includes attribute information of the job execution node, as shown in fig. 10, five pieces of attribute information are in the attribute configuration box, where the ID is a unique node ID automatically generated by the system when the user drags the node into the process arrangement canvas, the name is "job execution", the above 3 pieces are all automatically generated, and the user does not need to configure. The user may enter a custom command execution node description utterance in the node description input box. And inputting the batch date of the currently tested code data to be tested in a 'batch date' input box, wherein the format is YYYYMMDD. And finally, selecting code data to be tested in a 'job name' drop-down box.
Comparing the result with the node attribute information, as shown in fig. 11, the node attribute has four pieces of attribute information, which is the node ID and the node name "result comparison" automatically generated by the system, and the two pieces of attribute do not need to be configured by the user.
The data node attribute information, as shown in fig. 12, includes five pieces of attribute information in the data node, which is a node ID automatically generated by the system, a node name produced according to a job corresponding to the data node, a job name, a remark corresponding to the data node, and current code data to be tested.
According to the code data test file generation method, the code data test file generation device, the code data test file generation equipment and the storage medium, the metadata information matched with the code script information is obtained in the test database according to the code script information, and the test result is generated according to the metadata information and the code data to be tested. By adopting the technical scheme, a user can realize highly automatic generation of a test result only by simple configuration, so that the workload during the whole-flow test is greatly reduced, and the efficiency of testers is improved.
Fig. 13 is a schematic structural diagram of a code data test file generating apparatus according to a third embodiment of the present application.
Specifically, the apparatus 130 of the third embodiment includes:
the obtaining unit 1301 is configured to obtain code data to be tested, and configure a test database matched with the code data to be tested.
The determining unit 1302 is configured to test the code data to be tested in the test database according to the configuration information, so as to obtain a test result.
And the generating unit 1303 is configured to generate a test file from the code data to be tested if the test result is the same as a preset value in the test database.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Fig. 14 is a schematic structural diagram of a code data test file generating apparatus according to a fourth embodiment of the present application.
Specifically, the device 140 according to the fourth embodiment includes:
an obtaining unit 1401, configured to obtain code data to be tested, and configure a test database to which the code data to be tested matches.
The determining unit 1402 is configured to test the code data to be tested in the test database according to the configuration information, so as to obtain a test result.
A generating unit 1403, configured to generate a test file from the code data to be tested if the test result is the same as a preset value in the test database.
In one example, the determining unit 1402 includes:
a first determining module 14021, configured to determine, according to the configuration information, code script information in the code data to be tested;
an obtaining module 14022, configured to obtain, according to the code script information, metadata information matched with the code script information in the test database;
the generating module 14023 is configured to generate a test result according to the metadata information and the code data to be tested.
In one example, the generating module 14023 includes:
the calculation submodule 140231 is used for calculating the metadata information according to the logic of the code data to be tested to obtain test data information;
and the generation submodule 140232 is used for generating a test result according to the type of the test database by using the test data information.
In one example, the obtaining module 14022 includes:
establishing a submodule 140221 for establishing a connection relation between the code script information and the test database according to the code script information;
and the analysis submodule 140222 is used for performing data analysis on the code script information according to the connection relation to obtain metadata information matched with the code script information in the test database.
In one example, the apparatus further comprises:
the display unit 1404 is configured to display the test file to the user side through an interface for the user side to process.
In one example, the interface display includes the following: configuration information of code data to be tested; the configuration information comprises process attribute information, node attribute information and connection attribute information; wherein the node attribute information includes one or more of the following items: command line execution node attribute information, SQL execution node attribute information, job execution node attribute information, result comparison node attribute information, and data node attribute information.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
FIG. 15 is a block diagram illustrating an electronic device, which may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like, in accordance with an exemplary embodiment.
The apparatus 1500 may include one or more of the following components: processing component 1502, memory 1504, power component 1506, multimedia component 1508, audio component 1510, input/output (I/O) interface 1512, sensor component 1514, and communications component 1516.
The processing component 1502 generally controls overall operation of the device 1500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1502 may include one or more processors 1520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 1502 may include one or more modules that facilitate interaction between processing component 1502 and other components. For example, processing component 1502 may include a multimedia module to facilitate interaction between multimedia component 1508 and processing component 1502.
The memory 1504 is configured to store various types of data to support operations at the apparatus 1500. Examples of such data include instructions for any application or method operating on the device 1500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 1506 provides power to the various components of the device 1500. The power components 1506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 1500.
The multimedia component 1508 includes a screen that provides an output interface between the device 1500 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, multimedia component 1508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera can receive external multimedia data when the apparatus 1500 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1510 is configured to output and/or input audio signals. For example, the audio component 1510 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 1500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 1504 or transmitted via the communication component 1516. In some embodiments, audio component 1510 also includes a speaker for outputting audio signals.
The I/O interface 1512 provides an interface between the processing component 1502 and peripheral interface modules, which can be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1514 includes one or more sensors for providing status assessment of various aspects of the apparatus 1500. For example, the sensor assembly 1514 can detect an open/closed state of the device 1500, the relative positioning of components, such as a display and keypad of the device 1500, the sensor assembly 1514 can also detect a change in position of the device 1500 or a component of the device 1500, the presence or absence of user contact with the device 1500, orientation or acceleration/deceleration of the device 1500, and a change in temperature of the device 1500. The sensor assembly 1514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1516 is configured to facilitate wired or wireless communication between the apparatus 1500 and other devices. The apparatus 1500 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1516 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 1504 comprising instructions, executable by the processor 1520 of the apparatus 1500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer-readable storage medium, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a code data test file generation method of the electronic device.
The application also discloses a computer program product comprising a computer program which, when executed by a processor, implements the method as described in the embodiments.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, causes the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or electronic device.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data electronic device), or that includes a middleware component (e.g., an application electronic device), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include a client and an electronic device. The client and the electronic device are generally remote from each other and typically interact through a communication network. The relationship of client and electronic device arises by virtue of computer programs running on the respective computers and having a client-electronic device relationship to each other. The electronic device may be a cloud electronic device, which is also called a cloud computing electronic device or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a traditional physical host and a VPS service ("Virtual Private Server", or "VPS" for short). The electronic device may also be a distributed system of electronic devices or an electronic device incorporating a blockchain. It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, and the present invention is not limited herein.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A code data test file generation method is characterized by comprising the following steps:
acquiring code data to be tested and configuring a test database matched with the code data to be tested;
testing the code data to be tested in the test database according to the configuration information to obtain a test result;
and if the test result is the same as a preset numerical value in the test database, generating a test file by the code data to be tested.
2. The method of claim 1, wherein the testing the code data to be tested in the test database according to the configuration information to obtain a test result comprises:
determining code script information in the code data to be tested according to the configuration information;
according to the code script information, acquiring metadata information matched with the code script information from the test database;
and generating the test result according to the metadata information and the code data to be tested.
3. The method of claim 2, wherein generating the test result according to the metadata information and the code data to be tested comprises:
calculating the metadata information according to the logic of the code data to be tested to obtain test data information;
and generating the test result according to the type of the test database by using the test data information.
4. The method according to claim 2, wherein the obtaining metadata information matching the code script information in the test database according to the code script information comprises:
establishing a connection relation between the code script information and the test database according to the code script information;
and according to the connection relation, performing data analysis on the code script information to obtain metadata information matched with the code script information in the test database.
5. The method according to any one of claims 1-4, further comprising:
and displaying the test file to the user side through an interface for the user side to process.
6. The method of claim 5, wherein the interface display comprises: configuration information of the code data to be tested; the configuration information comprises process attribute information, node attribute information and connection attribute information; the node attribute information comprises one or more of the following items: command line execution node attribute information, SQL execution node attribute information, job execution node attribute information, result comparison node attribute information, and data node attribute information.
7. An apparatus for generating a code data test file, the apparatus comprising:
the system comprises an acquisition unit, a test data base and a test data base, wherein the acquisition unit is used for acquiring code data to be tested and configuring the test data base matched with the code data to be tested;
the determining unit is used for testing the code data to be tested in the testing database according to the configuration information to obtain a testing result;
and the generating unit is used for generating a test file from the code data to be tested if the test result is the same as a preset numerical value in the test database.
8. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any of claims 1-6.
9. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the method of any one of claims 1-6.
10. A computer program product, comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-6.
CN202211153290.4A 2022-09-21 2022-09-21 Code data test file generation method, device, equipment and storage medium Pending CN115421727A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211153290.4A CN115421727A (en) 2022-09-21 2022-09-21 Code data test file generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211153290.4A CN115421727A (en) 2022-09-21 2022-09-21 Code data test file generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115421727A true CN115421727A (en) 2022-12-02

Family

ID=84203368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211153290.4A Pending CN115421727A (en) 2022-09-21 2022-09-21 Code data test file generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115421727A (en)

Similar Documents

Publication Publication Date Title
JP2018525751A (en) Interactive control method and apparatus for voice and video calls
WO2023226255A1 (en) Article query method and apparatus based on strategy mode, device and storage medium
CN111209195B (en) Method and device for generating test case
CN115687303A (en) Data information migration method, device, equipment and storage medium
WO2022135259A1 (en) Speech input method and apparatus, and electronic device
CN111708824A (en) Data processing method, device, equipment and storage medium
CN109684112A (en) Program file operation method, device, terminal and storage medium
CN112416751A (en) Processing method and device for interface automation test and storage medium
CN116031498A (en) Control method and device for production process of lithium ion battery cell
CN115421727A (en) Code data test file generation method, device, equipment and storage medium
CN116150386A (en) Enterprise knowledge graph updating method, device, equipment and storage medium
CN104793859A (en) Layout method and device of application interface
CN112383661B (en) Mobile terminal automatic test method and device, electronic equipment and storage medium
CN116931777A (en) Drag-based prediction model generation method, data set prediction method and device
CN114090738A (en) Method, device and equipment for determining scene data information and storage medium
CN117391038B (en) Metal stack space information dividing method of chip layout and chip
CN112800285B (en) Data query method, device, storage medium and product based on graph database
CN111159148B (en) Configuration information state management method and device, electronic equipment and storage medium
CN117632995A (en) Verification method and device of data processing logic, electronic equipment and storage medium
CN112416697B (en) Information processing device, terminal and storage medium
CN116680274A (en) Method and device for associating business database table and attachment information table
CN118101659A (en) Load balancing task issuing method and device, computer equipment and storage medium
CN116775358A (en) Data analysis method, device, electronic equipment and storage medium
CN118283203A (en) Video data complement method and device, electronic equipment and storage medium
CN114329088A (en) Directory structure file generation 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