Search

CN-121979776-A - Cloud primary container module testing method based on probe and related equipment

CN121979776ACN 121979776 ACN121979776 ACN 121979776ACN-121979776-A

Abstract

The application discloses a probe-based cloud primary container module testing method and related equipment, wherein the method comprises the steps of obtaining a target testing unit and a preset verification rule; the method comprises the steps of obtaining metadata according to a target test unit, analyzing the metadata to determine target data information, collecting data according to the target data information, a preset probe and kernel resources to obtain an original data set, carrying out rule conversion based on a preset verification rule and a preset pointer to obtain target filtering conditions, extracting key characteristic information according to the original data set, carrying out multi-layer verification on the key characteristic information through the target filtering conditions to obtain a first test result, carrying out fault injection according to a preset fault type to carry out fault processing test on a module in the test unit to determine a second test result, and determining a final test result according to the obtained first test result and the second test result. The embodiment of the application can increase the test coverage area and reduce the resource consumption. The application can be widely applied to the technical field of testing.

Inventors

  • LIU XU
  • ZHANG JINXIU
  • HUANG WEI

Assignees

  • 广州市玄武无线科技股份有限公司

Dates

Publication Date
20260505
Application Date
20251216

Claims (10)

  1. 1. A probe-based cloud primary container module testing method, the method comprising: acquiring a target test unit and a preset verification rule, determining metadata according to the target test unit, analyzing the metadata, and determining target data information; Processing according to the target data information, a preset probe and kernel resources to determine an original data set; Converting the preset verification rule according to the preset probe, and determining a target filtering condition; Extracting features of the original data set, determining key feature information, performing multi-layer verification according to the target filtering condition and the key feature information, and determining a first test result; and performing injection test according to a preset fault type, determining a second test result, and determining a final test result according to the first test result and the second test result.
  2. 2. The method according to claim 1, wherein the parsing the metadata to determine target data information specifically includes: analyzing the metadata, determining target path information, filtering the target test unit according to the target path information, and determining a target process set; analyzing the target process set, determining module characteristic information, positioning according to the module characteristic information, and determining target data information.
  3. 3. The method according to claim 1, wherein the processing according to the target data information, the preset probe and the kernel resource, and determining the original data set specifically comprises: Analyzing the target data information, determining a target module, and acquiring data according to the preset probe and the target module to determine target module data; Performing system call according to the preset probe, and determining system parameter information and return value data; and carrying out event monitoring on the kernel resources according to the preset probe, determining resource occupation data, and carrying out compression processing on the target module data, the system parameter information, the return value data and the resource occupation to obtain the original data set.
  4. 4. The method according to claim 1, wherein the determining a first test result according to the target filtering condition and the key feature information by performing multi-layer verification specifically includes: Analyzing the target filtering condition to determine a multi-layer verification condition and a preset test case, wherein the multi-layer verification condition comprises a network layer verification condition, an application layer verification condition, a kernel layer verification condition and a performance layer verification condition; Testing the key feature information according to the preset test case, and determining a third test result; and verifying the third test result according to the multi-layer verification condition, and determining the first test result.
  5. 5. The method of claim 1, wherein the performing the injection test according to the preset fault type, and determining the second test result specifically includes: Generating a fault simulation event according to the preset fault type, performing fault simulation on the system according to the fault simulation event, and determining current operation data of the system; analyzing the current system operation data, determining fault processing information, comparing the fault processing information with preset processing information, and determining the second test result.
  6. 6. The method of claim 5, wherein the method further comprises: analyzing the current operation data of the system according to the fault simulation event to determine fault processing link information, wherein the fault processing link information comprises processing node information; Processing according to the current time information and the fault processing link information, determining node time stamp information, matching the node time stamp information with the fault processing link information according to a preset mapping relation, and determining processing event ID information; and according to the fault processing link information, the node time stamp information and the processing event ID information, carrying out association, and determining log records.
  7. 7. A probe-based cloud primary container module testing system, the system comprising: The acquisition module is used for acquiring a target test unit and a preset verification rule, determining metadata according to the target test unit, analyzing the metadata and determining target data information; The acquisition module is used for processing according to the target data information, the preset probe and the kernel resources to determine an original data set; The conversion module is used for converting the preset verification rule according to the preset probe and determining a target filtering condition; The first test module is used for carrying out feature extraction on the original data set, determining key feature information, carrying out multi-layer verification according to the key feature information and determining a first test result; and the second test module is used for carrying out injection test according to a preset fault type, determining a second test result and determining a final test result according to the first test result and the second test result.
  8. 8. An electronic device, comprising: At least one processor; At least one memory for storing at least one program; the at least one program, when executed by the at least one processor, causes the at least one processor to implement the method of any one of claims 1 to 6.
  9. 9. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 6.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 6.

Description

Cloud primary container module testing method based on probe and related equipment Technical Field The application relates to the technical field of testing, in particular to a cloud primary container module testing method based on a probe and related equipment. Background Along with the popularization of the cloud native technology, the containerized application is widely applied to various fields, in order to ensure the stable operation of related processes, the containerized application needs to be tested, the conventional test technology generally adopts unit test, calls external component cluster resources to build corresponding test environments, and independently tests functional modules in the containerized application, so that the test coverage range is small and the resource consumption is high. Disclosure of Invention The embodiment of the application mainly aims to provide a probe-based cloud primary container module testing method and related equipment, which can increase the testing coverage and reduce the resource consumption. To achieve the above objective, an aspect of the embodiments of the present application provides a probe-based testing method for a cloud native container module, the method including: acquiring a target test unit and a preset verification rule, determining metadata according to the target test unit, analyzing the metadata, and determining target data information; Processing according to the target data information, a preset probe and kernel resources to determine an original data set; Converting the preset verification rule according to the preset probe, and determining a target filtering condition; Extracting features of the original data set, determining key feature information, performing multi-layer verification according to the target filtering condition and the key feature information, and determining a first test result; and performing injection test according to a preset fault type, determining a second test result, and determining a final test result according to the first test result and the second test result. In some embodiments, the parsing the metadata to determine target data information specifically includes: analyzing the metadata, determining target path information, filtering the target test unit according to the target path information, and determining a target process set; analyzing the target process set, determining module characteristic information, positioning according to the module characteristic information, and determining target data information. In some embodiments, the processing according to the target data information, the preset probe and the kernel resource, and determining the original data set specifically includes: Analyzing the target data information, determining a target module, and acquiring data according to the preset probe and the target module to determine target module data; Performing system call according to the preset probe, and determining system parameter information and return value data; and carrying out event monitoring on the kernel resources according to the preset probe, determining resource occupation data, and carrying out compression processing on the target module data, the system parameter information, the return value data and the resource occupation to obtain the original data set. In some embodiments, the determining the first test result according to the target filtering condition and the key feature information through multi-layer verification specifically includes: Analyzing the target filtering condition to determine a multi-layer verification condition and a preset test case, wherein the multi-layer verification condition comprises a network layer verification condition, an application layer verification condition, a kernel layer verification condition and a performance layer verification condition; Testing the key feature information according to the preset test case, and determining a third test result; and verifying the third test result according to the multi-layer verification condition, and determining the first test result. In some embodiments, the performing the injection test according to the preset fault type, and determining the second test result specifically includes: Generating a fault simulation event according to the preset fault type, performing fault simulation on the system according to the fault simulation event, and determining current operation data of the system; analyzing the current system operation data, determining fault processing information, comparing the fault processing information with preset processing information, and determining the second test result. In some embodiments, the method further comprises: analyzing the current operation data of the system according to the fault simulation event to determine fault processing link information, wherein the fault processing link information comprises processing node information; Processing according to the current time