Search

CN-116244211-B - Test method, test device, storage medium and computer equipment

CN116244211BCN 116244211 BCN116244211 BCN 116244211BCN-116244211-B

Abstract

The application discloses a testing method, a testing device, a storage medium and computer equipment, wherein the testing method comprises the steps of obtaining target order information and to-be-tested state characteristics; the method comprises the steps of carrying out feature combination processing according to the state features to be tested and target order information to determine a state feature sample, generating a test case according to the state feature sample, carrying out simulation processing according to the test case to obtain a simulation result, and determining test log information of the state feature sample according to the hit times in the simulation result. Therefore, all possible state features generated in the life cycle of the order are used as the basis of sample arrangement and combination, the scene measurement of intermediate states, process states and other non-final states is realized, the perception of the scene missed detection by the testers is improved, and the online problem caused by the test missed detection is effectively reduced. Meanwhile, the test case is generated based on the real order data, so that the test case generation efficiency is improved, and meanwhile, the test case can cover various real service scenes, and the test cost is reduced.

Inventors

  • WANG JIANYU

Assignees

  • 拉扎斯网络科技(上海)有限公司

Dates

Publication Date
20260508
Application Date
20230413

Claims (20)

  1. 1. A method of testing, the method comprising: Acquiring order information which is initiated on line in real time and has second order attribute characteristics meeting the current service requirements and/or preset order attribute characteristics as target order information, and acquiring state characteristics to be detected, wherein the target order information comprises a state characteristic and a combination relation of a plurality of state characteristics in the order circulation process; performing feature combination processing according to the to-be-detected state features and the target order information, and determining a state feature sample, wherein the state feature sample comprises the to-be-detected state features and/or to-be-detected feature combination relations containing the to-be-detected state features; generating a test case according to the state characteristic sample; Executing simulation processing according to the test case to obtain a simulation result, wherein the simulation result comprises hit times of the state characteristic sample; Determining test log information of the state characteristic sample according to the hit times; the feature combination processing according to the feature of the state to be detected and the target order information comprises the following steps: Extracting a first characteristic combination relation containing the state characteristics to be detected from the target order information according to the state characteristics to be detected and the combination relation; Combining the state characteristics to be detected with the state characteristics in the target order information to obtain a second characteristic combination relation; Filtering the first characteristic combination relation and the second characteristic combination relation to obtain the characteristic combination relation to be detected; and determining the to-be-detected state characteristics and/or the to-be-detected characteristic combination relation as the state characteristic sample.
  2. 2. The method of claim 1, wherein generating test cases from the state feature samples comprises: Carrying out statistical processing on the target order information, and determining the heat information of the state characteristic sample in the target order information; displaying the state characteristic sample and the heat information in a correlation way; and responding to a first input, and generating the test case according to the state characteristic sample corresponding to the first input.
  3. 3. The method of claim 1, wherein generating test cases from the state feature samples comprises: acquiring a link simulation model of the state characteristic sample; And generating the test case of the state characteristic sample based on the link simulation model.
  4. 4. The method according to claim 1, wherein the method further comprises: the state characteristics to be measured and the order attribute characteristics of the target order information corresponding to the state characteristics to be measured are aggregated, and/or, And aggregating the feature combination relation to be tested and the order attribute features of the target order information corresponding to the feature combination relation to be tested.
  5. 5. The method of claim 1, wherein the step of determining the position of the substrate comprises, The filtering process comprises at least one of cleaning process, de-duplication process, noise reduction process and clustering process.
  6. 6. The method according to any one of claims 1 to 5, wherein the performing simulation processing according to the test case includes: generating a test task according to the test case; Executing the test task to obtain simulation data; If the simulation data of the current test task has at least one feature in the state feature sample, and the identification information of the current test task is different from the identification information of the test task corresponding to the accumulated hit times, accumulating the hit times of the state feature sample.
  7. 7. The method according to any one of claims 1 to 5, further comprising: performing verification processing on the simulation result according to the combination relation; And deleting the simulation result with verification failure.
  8. 8. The method of any one of claims 1 to 5, wherein the test log includes test coverage, wherein the determining test log information for the state feature samples based on the hit count includes: Determining a first state characteristic sample in the state characteristic samples according to the hit times; And determining the quotient of the number of the first state characteristic samples and the number of the state characteristic samples as the test coverage.
  9. 9. The method of claim 8, wherein the method further comprises: and if the test coverage is smaller than or equal to a coverage threshold, outputting prompt information according to the first state characteristic sample.
  10. 10. A test apparatus, the apparatus comprising: The system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring order information which is initiated on line in real time and has second order attribute characteristics meeting the current service requirements and/or preset order attribute characteristics as target order information and acquiring to-be-tested state characteristics, and the target order information comprises a combination relation of the state characteristics and a plurality of state characteristics in the order circulation process; The determining module is used for carrying out feature combination processing according to the to-be-detected state features and the target order information to determine a state feature sample, wherein the state feature sample comprises the to-be-detected state features and/or to-be-detected feature combination relations containing the to-be-detected state features; The test module is used for generating test cases according to the state characteristic samples and Executing simulation processing according to the test case to obtain a simulation result, wherein the simulation result comprises hit times of the state characteristic sample, and Determining test log information of the state characteristic sample according to the hit times; The determining module is specifically configured to extract a first feature combination relation including the to-be-detected feature in the target order information according to the to-be-detected feature and the combination relation, combine the to-be-detected feature with the state feature in the target order information to obtain a second feature combination relation, filter the first feature combination relation and the second feature combination relation to obtain the to-be-detected feature combination relation, and determine the to-be-detected feature and/or the to-be-detected feature combination relation as the state feature sample.
  11. 11. The apparatus of claim 10, wherein the apparatus further comprises: the statistics module is used for carrying out statistics processing on the target order information and determining the heat information of the state characteristic sample in the target order information; The display module is used for displaying the state characteristic sample and the heat information in a correlation manner; The test module is specifically configured to respond to a first input, and generate the test case according to the state feature sample corresponding to the first input.
  12. 12. The apparatus of claim 10, wherein the device comprises a plurality of sensors, The test module is specifically used for acquiring a link simulation model of the state characteristic sample; And generating the test case of the state characteristic sample based on the link simulation model.
  13. 13. The apparatus of claim 10, wherein the device comprises a plurality of sensors, The determining module is further configured to aggregate the to-be-detected status feature and the order attribute feature of the target order information corresponding to the to-be-detected status feature, and/or, And aggregating the feature combination relation to be tested and the order attribute features of the target order information corresponding to the feature combination relation to be tested.
  14. 14. The apparatus of claim 10, wherein the device comprises a plurality of sensors, The filtering process comprises at least one of cleaning process, de-duplication process, noise reduction process and clustering process.
  15. 15. The device according to any one of claims 10 to 14, wherein, The test module is specifically used for generating a test task according to the test case; Executing the test task to obtain simulation data; If the simulation data of the current test task has at least one feature in the state feature sample, and the identification information of the current test task is different from the identification information of the test task corresponding to the accumulated hit times, accumulating the hit times of the state feature sample.
  16. 16. The apparatus according to any one of claims 10 to 14, further comprising: the verification module is used for verifying the simulation result according to the combination relation; And deleting the simulation result with verification failure.
  17. 17. The apparatus of any one of claims 10 to 14, wherein the test log comprises a test coverage; The test module is specifically configured to determine a first state feature sample in the state feature samples according to the hit number; And determining the quotient of the number of the first state characteristic samples and the number of the state characteristic samples as the test coverage.
  18. 18. The apparatus of claim 17, wherein the apparatus further comprises: and the prompt module is used for outputting prompt information according to the first state characteristic sample if the test coverage is smaller than or equal to a coverage threshold.
  19. 19. A storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the test method of any of claims 1 to 9.
  20. 20. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the test method of any one of claims 1 to 9 when executing the program.

Description

Test method, test device, storage medium and computer equipment Technical Field The present application relates to the field of computer technologies, and in particular, to a testing method, a testing device, a storage medium, and a computer device. Background At present, one of the commonly used methods for guaranteeing the stable operation of computer software is to use a software testing system to execute test cases of computer software products in a testing mode so as to perform more comprehensive inspection on services or service scenes in the computer software products. However, as the number of services and the processing of services in the computer software product are increased, the real-time performance of the process state change is increased, and the data on line is in a final state when the data is collected, for example, one of paid, completed, distributed and the like is stored in a transaction performance list, but the state before the final state is not stored or is covered for the final state of paid, completed and the like. Therefore, partial test scenes are missed, so that the counted scenes are not the full amount of scenes on the line, and further the problem on the line is caused. Disclosure of Invention In view of the above, the present application provides a testing method, a device, a storage medium and a computer device, and is mainly aimed at solving the technical problem of reducing test omission. According to a first aspect of the present application there is provided a test method comprising: acquiring target order information and to-be-tested state features, wherein the target order information comprises a combination relation of the state features and a plurality of state features in an order circulation process; Carrying out feature combination processing according to the to-be-detected state features and the target order information, and determining a state feature sample, wherein the state feature sample comprises to-be-detected state features and/or to-be-detected feature combination relations containing the to-be-detected state features; Generating a test case according to the state characteristic sample; Executing simulation processing according to the test case to obtain a simulation result, wherein the simulation result comprises hit times of the state characteristic sample; and determining the test log information of the state characteristic sample according to the hit times. Further, generating a test case according to the state feature sample includes: Carrying out statistical processing on the target order information, and determining the heat information of the state feature samples in the target order information; Associating and displaying the state characteristic sample and the heat information; and responding to the first input, and generating a test case according to the state characteristic sample corresponding to the first input. Further, generating a test case according to the state feature sample includes: Acquiring a link simulation model of a state characteristic sample; And generating a test case of the state characteristic sample based on the link simulation model. Further, feature combination processing is performed according to the feature of the state to be detected and the target order information, including: Extracting a first characteristic combination relation containing the to-be-detected state characteristic from the target order information according to the to-be-detected state characteristic and the combination relation; Combining the state characteristics to be detected with the state characteristics in the target order information to obtain a second characteristic combination relation; Filtering the first characteristic combination relation and the second characteristic combination relation to obtain a characteristic combination relation to be detected; And determining the to-be-detected state characteristics and/or the to-be-detected characteristic combination relation as a state characteristic sample. Further, the test method further comprises: The method comprises the steps of carrying out aggregation processing on the to-be-detected state characteristics and order attribute characteristics of target order information corresponding to the to-be-detected state characteristics to obtain a state characteristic sample, and/or, And aggregating the feature combination relation to be tested and the order attribute features of the target order information corresponding to the feature combination relation to be tested to obtain a state feature sample. Further, the filtering process comprises at least one of a cleaning process, a deduplication process, a noise reduction process, and a clustering process. Further, obtaining the target order information includes: Acquiring historical order information and preset order attribute characteristics; Extracting first order attribute characteristics in the historical order information; screening the fi