Test execution method, device, electronic device and storage medium
By processing test cases and executors in parallel, and using reference data identification lists to optimize test order and resource allocation, it solves the problems of long time consumption and low efficiency caused by serial testing, and achieves more efficient automated test execution.
Patent Information
- Application Number
- CN201911299189.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-16
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2039-12-16
AI Technical Summary
In existing automated testing frameworks, serial execution causes long test times and low efficiency, especially when there are a large number of test cases and each test case takes a long time to execute, which affects rapid version verification.
By obtaining the reference data identification list of the test case, it is determined whether the test data is being executed, thereby adjusting the execution order of the test cases and assigning them to idle test executors for parallel processing, storing them in the runtime data list to avoid data occupation, and Update the execution status and results after the test is completed.
It improves testing efficiency, reduces testing time, and ensures efficient utilization of test executor resources and accuracy of test results.
Smart Images

Figure CN112988558B
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technology, and more specifically, to a test execution method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the increasingly frequent delivery of application software, incorporating automated testing into the software development process for quality assurance is a common industry practice to improve the speed of software delivery. To reduce the complexity of automated test analysis, automated test cases are typically executed sequentially. However, as software scales and the number of automated test cases increases, the efficiency of sequential automated testing becomes increasingly inadequate. To improve the efficiency of automated testing, it is necessary to execute automated test cases in parallel to complete automated tests quickly.
[0003] Existing automated testing frameworks maintain a set of test cases. A test executor within the framework sequentially retrieves and executes test cases from this set. This entire process is sequential; only one test case can be executed before the next one begins. When the number of test cases is small and the execution speed of each test case is fast, the sequential execution has little impact. However, when the number of test cases is large and the execution time of each test case is long, the overall automated testing process will take a considerable amount of time, hindering rapid version verification. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a test execution method, apparatus, electronic device and storage medium to improve the problems of long time consumption and low efficiency of serial testing in the prior art.
[0005] This application provides a test execution method, the method comprising: obtaining a test case to be executed from a test case set; reading a reference data identifier list of the test case, the reference data identifier list including data identifiers of one or more test data that the test case needs to reference; when any data identifier in the reference data identifier list already exists in a runtime data list, adjusting the execution order of the test case to the last position in the test case set, and the test data corresponding to the data identifier in the runtime data list is in an execution state; when all data identifiers in the reference data identifier list do not exist in the runtime data list, assigning the test case to an idle test executor among a preset plurality of test executors for testing, and storing all data identifiers in the reference data identifier list into the runtime data list.
[0006] In the above implementation, the test cases are determined to be executed based on the data identifier and the runtime data list. Then, based on the mutual exclusion relationship of the test data references, the test cases whose referenced test data is in an idle state are processed in parallel, thereby improving test efficiency and reducing test time.
[0007] Optionally, after storing all data identifiers in the reference data identifier list into the runtime data list, the method further includes: storing the test results of the test cases into a test result list; and deleting all data identifiers in the reference data identifier list from the runtime data list.
[0008] In the above implementation, after a test case completes testing, the data identifier corresponding to that test case is removed from the runtime data list to avoid data occupancy when other test cases need to reference the same test data, thereby ensuring the execution efficiency of the test cases.
[0009] Optionally, after assigning the test case to an idle test executor for testing, the method further includes: setting the execution status of the test executor executing the test case to running; after deleting all data identifiers in the reference data identifier list from the runtime data list, the method further includes: setting the execution status of the test executor executing the test case to idle.
[0010] In the above implementation, the state settings of the test executors enable multiple test executors to perform parallel testing on multiple test cases simultaneously, thereby improving testing efficiency from the perspective of test case execution.
[0011] Optionally, the method further includes: creating the test case set, adding one or more test cases to be executed to the test case set, wherein the order of arrangement in the test case set indicates the order in which the test cases in the test case set are executed.
[0012] In the above implementation, by setting a test case set with a sequential order for test case invocation, the test order of test cases can be adjusted based on priority and test case execution status. This avoids the situation where the test executor cannot perform the test after calling a certain test case, thus wasting test executor resources and improving test efficiency.
[0013] Optionally, the method further includes: generating a test report based on the test result list after all test cases in the test case set have been tested.
[0014] In the above implementation, test reports are generated uniformly on a set of test cases, rather than outputting test results for each test case individually. This allows the test reports to better reflect the correlation and overall operation of the tested program.
[0015] Optionally, obtaining test cases includes: when there are currently idle test executors, obtaining test cases from the test case set based on the sorting order.
[0016] In the above implementation, the state of the test executor and the order of the test cases are determined when the test cases are called to enter the test executor, so as to ensure that the test cases can be tested smoothly after they are called and to avoid invalid operations.
[0017] Optionally, the method further includes: obtaining all test data that all test cases need to reference in the test case set, and adding a globally unique data identifier to each piece of test data.
[0018] In the above implementation, a globally unique data identifier is set to identify the test data that the test cases need to reference, so that subsequent steps can arrange the testing of test cases in parallel based on the mutual exclusion relationship of the test data, thus ensuring testing efficiency.
[0019] This application embodiment also provides a test execution apparatus, the apparatus comprising: a test case acquisition module, configured to acquire currently executed test cases from a test case set; an identifier list reading module, configured to read a reference data identifier list of the test cases, the reference data identifier list including data identifiers of one or more test data that the test cases need to reference; a repositioning module, configured to adjust the execution order of the test cases to the last position of the test case set when any data identifier in the reference data identifier list already exists in the runtime data list, and the test data corresponding to the data identifier in the runtime data list is in an executing state; and a test execution module, configured to assign the test cases to an idle test executor among a preset plurality of test executors for testing when none of the data identifiers in the reference data identifier list exist in the runtime data list, and store all data identifiers in the reference data identifier list into the runtime data list.
[0020] In the above implementation, the test cases are determined to be executed based on the data identifier and the runtime data list. Then, based on the mutual exclusion relationship of the test data references, the test cases whose referenced test data is in an idle state are processed in parallel, thereby improving test efficiency and reducing test time.
[0021] Optionally, the apparatus further includes: an identifier processing module, configured to store the test results of the test cases into a test result list; and delete all data identifiers in the reference data identifier list from the runtime data list.
[0022] In the above implementation, after a test case completes testing, the data identifier corresponding to that test case is removed from the runtime data list to avoid data occupancy when other test cases need to reference the same test data, thereby ensuring the execution efficiency of the test cases.
[0023] Optionally, the apparatus further includes: an executor processing module, configured to, after assigning the test case to an idle test executor for testing, set the execution status of the test executor executing the test case to running; and after deleting all data identifiers in the reference data identifier list from the runtime data list, set the execution status of the test executor executing the test case to idle.
[0024] In the above implementation, the state settings of the test executors enable multiple test executors to perform parallel testing on multiple test cases simultaneously, thereby improving testing efficiency from the perspective of test case execution.
[0025] Optionally, the apparatus further includes a report generation module, configured to generate a test report based on the test result list after all test cases in the test case set have been tested.
[0026] In the above implementation, test reports are generated uniformly on a set of test cases, rather than outputting test results for each test case individually. This allows the test reports to better reflect the correlation and overall operation of the tested program.
[0027] Optionally, the apparatus further includes: a set creation module, used to create the test case set, add one or more test cases to be executed to the test case set, wherein the order of arrangement in the test case set indicates the order in which the test cases in the test case set are executed.
[0028] In the above implementation, by setting a test case set with a sequential order for test case invocation, the test order of test cases can be adjusted based on priority and test case execution status. This avoids the situation where the test executor cannot perform the test after calling a certain test case, thus wasting test executor resources and improving test efficiency.
[0029] Optionally, the test case acquisition module is specifically used to: when there is an idle test executor, acquire test cases from the test case set based on the sorting order.
[0030] In the above implementation, the state of the test executor and the order of the test cases are determined when the test cases are called to enter the test executor, so as to ensure that the test cases can be tested smoothly after they are called and to avoid invalid operations.
[0031] Optionally, the device further includes an identifier adding module, configured to: obtain all test data that all test cases in the test case set need to reference, and add a globally unique data identifier to each piece of test data.
[0032] In the above implementation, a globally unique data identifier is set to identify the test data that the test cases need to reference, so that subsequent steps can arrange the testing of test cases in parallel based on the mutual exclusion relationship of the test data, thus ensuring testing efficiency.
[0033] This application also provides an electronic device, which includes a memory and a processor. The memory stores program instructions, and when the processor reads and runs the program instructions, it executes any of the above-described test execution methods.
[0034] This application also provides a storage medium storing computer program instructions, which are read and executed by a processor to perform any of the above-described test execution methods. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 A flowchart illustrating a test execution method provided in an embodiment of this application;
[0037] Figure 2 A flowchart illustrating a data identifier deletion step provided in an embodiment of this application;
[0038] Figure 3 This is a schematic diagram of the overall process of a test execution method provided in an embodiment of this application;
[0039] Figure 4 This is a schematic diagram of a test execution device provided in an embodiment of this application.
[0040] Icons: 20-Test execution device; 21-Test case acquisition module; 22-Identifier list reading module; 23-Positioning module; 24-Test execution module. Detailed Implementation
[0041] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0042] The applicant's research revealed that existing automated testing frameworks operate on the system under test based on the content of automated test cases. The framework then judges the results based on the returned information from the system under test and the expected results in the test cases. If the results match the expectations, the automated test case passes; otherwise, it fails. This entire process is sequential. When there are many test cases or each test case takes a long time to execute, the entire automated testing process is time-consuming and inefficient.
[0043] To address the aforementioned issues, this application provides a test execution method, please refer to... Figure 1 , Figure 1 This is a flowchart illustrating a test execution method provided in an embodiment of this application. The specific steps of this test execution method are as follows:
[0044] Step S12: Obtain the test case to be executed from the test case set.
[0045] Test cases are a concept in software testing. Software testing describes a process used to facilitate the identification of the correctness, integrity, security, and quality of software. In other words, software testing is a review or comparison process between actual and expected output; that is, operating a program under specified conditions to discover program errors, measure software quality, and evaluate whether it meets design requirements.
[0046] A test case is a description of a software testing task for a specific software product, reflecting the test plan, methods, techniques, and strategies. Typically, a test case includes the test objective, test environment, input data, test steps, expected results, and test scripts, ultimately forming a document. Simply put, a test case is a set of test inputs, execution conditions, and expected results compiled for a specific goal to verify whether a particular software requirement is met.
[0047] As an optional implementation, test cases can be obtained from a test case set. Therefore, before step S12, a test case set creation step may be included, which may specifically include: creating a test case set, adding one or more test cases to be executed to the test case set, and the order of arrangement in the test case set indicating the order in which the test cases in the test case set are executed.
[0048] In this step, the test executor is a code tool used to execute commands on test cases and complete the relevant tests.
[0049] Furthermore, regarding the invocation of test cases by the test executor, when an idle test executor exists, test cases can be retrieved from the test case set based on their order. This ensures that test cases can be successfully tested after being invoked, avoiding invalid operations. The testing order of test cases can be adjusted based on priority and test case execution status, preventing situations where a test executor calls a test case but cannot perform the test, thus wasting test executor resources and improving testing efficiency.
[0050] Step S14: Read the reference data identifier list of the test case. The reference data identifier list includes the data identifiers of one or more test data that the test case needs to reference.
[0051] Optionally, after creating a test case set, it is necessary to obtain all the test data that the test cases in the test case set need to reference, and add a globally unique data identifier to each piece of test data.
[0052] Each test case has a corresponding list of referenced data identifiers. This list contains the data identifiers for all the test data that the test case needs to reference during testing. Therefore, reading the referenced data identifier list of a test case determines all the test data that the test case needs to reference.
[0053] Among them, data identification can be Tag, which is a flexible way to classify logs and other files. Tag can also be a kind of keyword markup, which makes it easier to search and find. One or more tags can be added to each log or other file.
[0054] Optionally, when the data identifier is a Tag, the list of reference data identifiers can be a form named "TagList".
[0055] This embodiment uses step S14 and its sub-steps to set a globally unique data identifier to identify the test data that the test cases need to reference, thereby determining all the test data that each test case needs to reference during testing. This allows subsequent steps to arrange test cases in parallel based on the mutual exclusion relationship of the test data, improving the utilization efficiency of the test data and ensuring overall testing efficiency.
[0056] Step S16: If any data identifier in the reference data identifier list already exists in the runtime data list, adjust the execution order of the test cases to the last position of the test case set, and the test data corresponding to the data identifier in the runtime data list is in the execution state.
[0057] It should be understood that before step S16, a runtime data list needs to be created. This runtime data list is used to store and display the data identifiers corresponding to the test data that is being tested. Therefore, taking the test cases with data identifiers 56 and 68 in the reference data identifier list as an example of those that need to be tested, if the runtime data list contains data identifier 56 but not data identifier 68, it means that the test data with data identifier 56 is being tested, and there is no test data with data identifier 68 being tested.
[0058] Optionally, when the data is identified as a Tag, the run data list can be a collection named "RunTagSet" used to store the hour tags.
[0059] In this implementation, if any data identifier in the list of referenced data identifiers of the queried test cases already exists in the runtime data list, it means that the test data corresponding to the data identifier existing in the runtime data list is being tested. In order to wait for the test to complete and to quickly perform tests on other test cases that do not need to reference the test data, adjusting the execution order of the test case to the last position in the test case set can improve the overall testing efficiency.
[0060] Specifically, when the order of test cases in the test case set represents the order in which test cases are called, adjusting the execution order of the test case to the last position in the test case set can be done by placing the test case at the end of the test case set.
[0061] Step S18: When all data identifiers in the reference data identifier list do not exist in the runtime data list, assign the test cases to the idle test executors among the preset multiple test executors for testing, and store all data identifiers in the reference data identifier list into the runtime data list.
[0062] In this implementation, if none of the data identifiers in the reference data identifier list of the queried test cases exist in the runtime data list, it means that the test data corresponding to the data identifiers that exist in the runtime data list are not in a running test state, and the test data can be directly referenced to test the test case.
[0063] Meanwhile, when testing this test case using an idle test executor, all data identifiers in the reference data identifier list of this test case need to be stored in the runtime data list to avoid conflicts caused by other test executors testing other test cases that need to reference the same test data while testing this test case.
[0064] As an alternative implementation method, please refer to Figure 2After completing the testing of the test cases, this embodiment may further include the following steps:
[0065] Step S191: Store the test results of the test cases into the test result list.
[0066] The test results list is a list used to store the test execution results of test cases. Optionally, this test results list can be named "CaseRunResult".
[0067] Step S192: Remove all data identifiers from the referenced data identifier list from the runtime data list.
[0068] Because the test executor performs test cases based on the mutual exclusion relationship of test data, once all data identifiers in the reference data identifier list of a test case are removed from the runtime data list after the test case is completed, the runtime data list will no longer contain the data identifiers in the reference data identifier list. Therefore, the test task can still be executed even if any of the same data identifiers are in the reference data identifier lists of other test cases.
[0069] Optionally, after all test cases in the test case set have been tested, the test results of all test cases are stored in a test result list, and then a test report is generated based on the test result list. This test report allows for a more systematic and comprehensive evaluation of the test program.
[0070] To improve testing efficiency, the utilization efficiency of test executors should be considered. Therefore, in this embodiment, after assigning test cases to idle test executors, the execution status of the test executors executing the test cases is set to running. On the other hand, after deleting all data identifiers from the reference data identifier list from the runtime data list, the execution status of the test executors executing the test cases is set to idle.
[0071] In the above steps, the state settings of the test executors enable multiple test executors to perform parallel testing on multiple test cases simultaneously, thereby improving testing efficiency in terms of test case execution.
[0072] The overall process of the test execution method in this embodiment is illustrated below with an example:
[0073] Based on pre-configuration and requirements, create test executors for multiple automated tests, create a runtime data list to store data identifiers corresponding to the test data being run, create a test result list to store test results, and create a test case set to store test cases.
[0074] Add all test cases that need to be tested to the test case set, extract all test data that each test case needs to reference, and add a globally unique data identifier to each test data;
[0075] Create a reference data identifier list for each test case, and add the data identifiers of the test data that each test case needs to reference when performing the test to its own reference data identifier list;
[0076] The scheduler determines whether there is an idle test executor. If so, it retrieves the first test case from the set of currently executing test cases.
[0077] Read the reference data identifier list from the test case, and check whether the data identifier in the reference data identifier list exists in the runtime data list;
[0078] If any data identifier in the reference data identifier list exists in the runtime data list, then that test case is placed at the end of the test case set;
[0079] If the data identifier in the reference data identifier list does not exist in the runtime data list, an idle test executor is invoked to test the test case. After the test is completed, the test result of the test case is added to the test result list, the status of the test executor is set to idle, and the data identifier in the reference data identifier list is removed from the runtime data list.
[0080] After all test cases in the test case set have been tested, a test report is generated based on the list of test results.
[0081] Please refer to the complete steps above. Figure 3 , Figure 3 This is a schematic diagram of the overall process of a test execution method provided in an embodiment of this application. The test program is executed for each test case, which can be a main loop step, thereby completing the test for all test cases in the test case set.
[0082] To complement the above-described test execution method, this embodiment also provides a test execution device 20, please refer to... Figure 4 , Figure 4 This is a schematic diagram of a test execution device provided in an embodiment of this application.
[0083] Test execution device 20 includes:
[0084] The test case acquisition module 21 is used to acquire the test cases to be executed from the test case set;
[0085] The identifier list reading module 22 is used to read the reference data identifier list of the test case. The reference data identifier list includes the data identifiers of one or more test data that the test case needs to reference.
[0086] The adjustment module 23 is used to adjust the execution order of test cases to the last position of the test case set when any data identifier in the reference data identifier list already exists in the runtime data list, and the test data corresponding to the data identifier in the runtime data list is in the execution state;
[0087] The test execution module 24 is used to assign test cases to an idle test executor among a number of preset test executors when none of the data identifiers in the reference data identifier list exist in the runtime data list, and to store all the data identifiers in the reference data identifier list into the runtime data list.
[0088] Optionally, the test execution device 20 further includes: an identification processing module, used to store the test results of the test cases into a test result list; and to delete all data identifiers in the reference data identifier list from the runtime data list.
[0089] Optionally, the test execution device 20 further includes: an executor processing module, configured to set the execution status of the test executor executing the test cases to running after assigning the test cases to an idle test executor for testing; and to set the execution status of the test executor executing the test cases to idle after deleting all data identifiers in the reference data identifier list from the runtime data list.
[0090] Optionally, the test execution device 20 further includes a report generation module, used to generate a test report based on the test result list after all test cases in the test case set have been tested.
[0091] Optionally, the test execution device 20 further includes: a set creation module, used to create a test case set, add one or more test cases to be executed to the test case set, and the order of arrangement in the test case set indicates the order in which the test cases in the test case set are executed.
[0092] Optionally, the test case acquisition module 21 is specifically used to: when there is an idle test executor, acquire test cases from the test case set based on the sorting order.
[0093] Optionally, the test execution device 20 further includes an identifier adding module, used to: obtain all test data that all test cases in the test case set need to reference, and add a globally unique data identifier to each piece of test data.
[0094] This application also provides an electronic device, which includes a memory and a processor. The memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps in any of the test execution methods provided in this embodiment.
[0095] It should be understood that the electronic device can be a personal computer (PC), tablet computer, smartphone, personal digital assistant (PDA), or other electronic device with logical computing functions.
[0096] This application also provides a readable storage medium storing computer program instructions, which are read and executed by a processor to perform steps in any test execution method.
[0097] In summary, embodiments of this application provide a test execution method, apparatus, electronic device, and storage medium. The method includes: obtaining a test case to be executed from a test case set; reading a reference data identifier list of the test case, the reference data identifier list including data identifiers of one or more test data that the test case needs to reference; when any data identifier in the reference data identifier list already exists in a runtime data list, adjusting the execution order of the test case to the last position in the test case set, and the test data corresponding to the data identifier in the runtime data list is in an executing state; when all data identifiers in the reference data identifier list do not exist in the runtime data list, assigning the test case to an idle test executor among a preset plurality of test executors for testing, and storing all data identifiers in the reference data identifier list into the runtime data list.
[0098] In the above implementation, the test cases are determined to be executed based on the data identifier and the runtime data list. Then, based on the mutual exclusion relationship of the test data references, the test cases whose referenced test data is in an idle state are processed in parallel, thereby improving test efficiency and reducing test time.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed device can also be implemented in other ways. The device embodiments described above are merely illustrative; for example, the block diagrams in the accompanying drawings illustrate the possible architecture, functions, and operations of the device according to various embodiments of this application. In this regard, each block in the block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram, and combinations of block diagrams, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0100] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0101] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Therefore, this embodiment also provides a computer program instruction stored in a readable storage medium. When this computer program instruction is read and executed by a processor, it performs the steps of any of the block data storage methods. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0102] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of 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 principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0103] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
[0104] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A test execution method, It is characterized in that The method comprises: Get the test case currently to be executed from the test case collection; Reading a reference data identification list of the test case, wherein the reference data identification list includes data identifications of one or more test data pieces that the test case needs to reference; When any data identifier in the reference data identifier list already exists in the runtime data list, the execution order of the test case is adjusted to the last position of the test case set, and the test data corresponding to the data identifier in the runtime data list is in the executing state; When all data identifiers in the reference data identifier list do not exist in the runtime data list, the test case is assigned to an idle test executor among a plurality of preset test executors for testing, and all data identifiers in the reference data identifier list are stored in the runtime data list; after the test case completes the test, the data identifier of the test case in the reference data identifier list is deleted from the runtime data list; The obtaining of the test case to be executed currently from the test case set includes: determining whether there is an idle test executor currently based on a scheduler, and if so, obtaining the first test case in the test case set.
2. The method according to claim 1, It is characterized in that After storing all the data identifiers in the reference data identifier list into the runtime data list, the method further includes: Storing the test results of the test case in a test result list; All data identifiers in the reference data identifier list are deleted from the runtime data list.
3. The method according to claim 2, It is characterized in that After allocating the test case to an idle test executor for testing, the method further includes: Setting the execution state of the test executor executing the test case to running; After deleting all data identifiers in the reference data identifier list from the runtime data list, the method further includes: The execution state of the test executor executing the test case is set to idle.
4. The method according to any one of claims 1 to 3, It is characterized in that Before obtaining the test case to be executed currently from the test case set, the method further includes: The test case set is created, and one or more test cases to be executed are added to the test case set. The arrangement order in the test case set indicates the order in which the test cases in the test case set are executed.
5. The method according to claim 4, It is characterized in that The method further comprises: After all test cases in the test case set have been tested, a test report is generated based on the test result list.
6. The method according to claim 4, It is characterized in that The method further comprises: The test data that needs to be referenced by all test cases in the test case set is obtained, and a globally unique data identifier is added to each test data.
7. A test execution device, It is characterized in that The device comprises: A test case acquisition module is used to obtain the test case currently to be executed from the test case collection; An identification list reading module, used to read a reference data identification list of the test case, wherein the reference data identification list includes data identifications of one or more test data that the test case needs to reference; A repositioning module, used for adjusting the execution order of the test case to the last position of the test case set when any data identifier in the reference data identifier list already exists in the runtime data list, and the test data corresponding to the data identifier in the runtime data list is in the executing state; A test execution module, configured to assign the test case to an idle test executor among a plurality of preset test executors for testing when all data identifiers in the reference data identifier list do not exist in the runtime data list, and store all data identifiers in the reference data identifier list into the runtime data list; after the test case completes the test, delete the data identifier of the test case in the reference data identifier list from the runtime data list; The obtaining of the test case to be executed currently from the test case set includes: determining whether there is an idle test executor currently based on a scheduler, and if so, obtaining the first test case in the test case set.
8. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, wherein program instructions are stored in the memory, and when the processor runs the program instructions, the test execution method according to any one of claims 1 to 6 is executed.
9. A storage medium, It is characterized in that The storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the test execution method according to any one of claims 1 to 6 is executed.
