File management method and device based on performance test, equipment and storage medium
By acquiring and parsing test scenario files from performance testing, and automating file management, the problem of low file management efficiency in performance testing is solved, storage space utilization and file management accuracy are improved, and manpower and time are saved.
Patent Information
- Application Number
- CN202311134384.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-09-04
AI Technical Summary
In performance testing, file management efficiency was low, storage space utilization was low, and file management accuracy and efficiency were insufficient, resulting in a waste of manpower and time.
By obtaining the storage path and test scenario table of the performance test test scenario files, parsing the test scenario files, determining whether the files match the test scenarios, identifying valid test scenario files, and retaining and storing them, the system automatically manages the files.
It improves the effective utilization of storage space, reduces the difficulty of file management, enhances the accuracy and efficiency of file management, and saves manpower and time.
Smart Images

Figure CN117149704B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the financial field, and more particularly to a file management method, apparatus, device, and storage medium based on performance testing. Background Technology
[0002] With the rapid development of technology, the performance requirements of banking information systems are becoming increasingly stringent, necessitating performance testing of important and new systems before deployment.
[0003] Performance testing involves a large number of files, including script files, parameter files, and result files. Because these files need to be continuously modified, repeatedly tested, or tested over extended periods, the number and size of these files constantly increase, placing enormous pressure and difficulty on file management. Summary of the Invention
[0004] This application provides a file management method, apparatus, device, and storage medium based on performance testing, in order to improve the efficiency and accuracy of file management.
[0005] Firstly, this application provides a file management method based on performance testing, including:
[0006] Obtain the storage path of the test scenario files for performance testing, and obtain the test scenario table for performance testing; wherein, the test scenario files represent the files required for performance testing under the test scenario and the files obtained after the performance test, and the test scenario files include scenario script files, test parameter files, and test result files; the test scenario table includes the test scenarios for performance testing;
[0007] The test scenario file is retrieved from the storage path, parsed, and the parsing result corresponding to the test scenario file is determined; wherein, the parsing result includes at least one of the following: the file name, file content, and file attribute information of the test scenario file;
[0008] If, based on the parsing results corresponding to the test scenario file, it is determined that there exists a test scenario in the test scenario table that matches the test scenario file, then the test scenario file is determined to be a valid test scenario file.
[0009] The valid test scenario files are retained and stored.
[0010] Secondly, this application provides a file management device based on performance testing, comprising:
[0011] The acquisition module is used to acquire the storage path of the test scenario files for performance testing, and to acquire the test scenario table for performance testing; wherein, the test scenario files represent the files required for performance testing under the test scenario and the files obtained after the performance test, and the test scenario files include scenario script files, test parameter files, and test result files; the test scenario table includes the test scenarios for performance testing;
[0012] The parsing module is used to obtain the test scenario file from the storage path, parse the test scenario file, and determine the parsing result corresponding to the test scenario file; wherein, the parsing result includes at least one of the following: the file name, file content, and file attribute information of the test scenario file;
[0013] The judgment module is used to determine the test scenario file as a valid test scenario file if, based on the parsing result corresponding to the test scenario file, there is a test scenario in the test scenario table that matches the test scenario file.
[0014] The storage module is used to retain and store the valid test scenario files.
[0015] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0016] The memory stores computer-executed instructions;
[0017] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect of this application.
[0018] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect of this application.
[0019] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the file management method based on performance testing as described in the first aspect of this application.
[0020] The file management method, apparatus, device, and storage medium based on performance testing provided in this application obtain the test scenario files by acquiring their storage paths. The test scenario files are then parsed to obtain the parsing results. A test scenario table for performance testing is obtained, and it is determined whether the parsing results match the test scenarios in the table. If they match, the test scenario file corresponding to the parsing results is identified as a valid test scenario file. Valid test scenario files are then archived and stored, thereby achieving automatic file management and significantly improving the effective utilization of storage space. This solves the problem of large numbers of files occupying storage space in existing technologies, reduces the difficulty of file management and filtering in performance testing, improves the accuracy and effectiveness of file management, saves manpower and time, and ultimately improves the efficiency of performance testing. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0022] Figure 1 A flowchart illustrating a file management method based on performance testing, provided as an embodiment of this application;
[0023] Figure 2 A flowchart illustrating a file management method based on performance testing, provided as an embodiment of this application;
[0024] Figure 3 A structural block diagram of a file management device based on performance testing provided in this application embodiment;
[0025] Figure 4 A structural block diagram of a file management device based on performance testing provided in this application embodiment;
[0026] Figure 5 A structural block diagram of an electronic device provided in an embodiment of this application;
[0027] Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of this application.
[0028] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0031] It should be noted that the file management method, apparatus, device and storage medium based on performance testing of this application can be used in the financial field, or in any field other than the financial field. The application field of the file management method, apparatus, device and storage medium based on performance testing of this application is not limited.
[0032] With the rapid development of business technology, the performance requirements of banking information systems are becoming increasingly stringent, necessitating performance testing of critical and new systems before production deployment. Performance testing involves a large number of test files, including script files, parameter files, and result files. Due to the need for continuous modification, repeated testing, and long-term testing based on test results, coupled with the large scale of testing, the number and size of generated files continuously increase, placing pressure and difficulty on file management. A large number of files consume disk space on the stress test machine, exceeding storage capacity, leading to storage space pressure, capacity overruns, and storage failures. Invalid or duplicate test result files, and used one-time parameter files also consume space, resulting in low effective utilization of storage resources. Furthermore, the relationships between files are often chaotic; for example, the filenames of result files are often unreasonable or ambiguous, making it difficult for testers to quickly locate the necessary reference files, impacting testing efficiency. Therefore, it is necessary to improve the effective utilization of storage space to enhance the efficiency of performance testing.
[0033] Currently, the methods for managing performance test files are either to directly sort files by time and retain the most recent test result files (e.g., files from the last 15 days), or to retain a few recently generated test result files (e.g., 30 files) and delete the others; or to send messages or emails to performance testers when disk space is insufficient, notifying them to manually determine and delete unnecessary test files. Both of these methods rely solely on time factors or involve manually opening and viewing files to determine whether to retain or delete them, wasting significant manpower and time, resulting in low accuracy and efficiency in file management.
[0034] This application provides a file management method, apparatus, device, and storage medium based on performance testing, which aims to solve the above-mentioned technical problems in the prior art.
[0035] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0036] Figure 1 This is a flowchart illustrating a file management method based on performance testing according to an embodiment of this application. The method is executed by a file management device based on performance testing. Figure 1 As shown, the method includes the following steps:
[0037] S101. Obtain the storage path of the test scenario files for performance testing, and obtain the test scenario table for performance testing; wherein, the test scenario files represent the files required for performance testing under the test scenario and the files obtained after the performance test, and the test scenario files include scenario script files, test parameter files and test result files; the test scenario table includes the test scenarios for performance testing.
[0038] For example, during performance testing, each test corresponds to multiple test scenario files. Test scenario files can represent the files required for performance testing within a test scenario and the files obtained after the performance test. For instance, test scenario files may include scenario script files, test parameter files, and test result files. Scenario script files and test parameter files are the files required for performance testing, while the test result files are the files obtained after the performance test.
[0039] The scenario script file can include pre-written test scripts; the test parameter file includes pre-configured test parameters, such as the number of tests and test time; the test result file includes performance test results, such as whether the test was successful and the test duration. All test scenario files are stored in a preset storage path. The storage path of the performance test scenario files can be retrieved in real-time or periodically, enabling real-time or periodic file management.
[0040] A test scenario table is also required, containing the test scenarios that need to be tested. This table can include multiple test scenarios, represented by names or identifiers. For example, it might have multiple rows, each representing a different test scenario. The test scenarios in the table are pre-determined and valid by the staff through discussion. If a test scenario is not listed in the table, it is considered invalid.
[0041] In this embodiment, obtaining the test scenario table for performance testing includes: obtaining a preset test plan report document; wherein the test plan report document includes test scenarios that need to be tested for performance, as confirmed by the staff; identifying the names of the test scenarios in the test plan report document, and generating a test scenario table based on the identified test scenario names.
[0042] Specifically, staff members discuss and finalize the performance test plan report beforehand. This report includes the test scenarios confirmed by the staff as requiring performance testing. For example, if staff confirm that scenario one needs to be tested but scenario two is not, the report will specify that scenario one will be tested. In other words, the report can be a performance test plan design report or other related documents containing test scenario design plans, such as a test plan review form.
[0043] The test plan report document is obtained, which includes information such as the names or identifiers of the test scenarios requiring performance testing. Therefore, based on a preset recognition algorithm, the names or identifiers of the test scenarios in the test plan report document can be identified to determine the test scenarios requiring performance testing. In this embodiment, the preset recognition algorithm is not specifically limited. A test scenario table is generated based on the identified test scenario names or identifiers, ensuring that the table includes the identified test scenario names or identifiers. In this embodiment, the format of the test scenario table is not specifically limited.
[0044] The advantage of this setup is that it allows you to obtain test plan report documents, identify pre-determined valid test scenarios, and automatically generate a test scenario table, effectively improving the efficiency of file management.
[0045] S102. Obtain the test scenario file from the storage path, parse the test scenario file, and determine the parsing result corresponding to the test scenario file; wherein, the parsing result includes at least one of the following: the file name, file content, and file attribute information of the test scenario file.
[0046] For example, after obtaining the storage path of the test scenario files, the test scenario files can be retrieved from that storage path. The storage path may include multiple test scenario files for different performance tests; therefore, multiple test scenario files for various performance tests can be obtained.
[0047] Each test scenario file can be parsed to obtain the parsing results for each test scenario file. For example, the filename and content of the test scenario file can be parsed. In this embodiment, the specific data to be parsed for the test scenario file is not specifically limited. The filename or content of the test scenario file can be parsed, and the parsing result can include at least one of the following: filename, file content, and file attribute information. Attribute information can include file size, type, creation time, etc. Different types of test scenario files may require different data to be parsed.
[0048] S103. If, based on the parsing results corresponding to the test scenario file, it is determined that there exists a test scenario in the test scenario table that matches the test scenario file, then the test scenario file is determined to be a valid test scenario file.
[0049] For example, the test scenario table may include multiple test scenarios, and test scenarios can be represented by their names. After obtaining the parsing result of the test scenario file, the parsing result is matched with the test scenarios in the test scenario table. For example, if the parsing result includes the name of the test scenario corresponding to the test scenario file, the names of the test scenarios in the parsing result can be compared with the names of the test scenarios in the test scenario table to determine whether there is a test scenario in the test scenario table that matches the test scenario file corresponding to the parsing result. If the name of the test scenario in the parsing result matches the name of a test scenario in the test scenario table, then it is considered that there is a test scenario in the test scenario table that matches the test scenario file corresponding to the parsing result; if the name of the test scenario in the parsing result does not match the name of any test scenario in the test scenario table, then it is considered that there is no test scenario in the test scenario table that matches the test scenario file corresponding to the parsing result.
[0050] All test scenarios in the test scenario table are pre-determined and valid test scenarios. If a test scenario matching a test scenario file exists in the test scenario table, it means that the test scenario file is a valid test scenario file and can be identified as a valid test scenario file.
[0051] Valid test scenarios can include single-transaction benchmark test scenarios, single-transaction load test scenarios, mixed-scenario load test scenarios, mixed-scenario stability test scenarios, and extreme scenarios. If the test scenario file is a file related to the above scenarios, then the test scenario file is a valid test scenario file.
[0052] S104. Retain and store valid test scenario files.
[0053] For example, if the test scenario file is a valid test scenario file, it needs to be retained and stored. That is, the valid test scenario file can continue to be kept in the preset storage path. Alternatively, the valid test scenario file can be further archived and stored for easy viewing by subsequent staff.
[0054] In this embodiment, the method further includes: if, based on the parsing result corresponding to the test scenario file, it is determined that there is no test scenario in the test scenario table that matches the test scenario file, then the test scenario file is determined to be an invalid test scenario file; and the invalid test scenario file is deleted from the storage path.
[0055] Specifically, if the parsing results of the test scenario file indicate that there is no matching test scenario in the test scenario table—for example, if the test scenario name in the parsing results is different from every test scenario name in the test scenario table—then the test scenario corresponding to the test scenario file is determined to be outside the test scenario table. Test scenarios not in the test scenario table are invalid, and their corresponding test scenario files can be classified as invalid test scenario files. In other words, if it is determined that there is no matching test scenario in the test scenario table, the test scenario file can be classified as invalid.
[0056] Invalid test scenario files do not need to be retained; therefore, they can be deleted from the preset storage path.
[0057] The advantage of this setup is that it can identify valid and invalid test scenario files through intelligent and automated methods, thereby archiving or cleaning up the files, greatly improving the utilization of storage space, reducing the difficulty of file management and filtering, improving the accuracy and effectiveness of file management, and thus improving the efficiency of performance testing.
[0058] The file management method based on performance testing provided in this application obtains the test scenario files by acquiring their storage paths. The test scenario files are then parsed to obtain the parsing results. A test scenario table for performance testing is obtained, and it is determined whether the parsing results match the test scenarios in the table. If they match, the test scenario file corresponding to the parsing results is identified as a valid test scenario file. Valid test scenario files are then archived and stored, thereby achieving automatic file management and significantly improving the effective utilization of storage space. This solves the problem of large numbers of files occupying storage space in existing technologies, reduces the difficulty of file management and filtering in performance testing, improves the accuracy and effectiveness of file management, saves manpower and time, and ultimately improves the efficiency of performance testing.
[0059] Figure 2 This is a flowchart illustrating a file management method based on performance testing, which is an optional embodiment based on the above embodiments.
[0060] In this embodiment, if the test scenario table is found to contain a test scenario that matches the test scenario file based on the parsing results corresponding to the test scenario file, then the test scenario file is determined to be a valid test scenario file. This can be further refined as follows: based on preset information extraction rules, information is extracted from the parsing results corresponding to the test scenario file, and the extracted information is determined to be keyword information; if the test scenario table contains a test scenario that matches the keyword information, then the test scenario file corresponding to the keyword information is determined to be a valid test scenario file.
[0061] like Figure 2 The method includes the following steps:
[0062] S201. Obtain the storage path of the test scenario files for performance testing, and obtain the test scenario table for performance testing; wherein, the test scenario files represent the files required for performance testing under the test scenario and the files obtained after the performance test, and the test scenario files include scenario script files, test parameter files and test result files; the test scenario table includes the test scenarios for performance testing.
[0063] For example, this step can refer to step S101 above, and will not be repeated here.
[0064] S202. Obtain the test scenario file from the storage path, parse the test scenario file, and determine the parsing result corresponding to the test scenario file; wherein, the parsing result includes at least one of the following: the file name, file content, and file attribute information of the test scenario file.
[0065] For example, test scenario files are retrieved from the storage path, and different types of test scenario files are parsed separately. That is, scenario script files, test parameter files, and test result files can be parsed separately to obtain the corresponding parsing results for each test scenario file. The parsing results may include various data such as the filename, file content, and file attribute information of the test scenario file. The types of data obtained from parsing different types of test scenario files may differ.
[0066] In this embodiment, the test scenario file is parsed to determine the corresponding parsing result, including: parsing the scenario script file to obtain the file name, scenario configuration parameters in the file content, and file creation time; parsing the test parameter file to obtain the file name, test parameters in the file content, and file creation time; and parsing the test result file to obtain the file name, test duration in the file content, and file creation time.
[0067] Specifically, test scenario files can include scenario script files, test parameter files, and test result files. For scenario script files, parsing them yields the filename, scenario configuration parameters within the file content, and the file creation time. For example, text recognition can be performed on the filename to obtain the name of the test scenario. The scenario configuration parameters within the file content are pre-written parameters that can be extracted from the file.
[0068] For test parameter files, parsing them yields the filename, the test parameters within the file content, and the file creation time. That is, parsing the test parameter file does not require obtaining the scenario configuration parameters within the file content; instead, it retrieves the test parameters. Similarly, parsing the test result file yields the filename, the test duration within the file content, and the file creation time. Again, parsing the test result file does not require obtaining the scenario configuration parameters or the test parameters within the file content; instead, it retrieves the test duration. The test duration refers to the length of time required to complete the performance test.
[0069] The advantage of this setup is that it allows for targeted parsing of different types of test scenario files, improving parsing accuracy and consequently enhancing file management precision.
[0070] S203. Based on the preset information extraction rules, extract information from the parsing results corresponding to the test scenario file, and determine the extracted information as keyword information.
[0071] For example, information extraction rules are pre-set to extract keyword information from the parsing results. For instance, the information extraction rules may include preset features for keyword information. Based on these preset features, data satisfying these features is extracted from the parsing results and used as keyword information. As another example, the information extraction rules may include a digit recognition algorithm. Based on this preset algorithm, digits are extracted from the parsing results, and these extracted digits are used as identifiers for the test scenario, i.e., the extracted keyword information.
[0072] The length and position of keywords can be pre-defined in the information extraction rules to facilitate accurate keyword extraction. Different information extraction rules can be set for different types of parsing results. For example, if the parsing result is a complete filename including a file number and the name of the test scenario, the name of the test scenario can be extracted from the filename as the keyword based on the information extraction rules, without needing to extract the file number.
[0073] S204. If there is a test scenario in the test scenario table that matches the keyword information, then the test scenario file corresponding to the keyword information shall be determined as a valid test scenario file.
[0074] For example, the keyword information is matched with the test scenarios in the test scenario table to determine whether there is a test scenario in the test scenario table that matches the keyword information. If yes, the test scenario file corresponding to the keyword information is determined to be a valid test scenario file; otherwise, the test scenario file corresponding to the keyword information is determined to be an invalid test scenario file.
[0075] In this embodiment, the keyword information is the name of the test scenario; if there is a test scenario in the test scenario table that matches the keyword information, then the test scenario file corresponding to the keyword information is determined as a valid test scenario file, including: if there is a test scenario name in the test scenario table that matches the keyword information, then the test scenario file corresponding to the keyword information is determined as a valid test scenario file.
[0076] Specifically, the keyword information is the name of the test scenario; that is, the name of the test scenario can be extracted from the parsing results. For example, the name of the test scenario can be determined from the file name or from the file content.
[0077] In the test scenario table, test scenarios are represented by their names. Therefore, the names of the test scenarios in the parsed results can be compared with those in the test scenario table to determine if a name exists in the table that matches the name in the parsed results. In other words, it determines if a name exists in the test scenario table that matches the keyword information. If so, the test scenario file corresponding to the keyword information is determined to be a valid test scenario file; otherwise, it is determined to be an invalid test scenario file.
[0078] The advantage of this setup is that by comparing the names of the test scenarios, valid test scenario files can be quickly identified, thus improving the efficiency of file management.
[0079] In this embodiment, the test scenario file is a test result file. If, based on the parsing result corresponding to the test scenario file, it is determined that there exists a test scenario in the test scenario table that matches the test scenario file, then the test scenario file is determined to be a valid test scenario file. This includes: obtaining the test duration from the file content of the test result file; if the test duration in the file content of the test result file is within a preset time range, then obtaining the name of the test scenario from the file name of the test result file; if the name of the test scenario in the file name of the test result file exists in the test scenario table, then the test result file is determined to be a valid test scenario file.
[0080] Specifically, the types of data used in the parsing results to determine the validity of test scenario files can differ depending on the type of test scenario file. For example, when determining whether a test parameter file is a valid test scenario file, the file creation time can be used as a starting point. If the file creation time is within a preset time period, the name of the test scenario corresponding to the file is compared with the names of test scenarios in the test scenario table. If the file creation time is not within the preset time period, the test parameter file can be directly identified as an invalid test scenario file.
[0081] When determining whether a test result file is a valid test scenario file, the test duration can be obtained from its content. For example, pre-defined information extraction rules can be used to extract the test duration from the parsed results of the test result file, which can then be used as keyword information. A time range can be pre-set; this range can be the length of time required to complete the performance test. For example, the time range could be 10 minutes, meaning the performance test is only valid if it is completed within 10 minutes. If the test duration is too long, the file used to perform the performance test is considered to have a problem.
[0082] The system checks if the test duration in the test results file falls within a preset time range. If so, it retrieves the test scenario name from the filename. Based on preset information extraction rules, it extracts information from the filename and uses the extracted test scenario name as the keyword. If not, the test results file is directly determined to be an invalid test scenario file.
[0083] If the test duration in the test result file is within the preset time range, the name of the test scenario corresponding to the test result file is determined. The name of the test scenario corresponding to the test result file is compared with the names of test scenarios in the test scenario table. If the name of the test scenario corresponding to the test result file exists in the test scenario table, the test result file is determined to be a valid test scenario file; otherwise, the test result file is determined to be an invalid test scenario file.
[0084] The advantage of this setup is that by making step-by-step judgments on the test duration and the name of the test scenario, the accuracy of judging the test result files is improved, thereby improving the accuracy of file management.
[0085] S205. Retain and store valid test scenario files.
[0086] For example, this step can refer to step S104 above, and will not be repeated here.
[0087] The file management method based on performance testing provided in this application obtains the test scenario files by acquiring their storage paths. The test scenario files are then parsed to obtain the parsing results. A test scenario table for performance testing is obtained, and it is determined whether the parsing results match the test scenarios in the table. If they match, the test scenario file corresponding to the parsing results is identified as a valid test scenario file. Valid test scenario files are then archived and stored, thereby achieving automatic file management and significantly improving the effective utilization of storage space. This solves the problem of large numbers of files occupying storage space in existing technologies, reduces the difficulty of file management and filtering in performance testing, improves the accuracy and effectiveness of file management, saves manpower and time, and ultimately improves the efficiency of performance testing.
[0088] Figure 3 This is a structural block diagram of a file management device based on performance testing, provided as an embodiment of this application. For ease of explanation, only the parts relevant to the embodiments of this disclosure are shown. (Refer to...) Figure 3 The device includes: an acquisition module 301, a parsing module 302, a judgment module 303, and a storage module 304.
[0089] The acquisition module 301 is used to acquire the storage path of the test scenario files for performance testing, and to acquire the test scenario table for performance testing; wherein, the test scenario files represent the files required for performance testing under the test scenario and the files obtained after the performance test, and the test scenario files include scenario script files, test parameter files and test result files; the test scenario table includes the test scenarios for performance testing;
[0090] The parsing module 302 is used to obtain the test scenario file from the storage path, parse the test scenario file, and determine the parsing result corresponding to the test scenario file; wherein, the parsing result includes at least one of the following: the file name, file content, and file attribute information of the test scenario file;
[0091] The judgment module 303 is used to determine the test scenario file as a valid test scenario file if, based on the parsing result corresponding to the test scenario file, there is a test scenario in the test scenario table that matches the test scenario file.
[0092] Storage module 304 is used to retain and store the valid test scenario files.
[0093] Figure 4 This application provides a structural block diagram of a file management device based on performance testing, in which... Figure 3 Based on the illustrated embodiments, as Figure 4 As shown, the determination module 303 includes a first determination unit 3031 and a second determination unit 3032.
[0094] The first determining unit 3031 is used to extract information from the parsing result corresponding to the test scenario file according to the preset information extraction rules, and determine the extracted information as keyword information.
[0095] The second determining unit 3032 is used to determine the test scenario file corresponding to the keyword information as a valid test scenario file if there is a test scenario in the test scenario table that matches the keyword information.
[0096] In one example, the keyword information is the name of the test scenario; the second determining unit 3032 is specifically used for:
[0097] If the test scenario table contains a test scenario name that matches the keyword information, then the test scenario file corresponding to the keyword information is determined as a valid test scenario file.
[0098] In one example, parsing module 302 is specifically used for:
[0099] The scene script file is parsed to obtain the file name, scene configuration parameters in the file content, and file creation time.
[0100] The test parameter file is parsed to obtain the file name, the test parameters in the file content, and the file creation time.
[0101] The test result file is parsed to obtain the file name, test duration in the file content, and file creation time.
[0102] In one example, the test scenario file is the test result file; the judgment module 303 is specifically used for:
[0103] Obtain the test duration from the contents of the test result file;
[0104] If the test duration in the test result file is within a preset time range, then the name of the test scenario is obtained from the filename of the test result file.
[0105] If the name of a test scenario exists in the filename of the test result file in the test scenario table, then the test result file is determined to be a valid test scenario file.
[0106] In one example, module 301 is retrieved, specifically for:
[0107] Obtain a pre-defined test plan report document; wherein the test plan report document includes test scenarios that require performance testing as confirmed by staff.
[0108] The names of the test scenarios in the test plan report document are identified, and the test scenario table is generated based on the identified test scenario names.
[0109] One example also includes:
[0110] The invalidity determination module is used to determine the test scenario file as invalid if, based on the parsing result corresponding to the test scenario file, there is no test scenario in the test scenario table that matches the test scenario file;
[0111] The deletion module is used to delete the invalid test scenario file from the storage path.
[0112] Figure 5 A structural block diagram of an electronic device provided in an embodiment of this application, such as... Figure 5 As shown, the electronic device includes: a memory 51 and a processor 52; the memory 51 is a memory used to store instructions executable by the processor 52.
[0113] The processor 52 is configured to perform the methods provided in the above embodiments.
[0114] The electronic device also includes a receiver 53 and a transmitter 54. The receiver 53 is used to receive instructions and data sent by other devices, and the transmitter 54 is used to send instructions and data to external devices.
[0115] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. The device may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc.
[0116] Device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.
[0117] Processing component 602 typically controls the overall operation of device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0118] Memory 604 is configured to store various types of data to support the operation of device 600. Examples of this data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0119] Power supply component 606 provides power to various components of device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 600.
[0120] Multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0121] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0122] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0123] Sensor assembly 614 includes one or more sensors for providing status assessments of various aspects of device 600. For example, sensor assembly 614 may detect the on / off state of device 600, the relative positioning of components such as the display and keypad of device 600, changes in the position of device 600 or a component of device 600, the presence or absence of user contact with device 600, the orientation or acceleration / deceleration of device 600, and temperature changes of device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0124] Communication component 616 is configured to facilitate wired or wireless communication between device 600 and other devices. Device 600 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0125] In an exemplary embodiment, device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0126] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0127] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of a terminal device, enables the terminal device to perform the aforementioned file management method based on performance testing.
[0128] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0129] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A file management method based on performance testing, characterized in that, include: Obtain the storage path of the test scenario files for performance testing, and obtain the test scenario table for performance testing; wherein, the test scenario files represent the files required for performance testing under the test scenario and the files obtained after the performance test, and the test scenario files include scenario script files, test parameter files, and test result files; the test scenario table includes the test scenarios for performance testing; The test scenario file is retrieved from the storage path, parsed, and the parsing result corresponding to the test scenario file is determined; wherein, the parsing result includes at least one of the following: the file name, file content, and file attribute information of the test scenario file; If, based on the parsing results corresponding to the test scenario file, it is determined that there exists a test scenario in the test scenario table that matches the test scenario file, then the test scenario file is determined to be a valid test scenario file. The valid test scenario files are retained and stored; If, based on the parsing results corresponding to the test scenario file, it is determined that there is no test scenario in the test scenario table that matches the test scenario file, then the test scenario file is determined to be an invalid test scenario file. Delete the invalid test scenario file from the storage path; Wherein, the test scenario file is a test result file; if, based on the parsing result corresponding to the test scenario file, it is determined that there exists a test scenario in the test scenario table that matches the test scenario file, then the test scenario file is determined to be a valid test scenario file, including: Obtain the test duration from the contents of the test result file; If the test duration in the test result file is within a preset time range, then the name of the test scenario is obtained from the filename of the test result file. If the name of a test scenario exists in the filename of the test result file in the test scenario table, then the test result file is determined to be a valid test scenario file.
2. The method according to claim 1, characterized in that, If, based on the parsing results corresponding to the test scenario file, it is determined that there exists a test scenario in the test scenario table that matches the test scenario file, then the test scenario file is determined to be a valid test scenario file, including: Based on the preset information extraction rules, information is extracted from the parsing results corresponding to the test scenario file, and the extracted information is determined as keyword information. If there is a test scenario in the test scenario table that matches the keyword information, then the test scenario file corresponding to the keyword information is determined as a valid test scenario file.
3. The method according to claim 2, characterized in that, The keyword information is the name of the test scenario; if there is a test scenario in the test scenario table that matches the keyword information, then the test scenario file corresponding to the keyword information is determined as a valid test scenario file, including: If the test scenario table contains a test scenario name that matches the keyword information, then the test scenario file corresponding to the keyword information is determined as a valid test scenario file.
4. The method according to claim 1, characterized in that, The test scenario file is parsed to determine the corresponding parsing result, including: The scene script file is parsed to obtain the file name, scene configuration parameters in the file content, and file creation time. The test parameter file is parsed to obtain the file name, the test parameters in the file content, and the file creation time. The test result file is parsed to obtain the file name, test duration in the file content, and file creation time.
5. The method according to claim 1, characterized in that, Obtain the test scenario table for performance testing, including: Obtain a pre-defined test plan report document; wherein the test plan report document includes test scenarios that require performance testing as confirmed by staff. The names of the test scenarios in the test plan report document are identified, and the test scenario table is generated based on the identified test scenario names.
6. A file management device based on performance testing, characterized in that, include: The acquisition module is used to acquire the storage path of the test scenario files for performance testing, and to acquire the test scenario table for performance testing; wherein, the test scenario files represent the files required for performance testing under the test scenario and the files obtained after the performance test, and the test scenario files include scenario script files, test parameter files, and test result files; the test scenario table includes the test scenarios for performance testing; The parsing module is used to obtain the test scenario file from the storage path, parse the test scenario file, and determine the parsing result corresponding to the test scenario file; wherein, the parsing result includes at least one of the following: the file name, file content, and file attribute information of the test scenario file; The judgment module is used to determine the test scenario file as a valid test scenario file if, based on the parsing result corresponding to the test scenario file, there is a test scenario in the test scenario table that matches the test scenario file. A storage module is used to retain and store the valid test scenario files; The invalidity determination module is used to determine the test scenario file as invalid if, based on the parsing result corresponding to the test scenario file, there is no test scenario in the test scenario table that matches the test scenario file; The deletion module is used to delete the invalid test scenario file from the storage path; Wherein, the test scenario file is the test result file; the judgment module is specifically used for: Obtain the test duration from the contents of the test result file; If the test duration in the test result file is within a preset time range, then the name of the test scenario is obtained from the filename of the test result file. If the name of a test scenario exists in the filename of the test result file in the test scenario table, then the test result file is determined to be a valid test scenario file.
7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for managing performance test versions
CN104142891A
Performance test data processing method and device, computer equipment and storage medium
CN110716901A
