A software testing method and device, electronic equipment and storage medium

CN122653993APending Publication Date: 2026-08-28ZHAOLIAN CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610725994.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-25
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0006]本发明各实施例提供一种软件测试方法,以解决现有技术效率低下、主观性强、覆盖度不足、测试知识难以复用和传承、无法从缺陷中学习优化自身的问题

Benefits of technology

在上述技术方案,本发明通过首先获取软件测试的多源数据,包括需求文档、设计文档、历史测试用例、缺陷报告及代码仓库,利用自然语言处理NLP技术对非结构化文本进行实体识别和关系抽取,并结合知识图谱技术将结构化与结构化数据进行关联映射、清洗和标注,从而构建可供查询和学习的活知识库,在此基础上,获取需求文档并利用NLP技术解析提取功能点、业务规则和验收标准,同时从知识库中检索相关历史缺陷、相似功能点及对应测试用例,结合知识库中相似项目的用例模板和最佳实践,自动生成包含测试要点和结构化测试用例的测试方案,并通过人工审核机制进行审核、修改和补充,然后,根据测试方案驱动相应的测试框架执行,对自动化用例直接驱动Selenium、JMeter等框架在云端或本地环境中执行,对手工用例生成执行步骤和预期结果清单推送给测试人员,当执行失败时自动收集日志、堆栈信息、截图等上下文数据,与知识库中的历史缺陷进行比对和根因分析,生成包含失败原因、关联代码行及修复建议的缺陷分析报告并推送至开发人员,最后,将测试全过程产生的需求文档、测试用例、执行结果、缺陷报告、人工审核修改记录及修复反馈等数据进行清洗处理后回流至知识库优化知识图谱,同时转化为训练集结合DIFY工作流和SYSTEM角色提示词对测试模型进行迭代更新并部署到生产环境,实现了测试系统的持续自进化,不仅显著提升了测试效率、降低了人力成本,而且全面提高了测试质量和知识复用率,使得软件测试能够在快速迭代的开发节奏中更加高效、智能、可靠地完成,从而有效解决了现有技术中测试效率低下、质量不可靠、知识复用难及智能化程度低的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122653993A_ABST
    Figure CN122653993A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a kind of software testing method, device, electronic equipment and storage medium, involve software testing technical field, wherein the method comprises: obtaining requirement document, design document, historical test case, defect report and code repository etc. Multiple source data, utilize NLP to carry out entity recognition and relationship extraction, combine knowledge graph to build the active knowledge base that can be queried by AI intelligent agent. Analyzing requirement extracts function point, business rule and acceptance criteria, retrieves historical defects and similar use cases from the knowledge base, automatically generates test plan in combination with best practices and is manually reviewed. Drive Selenium, JMeter and other frameworks to execute tests, manually generate execution guidelines and push testers, automatically collect context and compare with historical defects when failed, generate defect reports containing root cause analysis and repair suggestions. Finally, the data of the whole process is backflowed to the knowledge base to optimize the graph and evolve automatically. The present application effectively solves the problems of low test efficiency, unreliable quality and difficult knowledge reuse in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, and in particular to a software testing method, apparatus, electronic device, and storage medium. Background Technology

[0002] As software systems become increasingly complex, software testing, as a crucial step in ensuring software quality, is becoming increasingly important and costly. However, existing software testing methods and platforms primarily rely on manual operation, which faces numerous challenges when dealing with the rapid iteration pace of development.

[0003] Traditional software testing platforms primarily provide basic functions such as test case management and defect tracking. The core testing tasks—such as requirements analysis, test plan design, test case writing, test execution, and result analysis—still heavily rely on manual processes. This approach is not only inefficient, leading to long testing cycles and difficulty keeping pace with rapid development iterations, but manual testing also inevitably introduces subjectivity and oversights. For complex business logic and massive amounts of data, test coverage is difficult to guarantee, resulting in missed defects and severely impacting the stability of the software after deployment.

[0004] Furthermore, testers accumulate a wealth of experience and knowledge over long periods of work, but this knowledge often exists in unstructured forms in personal minds, local documents, or isolated defect systems, forming historical data. When personnel change or new projects are faced, this valuable knowledge is difficult to reuse and pass on effectively, leading to uneven team capabilities and over-reliance on core experts. Meanwhile, existing automated testing tools are essentially "script-driven," lacking true "intelligence." They cannot understand requirements, autonomously design test scenarios, or learn from defects to optimize themselves, failing to fundamentally change the labor-intensive nature of testing activities.

[0005] Therefore, there is an urgent need for a software testing methodology that can transform testing knowledge into a living knowledge base that can be understood and applied, automate the entire testing process from requirements analysis to defect repair, and continuously learn and optimize itself. Summary of the Invention

[0006] The embodiments of this invention provide a software testing method to address the problems of low efficiency, high subjectivity, insufficient coverage, difficulty in reusing and passing on testing knowledge, and inability to learn from defects and optimize itself in existing technologies. The technical solution is as follows: According to one aspect of the present invention, a software testing method includes: acquiring a data source for software testing; cleaning, extracting, labeling, and associating the data source using Natural Language Processing (NLP) and knowledge graph technologies to obtain a knowledge base; the data source includes requirement documents, design documents, historical test cases, defect reports, and code repositories; acquiring the requirement documents and parsing them to obtain the functional points, business rules, and acceptance criteria of the current requirements, then retrieving related information from the knowledge base, combining test case templates and best practices from similar projects in the knowledge base to obtain a test plan containing test points and structured test cases, and performing manual review; driving the execution of the corresponding test framework according to the test plan, performing defect analysis and repair on test cases that fail to execute, and comparing and performing root cause analysis with historical defects in the knowledge base to obtain a defect analysis report; the defect analysis report includes the cause of failure, related lines of code, and repair suggestions; cleaning and processing the test data generated during the testing process and then feeding it back into the knowledge base to optimize the knowledge graph, and converting it into a training set to iteratively update test-related models; the test data includes requirement documents, test cases, execution results, defect reports, manual review modification records, and repair feedback.

[0007] In one embodiment, the acquisition of software testing data sources, and the cleaning, extraction, annotation, and association of these data sources to obtain a knowledge base, are achieved through the following steps: Accessing various testing data sources within the enterprise; using NLP technology to perform entity recognition and relation extraction on unstructured text in the data sources to obtain structured data; and using knowledge graph technology to associate and map the structured data in the data sources with the structured data, followed by cleaning and annotation to obtain the knowledge base.

[0008] In one embodiment, obtaining the requirements document and parsing it to obtain the functional points, business rules, and acceptance criteria of the current requirements is achieved through the following steps: using NLP technology to extract the functional points, business rules, and acceptance criteria of the current requirements document, and retrieving historical defects, similar functional points, and corresponding test cases related to the current requirements from the knowledge base, and generating a requirements analysis report by combining the functional points, business rules, and acceptance criteria.

[0009] In one embodiment, relevant information is retrieved from the knowledge base, and a test plan containing test points and structured test cases is obtained by combining the test case templates and best practices of similar projects in the knowledge base. This is then manually reviewed through the following steps: A test plan is generated based on the requirements analysis report and the test case templates and best practices of similar projects in the knowledge base; the test plan is reviewed, modified, supplemented, and recorded using a manual review mechanism; the test plan includes test strategies, test environment requirements, test case types, and test case sets.

[0010] In one embodiment, the test framework is driven to execute according to the test plan, and defect analysis and repair are performed on the failed test cases. The defect analysis report is obtained by comparing and performing root cause analysis with the historical defects in the knowledge base. This is achieved through the following steps: For automated test cases in the test plan, the corresponding test framework is driven to execute in the cloud or local test environment. For manual test cases in the test plan, an execution step and expected result list are generated and pushed to relevant testers for execution, and execution logs and results are collected in real time.

[0011] In one embodiment, defect analysis and repair of failed test cases, and comparison and root cause analysis with historical defects in the knowledge base to obtain a defect analysis report, are achieved through the following steps: when a test fails, failure information is collected, compared with historical defects in the knowledge base, and root cause analysis is performed to generate a defect analysis report and push it to the developers to generate patches for the associated code lines; the failure information includes logs, stack information, and screenshots; the failure reasons include API return errors and UI elements not found.

[0012] In one embodiment, the test data generated during the testing process is cleaned and processed, then fed back into the knowledge base to optimize the knowledge graph, and converted into a training set to iteratively update the test-related model. This is achieved through the following steps: cleaning and processing the test data generated during the testing process, feeding it back into the knowledge base to optimize the knowledge graph, constructing the DIFY workflow, designing SYSTEM role prompts to construct test patterns, converting the test data into a training set to train the test model in combination with existing test cases, and deploying it to the production environment.

[0013] According to one aspect of the present invention, a software testing apparatus includes: a knowledge base construction and management module, used to acquire data sources for software testing, and to clean, extract, label, and associate the data sources using Natural Language Processing (NLP) and knowledge graph technologies to obtain a knowledge base; the data sources include requirement documents, design documents, historical test cases, defect reports, and code repositories; and a requirement parsing and solution generation module, used to acquire requirement documents and parse them to obtain the functional points, business rules, and acceptance criteria of the current requirements, then retrieve related information from the knowledge base, and combine test case templates and best practices from similar projects in the knowledge base to obtain a test solution containing test points and structured test cases. The test execution and defect analysis module is used to drive the corresponding test framework to execute according to the test plan, perform defect analysis and repair on failed test cases, and compare and perform root cause analysis with historical defects in the knowledge base to obtain a defect analysis report. The defect analysis report includes the cause of failure, related lines of code, and repair suggestions. The self-evolution and feedback loop module is used to clean and process the test data generated during the test process and then feed it back to the knowledge base to optimize the knowledge graph, and convert it into a training set to iteratively update the test-related models. The test data includes requirement documents, test cases, execution results, defect reports, manual review and modification records, and repair feedback.

[0014] According to one aspect of the present invention, an electronic device includes at least one processor and at least one memory, wherein computer-readable instructions are stored on the memory; the computer-readable instructions are executed by one or more of the processors to cause the electronic device to implement the software testing method described above.

[0015] According to one aspect of the present invention, a storage medium has computer-readable instructions stored thereon, which are executed by one or more processors to implement the software testing method described above.

[0016] The beneficial effects of the technical solution provided by this invention are: In the above technical solution, this invention first acquires multi-source data for software testing, including requirement documents, design documents, historical test cases, defect reports, and code repositories. It then utilizes Natural Language Processing (NLP) technology to perform entity recognition and relation extraction on unstructured text, and combines this with knowledge graph technology to associate, clean, and label structured data, thereby constructing a live knowledge base that can be queried and learned. Based on this, requirement documents are acquired and NLP technology is used to parse and extract functional points, business rules, and acceptance criteria. Simultaneously, relevant historical defects, similar functional points, and corresponding test cases are retrieved from the knowledge base. Combining test case templates and best practices from similar projects in the knowledge base, a test plan containing test points and structured test cases is automatically generated. This plan is then reviewed, modified, and supplemented through a manual review mechanism. Finally, the test plan drives the execution of the corresponding test framework. For automated test cases, frameworks such as Selenium and JMeter are directly driven to execute in the cloud or local environment. For manually generated test cases, execution steps are... The system pushes a list of steps and expected results to testers. When execution fails, it automatically collects contextual data such as logs, stack traces, and screenshots, compares it with historical defects in the knowledge base, performs root cause analysis, and generates a defect analysis report containing the cause of failure, related lines of code, and repair suggestions, which is then pushed to developers. Finally, the data generated throughout the testing process, including requirement documents, test cases, execution results, defect reports, manual review and modification records, and repair feedback, are cleaned and fed back into the knowledge base to optimize the knowledge graph. Simultaneously, it is transformed into a training set and combined with the DIFY workflow and SYSTEM role prompts to iteratively update the test model and deploy it to the production environment. This enables the test system to continuously evolve, significantly improving testing efficiency, reducing labor costs, and comprehensively improving test quality and knowledge reusability. This allows software testing to be completed more efficiently, intelligently, and reliably in a fast-paced development environment, effectively solving the problems of low testing efficiency, unreliable quality, difficulty in knowledge reusability, and low level of intelligence in existing technologies. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating a software testing method according to an exemplary embodiment; Figure 2 This is a block diagram of a software testing apparatus according to an exemplary embodiment; Figure 3This is a hardware structure diagram of an electronic device according to an exemplary embodiment; Figure 4 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0020] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this disclosure means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0021] This invention provides a software testing method that, by constructing a living knowledge base, deploying multi-AI agent collaborative testing, and implementing a self-evolutionary feedback mechanism, achieves automation, intelligence, and continuous optimization of the entire testing process. It effectively solves the problems of low testing efficiency, unreliable quality, difficulty in knowledge reuse, and low level of intelligence in existing technologies. This software testing method is applicable to software testing devices, which can be electronic devices. The software testing method in this invention can be applied to various scenarios, such as software testing.

[0022] Please see Figure 1 This invention provides a software testing method applicable to electronic devices.

[0023] In the following method embodiments, for ease of description, the execution subject of each step of the method is an electronic device, but this does not constitute a specific limitation.

[0024] like Figure 1 As shown, the method may include the following steps: Step 110: Obtain the data source for software testing, and use Natural Language Processing (NLP) and knowledge graph technologies to clean, extract, label, and associate the data source to obtain a knowledge base.

[0025] One possible implementation involves accessing various test data sources within the enterprise, using Natural Language Processing (NLP) technology to perform entity recognition and relation extraction on the unstructured text in the data sources to obtain structured data, and then using knowledge graph technology to associate and map the structured data in the data sources with each other, followed by cleaning and labeling to obtain a knowledge base.

[0026] The data sources include requirements documents, design documents, historical test cases, defect reports, code repositories, etc., without any specific restrictions.

[0027] Specifically, the first step is to connect to various internal testing data sources within the enterprise, including but not limited to requirement documents (such as PRDs), design documents, historical test cases, defect reports, and code repositories. These data sources are diverse, including structured data (such as test case tables in the test case management system and bug records in the defect system) as well as a large amount of unstructured data (such as Word-format requirement documents, PDF-format design specifications, and free-text defect descriptions). Through standardized data interfaces, this data, scattered across different systems, is unified and aggregated, laying the data foundation for subsequent knowledge-based processing.

[0028] Furthermore, the aggregated unstructured text data undergoes in-depth processing using Natural Language Processing (NLP) techniques. Specifically, Named Entity Recognition (NER) technology is used to extract key entities from requirement documents and defect reports, such as functional module names, business rule keywords, and defect types. Relationship extraction technology is used to identify the relationships between entities, such as "Function A depends on interface B" and "Defect C is caused by code module D." Through this process, the originally chaotic unstructured text is transformed into structured entity-relation triples, forming a structured representation of the unstructured data.

[0029] Furthermore, after extracting unstructured data, knowledge graph technology is used to map structured data (such as test case IDs and execution results in test case tables) with unstructured data (such as entity-relation triples). Through entity alignment and relation fusion, a knowledge graph covering multi-dimensional relationships between functional modules, business rules, test cases, and historical defects is constructed. Simultaneously, nodes and edges in the knowledge graph are labeled, such as the priority of a test case or the severity of a defect, making the knowledge base not only "searchable" but also "understandable." The final output is a structured knowledge base that can be efficiently queried and learned.

[0030] In the above process, the embodiments of the present invention use NLP technology to clean, extract and label multi-source heterogeneous test data, and use knowledge graphs to achieve deep association between structured and unstructured data. This transforms the test history data that was originally scattered in personal minds, local documents and isolated systems into a knowledge base that can be understood and called by AI, providing a unified knowledge foundation and realizing the standardized accumulation and efficient reuse of test knowledge. This fundamentally solves the problems of difficult knowledge reuse and over-reliance on core experts in the existing technology.

[0031] Step 120: Obtain the requirements document and parse it to obtain the functional points, business rules and acceptance criteria of the current requirements. Then, retrieve related information from the knowledge base, combine it with the test case templates and best practices of similar projects in the knowledge base, and obtain a test plan containing test points and structured test cases. Then, conduct manual review.

[0032] One possible implementation involves using NLP technology to extract the functional points, business rules, and acceptance criteria from the current requirements document, and retrieving historical defects, similar functional points, and corresponding test cases related to the current requirements from the knowledge base. The requirements analysis report is then generated by combining the functional points, business rules, and acceptance criteria.

[0033] In one possible implementation, test plans are generated based on test case templates and best practices from similar projects in the requirements analysis report and knowledge base. A manual review mechanism is then used to review, modify, supplement, and record the test plans.

[0034] The test plan includes test strategies, test environment requirements, test case types, test case sets, etc., which are not specified here.

[0035] Specifically, the requirements document (such as PRD) for this iteration is parsed paragraph by paragraph, and the functional points (such as "the user login module supports login by mobile phone number + verification code"), business rules (such as "the amount of a single transfer shall not exceed 50,000 yuan") and acceptance criteria (such as "the interface response time shall not exceed 200ms") are automatically extracted.

[0036] Furthermore, retrieve historical defects related to the current requirements (e.g., "This functional module had a defect XX in the previous version"), similar functionalities (e.g., "The functional similarity with last year's payment module is 85%), and corresponding test case templates. Integrate the parsed results with the retrieved related information to comprehensively assess the scope of impact of the requirement change and the testing focus, and finally generate a "Requirement Analysis and Testing Points Report" which is sent to the testers for confirmation.

[0037] Furthermore, after the tester confirms the requirements analysis report on the interactive interface, the instruction is issued to the solution design agent. Receiving the requirements analysis results and combining them with similar project test case templates and best practices stored in the knowledge base (such as "mandatory test case set for the payment module of financial projects"), a complete test plan is automatically generated. This plan includes: testing strategy (such as "using a combination of smoke testing and regression testing"), testing environment requirements (such as "requires Linux + MySQL + Chrome environment"), required test data types (such as "requires preparing 100 transfer records of different amounts"), and outputs a set of structured test cases (each test case includes preconditions, operation steps, and expected results).

[0038] Furthermore, the generated test plans and test cases are reviewed by testers. Testers can view the basis for each test case's generation (e.g., "This test case comes from the XX project template in the knowledge base") and modify, supplement, or delete it. More importantly, a "correction interaction" mechanism is supported—testers gradually adjust the test case content until they are satisfied. Every manual modification is fully recorded and used as training data for subsequent model optimization.

[0039] In the above process, the embodiments of the present invention utilize the long text understanding capabilities of the large language model and the historical experience in the knowledge base to achieve full automation from requirement analysis to test plan generation. Through the review and correction mechanism, the generated test plans are both comprehensive and tailored to the team's actual situation, providing efficient, accurate and continuously optimizable solution generation capabilities, and significantly shortening the solution design cycle.

[0040] Step 130: Drive the corresponding test framework to execute according to the test plan, perform defect analysis and repair on the test cases that fail to execute, and compare and perform root cause analysis with historical defects in the knowledge base to obtain a defect analysis report.

[0041] In one possible implementation, for automated test cases in the test plan, the corresponding test framework is driven to execute in the cloud or local test environment. For manual test cases in the test plan, a list of execution steps and expected results is generated and pushed to the relevant testers for execution, and execution logs and results are collected in real time.

[0042] In one possible implementation, when a test fails, failure information is collected, compared with historical defects in the knowledge base, and root cause analysis is performed to generate a defect analysis report, which is then pushed to the developers to generate patches for the relevant lines of code.

[0043] The defect analysis report includes the cause of failure, related lines of code, and repair suggestions. Failure information includes logs, stack traces, screenshots, etc., and the cause of failure includes API error return, UI element not found, etc., without any restrictions.

[0044] Specifically, after the test case set is manually reviewed and finalized, it is intelligently distributed according to the type of each test case. Test cases are divided into three categories: UI automation test cases, API automation test cases, and manual test cases. For UI automation test cases, the agent schedules them to UI automation testing frameworks such as Selenium; for API automation test cases, they are scheduled to API testing frameworks such as JMeter; for manual test cases, clear execution steps and a list of expected results are generated and pushed to the corresponding human testers. The entire distribution process is dynamically scheduled based on the resource status of the testing environment (such as the number of available browser instances, API server load, etc.) to ensure optimal utilization of testing resources.

[0045] Furthermore, for automated test cases, the corresponding testing framework is driven to execute in the cloud or local testing environment. The execution scope covers various test types: for UI testing, it simulates real user behavior, performing actions such as page clicks, form filling, and process navigation; for API testing, it calls APIs to send requests and verifies the response status code, response body content, and response time; for stress testing, it automatically generates massive amounts of concurrent data for load testing. During execution, execution logs, screenshots, performance metrics, and other result data are collected in real time and compared with expected results, marking them as passed or failed.

[0046] Furthermore, when a test fails, complete contextual information about the failure is collected, including error logs, Java stack traces, page screenshots, request / response data, etc. This contextual information is compared with historical defects in the knowledge base, and preliminary root cause analysis is performed using the reasoning capabilities of a large model. For example, if an API returns a 500 error, the analysis determines whether it's due to parameter validation failure or a backend service exception; if a UI element is not found, the analysis determines whether it's due to page rendering delay or element locator malfunction. Finally, a "defect analysis report" is generated, clearly indicating the cause of the failure (e.g., "an API returned an error," "a UI element was not found"), and linking it to possible lines of code or modules, even attempting to automatically generate a fix patch.

[0047] Furthermore, once the defect analysis report is generated, it is automatically pushed into the developer's workflow (such as JIRA, GitLab, etc.). Developers can use this to quickly locate and fix problematic code. After the fix is ​​completed, the developer's feedback (such as "Modified line XX of file XX") is also recorded as training data, forming a complete closed loop from "discovering defects" to "fixing defects" and then to "learning from defects".

[0048] In the above process, the embodiments of the present invention enable the test execution process to no longer rely on a large number of manual operations through multi-dimensional automated execution and context-aware root cause analysis, providing rapid and accurate defect discovery and location capabilities, realizing large-scale automation of the test execution process and intelligent defect analysis, significantly improving defect detection rate and repair efficiency, and ensuring the quality and stability of software products.

[0049] Step 140: After cleaning and processing the test data generated during the testing process, the data is fed back into the knowledge base to optimize the knowledge graph and transformed into a training set to iteratively update the test-related models.

[0050] In one possible implementation, the test data generated during the testing process is cleaned and processed and then fed back into the knowledge base to optimize the knowledge graph. The DIFY workflow is constructed, the SYSTEM role prompts are designed to build the processing flow of test tasks, the test data is transformed into a training set and combined with existing test cases to train the test model, and then deployed to the production environment.

[0051] The test data includes requirements documents, test cases, execution results, defect reports, manual review and modification records, repair feedback, etc., without any specific limitations.

[0052] Specifically, after the entire testing process (from requirement access to defect fixing) is completed, data collection is initiated to summarize all data generated in this iteration, including: original requirement documents, AI-generated test cases, test execution results (pass / fail), defect analysis reports, testers' review and modification records of AI-generated test cases, and developers' fix feedback, etc.

[0053] Furthermore, the collected raw data is not used directly for training, but first undergoes cleaning and processing: removing noisy data (such as duplicate records and invalid logs), standardizing the data format, and performing data anonymization. The cleaned data is then fed back into the knowledge base to optimize the knowledge graph—for example, newly discovered defect types and their root causes are added to the knowledge graph, and modified test cases by testers are incorporated into the knowledge base as new best practices. This allows the coverage and accuracy of the knowledge base to continuously improve with each test iteration.

[0054] Furthermore, the reverted data is simultaneously transformed into training samples for optimizing all models. A DIFY workflow is constructed, SYSTEM role prompts are designed, and cleaned data (such as changes made by testers to a test case) is used as training samples. This data, combined with existing test cases, is used to incrementally train the model. After training, the updated model is deployed to the production environment.

[0055] In the above process, the embodiments of the present invention automatically transform the interactive data, decision records and manual feedback generated in the entire testing process into training samples through self-evolution and feedback loop, continuously optimize the knowledge graph and model parameters, so that the performance is more accurate and intelligent when performing similar tasks in the future, providing a long-term mechanism for continuous value-added, and realizing a qualitative change from "functional solidification" to "continuous evolution".

[0056] Through the above process, this invention transforms multi-source enterprise test data into a dynamic knowledge base through knowledge base construction and management. It achieves automated design and manual review of test plans through requirement analysis and solution generation. Through test execution and defect analysis, it enables multi-dimensional automated root cause localization. Finally, through a self-evolving feedback loop, it continuously optimizes capabilities by feeding back data from the entire process. This fundamentally solves the problems of low testing efficiency, unreliable quality, difficulty in knowledge reuse, and low level of intelligence in existing technologies.

[0057] In one application scenario, a software testing system was built using the software testing method of this invention. This system mainly includes the following five core modules: The knowledge base construction and management module is responsible for accessing and processing various internal testing data sources, including requirement documents, design documents, historical test cases, defect reports, and code repositories. This module utilizes Natural Language Processing (NLP) technology to perform entity recognition and relation extraction on unstructured text, while combining knowledge graph technology to associate, clean, and label structured data, ultimately building a structured knowledge base that can be queried and learned by AI agents.

[0058] The AI ​​Agent Collaboration Module deploys multiple AI agents with varying functionalities, communicating and collaborating through standardized interfaces. Specifically, this includes: a requirements analysis agent responsible for parsing requirements documents, extracting functional points, and generating test criteria; a solution design agent that automatically generates test plans and test cases based on best practices from a knowledge base; a test execution agent that automatically distributes tasks according to test case type, driving frameworks such as Selenium and JMeter to execute automated tests or generate manual test guidelines; and a defect analysis and remediation assistance agent that automatically collects contextual information, performs root cause analysis, locates defective code, and provides remediation suggestions to developers when tests fail.

[0059] Human-Machine Collaborative Interaction Module: Provides a unified interactive interface for testers, developers, and managers to view system status, review AI-generated results, intervene in complex decisions, and supplement new knowledge. Testers can review and fine-tune AI-generated test cases and manage agent task allocation on this interface; their actions are automatically recorded by the system as training data for subsequent model optimization.

[0060] Self-evolution and feedback loop module: As the core driving mechanism of the system, this module automatically records all interactions, decisions, results and human feedback throughout the entire testing process. After cleaning and processing, this data is fed back into the knowledge base and AI model to optimize the knowledge graph and retrain the parameters of the Qwen3 model. This enables the AI ​​agent to perform more accurately and intelligently when performing similar tasks in the future, thereby achieving continuous self-evolution of the system.

[0061] The five modules mentioned above are closely connected through data flow: the knowledge base provides data support for the intelligent agent, the intelligent agent collaborates to complete the entire testing process, the human-computer interaction module ensures human review and intervention, and the self-evolution module feeds back the data from the entire process to the knowledge base and model, forming a complete closed loop.

[0062] Specifically, using this software testing system for software testing may include the following steps: Step S1: Knowledge base construction and multi-source data access.

[0063] Specifically, the system administrator uses over 5,000 historical test cases, over 800 defect reports, over 200 requirement documents (PRDs), design documents, and code change records from the Git repository accumulated within the enterprise as data sources, and integrates them into the knowledge base construction and management module of the software testing system. This module utilizes Natural Language Processing (NLP) technology to perform entity recognition and relation extraction on unstructured text (such as business rule descriptions in requirement documents and root cause analysis text in defect reports). At the same time, it combines knowledge graph technology to associate, map, clean, and label structured data (such as test case execution results and defect severity levels) with structured data, ultimately constructing a structured knowledge base that can be queried and learned by AI agents.

[0064] Furthermore, this knowledge base not only includes historical test cases and defect reports, but also designs SYSTEM role prompts through the DIFY workflow, constructs a preprocessing framework for test agents, and uses existing test cases as data sources to train a large model (Qwen3-235B-A22B-FP8, with long text context support up to 256K), laying the foundation for accurate invocation of subsequent agents.

[0065] In the above process, the embodiments of the present invention use the dual technical means of NLP and knowledge graph to transform the test history data accumulated by enterprises over many years into a knowledge base that can be understood and called by AI, thereby achieving the standardization and platformization of test experience and best practices.

[0066] Step S2: Requirements analysis and test point generation.

[0067] Specifically, the test manager uploaded the requirements document (PRD) for the "Mobile Loan Approval Function V2.0" for this iteration to the software testing system, and the requirements analysis agent was automatically activated. The agent first used NLP technology to parse the PRD, extracting 12 functional points such as "loan amount calculation", "risk control rule verification", and "approval process flow", 8 business rules (such as "single loan amount not exceeding 500,000"), and 5 acceptance criteria.

[0068] Subsequently, the demand analysis agent initiated a query to the knowledge base construction and management module, retrieving 3 historical defects related to "loan limit calculation" (which had previously caused overflow due to improper boundary value handling) and 15 test cases corresponding to 2 similar functional points (the limit calculation module in version V1.0).

[0069] Furthermore, the requirements analysis agent integrates the analysis results with the retrieved related information to generate a "Requirements Analysis and Testing Points Report," which clearly marks high-risk testing areas (such as boundary value testing and concurrent approval testing) and pushes it to the human-computer collaborative interaction module for testers to refer to and confirm.

[0070] In the above process, the embodiments of the present invention automatically complete the requirements analysis and historical association retrieval through the requirements analysis intelligent agent, which significantly shortens the requirements analysis work that originally required two test engineers to complete in one day, and greatly improves the efficiency of test preparation.

[0071] Step S3: Intelligent test plan and test case generation.

[0072] Specifically, after the tester confirms the requirements analysis report on the unified interface of the human-computer collaborative interaction module, the instruction is issued to the solution design intelligent agent. This intelligent agent receives the output of the requirements analysis intelligent agent, combines the test case templates and best practices of the "Mobile Loan Approval V1.0" project in the knowledge base (such as "financial functions must include fund security verification test cases"), and automatically generates a detailed test plan, including the test strategy (functional testing accounts for 60%, interface testing accounts for 25%, and UI automation testing accounts for 15%), test environment requirements (a risk control rule engine that simulates the production environment needs to be used), and the required test data types (eight types of test data need to be constructed, such as normal loans, excessive loans, and concurrent approvals), and outputs a test case set containing 86 structured test cases.

[0073] Furthermore, testers reviewed and fine-tuned 12 test cases on the interactive interface (e.g., changing "verify that the loan amount is calculated correctly" to "verify that the loan amount is calculated correctly within the range of 10,000 to 500,000, with boundary values ​​of 9,900, 500,000, and 500,100 respectively"). Their modifications were automatically recorded by the system and became training data for subsequent model optimization.

[0074] In the above process, the embodiments of the present invention automatically generate test plans by combining the solution design intelligent agent with historical best practices, and support human-machine collaborative review, which significantly improves the efficiency of test case design.

[0075] Step S4: Intelligent test execution and task distribution.

[0076] Specifically, after the test case set is finalized, the test execution agent automatically distributes and schedules tasks based on the test case type. For the 62 automated test cases (including 35 interface test cases and 27 UI automated test cases), the test execution agent directly drives the Selenium framework to execute UI automated tests in the cloud testing environment (simulating user actions such as clicking the "Apply for Loan" button, filling out forms, and submitting for approval), while simultaneously driving the JMeter framework to perform stress tests on the "Concurrent Approval" interface (simulating 500 users submitting loan applications simultaneously). For the 24 manual test cases (such as "verifying the UI display of the manual review node in the approval process"), the system generates a clear list of execution steps and expected results, which are then pushed to the corresponding human testers for execution.

[0077] Furthermore, the test execution agent collects execution logs and results in real time. When a "concurrent approval interface response time" test case fails (response time exceeds 3 seconds), the defect analysis process is automatically triggered. This embodiment of the invention achieves seamless integration of automated and manual testing through the intelligent distribution capability of the test execution agent, significantly improving test execution efficiency compared to purely manual mode.

[0078] Step S5: Intelligent Defect Analysis and Repair Assistance.

[0079] Specifically, when the "concurrent approval interface response time" test case fails, the defect analysis and repair assistance agent automatically intervenes. This agent collects the context information at the time of failure (including interface request parameters, response logs, slow query stack information in the database, and screenshots of the interface response) and compares it with historical defects in the knowledge base. It finds that it is highly similar to the "slow concurrent query in version V1.5" defect from 3 months ago (the root cause of both defects is missing database indexes).

[0080] Furthermore, the agent performed preliminary root cause analysis, locating the potential defective code in the SQL query statement on line 187 of LoanApprovalController.java. It generated a defect analysis report indicating that the failure was caused by "a missing index on the approval_time field, leading to a full table scan," linking it to the specific line of code, and providing developers with repair suggestions (adding a composite index idx_approval_time_status) and even attempting to generate a patch. This report was pushed into the developers' workflow, allowing them to quickly locate and fix the problem.

[0081] In the above process, the embodiments of the present invention significantly shorten the defect location time and improve the defect repair efficiency by utilizing the automatic root cause analysis capability of the defect analysis intelligent agent.

[0082] Step S6: Self-evolutionary feedback and model iterative optimization.

[0083] Specifically, after the entire testing process is completed, the self-evolution and feedback loop module automatically summarizes all the data of this iteration: requirements document, 86 test cases, execution results (pass rate 92%), 4 defect reports, testers' review and modification records of 12 test cases, developers' feedback on the fixes of 4 defects, etc.

[0084] Furthermore, after cleaning and processing, this new data is fed back into the knowledge base to optimize the knowledge graph (e.g., adding defect pattern associations for "slow queries in concurrent approval interfaces"), and simultaneously transformed into training samples. Combined with the DIFY workflow and SYSTEM role prompts, the Qwen3-235B-A22B-FP8 large model is iteratively updated (e.g., incorporating the style characteristics of tester test case modifications into the generation strategy of the solution design agent). The updated model is deployed to the production environment, resulting in an iteration and improvement of the software testing system's capabilities.

[0085] In the above process, the embodiments of the present invention enable the system to achieve a continuous evolution effect of "getting smarter the more it is used" through the self-evolution and feedback loop module, which greatly reduces the amount of human workload and significantly improves the test-development ratio.

[0086] Through the above process, this embodiment of the invention first constructs a living knowledge base from multiple sources of data, including over 5000 historical test cases and over 800 defect reports, using NLP and knowledge graph technologies. Second, the requirements analysis agent automatically parses the PRD, extracts 12 functional points, and associates them with historical defects. The solution design agent generates 86 structured test cases based on best practices, which are then manually reviewed. Next, the test execution agent drives Selenium and JMeter to perform automated testing. Manual test case generation guides are pushed to testers. Upon failure, the defect analysis agent automatically collects context, compares with historical defects, locates lines of code, and generates a defect report with repair suggestions. Finally, all data is fed back to the knowledge base, and the Qwen 3-model is iteratively updated through the DIFY workflow, achieving system self-evolution. This embodiment covers all core modules, including knowledge base construction, collaboration of the four intelligent agents, human-computer interaction, and self-evolutionary feedback, significantly improving testing efficiency.

[0087] The following are embodiments of the apparatus of the present invention, which can be used to execute the software testing method involved in the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the method embodiments of the software testing method involved in the present invention.

[0088] Please see Figure 2 This invention provides a software testing device 800.

[0089] The software testing device 800 includes, but is not limited to: a knowledge base construction and management module 810, a requirement analysis and solution generation module 830, a test execution and defect analysis module 850, and a self-evolution and feedback loop module 870.

[0090] Among them, the knowledge base construction and management module 810 is used to obtain the data source for software testing. It uses natural language processing (NLP) and knowledge graph technology to clean, extract, label and associate the data source to obtain the knowledge base. The data source includes requirements documents, design documents, historical test cases, defect reports and code repositories.

[0091] The requirement analysis and solution generation module 830 is used to obtain the requirement document and parse it to obtain the functional points, business rules and acceptance criteria of the current requirement. Then, it retrieves related information from the knowledge base, combines the test case templates and best practices of similar projects in the knowledge base, and obtains a test solution containing test points and structured test cases, which is then manually reviewed.

[0092] The test execution and defect analysis module 850 is used to drive the execution of the corresponding test framework according to the test plan, perform defect analysis and repair on the test cases that fail to execute, and compare and perform root cause analysis with historical defects in the knowledge base to obtain a defect analysis report; the defect analysis report includes the cause of failure, related lines of code, and repair suggestions.

[0093] The self-evolution and feedback loop module 870 is used to clean and process the test data generated during the testing process and then feed it back into the knowledge base to optimize the knowledge graph, and transform it into a training set to iteratively update the test-related models; the test data includes requirement documents, test cases, execution results, defect reports, manual review and modification records, and repair feedback.

[0094] It should be noted that the software testing provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the software testing device will be divided into different functional modules to complete all or part of the functions described above.

[0095] Furthermore, the software testing apparatus and software testing method embodiments provided in the above embodiments belong to the same concept, and the specific way in which each module performs operations has been described in detail in the method embodiments, and will not be repeated here.

[0096] Figure 3 A schematic diagram of the structure of an electronic device according to an exemplary embodiment is shown.

[0097] It should be noted that this electronic device is merely an example adapted to the present invention and should not be construed as providing any limitation on the scope of use of the present invention. Furthermore, this electronic device should not be interpreted as requiring or depending on having... Figure 3 One or more components of the exemplary electronic device 2000 shown.

[0098] The hardware structure of electronic devices 2000 can vary significantly due to differences in configuration or performance, such as... Figure 3 As shown, the electronic device 2000 includes: a power supply 210, an interface 230, at least one memory 250, and at least one central processing unit (CPU) 270.

[0099] Specifically, power supply 210 is used to provide operating voltage for various hardware devices on electronic device 2000.

[0100] Interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Of course, in other examples adapted to this invention, interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input / output interface 235, and at least one USB interface 237, etc. Figure 3 As shown, this does not constitute a specific limitation.

[0101] The memory 250 serves as a carrier for resource storage and can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it include the operating system 251, application programs 253, and data 255, etc., and the storage method can be temporary storage or permanent storage.

[0102] The operating system 251 is used to manage and control the various hardware devices and application programs 253 on the electronic device 2000, so as to enable the central processing unit 270 to perform calculations and processing on the massive data 255 in the memory 250. It can be Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0103] Application 253 is a computer-readable instruction based on operating system 251 that performs at least one specific task, and may include at least one module ( Figure 3 (Not shown), each module may contain computer-readable instructions for electronic device 2000. For example, the software testing device may be considered as application program 253 deployed on electronic device 2000.

[0104] Data 255 may be signal information, etc., and is stored in memory 250.

[0105] The central processing unit 270 may include one or more processors and is configured to communicate with the memory 250 via at least one communication bus to read computer-readable instructions stored in the memory 250, thereby performing operations and processing on massive amounts of data 255 stored in the memory 250. For example, a software testing method may be performed by having the central processing unit 270 read a series of computer-readable instructions stored in the memory 250.

[0106] Furthermore, the present invention can also be implemented through hardware circuits or a combination of hardware circuits and software. Therefore, the implementation of the present invention is not limited to any specific hardware circuit, software, or combination thereof.

[0107] Please see Figure 4 This invention provides an electronic device 4000, which may include: a desktop computer, a laptop computer, a server, etc., with sensor recognition capabilities.

[0108] exist Figure 4 In this context, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.

[0109] The data interaction between the processor 4001 and the memory 4003 can be achieved through at least one communication bus 4002. This communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0110] Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0111] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0112] The memory 4003 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program instructions or code in the form of instructions or data structures and accessible by the electronic device 4000, but not limited thereto.

[0113] The memory 4003 stores computer-readable instructions, and the processor 4001 can read the computer-readable instructions stored in the memory 4003 through the communication bus 4002.

[0114] The computer-readable instructions are executed by one or more processors 4001 to implement the software testing methods in the above embodiments.

[0115] Furthermore, this embodiment of the invention provides a storage medium storing computer-readable instructions, which are executed by one or more processors to implement the software testing method described above.

[0116] This invention provides a computer program product, which includes computer-readable instructions stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, thereby enabling the electronic device to implement the software testing method described above.

[0117] Compared with related technologies, the beneficial effects of the present invention are: 1. This invention significantly improves testing efficiency and drastically reduces labor costs. By deploying collaborative work involving requirements analysis, solution design, test execution, and defect analysis, it automates the time-consuming mental labor that previously required multiple test engineers to complete for several days, such as requirements analysis, test case design, and execution scheduling, thus greatly shortening the testing cycle. Calculations show that this can result in annualized savings in manpower, significantly improving test development efficiency and achieving a comprehensive transformation of testing activities from "labor-intensive" to "intelligence-intensive."

[0118] 2. This invention has the beneficial effects of comprehensively improving testing quality and ensuring the stable operation of software systems. By using an AI agent to perform comprehensive requirement analysis and test case generation based on a full knowledge base, it avoids the subjectivity and oversights that are unavoidable in manual testing. Combined with intelligent defect analysis and repair assistance, the AI ​​agent automatically collects logs and stack information from failed test cases to perform root cause analysis and locate defective code. This enables faster and more accurate discovery and location of problems, thereby effectively improving the defect detection rate and ensuring the quality and operational stability of software products.

[0119] 3. This invention can effectively accumulate and reuse enterprise testing knowledge assets, breaking through talent bottlenecks. Through NLP and knowledge graph technologies, it transforms the test history data accumulated by enterprises over the years in unstructured form in individuals' minds and local documents into a knowledge base that can be queried and learned. New employees or new projects can work on the shoulders of giants, reducing the over-reliance on scarce testing experts and realizing the standardization and platform-based inheritance of testing experience and best practices.

[0120] 4. This invention has the beneficial effect of building a continuously evolving intelligent system and creating long-term value. Through the self-evolution and feedback loop module, it automatically records all interactions, decisions, results and human feedback throughout the entire testing process. After cleaning and processing, this new data is fed back into the knowledge base and model to optimize the knowledge graph and retrain the parameters of the Qwen3 model. When performing similar tasks in the future, the system will perform more accurately and intelligently. The system's capabilities will continue to increase with use, helping enterprises build a technologically competitive brand.

[0121] 5. This invention enables efficient human-machine collaboration, balancing intelligence and controllability. Through the human-machine collaborative interaction module, a unified interactive interface is provided, allowing testers to review and fine-tune generated test cases, manage intelligent agent task allocation, and intervene in complex decisions. Their operational behaviors are simultaneously recorded by the system as training data to feed back into model optimization. This approach leverages the advantages of high efficiency and intelligence while retaining the control over key decisions by human experts, achieving an organic combination of intelligence and manual review.

[0122] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0123] The above description is only a partial embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A software testing method, characterized in that, The method includes: The data sources for software testing are obtained, and a knowledge base is obtained by cleaning, extracting, labeling, and associating the data sources using Natural Language Processing (NLP) and knowledge graph technologies. The data sources include requirements documents, design documents, historical test cases, defect reports, and code repositories. After obtaining the requirements document and parsing it to get the functional points, business rules and acceptance criteria of the current requirements, relevant information is retrieved from the knowledge base. Combined with the test case templates and best practices of similar projects in the knowledge base, a test plan containing test points and structured test cases is obtained and then manually reviewed. The test framework is driven to execute according to the test plan. Defect analysis and repair are performed on the test cases that fail to execute. The results are compared with historical defects in the knowledge base and root cause analysis is performed to obtain a defect analysis report. The defect analysis report includes the cause of failure, the associated lines of code, and repair suggestions. The test data generated during the testing process is cleaned and processed, then fed back into the knowledge base to optimize the knowledge graph, and transformed into a training set to iteratively update the test-related models; the test data includes requirement documents, test cases, execution results, defect reports, manual review and modification records, and repair feedback.

2. The software testing method as described in claim 1, characterized in that, The data source for software testing is obtained by cleaning, extracting, labeling, and associating the data source using Natural Language Processing (NLP) and knowledge graph technologies to obtain a knowledge base, including: By accessing various test data sources within the enterprise, and using Natural Language Processing (NLP) technology to perform entity recognition and relation extraction on the unstructured text in the data sources to obtain structured data; Knowledge graph technology is used to associate and map structured data from the data source with the structured data, and then the data is cleaned and labeled to obtain a knowledge base.

3. The software testing method as described in claim 1, characterized in that, The process of obtaining the requirements document and parsing it to get the functional points, business rules, and acceptance criteria of the current requirements includes: NLP technology is used to extract the functional points, business rules and acceptance criteria of the current requirements document, and historical defects, similar functional points and corresponding test cases related to the current requirements are retrieved from the knowledge base. A requirements analysis report is generated by combining the functional points, business rules and acceptance criteria.

4. The software testing method as described in claim 3, characterized in that, The process of retrieving relevant information from the knowledge base, combining it with test case templates and best practices from similar projects in the knowledge base, yields a test plan containing test points and structured test cases, which is then manually reviewed, including: Test plans are generated based on the requirements analysis report and test case templates and best practices of similar projects in the knowledge base. The test plans are reviewed, modified, supplemented and recorded using a manual review mechanism. The test plans include test strategies, test environment requirements, test case types and test case sets.

5. The software testing method as described in claim 1, characterized in that, The test framework is executed according to the test plan, and defect analysis and repair are performed on failed test cases. A defect analysis report is obtained by comparing the results with historical defects in the knowledge base and performing root cause analysis. This includes: For automated test cases in the test plan, the corresponding test framework is driven to execute in the cloud or local test environment. For manual test cases in the test plan, an execution step and expected result list are generated and pushed to relevant testers for execution, and execution logs and results are collected in real time.

6. The software testing method as described in claim 5, characterized in that, The defect analysis and repair of failed use cases, and the comparison and root cause analysis with historical defects in the knowledge base to obtain a defect analysis report, include: When a test fails, failure information is collected, compared with historical defects in the knowledge base, and root cause analysis is performed to generate a defect analysis report, which is then pushed to the developers to generate patches for the associated lines of code. The failure information includes logs, stack traces, and screenshots. The reasons for failure include API return errors and UI elements not found.

7. The software testing method as described in claim 1, characterized in that, The process of cleaning and processing the test data generated during the testing process, then feeding it back into the knowledge base to optimize the knowledge graph, and converting it into a training set for iterative updates to the test-related models includes: After cleaning and processing the test data generated during the testing process, it is fed back into the knowledge base to optimize the knowledge graph, build the DIFY workflow, design SYSTEM role prompts to construct test patterns, transform the test data into a training set, combine it with existing test cases to train the test model, and then deploy it to the production environment.

8. A software testing apparatus, characterized in that, The device includes: The knowledge base construction and management module is used to acquire data sources for software testing. It uses Natural Language Processing (NLP) and knowledge graph technologies to clean, extract, label, and associate the data sources to obtain the knowledge base. The data sources include requirements documents, design documents, historical test cases, defect reports, and code repositories. The requirement analysis and solution generation module is used to obtain the requirement document and parse it to obtain the functional points, business rules and acceptance criteria of the current requirement. Then, it retrieves related information from the knowledge base, combines the test case templates and best practices of similar projects in the knowledge base, and obtains a test solution containing test points and structured test cases, and performs manual review. The test execution and defect analysis module is used to drive the corresponding test framework to execute according to the test plan, perform defect analysis and repair on the test cases that fail to execute, and compare and perform root cause analysis on the defects in the knowledge base to obtain a defect analysis report; the defect analysis report includes the cause of failure, the associated code lines, and repair suggestions; The self-evolution and feedback loop module is used to clean and process the test data generated during the testing process and then feed it back into the knowledge base to optimize the knowledge graph, and convert it into a training set to iteratively update the test-related models; the test data includes requirement documents, test cases, execution results, defect reports, manual review and modification records, and repair feedback.

9. An electronic device, characterized in that, include: At least one processor and at least one memory, wherein, The memory stores computer-readable instructions; The computer-readable instructions are executed by one or more of the processors, causing the electronic device to implement the software testing method as described in any one of claims 1 to 7.

10. A storage medium having computer-readable instructions stored thereon, characterized in that, The computer-readable instructions are executed by one or more processors to implement the software testing method as described in any one of claims 1 to 7.