Automatic software testing and defect detecting method and system based on artificial intelligence
Through the automated software testing method based on artificial intelligence, the time-consuming and labor-consuming problem of traditional testing methods is solved, and the automated execution of software testing and intelligent defect detection are realized, which improves testing efficiency and accuracy, reduces costs, and supports continuous integration and deployment.
Patent Information
- Application Number
- CN202411460095.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-17
AI Technical Summary
Traditional manual software testing methods are time-consuming and difficult to ensure comprehensiveness and accuracy. The existing automated testing technology is costly and difficult to adapt to new testing needs when facing complex software systems.
Adopting an automated software testing method based on artificial intelligence, the automated execution and intelligent defect detection of software tests are realized through initialization of test scripts, real-time monitoring, artificial intelligence defect detection modules, defect report generation and optimization iteration.
Improves testing efficiency and accuracy, reduces testing costs, supports continuous integration and continuous deployment, and reduces manual intervention and testing cycles.
Smart Images

Figure CN119322749A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing technology, and in particular to an artificial intelligence-based automated software testing and defect detection method and system. Background Art
[0002] In the current software industry, software testing is a key link in ensuring software quality. However, with the increasing complexity and scale of software products, traditional manual testing methods can no longer meet the needs of modern software development. Traditional manual testing methods usually rely on the experience and skills of test engineers, require a lot of manpower, material resources and time investment, and it is difficult to ensure the comprehensiveness and accuracy of the test.
[0003] In order to solve the problems existing in traditional testing methods, people began to explore automated testing technology. Automated testing technology can automatically execute test cases and generate test reports by writing test scripts and using test tools, thereby improving testing efficiency. However, existing automated testing technology still faces some challenges. First, the writing and maintenance of test scripts requires a lot of workload and expertise. For complex software systems, the cost of writing and maintaining test scripts can be very high. Second, automated testing tools can usually only execute preset test cases. For new test requirements or changed test scenarios, it is necessary to manually modify the test script or add new test cases, which increases the complexity and workload of the test.
[0004] Therefore, the prior art has defects and needs to be improved. Summary of the invention
[0005] The technical problem to be solved by the present invention is: to provide an artificial intelligence-based automated software testing and defect detection method and system, which realizes the automated execution of software testing and intelligent detection of defects by integrating automated testing technology and artificial intelligence technology.
[0006] The technical solution of the present invention is as follows: an artificial intelligence-based automated software testing and defect detection method is provided, comprising the following steps.
[0007] S1: Initialize the test script.
[0008] S2: The test script performs automatic testing on the software and performs real-time monitoring to obtain the test results.
[0009] S3: Use artificial intelligence defect detection module for defect detection.
[0010] S4: Generate defect report.
[0011] S5: Optimize and iterate.
[0012] Furthermore, the initialization test script includes: environment configuration: first, build the test environment, which includes selecting a suitable operating system, configuring the database, and setting up the network environment; ensuring that the test environment can simulate various situations in the actual production environment in order to conduct comprehensive testing; and dependency installation: install the dependent tools required for testing; including automated testing tools, programming languages (such as Java, Python, etc.), and database connection tools; these tools will be used to write and execute test scripts.
[0013] Furthermore, in step S2, the test script should cover all functional modules and performance requirements of the software being tested to ensure the comprehensiveness of the test; when executing the test script, simulate user operations and record test results; during the test execution, monitor the stability of the test environment and resource usage in real time to ensure the smooth progress of the test.
[0014] Further, in step S3, the artificial intelligence defect detection module performs defect detection including the following steps.
[0015] Data preprocessing: preprocess the test data and test results, including data cleaning, format conversion, and feature extraction; the preprocessed data will be used as input for the machine learning model;
[0016] Model training: Use machine learning algorithms to train models so that computers can identify defective data; model training uses a large amount of historical test data and defect data as input, and through continuous iteration and optimization, the model learns the characteristics and patterns of software defects.
[0017] Defect detection: During the test execution process, the test data and test results are input into the trained model for defect detection; the model automatically identifies and detects potential defects in the software based on the learned features and patterns.
[0018] Defect classification and prioritization: Automatically classify and prioritize detected defects; classify defects into different levels based on factors such as the severity of the defects and the scope of impact, and assign corresponding priorities to each defect.
[0019] Furthermore, the step S4 is specifically as follows: automatically generating a detailed defect report based on the detection results of the artificial intelligence defect detection module; and displaying the generated defect report to the user through the user interface. The report content includes information such as the description, location, severity, classification, and repair suggestions of the defect.
[0020] Furthermore, the step S4 also includes: sharing and collaborating on the defect report online; team members can view and discuss the defect report in real time, thereby improving team collaboration and communication efficiency.
[0021] Furthermore, step S5 includes: result feedback: feeding back the test results and defect reports to developers to help them quickly locate and fix problems; at the same time, collecting feedback from developers to continuously optimize and improve test processes and methods; model update: based on new test data and defect data, continuously updating and optimizing machine learning models to improve the accuracy and efficiency of defect detection.
[0022] Furthermore, the present invention also provides an artificial intelligence-based automated software testing and defect detection system, comprising: an automated testing execution module, an artificial intelligence defect detection module, a defect report generation module, and a user interaction interface; executing the aforementioned artificial intelligence-based automated software testing and defect detection method to automatically test and detect the software.
[0023] By adopting the above scheme, the present invention provides an automated software testing and defect detection method and system based on artificial intelligence, which realizes the automated execution of software testing and intelligent detection of defects. Compared with the traditional software testing method, the present invention has the following advantages:
[0024] Improve test efficiency: Through the automated test execution module, the test process can be automatically executed, reducing manual intervention and test cycles, and improving test efficiency.
[0025] Improve test accuracy: The artificial intelligence defect detection module can realize automatic identification and detection of software defects, improving the accuracy and comprehensiveness of testing.
[0026] Reduce testing costs: Reduce testing costs by reducing the workload of manually writing and maintaining test scripts.
[0027] Support continuous integration and continuous deployment: The present invention can be seamlessly integrated with the continuous integration and continuous deployment processes to achieve rapid iteration and deployment of software development. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0029] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0030] See also Figure 1 The present invention provides an artificial intelligence-based automated software testing and defect detection method, comprising the following steps.
[0031] S1: Initialize the test script.
[0032] S2: The test script performs automatic testing on the software and performs real-time monitoring to obtain the test results.
[0033] S3: Use artificial intelligence defect detection module for defect detection.
[0034] S4: Generate defect report.
[0035] S5: Optimize and iterate.
[0036] In this embodiment, the initialization test script includes: environment configuration: first, build the test environment, which includes selecting a suitable operating system, configuring the database, and setting up the network environment; ensure that the test environment can simulate various situations of the actual production environment in order to conduct comprehensive testing; and, dependency installation: install the dependent tools required for testing; including automated testing tools, programming languages (such as Java, Python, etc.), and database connection tools; these tools will be used to write and execute test scripts.
[0037] In this embodiment, in step S2, the test script should cover all functional modules and performance requirements of the software being tested to ensure the comprehensiveness of the test; when executing the test script, simulate user operations and record test results; during the test execution, monitor the stability of the test environment and resource usage in real time to ensure the smooth progress of the test.
[0038] In this embodiment, in step S3, the artificial intelligence defect detection module performs defect detection including the following steps.
[0039] Data preprocessing: preprocess the test data and test results, including data cleaning, format conversion, and feature extraction; the preprocessed data will be used as input for the machine learning model;
[0040] Model training: Use machine learning algorithms to train models so that computers can identify defective data; model training uses a large amount of historical test data and defect data as input, and through continuous iteration and optimization, the model learns the characteristics and patterns of software defects.
[0041] Defect detection: During the test execution process, the test data and test results are input into the trained model for defect detection; the model automatically identifies and detects potential defects in the software based on the learned features and patterns.
[0042] Defect classification and prioritization: Automatically classify and prioritize detected defects; classify defects into different levels based on factors such as the severity of the defects and the scope of impact, and assign corresponding priorities to each defect.
[0043] In this embodiment, step S4 specifically includes: automatically generating a detailed defect report based on the detection results of the artificial intelligence defect detection module; and displaying the generated defect report to the user through the user interface. The report content includes information such as the description, location, severity, classification, and repair suggestions of the defect.
[0044] In this embodiment, step S4 further includes: sharing and collaborating on the defect report online; team members can view and discuss the defect report in real time, thereby improving team collaboration and communication efficiency.
[0045] In this embodiment, step S5 includes: result feedback: feeding back the test results and defect reports to developers to help them quickly locate and fix problems; at the same time, collecting feedback from developers to continuously optimize and improve test processes and methods; model update: based on new test data and defect data, continuously updating and optimizing machine learning models to improve the accuracy and efficiency of defect detection.
[0046] The present invention also provides an artificial intelligence-based automated software testing and defect detection system, comprising: an automated testing execution module, an artificial intelligence defect detection module, a defect report generation module, and a user interaction interface; the aforementioned artificial intelligence-based automated software testing and defect detection method is executed to automatically test and detect the software.
[0047] 1. Automated test execution module
[0048] The automated test execution module is one of the core components of this system, which aims to realize the automated execution of the software testing process. This module integrates multiple testing tools and technologies, such as unit testing framework, integrated testing tools, system testing platform, etc., to achieve comprehensive coverage testing of software products.
[0049] 1. Test script management
[0050] The automated test execution module supports the automatic writing, management and maintenance of test scripts. The system can automatically generate test scripts based on the preset test plans and test cases, and supports the modification and version control of test scripts. The writing of test scripts follows unified specifications and standards to ensure the consistency and maintainability of the tests.
[0051] 2. Test environment management
[0052] The system also provides test environment management functions, including test environment configuration, deployment and monitoring. The test environment can be customized according to test requirements, including operating system, database, network settings, etc. The system supports the creation and switching of multiple test environments to adapt to different test scenarios and requirements.
[0053] 3. Test Execution
[0054] The automated test execution module automatically executes the test process by calling test tools and test scripts. The system can execute unit tests, integration tests, system tests, etc. in sequence according to the requirements of the test plan, and record the test process and results. During the test execution process, the system can automatically monitor the stability of the test environment and resource usage to ensure the smooth progress of the test.
[0055] 4. Test results collection
[0056] After the test execution is completed, the system automatically collects the test results, including the test case execution status, execution time, output information, etc. The test results are stored in a structured manner to facilitate subsequent analysis and report generation.
[0057] 2. Artificial Intelligence Defect Detection Module
[0058] The artificial intelligence defect detection module is another core component of this system, which uses artificial intelligence technology to automatically identify and detect software defects.
[0059] 1. Data preprocessing
[0060] Before defect detection, the system first preprocesses the test data and test results. Preprocessing includes steps such as data cleaning, format conversion, and feature extraction to ensure the quality and consistency of the data. The preprocessed data will be used as input for the machine learning model.
[0061] 2. Machine Learning Model Construction
[0062] The system uses a variety of machine learning algorithms, such as deep learning, neural networks, and decision trees, to build a defect detection model. Model training requires a large amount of historical test data and defect data as input. Through continuous iteration and optimization, the model can learn the characteristics and patterns of software defects.
[0063] 3. Defect identification and detection
[0064] During the test execution process, the system inputs the test data and test results into the machine learning model in real time. The model automatically identifies and detects potential defects in the software based on the learned features and patterns. The system can identify various types of defects, such as functional defects, performance defects, security defects, etc.
[0065] 4. Defect classification and prioritization
[0066] The system also supports automatic classification and prioritization of detected defects. Based on the severity of the defects, the scope of impact and other factors, the system divides the defects into different levels and assigns a corresponding priority to each defect. This helps developers quickly locate and fix critical defects.
[0067] 3. Defect Report Generation Module
[0068] The defect report generation module automatically generates a detailed defect report based on the detection results of the artificial intelligence defect detection module.
[0069] 1. Report Content
[0070] The defect report includes information such as defect description, location, severity, classification, and repair suggestions. The report content is clear and concise, which makes it easy for developers to quickly understand and handle defects.
[0071] 2. Report Format
[0072] The system supports exporting and sharing defect reports in multiple formats, such as Word documents, PDF files, Excel tables, etc. Developers can choose the appropriate format for viewing and editing according to their needs.
[0073] 3. Report sharing
[0074] Defect reports can be displayed to users through a user-friendly interface and support online sharing and collaboration. Team members can view and discuss defect reports in real time through the system, improving team collaboration and communication efficiency.
[0075] The user interaction interface allows users to easily configure test plans, view test results and defect reports. The interface design is simple and intuitive, easy to operate and understand.
[0076] Users can set test parameters, select test scope, start test execution, etc. through the interface. At the same time, the interface also supports real-time display and monitoring of test results, so users can understand the progress and results of the test at any time.
[0077] This system can realize the automated execution of software testing processes and intelligent detection of defects, improve the efficiency and accuracy of software testing, reduce testing costs, and support continuous integration and continuous deployment.
[0078] The present invention has significant technical effects, which are mainly reflected in the following aspects:
[0079] Significant improvement in testing efficiency
[0080] Automated execution: The automated test execution module can automatically execute the test plan without manual intervention, greatly reducing the workload and time investment of testers. At the same time, the efficiency of test execution is further improved through the automatic generation and management of test scripts.
[0081] Parallel testing: The system supports parallel operation of multiple test environments and can execute multiple test cases at the same time, further shortening the test cycle.
[0082] Real-time feedback: During the test execution process, the system can collect and display the test results in real time, so that testers can understand the test progress and results in time and respond quickly.
[0083] Significant improvement in test accuracy
[0084] Intelligent Defect Detection: The AI defect detection module conducts in-depth analysis of test data and results through machine learning models, which can automatically identify and detect potential defects in the software, greatly improving the accuracy and comprehensiveness of the test.
[0085] Defect classification and prioritization: The system automatically classifies and prioritizes detected defects, helping developers quickly locate and fix key defects, further improving the effectiveness and pertinence of testing.
[0086] Significant reduction in testing costs
[0087] Reduced manpower investment: Automated test execution and intelligent defect detection reduce the requirements for the number and skills of testers and reduce manpower investment.
[0088] Reduce maintenance costs: Automatic generation and management of test scripts reduces the cost of writing and maintaining test scripts. At the same time, the system supports automated configuration and deployment of the test environment, reducing the maintenance cost of the test environment.
[0089] Support continuous integration and continuous deployment
[0090] Seamless integration: This system can be seamlessly integrated with continuous integration and continuous deployment processes to achieve rapid iteration and deployment of software development.
[0091] Timely feedback: Through real-time feedback of test results and defect reports, the system can provide developers with timely feedback and guidance, helping them quickly locate and fix problems and ensure the quality and stability of the software.
[0092] Optimizing user experience
[0093] Friendly user interface: The system provides a user-friendly interface that enables testers to easily configure test plans, view test results and defect reports.
[0094] Various report formats: The system supports the export and sharing of defect reports in various formats to meet the needs and habits of different users.
[0095] The present invention realizes functions such as automated test execution, intelligent defect detection, defect classification and priority sorting, significantly improves the efficiency and accuracy of software testing, reduces testing costs, and supports continuous integration and continuous deployment. At the same time, the system also provides a friendly user interaction interface and a variety of report formats to optimize the user experience.
[0096] In summary, the present invention provides an automated software testing and defect detection method and system based on artificial intelligence, which realizes the automated execution of software testing and intelligent detection of defects. Compared with traditional software testing methods, the present invention has the following advantages:
[0097] Improve test efficiency: Through the automated test execution module, the test process can be automatically executed, reducing manual intervention and test cycles, and improving test efficiency.
[0098] Improve test accuracy: The artificial intelligence defect detection module can realize automatic identification and detection of software defects, improving the accuracy and comprehensiveness of testing.
[0099] Reduce testing costs: Reduce testing costs by reducing the workload of manually writing and maintaining test scripts.
[0100] Support continuous integration and continuous deployment: The present invention can be seamlessly integrated with the continuous integration and continuous deployment processes to achieve rapid iteration and deployment of software development.
[0101] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An automated software testing and defect detection method based on artificial intelligence, characterized in that: The following steps are involved: S1: Initialize the test script; S2: The test script performs automatic testing on the software and performs real-time monitoring to obtain test results; S3: Defect detection using artificial intelligence defect detection module; S4: Generate defect report; S5: Optimize and iterate.
2. The method of automated software testing and defect detection based on artificial intelligence according to claim 1, characterized in that: The initialization test script includes: Environment configuration: First, build a test environment, which includes selecting a suitable operating system, configuring the database, and setting up the network environment; ensure that the test environment can simulate various situations in the actual production environment in order to conduct comprehensive testing; Dependency installation: Install the dependent tools required for testing, including automated testing tools, programming languages, and database connection tools. These tools will be used to write and execute test scripts.
3. The method of automated software testing and defect detection based on artificial intelligence according to claim 1, characterized in that: In step S2, the test script should cover all functional modules and performance requirements of the tested software to ensure the comprehensiveness of the test; when executing the test script, simulate user operations and record the test results; During the test execution, the stability of the test environment and resource usage are monitored in real time to ensure the smooth progress of the test.
4. The method of automated software testing and defect detection based on artificial intelligence according to claim 1, characterized in that: In step S3, the artificial intelligence defect detection module performs defect detection including the following steps: Data preprocessing: preprocess the test data and test results, including data cleaning, format conversion, and feature extraction; the preprocessed data will be used as input for the machine learning model; Model training: Use machine learning algorithms to train models so that computers can identify defective data. Model training uses a large amount of historical test data and defect data as input. Through continuous iteration and optimization, the model learns the characteristics and patterns of software defects. Defect detection: During the test execution process, the test data and test results are input into the trained model for defect detection; the model automatically identifies and detects potential defects in the software based on the learned features and patterns; Defect classification and prioritization: Automatically classify and prioritize detected defects; classify defects into different levels based on factors such as the severity of the defects and the scope of impact, and assign corresponding priorities to each defect.
5. The method of automated software testing and defect detection based on artificial intelligence according to claim 1, characterized in that: The step S4 specifically comprises: automatically generating a detailed defect report according to the detection results of the artificial intelligence defect detection module; and displaying the generated defect report to the user through the user interface.
6. The method of automated software testing and defect detection based on artificial intelligence according to claim 5, characterized in that: The report content includes information such as defect description, location, severity, classification, and repair suggestions.
7. The method of automated software testing and defect detection based on artificial intelligence according to claim 5, characterized in that: The step S4 also includes: sharing and collaborating on the defect report online; team members can view and discuss the defect report in real time, thereby improving team collaboration and communication efficiency.
8. The method of automated software testing and defect detection based on artificial intelligence according to claim 1, characterized in that: The step S5 comprises: Result feedback: Feedback test results and defect reports to developers to help them quickly locate and fix problems; at the same time, collect feedback from developers to continuously optimize and improve test processes and methods; Model update: Based on new test data and defect data, the machine learning model is continuously updated and optimized to improve the accuracy and efficiency of defect detection.
9. An automated software testing and defect detection system based on artificial intelligence, characterized in that: include: Automated test execution module, artificial intelligence defect detection module, defect report generation module, user interaction interface; Execute the artificial intelligence-based automated software testing and defect detection method described in any one of claims 1 to 8 to automatically test and detect the software.