Test framework implementation method and device based on large data volume calculation

By constructing the directory structure of test data and performing test actions, the problems of high technical threshold and high communication costs in the existing technology are solved, and efficient testing processes and cost-reducing effects are achieved.

CN120196546APending Publication Date: 2025-06-24SHANSHU TECH (BEIJING) CO LTD +5
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510266079.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In the existing technology, the technical threshold for testing processes is high, and the communication cost between testers and developers is high, resulting in low testing efficiency and high cost.

Method used

Provide a test framework implementation method based on large data calculation. By building a directory structure of test data, obtaining and storing test case files, executing test actions and generating test results, and finally comparing the test results with the expected results to generate a test report file.

Benefits of technology

It lowers the technical barriers for testers, reduces the communication costs between testers and developers, improves testing efficiency, and facilitates management and viewing through visual test reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196546A_ABST
    Figure CN120196546A_ABST
Patent Text Reader

Abstract

The invention discloses a test framework implementation method and device based on large data volume calculation, and the method comprises the steps: constructing a directory structure of test data, the directory structure comprises a data set directory, a test case directory and a metadata file; obtaining a test case file, and storing the test case file to a specified storage medium according to the directory structure; reading the test case file in the storage medium, executing a test action under the test case file, and generating a test result; and comparing the test result with an expected test result to generate a test report file. A modular directory structure is adopted, a highly abstract and universal test framework is constructed, cross-scene multiplexing is supported, the communication cost between testers and developers is reduced, the technical threshold is lowered, and the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of testing technologies, and in particular, to a method and device for implementing a test framework based on large - data - volume computing. Background Art

[0002] In the field of supply chain management, business scenarios are usually highly complex, involving the processing of massive amounts of data and the verification of multi - dimensional algorithms. Especially in scenarios such as demand forecasting, inventory optimization, and logistics scheduling, the stability and robustness of systems and algorithms need to be strictly verified through diverse data sets and test cases. Traditional testing methods usually rely on technicians to convert business requirements into coded test logic and execute tests through customized scripts.

[0003] In existing technical solutions, the testing process usually follows the following pattern: business personnel describe testing requirements to IT technicians, and the technicians then write specific test scripts, construct temporary data sets, and perform verification accordingly. This pattern is highly dependent on technical implementation, which is not conducive to test regression and the writing of test cases, is not easy for business personnel to understand, requires in - depth intervention from technical developers, and has the defects of long implementation cycles and high costs. Summary of the Invention

[0004] Embodiments of this application provide a method and device for implementing a test framework based on large - data - volume computing to solve the problems of high technical thresholds for testing and high communication costs between testers and developers in the prior art.

[0005] In a first aspect, embodiments of this application provide a method for implementing a test framework based on large - data - volume computing, including: constructing a directory structure of test data, where the directory structure includes: a data set directory, a test case directory, and a metadata file

[0006] Obtaining a test case file and storing the test case file in a specified storage medium according to the directory structure;

[0007] Reading the test case file in the storage medium, executing the test actions under the test case file, and generating a test result;

[0008] Comparing the test result with the expected test result to generate a test report file.

[0009] In a possible embodiment,

[0010] The constructing of the directory structure of test data includes:

[0011] Constructing at least one of the test case directories under the data set directory;

[0012] Constructing a configuration file under the test case directory, where the configuration file includes:

[0013] A test action file, used to define the input data conditions of test cases and the execution steps of test actions;

[0014] An expected result file, used to store the expected test results corresponding to the test action file.

[0015] In a possible embodiment, the construction of the directory structure of test data includes:

[0016] Construct the association relationship between the dataset directory and the metadata file, so that each dataset directory performs data maintenance through an independent metadata file, and the metadata file is used to define the dataset name, dataset description, test case identifier, test case name, and test case description.

[0017] In a possible embodiment, the obtaining of the test case file and storing the test case file in a specified storage medium according to the directory structure includes:

[0018] Obtain a test case file uploaded by a tester, and the test case file includes: input data conditions, test action execution steps, and expected test results;

[0019] Store the test case file in a specified storage medium according to the dataset directory and test case directory defined by the metadata file.

[0020] In a possible embodiment, the obtaining of the test case file uploaded by a tester includes:

[0021] Read the basic data set in the dataset directory according to the test case file uploaded by the tester;

[0022] Read the input data conditions, test action execution steps, and expected test results corresponding to the current test in the test case directory according to the test case file uploaded by the tester.

[0023] In a possible embodiment, the reading of the test case file in the storage medium, executing the test action under the test case file, and generating a test result includes:

[0024] Read the input data conditions from the storage medium;

[0025] Execute the test action according to the test action execution steps and generate the test result corresponding to the current test case.

[0026] In a possible embodiment, the comparing of the test result with the expected test result to generate a test report file includes:

[0027] Compare the test result corresponding to the current test case with the expected test result in the current test case file;

[0028] If the test result exactly matches the expected test result, do not output. If the test result does not match the expected test result, output the differential entries and generate a test report file.

[0029] In a second aspect, an embodiment of the present application provides a test framework implementation device based on large data volume calculation, including:

[0030] A construction module that constructs the directory structure of test data, and the directory structure includes: a data set directory, a test case directory, and a metadata file;

[0031] An acquisition module that acquires a test case file and stores the test case file in a specified storage medium according to the directory structure;

[0032] An execution module that reads the test case file in the storage medium, executes the test actions under the test case file, and generates a test result;

[0033] A generation module that compares the test result with the expected test result to generate a test report file.

[0034] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. Among them, the memory stores program code, and when the program code is executed by the processor, the processor executes the method for implementing the test framework based on large data volume calculation described in the first aspect above.

[0035] In a fourth aspect, a computer-readable storage medium provided by the present application includes program code, and when the storage medium runs on an electronic device, the program code is used to cause the electronic device to execute the method for implementing the test framework based on large data volume calculation described in the first aspect above.

[0036] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; when the processor of the electronic device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the electronic device executes the method for implementing the test framework based on large data volume calculation described in the first aspect above.

[0037] The beneficial effects of the present application are as follows:

[0038] The embodiments of the present application provide a method and apparatus for implementing a test framework based on large - data - volume calculation. The method includes: constructing a directory structure of test data, where the directory structure includes: a data set directory, a test case directory, and a metadata file; obtaining test case files and storing the test case files in accordance with the directory structure in a specified storage medium; reading the test case files in the storage medium, executing the test actions under the test case files, and generating test results; comparing the test results with the expected test results to generate a test report file. By adopting a modular directory structure, multiple test cases can be associated with the same test data set, supporting cross - scenario reuse, constructing a highly abstract and general test framework, facilitating testers to quickly understand test requirements, efficiently complete test data preparation, reducing the communication cost between testers and developers, lowering the technical threshold, and improving test efficiency. By matching with the expected test results, it is possible to quickly locate the values where the test does not match the expectation and generate a visual test report file for easy management and viewing.

[0039] Other features and advantages of the present application will be described in the following description of the specification. And, some of them will become obvious from the description of the specification, or be understood by implementing the present application. The objectives and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the written specification, claims, and drawings. Brief Description of the Drawings

[0040] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.

[0041] Figure 1 It is a schematic diagram of the application scenario in the embodiments of the present application;

[0042] Figure 2 It is a flowchart of the implementation of a method for implementing a test framework based on large - data - volume calculation in the embodiments of the present application;

[0043] Figure 3 It is a schematic diagram of the specific implementation of the test framework in the embodiments of the present application;

[0044] Figure 4 It is a schematic diagram of the structure of an apparatus for implementing a test framework based on large - data - volume calculation in the embodiments of the present application;

[0045] Figure 5 It is a schematic diagram of a hardware composition structure of an electronic device in the embodiments of the present application. Detailed Embodiments

[0046] To make the objectives, technical solutions, and advantages of this application clearer and more understandable, the following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application. Without conflict, the embodiments in this application and the features in the embodiments can be arbitrarily combined with each other. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0047] The following briefly introduces the design concept of the embodiments of this application:

[0048] For supply chain application systems, the business scenarios are often very complex, and it is required to verify the stability and robustness of the system and algorithms under a large amount of data. When verifying, it is necessary to verify whether different data sets meet the expected output results under different behavioral effects. In the verification process of the prior art, system developers (i.e., professional IT technicians) need to make a large amount of technical preparations and write various test codes for testers (testers generally include testers before system acceptance and business personnel after system acceptance, which are uniformly referred to as testers in this specification) to use for testing. However, in practice, not all testers are proficient in code technology. The requirement descriptions of test cases by testers need to be implemented as code by developers, resulting in a large amount of communication costs between testers and developers, affecting the test efficiency and being unfavorable for the control of development costs.

[0049] In view of this, the embodiments of this application provide a method and device for implementing a test framework based on large-scale data computing. Among them, the method for implementing a test framework based on large-scale data computing includes:

[0050] First, construct the directory structure of the test data; wherein, the directory structure includes: a data set directory, a test case directory, and a metadata file; then, obtain the test case file and store the test case file in accordance with the directory structure in a specified storage medium; next, read the test case file in the storage medium, execute the test actions under the test case file, and generate test results; finally, compare the test results with the expected test results to generate a test report file. In this way, the technical threshold for testers can be reduced. It is not required that testers understand the code. Testers only need to prepare test case files according to the directory structure. The test case files can be files that are convenient for testers to edit and view, such as uniformly using standard cvs files (CSV (Comma-Separated Values) is a simple and practical file format for storing and representing various types of data including text, numerical values, etc. CSV files usually use.csv as the file extension). Then, control the execution of test actions through web interface operations, view the test results output in a unified standard file format, and finally enable testers to complete the test process independently and obtain test results without relying on the support of technical developers, greatly improving the test efficiency.

[0051] The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. And without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0052] As Figure 1As shown in the figure, it is a schematic diagram of an application scenario provided by an embodiment of the present application. In this application scenario schematic diagram, it includes a first terminal 101, multiple second terminals 102, a server 103, and a storage medium 104. Among them, the first terminal 101 is an electronic device for developers to deploy a test framework. The second terminal 102 is an electronic device for different testers to use the test framework. The electronic devices of the first terminal 101 and the second terminal 102 can be personal computers, mobile phones, tablet computers, notebooks, e-book readers, in-vehicle terminals, etc. In addition, a client for developers to write code to implement business requirements and deploy the test framework can be installed on the first terminal 101. This client can be software (such as an APP, a browser, etc.), or a web page, a small program, etc. A client for testers and business personnel to upload test case files, operate and run test cases, and view and manage test results can be installed on the second terminal 102. This client can be software (such as an APP, a browser, etc.), or a web page, a small program, etc. The server 103 can be an independent physical server, an edge device in the field of cloud computing, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, cloud functions, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (English name: Content Delivery Network, abbreviated as CDN), and big data and artificial intelligence platforms. The storage medium 104 can be a disk, a cloud storage server, etc. Developers deploy the test framework to the server 103 through the first terminal 101. Testers upload test case files to the storage medium 104 through the second terminal 102 and maintain them. Developers can read the test cases in the storage medium 104 through the first terminal 101 and debug them locally. Testers can send relevant operation instructions (such as running test cases, executing test actions, viewing and managing test results) to the server 103 through the second terminal 102. The server 103 reads the test case data in the storage medium 104 according to the instructions, executes the test actions, and stores the generated test results in the storage medium 104 after that. Testers can access the server 103 through the second terminal 102 and operate and run test cases and view test results through the web interface. The above-mentioned first terminal 101, second terminal 102, server 103, and storage medium 104 are connected through a communication network.

[0053] Next, in combination with the above application scenario, refer to the accompanying drawings to describe the method for implementing a test framework based on large-scale data calculation provided by an exemplary embodiment of the present application. It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principle of the present application, and the embodiments of the present application are not limited in this regard.

[0054] Refer to Figure 2, which is a flowchart of a method for implementing a test framework based on large - data volume calculation provided by an embodiment of the present application. Here, a test framework device composed of a server and a storage medium is used as the execution subject for introduction. The specific implementation process of this method is as follows:

[0055] S201, construct a directory structure for test data, and the directory structure includes: a data set directory, a test case directory, and a metadata file.

[0056] For example, local developers (usually professional IT technicians) develop a business system according to business scenarios and requirements in the supply chain. Before the business system is delivered, testers first provide test data to test the system functions. After the business system is delivered, business personnel who specifically use the system input data to conduct usage tests on the system. In this embodiment and the following embodiments, for the convenience of description, testers and business personnel are collectively referred to as testers, that is: the testers described in this specification should include testers before system delivery and business personnel after system delivery. Since the data sources provided by different testers are different, and not all testers are proficient in programming techniques, in the existing technology, the test process is as follows: testers describe business scenarios and expected test results to developers, and then developers convert them into test code to execute test actions. In response to this problem, the present application first constructs a directory structure for test data. Specifically, developers highly abstract test scenarios according to business scenarios, and construct a test framework that can meet as many test cases as possible and deploy it to a test server. This test framework is reflected in the test server through the directory structure of test data. That is, developers construct a directory structure for test data by writing code, and the directory structure includes a data set directory, a test case directory, and a metadata file. Specifically, the data set directory is a set of basic data required for all tests; the test case directory divides each group of tests into different test cases according to test requirements, so that each group of test cases corresponds to a set of test input actions, test execution actions, and test expected output results. Developers maintain and manage data information in the directory structure through metadata files, and testers can prepare test requirements through metadata files. For example, when developers construct a directory structure for test data, they can standardize all test data formats. For example, all data set test cases use cvs (cvs is an abbreviation for Comma - Separated Values, which is a common spreadsheet file format. A cvs file stores tabular data in plain text format, with each line representing a record and each field separated by a comma. A cvs file can be opened and edited using any text editor, and data can also be imported and exported through spreadsheet software) files for management.

[0057] In some embodiments, the specific implementation of constructing the directory structure of the test data in step S201 includes:

[0058] Construct at least one of the test case directories under the dataset directory;

[0059] Construct a configuration file under the test case directory, the configuration file includes:

[0060] A test action file for defining the input data conditions of the test case and the execution steps of the test action;

[0061] An expected result file for storing the expected test results corresponding to the test action file.

[0062] Specifically, multiple dataset directories can be set in the test framework. Each dataset directory has a name, and multiple test case directories are included under the dataset directory corresponding to this name. This configuration method can enable all test cases under the same test directory to share a set of basic datasets. Each test case directory contains the test actions and expected test results corresponding to this test case. This embodiment can meet the requirement that under the same business test scenario, different testers can use this test framework to test different test data or data from different sources. It reflects the generality of the test framework.

[0063] In some embodiments, the specific implementation of constructing the directory structure of the test data in step S201 includes:

[0064] Construct the association relationship between the dataset directory and the metadata file, so that each dataset directory is maintained through an independent metadata file. The metadata file is used to define the dataset name, dataset description, test case identifier, test case name, and test case description. The metadata file can be a metadata.yaml file. Through this file, developers can manage and debug the test framework, and testers can describe the test requirements as test case files through the metadata file, which are read by the tested server to run the tests.

[0065] S202, obtain the test case file and store the test case file in a specified storage medium according to the directory structure. The tester prepares the test case file and uploads it to the storage medium in the test framework for the test server in the test framework implementation device to read the test case file and run the test case.

[0066] In some embodiments, the specific implementation of step S202 may include:

[0067] First, obtain the test case file uploaded by the tester. The test case file includes: input data conditions, test action execution steps, and expected test results.

[0068] Then, store the test case file in a specified storage medium according to the dataset directory and test case directory defined in the metadata file.

[0069] The test case file stored in the storage medium can also be used by developers to actually monitor the test running situation and perform local debugging on the test framework.

[0070] In this embodiment, through the storage medium in the test framework, it is convenient to uniformly manage the test case file. It can not only meet the needs of testers to upload and maintain the test case file, but also be used by developers. It reduces the technical threshold of testing, enabling testers to independently complete tests according to test requirements.

[0071] In some embodiments, the specific implementation of obtaining the test case file uploaded by the tester includes:

[0072] Read the basic data set in the dataset directory according to the test case file uploaded by the tester;

[0073] Read the input data conditions, test action execution steps, and expected test results corresponding to the current test in the test case directory according to the test case file uploaded by the tester.

[0074] S203, read the test case file in the storage medium, execute the test actions under the test case file, and generate test results. Specifically, read the test case file in the storage medium through the test server in the test framework and execute the test to generate test results.

[0075] It should be noted that the storage medium and the test server are two functional modules in the test framework. In practice, the storage medium can be deployed on the same hardware device as the test server, or on different hardware devices. The storage medium can also be an independent server device with storage functions.

[0076] In some embodiments, the specific implementation of step S203 may include:

[0077] Read the input data conditions from the storage medium;

[0078] Execute the test actions according to the test action execution steps and generate the test results corresponding to the current test case.

[0079] In this embodiment, a test framework that reads a test case file in a storage medium through a configured test server, executes test actions, completes the test process, and generates test results enables testers to operate through a Web management interface on a terminal device, allowing business personnel to complete test case upload, execution, and result viewing through the Web interface without the need to master programming skills. The test framework realizes technical decoupling through a configuration file and a standardized file structure, enabling non-technical personnel to independently complete the entire test process and reducing the technical dependence on developers.

[0080] S204. Compare the test results with the expected test results to generate a test report file. Specifically, the test server can parse the metadata file, enabling testers to view the test results through the web management interface, including viewing historical test results, current test results, and expected test results. At the same time, the current test results will be compared with the expected test results to generate a test report file for easy viewing and management by testers.

[0081] In some embodiments, the specific implementation of step 204 may include:

[0082] Compare the test results corresponding to the current test case with the expected test results in the current test case file;

[0083] If the test results match the expected test results exactly, no output is generated. If the test results do not match the expected test results, differential entries are output, and a test report file is generated. The differential entries can be displayed in a table on the web management interface for the mismatched fields, descriptions, and values.

[0084] The specific application of this application in practice can be described in combination with the Figure 3 schematic diagram of the implementation of the shown framework as follows:

[0085] First, developers iteratively develop a new version of the algorithm. According to business requirements, iteratively develop the required algorithm services and publish and deploy them to the test server. Specifically, when developers publish the algorithm service, they also deploy the directory structure of the test data required for testing to the test server.

[0086] Then, the tester edits the test cases. Before and after the delivery of the algorithm service, the tester prepares the test case files according to the directory structure of the test data constructed by the developer. The test case files include: input data files, test action files, and expected test result files. For example, they can be in a unified standard file format: input.cvs (input data file), action.csv (test action file), and expect.csv (expected test result file). At the same time, a metadata.yaml (metadata file) for defining the dataset name, dataset description, test case identifier, test case name, and test case description will also be prepared. Through the client web management interface on the local computer, log in and access the test framework device, click the "Upload Test Case File" button to upload the prepared test files to the storage medium of the framework device. At the same time, the test server receives the access request from the tester, parses the metadata.yaml file, and displays the uploaded file content and upload results on the interface. When the tester accesses the test framework device, they can also view the historical test case files, re-execute the test, or directly view the test results.

[0087] Next, the tester can select to run the uploaded test cases through the client web management interface. Specifically, the uploaded test case files can be executed by clicking the "Execute Test" button. The test server will read the test dataset files from the storage medium and execute them according to the requirements of action.csv, and compare the test results with the expected results in expect.csv. A test report file result.csv is generated.

[0088] Finally, the generated test report file result.csv will be stored in the storage medium for developers and testers to view. Specifically, the tester can click the "View Results" button through the client web management interface, and the server reads the test report file result.csv and displays the test results on the interface. The displayed test results can be "error" or "OK". Further, after comparing the test results with the expected results in expect.csv, if the test results exactly match the expected test results, the test report file will not be output. If the test results do not match the expected test results, the differential entries will be output, and a test report file will be generated.

[0089] This embodiment adopts a modular directory structure, enabling a single test data set to be associated with multiple test cases, supporting cross-scenario reuse, constructing a highly abstract and general test framework, facilitating testers to quickly understand test requirements, efficiently complete test data preparation, reducing the communication cost between testers and developers, lowering the technical threshold, and improving test efficiency. By matching with the expected test results, it can quickly locate the values where the test does not match the expectation and generate a visual test report file for easy management and viewing.

[0090] Based on the same inventive concept, an embodiment of the present application also provides a test framework implementation device for large data volume calculations. As Figure 4 shown, it is a schematic structural diagram of a test framework implementation device 400 for large data volume calculations, which may include:

[0091] A construction module 401 that constructs the directory structure of test data, and the directory structure includes: a data set directory, a test case directory, and a metadata file.

[0092] An acquisition module 402 that acquires test case files and stores the test case files in a specified storage medium according to the directory structure.

[0093] An execution module 403 that reads the test case files in the storage medium, executes the test actions under the test case files, and generates test results.

[0094] A generation module 404 that compares the test results with the expected test results to generate a test report file.

[0095] In some possible implementation manners, the test framework implementation device for large data volume calculations according to the present application may at least include a processor and a memory. Among them, the memory stores program code, and when the program code is executed by the processor, the processor is caused to execute the steps in the test framework implementation method for large data volume calculations according to various exemplary embodiments of the present application described in this specification. For example, the processor may execute the steps as Figure 2 shown.

[0096] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, and the electronic device can implement the functions of the foregoing test framework implementation method for large data volume calculations. Referring to Figure 5 , the electronic device includes:

[0097] At least one processor 501, and a memory 502 connected to at least one processor 501. In the embodiment of the present application, the specific connection medium between the processor 501 and the memory 502 is not limited. Figure 5Take the connection between the processor 501 and the memory 502 via the bus 500 as an example. The bus 500 can be divided into an address bus, a data bus, a control bus, etc. Alternatively, the processor 701 can also be referred to as a controller, and there is no restriction on the name.

[0098] In the embodiments of the present application, the memory 502 stores instructions executable by at least one processor 501. By executing the instructions stored in the memory 502, the at least one processor 501 can execute the method for implementing the test framework based on large - data - volume calculation described above. The processor 501 can implement Figure 4 the functions of each module in the device shown.

[0099] Among them, the processor 501 is the control center of the device. It can use various interfaces and lines to connect all parts of the entire control device. By running or executing the instructions stored in the memory 502 and calling the data stored in the memory 502, it can perform various functions and process data of the device, thereby monitoring the device as a whole.

[0100] In a possible design, the processor 501 may include one or more processing units. The processor 501 can integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above - mentioned modem processor may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 can be implemented on the same chip, and in some embodiments, they can also be separately implemented on independent chips.

[0101] The processor 501 can be a general - purpose processor, such as a central processing unit (CPU), a digital signal processor, an application - specific integrated circuit, a field - programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general - purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method for implementing the test framework based on large - data - volume calculation disclosed in combination with the embodiments of the present application can be directly embodied as being completed by the execution of the hardware processor, or completed by the combination of hardware and software modules in the processor.

[0102] The memory 502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 502 can include at least one type of storage medium. For example, it can include flash memory, hard disks, multimedia cards, card-type memories, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memories, magnetic disks, optical discs, etc. The memory 502 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiments of the present application can also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.

[0103] By programming the design of the processor 501, the code corresponding to the method for implementing the test framework based on large data volume calculation introduced in the foregoing embodiments can be solidified into the chip, so that the chip can execute Figure 2 the steps of the method for implementing the test framework based on large data volume calculation in the illustrated embodiments. How to program the design of the processor 501 is a well-known technology to those skilled in the art and will not be elaborated here.

[0104] Based on the same inventive concept, the embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores computer instructions. Different from the storage medium described in the foregoing embodiments, the storage medium in the foregoing embodiments is mainly used to store data files in the test framework. The computer-readable storage medium stores computer instructions. When the computer instructions run on a computer, the computer is caused to execute the method for implementing the test framework based on large data volume calculation discussed above.

[0105] In some possible implementation manners, each aspect of the method for implementing the test framework based on large data volume calculation provided in the present application can also be implemented in the form of a program product, which includes program code. When the program product runs on a device, the program code is used to cause the control device to execute the steps in the method for implementing the test framework based on large data volume calculation according to various exemplary embodiments of the present application described above in this specification.

[0106] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0107] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or the combination of blocks.

[0108] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or the combination of blocks.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or the combination of blocks.

[0110] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A method for implementing a test framework based on large data volume calculation, characterized in that: include: Constructing a directory structure of test data, the directory structure including: a data set directory, a test case directory and a metadata file; Acquire a test case file, and store the test case file in a specified storage medium according to the directory structure; Read the test case file in the storage medium, execute the test actions under the test case file, and generate test results; The test results are compared with expected test results to generate a test report file.

2. The method according to claim 1, characterized in that: The directory structure of building the test data includes: Constructing at least one test case directory under the data set directory; Construct a configuration file under the test case directory, the configuration file includes: Test action files are used to define the input data conditions and test action execution steps of the test cases; The expected result file is used to store the expected test results corresponding to the test action file.

3. The method according to claim 1, characterized in that: The directory structure of building the test data includes: An association relationship between the dataset directory and the metadata file is constructed so that each dataset directory performs data maintenance through an independent metadata file, and the metadata file is used to define the dataset name, dataset description, test case identifier, test case name and test case description.

4. The method according to claim 1, characterized in that: The obtaining of the test case file and storing the test case file in a designated storage medium according to the directory structure includes: Obtaining a test case file uploaded by a tester, wherein the test case file includes: input data conditions, test action execution steps, and expected test results; The test case file is stored in a designated storage medium according to the data set directory and the test case directory defined in the metadata file.

5. The method according to claim 4, characterized in that: The test case files uploaded by the tester are obtained, including Read the basic data set in the data set directory according to the test case file uploaded by the tester; The input data conditions, test action execution steps and expected test results corresponding to the current test in the test case directory are read according to the test case file uploaded by the tester.

6. The method according to claim 4, characterized in that: The step of reading the test case file in the storage medium, executing the test actions in the test case file, and generating the test results includes: reading the input data condition from the storage medium; Execute the test action according to the test action execution steps and generate the test result corresponding to the current test case.

7. The method according to claim 6, characterized in that The step of comparing the test result with the expected test result to generate a test report file includes: Compare the test results corresponding to the current test case with the expected test results in the current test case file; If the test result completely matches the expected test result, no output is given; if the test result does not match the expected test result, a differential entry is given and a test report file is generated.

8. A test framework implementation device based on large data volume calculation, characterized in that: include: A construction module is used to construct a directory structure of test data, wherein the directory structure includes: a data set directory, a test case directory, and a metadata file; An acquisition module acquires a test case file and stores the test case file in a specified storage medium according to the directory structure; An execution module reads the test case file in the storage medium, executes the test actions under the test case file, and generates a test result; The generation module compares the test result with the expected test result to generate a test report file.

9. An electronic device, characterized in that: The device comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes any one of the methods in claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium comprises a program code, and when the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any one of the methods described in claims 1 to 7.