Test framework-based batch processing method and device, electronic equipment and medium
By using a testing framework based on Cypress to perform scheduled batch testing, generate test reports, and parse data, the inefficiency of traditional data processing methods is solved, and the accuracy and efficiency of batch testing in the financial and insurance sectors are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA PING AN LIFE INSURANCE CO LTD
- Filing Date
- 2022-09-09
- Publication Date
- 2026-07-03
Smart Images

Figure CN115391015B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a batch processing method, apparatus, electronic device and medium based on a test framework. Background Technology
[0002] Currently, with the rapid development of the internet, the amount of data is also increasing. Therefore, data statistics and visualization have become particularly important. In the financial and insurance sectors, batch processing, or big data batch processing, is a core business function. For example, interest settlement, accrual, and daily cut-off are all executed in batch processing, generating system reports in batches. Traditional data processing methods involve executing each data item sequentially, resulting in low efficiency and a high risk of errors in data testing. Therefore, most companies use big data batch task monitoring for batch processing, monitoring by capturing anomalies in the task code. However, data congestion may occur during the execution of big data batch tasks, reducing the accuracy of batch testing. Furthermore, manual processing of each batch's results is required, further reducing data processing efficiency and hindering testers' ability to review the results. Summary of the Invention
[0003] The main objective of this application is to propose a batch processing method, apparatus, electronic device, and medium based on a test framework, which can perform batch testing at regular intervals, thereby improving the efficiency of batch testing, and statistically organize the data after batch testing, thereby improving the accuracy of test results.
[0004] To achieve the above objectives, a first aspect of this application proposes a batch processing method based on a testing framework, the method comprising:
[0005] When a batch execution instruction is received, the batch execution data corresponding to the batch execution instruction is determined from the test framework according to the identification information carried by the batch execution instruction, and a timed script corresponding to the batch execution data is generated. The identification information is used to characterize the category of the batch execution instruction.
[0006] The batch data and the scheduled script are input into the test framework for testing, and the test results are obtained.
[0007] A test report and a corresponding test link are generated based on the test results, and the test report is archived in a preset database. The test report includes multiple test field information.
[0008] The test link and the test report are input into the test framework for data parsing to obtain batch running date information, batch running environment information, batch running test case information, and batch running link information corresponding to the test field information;
[0009] A test statistics report table is generated based on the batch running date information, the batch running environment information, the batch running test case information, and the batch running link information.
[0010] In some embodiments, determining the batch data corresponding to the batch execution instruction from the test framework based on the identification information includes:
[0011] The identification information is input into the test framework to trigger the batch task corresponding to the identification information;
[0012] The batch data corresponding to the batch execution instruction is determined from the preset database according to the batch execution task.
[0013] In some embodiments, the step of inputting the batch data and the timed script into the test framework for testing and obtaining test results includes:
[0014] The batch data and the timed script are input into the test framework, so that the test framework performs batch testing on the batch data within a preset time period to obtain multiple test field information.
[0015] The test results are obtained by summarizing the information from the multiple test fields.
[0016] In some embodiments, the batch data includes multiple batch test cases; the testing framework performs batch tests on the batch data within a preset time period to obtain multiple test field information, including:
[0017] Record the time for batch testing within the preset time period to obtain time field information;
[0018] The system environment for running the batch data was tested to obtain environment field information;
[0019] The batch test cases in the batch data are tested to obtain the quantity field information of the batch test cases.
[0020] In some embodiments, archiving the test report to a preset database includes:
[0021] The preset batch processing time for the batch data is determined according to the timed script in the test report;
[0022] The test report is archived at the preset batch processing time.
[0023] In some embodiments, the step of inputting the test link and the test report into the test framework for data parsing to obtain batch run date information, batch run environment information, batch run test case information, and batch run link information corresponding to the test field information includes:
[0024] The test report is input into the test framework for information extraction to obtain the time field information, the environment field information, and the quantity field information;
[0025] By analyzing the time field information, the environment field information, and the quantity field information, the batch running date information, the batch running environment information, and the batch running use case information are obtained.
[0026] The test link is tested to obtain the archive address of the test report in the preset data;
[0027] The batch processing link information is determined based on the archive address.
[0028] In some embodiments, the test report is input into the test framework for data parsing to obtain test case status information corresponding to the test field information, wherein the test case status information is used to characterize the error information during the execution of the batch test cases.
[0029] To achieve the above objectives, a second aspect of this application provides a batch processing apparatus based on a test framework, the apparatus comprising:
[0030] The script generation module is used to, when a batch execution instruction is received, determine the batch execution data corresponding to the batch execution instruction from the test framework according to the identification information carried by the batch execution instruction, and generate a timed script corresponding to the batch execution data, wherein the identification information is used to characterize the category of the batch execution instruction;
[0031] The data testing module is used to input the batch data and the timed script into the testing framework for testing and to obtain test results.
[0032] The report generation module is used to generate a test report and a test link corresponding to the test report based on the test results, and to archive the test report to a preset database. The test report includes multiple test field information.
[0033] The data parsing module is used to input the test link and the test report into the test framework for data parsing, and to obtain batch running date information, batch running environment information, batch running test case information and batch running link information corresponding to the test field information;
[0034] The statistics generation module is used to generate a test statistics report table based on the batch running date information, the batch running environment information, the batch running test case information, and the batch running link information.
[0035] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the batch processing method based on the test framework described in the first aspect.
[0036] To achieve the above objectives, a fourth aspect of the present application provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the batch processing method based on the test framework described in the first aspect.
[0037] The batch processing method, apparatus, electronic device, and storage medium based on a test framework proposed in this application, upon receiving a batch processing instruction, determines the corresponding batch processing data from the test framework based on the identification information in the instruction, and simultaneously generates a timed script corresponding to the batch processing data. This facilitates batch processing testing at a specified time, thereby avoiding data congestion. The batch processing data and timed script are then input into the test framework for testing. The generated test report and test links are archived in a preset database, facilitating testers' tracking and result viewing, thus improving the efficiency of batch processing testing. Finally, the test links and test reports are input into the test framework for data parsing, obtaining batch processing date information, batch processing environment information, batch processing test case information, and batch processing link information corresponding to the test links. Based on the above information and test links, a test statistics report table is generated, thereby achieving statistical organization of batch processing test data and improving the accuracy of test results. Attached Figure Description
[0038] Figure 1 This is a flowchart of a batch processing method based on a testing framework provided in an embodiment of this application;
[0039] Figure 2 yes Figure 1 The flowchart of step S101 in the text;
[0040] Figure 3 yes Figure 1 The flowchart of step S102 in the document;
[0041] Figure 4 yes Figure 3 The flowchart of step S301 in the process;
[0042] Figure 5 yes Figure 1 The flowchart of step S103 in the process;
[0043] Figure 6 yes Figure 1 The flowchart of step S104 in the process;
[0044] Figure 7 This is a flowchart of a batch processing method based on a test framework provided in another embodiment of this application;
[0045] Figure 8 This is a schematic diagram of the structure of the batch processing device based on the test framework provided in the embodiments of this application;
[0046] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0048] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0050] First, let's analyze some of the terms used in this application:
[0051] Natural Language Processing (NLP): NLP uses computers to process, understand, and utilize human language (such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, often referred to as computational linguistics. NLP includes syntactic analysis, semantic analysis, and discourse understanding. It is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, intent recognition, information extraction and filtering, text classification and clustering, sentiment analysis, and opinion mining. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computation.
[0052] Information extraction is a text processing technique that extracts factual information such as entities, relationships, and events from natural language text and outputs it as structured data. Information extraction is a technique for extracting specific information from text data. Text data is composed of specific units, such as sentences, paragraphs, and chapters. Text information is composed of smaller, specific units, such as characters, words, phrases, sentences, paragraphs, or combinations of these units. Extracting noun phrases, names of people, and place names from text data is an example of text information extraction. Of course, text information extraction techniques can extract information of various types.
[0053] Batch Processing: Batch processing is the automated closing of accounts by a computer system. Each bank has its own batch processing procedures, which involve batching monthly revenue and expenses generated within a company's corporate account into the system's general ledger for large-scale transactions such as interest settlement, accrual, and payments. Different banks employ different batch processing procedures, and their efficiency and functionality vary. Accumulating data into "batches" and processing them all at once within a specified timeframe is called batch processing, or batch processing.
[0054] User Interface (UI): This refers to the overall design of software's human-computer interaction, operational logic, and aesthetics. The UI serves as the medium for interaction and information exchange between the system and the user, converting information from its internal form to a human-readable format. The user interface is designed to facilitate communication between the user and hardware, enabling users to operate the hardware conveniently and efficiently to achieve two-way interaction and complete desired tasks. The definition of a user interface is broad, encompassing both human-computer interaction and graphical user interfaces; it exists in any field involving information exchange between humans and machines.
[0055] JavaScript Object Notation (JSON) is a lightweight data-interchange format. Based on a subset of the JavaScript specification defined by the European Computer Association (ECA), it uses a text format completely independent of programming languages to store and represent data. Its concise and clear hierarchical structure makes JSON an ideal data exchange language. It is easy for humans to read and write, as well as easy for machines to parse and generate, effectively improving network transmission efficiency.
[0056] Structured Query Language (SQL) is a database language with multiple functions, including data manipulation and definition. This interactive language provides great convenience to users. Database management systems should fully utilize SQL to improve the quality and efficiency of computer application systems. SQL can be used independently in the terminal, or as a sub-language to effectively assist in other program design. In program applications, SQL can work with other programming languages to optimize program functionality, thereby providing users with more comprehensive information.
[0057] Relational Database Management System (MySQL): An easy-to-use client and server database system that combines the features of a multi-user, multi-execution thread, and robust SQL syntax database server. It is a very popular database system with fast execution speed and is used as a database query language in relational databases.
[0058] The batch processing method, apparatus, electronic device, and storage medium based on the test framework provided in this application are specifically described through the following embodiments. First, the batch processing method based on the test framework in this application is described.
[0059] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0060] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0061] The batch processing method based on a testing framework provided in this application relates to the field of artificial intelligence technology. This batch processing method based on a testing framework can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the batch processing method based on the testing framework, but is not limited to the above forms.
[0062] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0063] In some embodiments, current UI automation is typically based on third-party browser automation testing frameworks, such as Selenium or Web Driver. However, these frameworks can only be used at the UI testing level and are unstable, slow, and unable to directly perform interface testing. Therefore, this application uses the third-party Cypress framework, which runs directly within the browser, to perform UI and interface integration testing to improve efficiency, stability, and scalability. Thus, the testing framework in this application is the Cypress framework.
[0064] Based on this, embodiments of this application provide a batch processing method and apparatus, electronic device and storage medium based on a test framework, which can perform batch tests at regular intervals, thereby improving the efficiency of batch tests, and statistically organize the data after batch tests, thereby improving the accuracy of test results.
[0065] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0066] Figure 1 This is an optional flowchart of the batch processing method based on the test framework provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S105.
[0067] Step S101: When a batch run instruction is received, the batch run data corresponding to the batch run instruction is determined from the test framework according to the identification information carried by the batch run instruction, and a timed script corresponding to the batch run data is generated.
[0068] It should be noted that the identification information is used to characterize the category of the batch execution command.
[0069] Step S102: Input the batch data and the scheduled script into the test framework for testing and obtain the test results;
[0070] Step S103: Generate a test report and a test link corresponding to the test report based on the test results, and archive the test report to a preset database;
[0071] It should be noted that the test report includes multiple test field information.
[0072] Step S104: Input the test link and test report into the test framework for data parsing to obtain the batch running date information, batch running environment information, batch running test case information, and batch running link information corresponding to the test field information.
[0073] Step S105: Generate a test statistics report table based on the batch running date information, batch running environment information, batch running test case information, and batch running link information.
[0074] In step S101 of some embodiments, after receiving the batch run instruction, the batch run data corresponding to the batch run instruction is determined from the test framework according to the identification information carried by the batch run instruction, and a timing script corresponding to the batch run data is generated to facilitate subsequent timing testing of the batch run data.
[0075] It should be noted that the testing framework includes multiple batch datasets, and the batch datasets are stored in the corresponding configuration files in JSON format. The scheduled scripts can be set by the testers themselves according to their needs, such as executing according to a period, by month, by date, or by a fixed time period. This embodiment does not impose any specific restrictions.
[0076] In step S102 of some embodiments, the batch data and the timed script are input into the test framework for testing to obtain test results, which facilitates subsequent information statistics.
[0077] In step S103 of some embodiments, a test report and a test link corresponding to the test report are generated based on the test results, and the test report is archived in a preset database for easy viewing by subsequent testers, and for organizing and statistically analyzing the test information.
[0078] It should be noted that the test report includes multiple test field information, including but not limited to the execution cycle format of the batch data, the execution script directory, the test report generation directory, the field directory, and various batch data information fields. The execution cycle format is the format in which the batch data is executed at a fixed time period or according to the time period requested by the user. The execution script directory contains various script types executed during the testing of the batch data, such as scheduled scripts, formatted scripts, or text scripts. These scripts are statistically analyzed to generate the execution script directory, which is convenient for testers to view and manage, thereby improving the efficiency of batch testing. The test report generation directory is used to indicate the storage location of the test report, making it convenient for testers to track the test report.
[0079] In step S104 of some embodiments, the test link and test report are input into the test framework for data parsing to obtain batch running date information, batch running environment information, batch running test case information, and batch running link information corresponding to the test field information. The test results of the test framework are verified based on the batch running date information, batch running environment information, batch running test case information, and batch running link information, thereby improving the accuracy of batch running tests.
[0080] It should be noted that the batch test date information includes the start and end times of each batch test, the batch test environment information includes the running system information, including but not limited to the operating system type, operating system version information, operating system kernel information, operating system memory information, and the project running environment of the batch test, etc., the batch test case information includes the number of batch test cases, the number of batch test cases that passed, and the number of batch test cases that failed, etc. The number of batch test cases, the number of batch test cases that passed, and the number of batch test cases that failed are obtained by parsing and statistically analyzing the different test field information, and the batch test link information is used to represent the absolute path storage location of the test report, which is convenient for subsequent viewing of the test report.
[0081] In step S105 of some embodiments, a test statistics report is generated based on the batch running date information, batch running environment information, batch running test case information, and batch running link information. This facilitates testers in tracking problems, improves batch running efficiency, and ensures the reliability and traceability of batch running results.
[0082] It should be noted that the test statistics report form may include one or more test reports, which makes it easier for testers to store and compare the results of multiple batch tests, and to statistically organize the data after batch tests, thereby improving the accuracy of the test results.
[0083] In steps S101 to S105 of this embodiment, upon receiving a batch run instruction, the corresponding batch run data is determined from the test framework based on the identifier information in the instruction. Simultaneously, a timed script corresponding to the batch run data is generated to facilitate batch run testing at a specified time, thus avoiding data congestion. The batch run data and timed script are then input into the test framework for testing. The generated test report and test link are archived in a preset database, facilitating the tracking and viewing of results by testers and improving the efficiency of batch run testing. Finally, the test link and test report are input into the test framework for data parsing to obtain batch run date information, batch run environment information, batch run test case information, and batch run link information corresponding to the test link. Based on the above information and the test link, a test statistics report is generated, thereby statistically organizing the batch run test data and improving the accuracy of the test results.
[0084] Please see Figure 2 In some embodiments, step S101 may include, but is not limited to, steps S201 to S202:
[0085] Step S201: Input the identification information into the test framework to trigger the batch task corresponding to the identification information;
[0086] Step S202: Determine the batch data corresponding to the batch execution instruction from the preset database according to the batch execution task.
[0087] In step S201 of some embodiments, the batch run instruction is input into the test framework, so that the test framework triggers the corresponding batch run task according to the identification information in the batch run instruction, thereby facilitating the subsequent determination of the batch run data.
[0088] It should be noted that the testing framework includes multiple batch tasks, each with its own identifier, and these tasks are stored in a pre-defined database.
[0089] In step S202 of some embodiments, after triggering the batch running task corresponding to the identification information, the batch running data corresponding to the batch running instruction is determined from the preset database according to the batch running task, which facilitates the subsequent testing of the batch running data. Furthermore, the batch running data is determined through the batch running task, thereby improving the matching accuracy between the identification information and the batch running data.
[0090] It is understood that the preset database can be an SQL database, a MySQL database, etc., and the preset database includes multiple storage areas. Different storage areas are set with different storage identifiers to facilitate partitioning of the preset database. The storage areas include, but are not limited to, batch data storage area, batch task storage area, test report storage area, and test statistics report area, etc. This embodiment does not impose specific limitations.
[0091] Please see Figure 3 In some embodiments, step S102 may include, but is not limited to, steps S301 to S302:
[0092] Step S301: Input the batch data and the timed script into the test framework so that the test framework performs batch testing on the batch data within a preset time period and obtains multiple test field information.
[0093] Step S302: Summarize the information from multiple test fields to obtain the test results.
[0094] In step S301 of some embodiments, the batch data and the timed script are input into the test framework, so that the test framework can perform batch testing on the batch data according to the preset time period in the timed script, thereby obtaining multiple test field information, avoiding information congestion, and thus improving the efficiency of batch testing.
[0095] It should be noted that the preset time period can be a specific time period on a particular date, such as 10:00 AM to 12:00 PM on June 20th, 1:00 PM to 2:00 PM on January 1st, or 12:00 PM to 4:00 PM on October 7th, or a periodic time period, such as 8:00 AM to 10:00 AM every Monday, 10:00 AM to 12:00 PM on the 15th of each month, or 8:00 AM to 4:00 PM every day. This embodiment does not impose any specific limitations.
[0096] In step S302 of some embodiments, after running batch tests on the batch data within a preset time period, the obtained multiple test field information is summarized to obtain the test results. Therefore, the test results include multiple test field information.
[0097] Please see Figure 4 In some embodiments, step S301 may include, but is not limited to, steps S401 to S403:
[0098] It should be noted that the batch data run includes multiple batch test cases.
[0099] Step S401: Record the time for batch testing within a preset time period to obtain time field information;
[0100] Step S402: Test the system environment for running batch data and obtain environment field information;
[0101] Step S403: Test the batch test cases in the batch data to obtain the number of batch test cases.
[0102] In step S401 of some embodiments, the time for performing batch testing is recorded within a preset time period to obtain time field information, which facilitates the observation and analysis of batch testing results and makes it easier to improve the testing framework in the future.
[0103] It should be noted that since the test duration of batch testing is not fixed, the batch test may be completed within a sub-time interval of the preset time period, or there may be pauses or interruptions within the preset time period. Therefore, it is necessary to record the time of batch testing within the preset time period. The time of batch testing includes, but is not limited to, the start time of batch testing, the end time of batch testing, the interruption duration of batch testing, and the buffer duration of batch testing. This embodiment does not impose specific limitations.
[0104] In step S402 of some embodiments, the system environment for running batch data is tested to obtain environment field information, thereby ensuring the efficiency of batch testing and avoiding situations such as insufficient system memory or outdated system version.
[0105] It should be noted that testing the system environment for running batch data allows us to determine the current operating system type and version, enabling testers to decide whether to update the operating system. It also provides information on the number of kernels and memory size to assess the stability of the system environment. Furthermore, testing the development, testing, and production environments for batch data runs improves overall efficiency, ensures the reliability of results, and facilitates future maintenance of the batch testing environment.
[0106] In step S403 of some embodiments, the batch test cases in the batch test data are tested to obtain the quantity field information of the batch test cases, which facilitates the subsequent statistics of the batch test cases and realizes a comprehensive record of the batch test.
[0107] It should be noted that testing the batch test cases in the batch data includes, but is not limited to, testing the number of batch test cases to obtain information such as the total number of batch test cases, the number of batch test cases that passed, the number of batch test cases that failed, and the number of batch test cases that were interrupted. This embodiment does not impose specific limitations.
[0108] Please see Figure 5 In some embodiments, step S103 may also include, but is not limited to, steps S501 to S502:
[0109] Step S501: Determine the preset batch running time for the batch data according to the timed script in the test report;
[0110] Step S502: Archive the test report at the preset batch running time.
[0111] In step S501 of some embodiments, the preset batch running time of the batch data is determined according to the timing script in the test report, so as to facilitate subsequent archiving according to the preset batch running time and realize the organization of the test report.
[0112] It should be noted that the preset batch running time can be the batch running date, batch running time period, etc. set in the scheduled script.
[0113] In step S502 of some embodiments, the test report is archived according to the preset batch test time determined in step S501, thereby realizing the automated archiving of the test report, improving the efficiency of batch testing, and facilitating subsequent linking and tracking of the test report by testers.
[0114] Understandably, when the preset batch run time is the batch run date, the batch run dates can be archived by month, and when the preset batch run time is the batch run period, the dates can be archived, thus enabling the organization of test reports.
[0115] Please see Figure 6 In some embodiments, step S104 includes, but is not limited to, steps S601 to S603:
[0116] Step S601: Input the test report into the test framework to extract information, and obtain the time field information, environment field information and quantity field information;
[0117] Step S602: Analyze the time field information, environment field information, and quantity field information to obtain batch running date information, batch running environment information, and batch running test case information;
[0118] Step S603: Determine the batch processing link information based on the archive address.
[0119] In step S601 of some embodiments, the test report is input into the test framework, which extracts information based on the field identifier to obtain time field information, environment field information, and quantity field information. This facilitates the analysis of batch test results, enabling a comprehensive analysis of the batch test and determining whether the batch test results are correct, thereby improving the accuracy of the batch test.
[0120] In step S602 of some embodiments, the time field information, environment field information, and quantity field information are analyzed to obtain batch run date information, batch run environment information, and batch run test case information. This enables the analysis of the time field information, environment field information, and quantity field information, thereby ensuring the correctness of the batch run date information, batch run environment information, and batch run test case information obtained through batch run testing.
[0121] In step S603 of some embodiments, the batch link information corresponding to the test report is determined according to the archive address of the test report, so as to realize the tracking of the test report.
[0122] Please see Figure 7 In some embodiments, Figure 7 This is a flowchart of a batch processing method based on a test framework provided in another embodiment of this application;
[0123] Step S701: Input the test report into the test framework for data parsing to obtain the test case status information corresponding to the test field information.
[0124] It should be noted that the test case status information is used to characterize the error messages encountered during the execution of batch test cases.
[0125] In step S701 of some embodiments, the test report is input into the test framework for data parsing to obtain the test case status information corresponding to the test field information, thereby realizing the judgment of the batch test case status and obtaining the error information in the batch test process, which facilitates the subsequent optimization of the batch test process based on the error information.
[0126] It should be noted that the test case status information includes successful test case information and failed test case information. Successful test case information refers to test cases that passed the batch test, that is, test cases whose test fields are completely consistent with the batch test information in the parsed test report. Failed test case information refers to test cases that failed the batch test, that is, test fields that are inconsistent with the batch test information in the parsed test report. For example, the time field information is inconsistent with the batch test date information, the environment field information is inconsistent with the batch test environment information, etc., or the test fields cannot correspond to the batch test information in the parsed test report. For example, the test report does not contain batch test date information corresponding to the time field information, or the test report does not contain batch test environment information corresponding to the environment field information, etc.
[0127] It is understandable that error messages during batch test execution are recorded to prevent the same errors from occurring in subsequent batch tests, thereby improving the accuracy of batch tests.
[0128] Please see Figure 8 This application also provides a batch processing apparatus based on a test framework, which can implement the above-described batch processing method based on a test framework. The apparatus includes:
[0129] The script generation module 801 is used to, when a batch execution instruction is received, determine the batch execution data corresponding to the batch execution instruction from the test framework according to the identification information carried by the batch execution instruction, and generate a timed script corresponding to the batch execution data. The identification information is used to characterize the category of the batch execution instruction.
[0130] The data testing module 802 is used to input batch data and timed scripts into the testing framework for testing and to obtain test results.
[0131] The report generation module 803 is used to generate a test report and a test link corresponding to the test report based on the test results, and archive the test report to a preset database. The test report includes multiple test field information.
[0132] The data parsing module 804 is used to input the test link and test report into the test framework for data parsing, and to obtain the batch run date information, batch run environment information, batch run test case information and batch run link information corresponding to the test field information;
[0133] The statistics generation module 805 is used to generate a test statistics report table based on the batch running date information, batch running environment information, batch running test case information, and batch running link information.
[0134] The specific implementation of the test framework-based batch processing device is basically the same as the specific implementation of the test framework-based batch processing method described above, and will not be repeated here.
[0135] This application also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the batch processing method based on the test framework described above. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0136] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0137] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0138] The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the batch processing method based on the test framework of the embodiments of this application.
[0139] The input / output interface 903 is used to implement information input and output;
[0140] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0141] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0142] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0143] This application embodiment also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the above-described batch processing method based on the test framework.
[0144] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0145] The batch processing method, apparatus, electronic device, and storage medium based on a test framework provided in this application, upon receiving a batch processing instruction, determine the corresponding batch processing data from the test framework based on the identification information in the instruction, and simultaneously generate a timed script corresponding to the batch processing data. This facilitates batch testing at a specified time, thus avoiding data congestion. The batch processing data and timed script are then input into the test framework for testing. The generated test report and test links are archived in a preset database, facilitating testers' tracking and result viewing, thereby improving the efficiency of batch testing. Finally, the test links and test reports are input into the test framework for data parsing, obtaining batch processing date information, batch processing environment information, batch processing test case information, and batch processing link information corresponding to the test links. Based on the above information and test links, a test statistics report table is generated, thereby achieving statistical organization of batch testing data and improving the accuracy of test results.
[0146] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0147] It will be understood by those skilled in the art that Figure 1-7 The technical solutions shown do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0148] The foregoing has described specific embodiments of this application; other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily have to follow the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0149] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and computer-readable storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0150] The apparatus, device, computer-readable storage medium and method provided in the embodiments of this application are corresponding. Therefore, the apparatus, device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, device and computer storage medium will not be described again here.
[0151] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many improvements to the methodology today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that an improvement to the methodology cannot be implemented using hardware physical modules.
[0152] For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system onto a PLD themselves, eliminating the need for chip manufacturers to design and fabricate dedicated integrated circuit chips. Furthermore, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented using "logic compiler" software, similar to the software compiler used in program development. The source code before compilation must be written in a specific programming language called a Hardware Description Language (HDL). There is not just one type of HDL, but many, such as:
[0153] ABEL (Advanced Boolean Expression Language); AHDL (Altera Hardware Description Language); Confluence; CUPL (Cornell University Programming Language); HDCal; and JHDL (Java Hardware Description Language); Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Currently, among the technologies in this field, VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are more commonly used. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using the aforementioned hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0154] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers:
[0155] The memory controller, including the ARC 625D, Atmel AT91SAM, Microchip IP address PIC18F26K20, and Silicon Labs C8051F320, can also be implemented as part of the memory's control logic. Those skilled in the art will also recognize that, in addition to implementing the controller as purely computer-readable program code, the same functionality can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices included within it for implementing various functions can also be considered structures within that hardware component. Alternatively, the devices for implementing various functions can be considered as both software modules implementing the method and structures within a hardware component.
[0156] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0157] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing the embodiments of this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0158] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0159] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0160] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0161] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0162] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0163] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0164] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0165] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0166] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0167] The embodiments of this application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. The embodiments of this application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside in local and remote computer storage media, including storage devices.
[0168] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0169] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
Claims
1. A batch processing method based on a test framework, characterized in that, include: When a batch execution instruction is received, the batch execution data corresponding to the batch execution instruction is determined from the test framework according to the identification information carried by the batch execution instruction, and a timed script corresponding to the batch execution data is generated. The identification information is used to characterize the category of the batch execution instruction. The batch data and the scheduled script are input into the test framework for testing, and the test results are obtained. A test report and a corresponding test link are generated based on the test results, and the test report is archived in a preset database. The test report includes multiple test field information. The test link and the test report are input into the test framework for data parsing to obtain batch running date information, batch running environment information, batch running test case information, and batch running link information corresponding to the test field information; A test statistics report table is generated based on the batch running date information, the batch running environment information, the batch running test case information, and the batch running link information.
2. The batch processing method based on the test framework according to claim 1, characterized in that, The step of determining the batch data corresponding to the batch execution instruction from the test framework based on the identification information includes: The identification information is input into the test framework to trigger the batch task corresponding to the identification information; The batch data corresponding to the batch execution instruction is determined from the preset database according to the batch execution task.
3. The batch processing method based on the test framework according to claim 1, characterized in that, The step of inputting the batch data and the scheduled script into the test framework for testing and obtaining test results includes: The batch data and the timed script are input into the test framework, so that the test framework performs batch testing on the batch data within a preset time period to obtain multiple test field information. The test results are obtained by summarizing the information from the multiple test fields.
4. The batch processing method based on the test framework according to claim 3, characterized in that, The batch data includes multiple batch test cases; The testing framework performs batch testing on the batch data within a preset time period, obtaining multiple test field information, including: Record the time for batch testing within the preset time period to obtain time field information; The system environment for running the batch data was tested to obtain environment field information; The batch test cases in the batch data are tested to obtain the quantity field information of the batch test cases.
5. The batch processing method based on the test framework according to claim 1, characterized in that, The step of archiving the test report to a preset database includes: The preset batch processing time for the batch data is determined according to the timed script in the test report; The test report is archived at the preset batch processing time.
6. The batch processing method based on the test framework according to claim 4, characterized in that, The step involves inputting the test link and the test report into the test framework for data parsing to obtain batch run date information, batch run environment information, batch run test case information, and batch run link information corresponding to the test field information, including: The test report is input into the test framework for information extraction to obtain the time field information, the environment field information, and the quantity field information; By analyzing the time field information, the environment field information, and the quantity field information, the batch running date information, the batch running environment information, and the batch running use case information are obtained. The test link is tested to obtain the archive address of the test report in the preset data; The batch processing link information is determined based on the archive address.
7. The batch processing method based on the test framework according to claim 4, characterized in that, The batch processing method also includes: The test report is input into the test framework for data parsing to obtain test case status information corresponding to the test field information. The test case status information is used to characterize the error information during the execution of the batch test cases.
8. A batch processing device based on a test framework, characterized in that, The device includes: The script generation module is used to, when a batch execution instruction is received, determine the batch execution data corresponding to the batch execution instruction from the test framework according to the identification information carried by the batch execution instruction, and generate a timed script corresponding to the batch execution data, wherein the identification information is used to characterize the category of the batch execution instruction; The data testing module is used to input the batch data and the timed script into the testing framework for testing and to obtain test results. The report generation module is used to generate a test report and a test link corresponding to the test report based on the test results, and to archive the test report to a preset database. The test report includes multiple test field information. The data parsing module is used to input the test link and the test report into the test framework for data parsing, and to obtain batch running date information, batch running environment information, batch running test case information and batch running link information corresponding to the test field information; The statistics generation module is used to generate a test statistics report table based on the batch running date information, the batch running environment information, the batch running test case information, and the batch running link information.
9. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the steps of the batch processing method based on the test framework as described in any one of claims 1 to 7.
10. A storage medium, said storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the batch processing method based on the test framework as described in any one of claims 1 to 7.