Interface test display method and device and related equipment

By automating interface test demonstration methods in an agile development environment, the test cases are constructed and executed, and the problems of low testing efficiency and insufficient coverage in the existing technology are solved, and an efficient and flexible testing process is achieved, ensuring test quality and coverage are ensured. .

CN119149415APending Publication Date: 2024-12-17PING AN HEALTH INSURANCE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411187668.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing interface testing demonstration methods are difficult to achieve flexible and efficient testing in an agile development environment, and manual testing is prone to errors, unable to respond quickly to demand changes, and insufficient test coverage.

Method used

Provide an interface test display method, establish test tasks in the project management area by responding to user operations, obtaining and building a test case collection, generating a test plan, switching the test environment to execute test cases, and output test results, reducing human errors and improving test quality and coverage.

Benefits of technology

It realizes zero manual intervention in an agile development environment to complete the test process, improves testing efficiency and accuracy, meets rapidly changing testing needs, and ensures test flexibility and configurability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149415A_ABST
    Figure CN119149415A_ABST
Patent Text Reader

Abstract

The embodiment of the invention belongs to the field of system testing, and relates to an interface test display method, which comprises the following steps: in response to at least one linkage operation of a user on a to-be-tested system in a project management area, establishing a test task for the to-be-tested system; acquiring a test case set of a to-be-tested interface of the to-be-tested system according to the test task; and obtaining at least one test plan having a mapping relationship with the test case set, switching different test environments according to the test plan to execute the test cases in the test case set, and outputting a test result and displaying the test result in a scheduling management area. According to the method and the device, the efficiency of quickly responding to the demand change in an agile development mode is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of system testing, and in particular to an interface testing display method, device and related equipment. Background Art

[0002] In the existing interface test display methods, it is usually necessary to manually select and associate test cases, which is not only inefficient but also susceptible to human errors. Moreover, it is difficult to ensure test coverage with manual testing, and some important test scenarios may be missed. In addition, for example, in the software iteration process of the digital medical platform, the test needs to be re-executed after each update, and manual regression testing is more prone to errors. For example, if the API of the digital medical platform adds a new endpoint for processing drug prescriptions, it is necessary to regenerate test cases for the interface and adjust the test plan to include information such as attributes related to the test.

[0003] With the popularization of agile development models, software projects require rapid iteration and frequent releases. Existing test management platforms have been unable to adapt to such rapid changes.

[0004] To overcome these limitations, automated testing technology came into being. Automated testing can significantly improve testing efficiency, reduce human errors, and provide more comprehensive test coverage. However, existing automated testing tools and methods still have some shortcomings, especially in agile development environments, which require more flexible and efficient automated testing solutions.

[0005] In the agile development model, testing needs to respond quickly to changes in requirements and be closely integrated with the development process. This requires that the testing method should not only be automated, but also that the corresponding test system platform should be highly flexible and configurable to adapt to rapidly changing testing requirements. Summary of the invention

[0006] The purpose of the embodiments of the present application is to propose an interface test display method, device and related equipment to solve the problem that testing technology cannot be performed flexibly and efficiently in an agile development environment.

[0007] In order to solve the above technical problems, the present application embodiment provides an interface test display method, including:

[0008] In response to at least one linkage operation of the user on the system to be tested in the project management area, establishing a test task for the system to be tested;

[0009] Acquire a set of test cases for the interface to be tested of the system to be tested according to the test task;

[0010] At least one test plan having a mapping relationship with the test case set is obtained, so as to switch different test environments according to the test plan to execute the test cases in the test case set, and the output test results are displayed in the scheduling management area.

[0011] Furthermore, before responding to at least one linkage operation of the user on the system to be tested in the project management area, the method further includes:

[0012] Receiving a system name, module configuration, environment configuration and associated personnel information input by a user through the project management area to obtain a defined system to be tested;

[0013] Identifying at least one interface in the system to be tested;

[0014] Specifying interface attributes for each of the interfaces; wherein the interface attributes include specifying a name, a module, a request method, a parameter format, and an interface path;

[0015] The interface attributes are displayed in the interface management area.

[0016] Furthermore, after specifying interface attributes for each of the interfaces, the method further includes:

[0017] Build test cases for each interface;

[0018] The constructed test cases are assembled according to the project type to obtain a test case set.

[0019] Further, in response to at least one linkage operation of the user on the system to be tested in the project management area, establishing a test task for the system to be tested includes:

[0020] Identifying at least one interface to be tested in the system to be tested selected by the linkage operation;

[0021] Get a set of test cases that match the interface attributes to be tested.

[0022] Further, the obtaining at least one test plan having a mapping relationship with the test case set includes:

[0023] Obtaining the test purpose and test risk of the test case set;

[0024] Performing path analysis on each of the systems to be tested to determine the critical paths in the test cases;

[0025] Generate a test plan based on the critical path, test objectives, and test risks.

[0026] Further, generating a test plan according to the critical path, test purpose and test risk includes:

[0027] Based on the test purpose, the test case corresponding to the critical path is used as the first execution case in the test plan;

[0028] Corresponding backup test cases are specified according to the test risks.

[0029] Furthermore, the switching of different test environments according to the test plan to execute the test cases in the test case set and outputting the test results to be displayed in the scheduling management area further includes:

[0030] When the test result is success or failure, a test report corresponding to the test result is sent to the user; or,

[0031] If a regression test related to the test task is detected, the test result of the test case is used as the test result of the regression test.

[0032] Furthermore, in order to solve the above problems, the present application also provides an interface test display device, comprising:

[0033] A task response module, configured to respond to at least one linkage operation of a user on a system to be tested in a project management area, so as to establish a test task for the system to be tested;

[0034] A test case acquisition module, used to acquire a test case set of the interface to be tested with the system to be tested according to the test task;

[0035] A result display module is used to obtain at least one test plan having a mapping relationship with the test case set, switch different test environments according to the test plan to execute the test cases in the test case set, and output the test results to be displayed in the scheduling management area.

[0036] Furthermore, in order to solve the above technical problems, the embodiment of the present application also provides a computer device, which adopts the following technical solution:

[0037] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the following technical solution is implemented:

[0038] In response to at least one linkage operation of a user on a system to be tested in a project management area, establishing a test task for the system to be tested;

[0039] Acquire a set of test cases for the interface to be tested of the system to be tested according to the test task;

[0040] At least one test plan having a mapping relationship with the test case set is obtained, so as to switch different test environments according to the test plan to execute the test cases in the test case set, and the output test results are displayed in the scheduling management area.

[0041] Furthermore, in order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which computer-readable instructions are stored, and the computer-readable instructions are implemented when executed by a processor.

[0042] In response to at least one linkage operation of a user on a system to be tested in a project management area, establishing a test task for the system to be tested;

[0043] Acquire a set of test cases for the interface to be tested of the system to be tested according to the test task;

[0044] At least one test plan having a mapping relationship with the test case set is obtained, so as to switch different test environments according to the test plan to execute the test cases in the test case set, and the output test results are displayed in the scheduling management area.

[0045] Compared with the prior art, in this embodiment, the preparation efficiency of the test task is improved by automatically creating interface attributes. Moreover, the accuracy and relevance of the test case are ensured by accurately associating the interface attributes with the test case. In addition, the automated construction and sending of the test case reduces human errors, improves the test quality, and makes the test execution more orderly and convenient for monitoring and management. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0048] Figure 2 A flowchart of the interface test display method according to the present application;

[0049] Figure 3 is a flow chart of an embodiment of a method for generating a test plan in step 206;

[0050] Figure 4 It is a structural schematic diagram of an interface test display device;

[0051] Figure 5 is a structural schematic diagram of another embodiment of an interface test demonstration device;

[0052] Figure 6 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0054] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0055] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0056] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0057] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0058] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0059] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0060] It should be noted that the interface testing method provided in the embodiment of the present application is generally executed by a server / terminal device.

[0061] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0062] In order to clearly illustrate the technical implementation of this application, Figure 2 A schematic diagram of an exemplary structure of an embodiment of an interface test display method according to the present application is shown.

[0063] Because many companies are currently using agile development models, the general cycle is relatively short, with an iterative upgrade lasting from one week to two weeks. In such a short period of time, they must go through requirements review, design review, use case writing review, smoke test, system test, compatibility test, regression test, UAT test and other nodes; there may be urgent requirements in the middle, and uncertain factors such as late development and unstable external docking cause the tester's system testing time to be very tight. Sometimes, after all the requirements are tested and handed over to UAT testing, it is almost time for the version to be released. In this way, there is very little time for regression testing before release, and you can only click on the page to see the interface situation. Sometimes, you can't even have time for regression before preparing to release production. In this way, each iteration lacks a strong interface regression, which can easily cause serious production problems. Therefore, after the system test, a practical testing tool is urgently needed to complete the interface automation of the entire system in a very short time, dynamically switch the test environment, and generate reports. At the same time, it can automatically write back the R&D version regression plan use case execution.

[0064] Currently, many companies mostly use manual regression or code execution. Both have disadvantages. Manual regression takes up human resources time and is inefficient. Code construction requires professional automated test developers to perform regular maintenance, which is slow to get started and has a high threshold.

[0065] In one embodiment, the present application proposes an interface test display method to solve the above problems, so as to complete the test process with zero human intervention. The method can be seamlessly integrated with the existing agile development process to realize a highly automated, flexible and configurable interface test process, aiming to improve test efficiency, reduce the time and cost of regression testing, and ensure the accuracy and coverage of the test to meet the needs of agile development.

[0066] In one embodiment, the interface test display method provided by the present application includes:

[0067] Step 202, in response to at least one linkage operation of the user on the system to be tested in the project management area, establishing a test task for the system to be tested;

[0068] The interface test display method of this embodiment can be applied to a highly integrated software testing platform, which may include a project management area and a scheduling management area.

[0069] Optionally, the project management area is used to respond to the test user's operation of creating and managing test projects, including but not limited to basic information, participants, test objectives and test scope of the projects to be tested in the system to be tested.

[0070] Users can create and manage multiple systems to be tested through a graphical user interface (GUI). Each system to be tested can have multiple projects, and each project includes multiple interfaces to be tested. Interface properties need to be set for each interface, including the specified name, module, request method, parameter format, and interface path. In addition, the interface classification and environment configuration can also be included, such as switching between environments stg1 and stg2.

[0071] After the test information is created, the server may respond to the user's test task creation operation in the project management area.

[0072] Specifically, the test task is a test task request sent by a user to a server through a project management area and is sent by at least one interface to be tested of a certain project to be tested of the system to be tested.

[0073] Step 204, obtaining a test case set of the interface to be tested with the system to be tested according to the test task;

[0074] In one embodiment, after receiving the test task request, the server acquires a set of test cases matching the interface to be tested according to the test task.

[0075] Of course, in one embodiment, before obtaining a test case set, it is necessary to first create a test case set.

[0076] Specifically, test cases in different projects or the same project are combined to form a test set. A test set can be executed in different environments, and the execution results can be sent to users in the form of emails.

[0077] For example, create a test case collection named STORE, which includes a test case named "post banner" interface, and execute it in the stg1 environment.

[0078] Step 206, obtaining at least one test plan having a mapping relationship with the test case set, switching different test environments according to the test plan to execute the test cases in the test case set, and outputting the test results to be displayed in the scheduling management area.

[0079] The test plan can be mapped back to the manual user, that is, the test case, to achieve the combination of automated testing and manual testing.

[0080] Further, when the test result is success or failure, a test report corresponding to the test result is sent to the test user; or,

[0081] After the test result is output, if a regression test related to the test task is detected, the test result of the test case is used as the test result of the regression test.

[0082] In a specific case, for example, an automated test plan named EHIS-STROE1.0 is established, which contains the STORE set and is executed in the stg1 environment.

[0083] Before obtaining the test plan, it is also necessary to develop and adjust the test plan. The test plan can be generated based on the priority, dependencies and expected test time of the test cases, test risks, test objectives, and the critical path of the items to be tested.

[0084] Optionally, the test plan includes one or more of a resource utilization maximization test plan, a test time minimization test plan, or a test cost optimization test case.

[0085] Among them, maximizing resource utilization, minimizing test time, and optimizing test costs are the characteristics of test planning.

[0086] Specifically, the test plans are divided into three categories according to the maximization of resource utilization, minimization of test time, and optimization of test costs. The test plans that meet the corresponding characteristics are divided into these three categories as labels for the test plans to facilitate later selection. Users can select or automatically select test plans with different characteristics to execute the same test case in different environments. This can meet different test requirements and achieve different test goals, or when resources and environment do not allow, execute test cases in an achievable environment to meet the needs of variable testing.

[0087] Optionally, the test plan that minimizes the test time may be generated in the following manner:

[0088] Obtaining the test purpose and test risk of the test case set;

[0089] Perform path analysis on each of the items to be tested to determine the key paths in the test cases;

[0090] Generate a test plan based on the critical path, test objectives, and test risks.

[0091] Specifically, the critical path method model can be used to determine the critical path in the testing activity, that is, the longest path that affects the overall testing time, prioritize resource allocation, and make plans to shorten the testing time of the critical path.

[0092] like Figure 3 As shown, in one embodiment, optionally, in order to ensure the quality of key function tests and the overall stability of the system, the test cost optimization can also be achieved in the following ways in the formulation of the test plan:

[0093] Step 302, based on the test purpose, taking the test case corresponding to the critical path as the first execution case in the test plan;

[0094] Step 304: specify corresponding backup test cases according to the test risks.

[0095] Specifically, assume that the purpose of the test is to verify the core functional interfaces of the new version of the software, such as user login, data loading, and transaction processing.

[0096] First, identify the critical path by analyzing the software requirements and design documents, such as the entire process from user login to transaction completion. Then mark the test cases on the critical path as high priority and make them the first cases to be executed in the test plan, and output the execution results.

[0097] Then, a risk assessment is performed on each test case required for the interface testing of the project to identify risk factors that may lead to test failure or software defects. By prioritizing the execution of test cases corresponding to the critical path and ensuring the overall implementation of the core functions, the test plan greatly reduces the risk of increased costs caused by testing all interfaces.

[0098] For each test case on the critical path or the test case of the corresponding interface in the entire project, specify the corresponding backup test case based on the risk.

[0099] For example, create a test case for each function point on the critical path:

[0100] TC001-User login test case, TC002-Product browsing test case, TC003-Checkout process test case.

[0101] So, if TC001-User Login test has a database dependency risk, then the alternative test case TC001A-User Login alternative test case will not rely on the database, but use static data to verify the login logic.

[0102] That is, in the test plan, the test cases on the critical path are first arranged for execution, and then the execution of alternative test cases is arranged based on the results of risk assessment.

[0103] During execution, test cases on the critical path are tested and the test results are monitored. If the primary test case fails, switch to the corresponding backup test case immediately.

[0104] Furthermore, after execution, the test results can be analyzed to record the passing status of critical path test cases and the use of backup test cases, providing feedback for subsequent tests.

[0105] Through the above embodiments, the test plan can ensure that the testing of key functions is executed with priority, while reducing the test risk through alternative test cases and improving the flexibility and reliability of the test.

[0106] Furthermore, another embodiment of generating a test plan that maximizes resource utilization may be:

[0107] Identify the test type, test objectives and dependencies between the test cases in the test set; obtain test resources for each test case generated by an intelligent test model based on the test type and the test objectives, wherein the test resources include test time and test equipment; the intelligent test model can be a risk-driven model, which can allocate test resources based on the risk assessment of the software product or system.

[0108] Preferably, a machine learning algorithm may be used to implement the above method, thereby allocating resources more intelligently.

[0109] Among them, the test type, test objectives and dependencies between test cases of each test case are identified.

[0110] First, you need to determine whether the test case is a functional test, performance test, security test, or compatibility test. Each test type may require different testing resources and tools.

[0111] The above information is then input into the intelligent testing model along with the defined test objectives, where the test objectives can be to verify functional implementation, measure performance indicators, ensure security, check compatibility, or confirm that changes have not introduced new problems, etc.

[0112] Then evaluate or generate the technical expertise and tools required for the test cases based on the complexity of the predetermined test cases. Complex tests may require advanced skills and specialized tools.

[0113] Furthermore, in the method of generating test cases that maximize resource utilization, one of the improvements is that different priorities can be assigned to test cases based on test objectives and business impact. High-priority test cases may require more test resources, and test plans that meet the requirements of maximizing resource utilization can be formulated in turn.

[0114] Based on the above information, such as performance testing, ensuring safety, or test case priority, resource allocation strategies can be formulated, including:

[0115] Determine the required tools and test environment, determine the required test tools and test environment, and ensure their availability.

[0116] Determine optimal testing time: Allocate a reasonable amount of time to each test case, considering the complexity and dependencies of the tests.

[0117] Furthermore, in order to optimize resource usage and develop a test plan that maximizes resource utilization, resource usage can also be optimized through resource sharing, multitasking and resource pooling.

[0118] The specific implementation can be to analyze the test cases to ensure the dependencies between them and build a dependency graph. Use the dependency graph to visualize the relationship between test cases, which helps to identify which test cases can be executed in parallel and which must be executed in sequence. Then a detailed schedule can be made to allocate specific test time for each test case. Take into account the expected execution time of the test case and leave a buffer for possible delays. To ensure that the test plan meets one or more requirements of maximizing utilization, minimizing test time or optimizing test costs.

[0119] Of course, in order to reduce the overall test time and reduce the occupancy of test resources, optionally, test cases that can be executed in parallel can also be identified. Of course, this requires ensuring that there is no direct dependency between these test cases.

[0120] Furthermore, in order to identify factors that may affect the test progress, such as the availability of certain resources, a risk assessment can be performed on the generated test plan to identify factors that may affect the test progress. The test plan can then be adjusted based on the risk assessment results.

[0121] It should be noted that the same test plan may be classified as one or more of a resource utilization maximization test plan, a test time minimization test plan, or a test cost optimization test plan, and there is no absolute restriction here.

[0122] Furthermore, in one embodiment, during the test execution process, the test progress and test resource usage are continuously monitored, the status of calling test cases and test results are tracked, and the test plan is continuously optimized based on the feedback from the test execution.

[0123] For example, if you identify that some test cases are taking longer than expected to execute, or that resources are unevenly allocated, you can adjust the plan in a timely manner.

[0124] Of course, further, the test results are used to generate test reports, provide test progress to all relevant users, and adjust the test plan based on user feedback, such as uneven distribution of test resources.

[0125] Through the above methods, an efficient and flexible test plan can be created to adapt to changing needs, while ensuring the best use of test resources, with the characteristics of minimizing test time and optimizing test costs.

[0126] Optionally, if the test plan is a test plan that optimizes test costs, the test cases can be sorted according to their priorities, and high-priority cases are first arranged in the test plan. Then, the test resources are allocated according to the estimated time and required test cases to ensure that key resources are allocated to high-priority test cases first.

[0127] Furthermore, in order to avoid risks that may be encountered during the testing process, additional resources and time can be allocated to high-risk test cases.

[0128] All of the above can serve as a test plan to execute test cases accordingly.

[0129] Furthermore, in order to prevent the main test resources from being unavailable, alternative test plans can also be developed for key test cases.

[0130] Specifically, in test execution, test case dependencies, test time, and priority are key factors that affect the order of test execution, test resource allocation, and the accuracy of test results.

[0131] The dependency of test cases can be that some test cases may depend on the execution results of other test cases. For example, if there is a test case that verifies the function of the user after logging in, it may depend on another test case that verifies the user registration function.

[0132] For example, test case A (user registration) must be executed before test case B (user login) because users need to register before they can log in.

[0133] Optionally, test time refers to the estimated time required to complete a single test case. This helps to properly arrange the execution sequence of test cases and allocate test resources in the test plan.

[0134] For example, test case C (search functionality testing) is expected to take 10 minutes to execute, while test case D (database backup and recovery testing) may take 30 minutes.

[0135] Optionally, the test cases are prioritized based on the importance of the test cases and the degree of impact on the system. High priority test cases are usually executed early in the testing cycle.

[0136] For example, test case E (payment function testing) has a high priority because it directly affects the user's transaction experience and the company's revenue. Test case F (font size adjustment on the user settings page) may be a low priority because it does not affect the core functionality.

[0137] In actual operation, these factors can be integrated and applied in the following ways: Set dependencies for each test case, and then automatically arrange the execution order of the test cases according to these dependencies to generate corresponding test plans, such as test cost optimization test plans.

[0138] Specifically, when creating test cases, you can obtain the estimated execution time entered by the tester for each test case. This helps to make more accurate time planning.

[0139] In addition, test cases can be marked as high, medium, or low priority based on their importance to sort the test cases according to priority, ensuring that the key functions of the project interface are verified first.

[0140] In this way, testing efforts can be organized and executed more efficiently, ensuring that critical functionality is adequately tested while optimizing the use of testing resources.

[0141] Specifically, the generation of the test plan is explained using a digital medical scenario as an example: a digital medical platform provides functions such as online appointments, electronic medical record management, remote diagnosis, and drug delivery. Its interface needs to be tested. The information of the interface, the requirement document, the test purpose, etc. are input into the model, such as a large language model.

[0142] The model first uses NLP technology to parse the received documents and extract key information, such as "online appointment", "electronic medical record", "remote diagnosis", etc. Then it identifies the various functional modules of the digital medical platform and the corresponding API endpoints, such as / api / appointments for online appointments. Identify the test points of each API endpoint, for example, at the / api / appointments endpoint, the test points may include appointment creation, query, modification, and cancellation.

[0143] The model can receive test cases input by the user, or test cases generated according to the requirements document, test purpose, etc., and generate test cases for each test point of each interface, for example, including request parameters, request method, expected response and status code. For example, the test case for creating an appointment may require parameters such as patient_id, doctor_id, appointment_time.

[0144] Then, through the identified critical path, for example, the user completes the appointment through the normal process. And prioritize the test cases corresponding to the critical path to ensure that the test case is executed first; and allocate test resources to each test case, including testers, test tools and test time.

[0145] Furthermore, it will be set in the test plan: collect feedback during the test execution, such as API response time, error rate, etc., to adjust subsequent test plans.

[0146] For example, if the digital health platform’s API has an endpoint:

[0147] / api / prescriptions is used to process drug prescriptions. The test plan generated by the model may include the following test cases:

[0148] Test case ID: TC001

[0149] Test case description: Verify that the doctor can successfully create a medication prescription.

[0150] Prerequisites: The doctor has logged into the system and the patient exists.

[0151] Test steps:

[0152] Send a POST request to / api / prescriptions.

[0153] The request body includes parameters such as patient_id, medication, and dosage.

[0154] Expected result: The system returns a 201 status code, indicating that the prescription was created successfully, and returns the prescription details.

[0155] Actual result: (fill in after test execution)

[0156] Status: Pending testing.

[0157] In this way, the model can generate detailed test plans for each function and API endpoint of the digital health business to ensure that software quality and business requirements are met. And the test plan can be adjusted according to different testing requirements.

[0158] In one embodiment, when creating a test task, interface attribute information is first created according to different project types of the system to be tested, so as to construct test cases according to different interface attributes.

[0159] The interface attribute information includes interface name, region, request method, parameter format, path, etc.

[0160] For example, the detailed configuration of an interface attribute can be:

[0161] For the EHIS-STROE project, you also need to create an interface attribute named "listing banner", the request method is POST, the parameter format is JSON, and the path is:

[0162] / operate / updateBannerConfigStatus.do.

[0163] Among them, banner is a banner advertisement displayed at the bottom or top of the software interface.

[0164] Then, associate the interface attributes with the test case:

[0165] Create specific test cases based on interface attributes. These test cases include case type, label, precondition, request parameter, parameter verification, association and assertion, etc. Here is just an example description, for example:

[0166] For example, build a positive test case based on the "post banner" interface, or receive a test case uploaded by a user, mark it as a regression test, and set the preconditions:

[0167] Such as database status;

[0168] Request header is cookie:

[0169] JSESSIONID=4BD3F7D91FC3F60D257880A5A12, assertion response code is 0.

[0170] Furthermore, after the test cases are built, you can also integrate the test cases, specifically, the project types, such as test cases corresponding to different interfaces under the same project, and test cases corresponding to the same interface under different projects. This way, the test cases can be organized into sets to facilitate subsequent test plan management and execution.

[0171] Then, the test cases can also be allocated to different test case sets according to the historical test plan as a test case series set, so as to execute the test cases in these test case series sets in an appropriate test environment.

[0172] These are two ways to assemble test cases, one is according to the project, and the other is according to the historical test plan. These greatly facilitate the management and execution of test cases and improve test efficiency.

[0173] When the test cases are grouped by project type, it is necessary to first identify and define different project types, assemble the test cases by project type, and generate a test collection.

[0174] Specifically, the project type can be based on a variety of factors, such as business field, technology stack, product features, etc.

[0175] These test cases may include different types of tests such as functional testing, performance testing, security testing, etc. Each test case has its attributes, such as case ID, description, preconditions, test steps, expected results, actual results, priority, and tags, etc. According to the project type, select relevant test cases for assembly.

[0176] For example, if the project type is e-commerce, you may need to assemble test cases related to interfaces such as shopping cart, payment, order processing, etc. Finally, combine the assembled test cases into a test collection. This collection is a group of logically related test cases that can be executed together to verify a specific function or business process.

[0177] In this embodiment, the efficiency of preparing test tasks is improved by automatically creating interface attributes. Moreover, the accuracy and relevance of test cases are ensured by accurately associating interface attributes with test cases. In addition, the automated construction and sending of test cases reduces human errors, improves test quality, and makes test execution more orderly and easy to monitor and manage.

[0178] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0179] In addition, in order to solve the technical problems in the prior art, such as Figure 4 As shown, the present application also proposes an interface test display device, comprising:

[0180] A task response module 402, configured to respond to at least one linkage operation of a user on a system to be tested in a project management area to establish a test task for the system to be tested;

[0181] A test case acquisition module 404 is used to acquire a test case set of the interface to be tested with the system to be tested according to the test task;

[0182] The result display module 406 is used to obtain at least one test plan having a mapping relationship with the test case set, so as to switch different test environments according to the test plan to execute the test cases in the test case set, and output the test results to be displayed in the scheduling management area.

[0183] See also Figure 5 Furthermore, in one embodiment, the interface test display device further includes:

[0184] The system configuration module 502 is used to receive the system name, module configuration, environment configuration and associated personnel information input by the user through the project management area to obtain the defined system to be tested;

[0185] An interface identification module 504, used to identify at least one interface in the system to be tested;

[0186] The attribute determination module 506 is used to specify interface attributes for each of the interfaces; wherein the interface attributes include a specified name, a module to which it belongs, a request method, a parameter format, and an interface path;

[0187] The information display module 508 is used to display the attributes of each interface in the interface management area.

[0188] Furthermore, the interface test demonstration device also includes:

[0189] Use case building module, used to build test cases for each interface;

[0190] The use case assembly module is used to assemble the constructed test cases according to the project type to obtain a test case set.

[0191] Furthermore, the task response module 402 includes:

[0192] An interface identification submodule, used to identify at least one interface to be tested in the system to be tested selected by the linkage operation;

[0193] The set acquisition submodule is used to acquire a set of test cases that match the interface attributes to be tested.

[0194] Furthermore, before the result display module 406, it also includes:

[0195] A test case acquisition submodule, used to acquire the test purpose and test risk of the test case set;

[0196] A path identification submodule is used to perform path analysis on each of the items to be tested and determine the key path in the test case;

[0197] The plan generation submodule is used to generate a test plan according to the critical path, test objectives and test risks.

[0198] Furthermore, the plan generation submodule includes:

[0199] A first plan generating unit is used to take the test case corresponding to the critical path as the first execution case in the test plan based on the test purpose;

[0200] The second plan generating unit is used to specify corresponding backup test cases according to the test risks.

[0201] Furthermore, the interface test demonstration device also includes:

[0202] A first feedback module is used to send a test report corresponding to the test result to a user when the test result is success or failure; or

[0203] The second feedback module is used to use the test result of the test case as the test result of the regression test if a regression test related to the test task is detected.

[0204] Compared with the prior art, in this embodiment, the preparation efficiency of the test task is improved by automatically creating interface attributes. Moreover, the accuracy and relevance of the test case are ensured by accurately associating the interface with the test case. In addition, the automated construction and sending of the test case reduces human errors, improves the test quality, and makes the test execution more orderly and convenient for monitoring and management.

[0205] The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium may be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0206] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0207] To solve the above technical problems, the present application also provides a computer device. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.

[0208] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 6 with components 61-63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0209] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0210] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the interface test method, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.

[0211] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run computer-readable instructions stored in the memory 61 or process data, such as computer-readable instructions for running the interface testing method.

[0212] The network interface 63 may include a wireless network interface or a wired network interface. The network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.

[0213] Compared with the prior art, in this embodiment, the preparation efficiency of the test task is improved by automatically creating interface attributes. Moreover, the accuracy and relevance of the test case are ensured by accurately associating the interface attributes with the test case. In addition, the automated construction and sending of the test case reduces human errors, improves the test quality, and makes the test execution more orderly and convenient for monitoring and management.

[0214] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the interface testing method as described above.

[0215] Compared with the prior art, in this embodiment, the preparation efficiency of the test task is improved by automatically creating interface attributes. Moreover, the accuracy and relevance of the test case are ensured by accurately associating the interface attributes with the test case. In addition, the automated construction and sending of the test case reduces human errors, improves the test quality, and makes the test execution more orderly and convenient for monitoring and management.

[0216] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0217] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. An interface test display method, characterized in that: include: In response to at least one linkage operation of a user on a system to be tested in a project management area, establishing a test task for the system to be tested; Acquire a set of test cases for the interface to be tested of the system to be tested according to the test task; At least one test plan having a mapping relationship with the test case set is obtained, so as to switch different test environments according to the test plan to execute the test cases in the test case set, and the output test results are displayed in the scheduling management area.

2. The method according to claim 1, characterized in that Before responding to at least one linkage operation of the user on the system to be tested in the project management area, the method further includes: Receiving a system name, module configuration, environment configuration and associated personnel information input by a user through the project management area to obtain a defined system to be tested; Identifying at least one interface in the system to be tested; Specifying interface attributes for each of the interfaces; wherein the interface attributes include specifying a name, a module, a request method, a parameter format, and an interface path; The attributes of each interface are displayed in the interface management area.

3. The method according to claim 2, characterized in that After specifying interface attributes for each of the interfaces, the method further includes: Build test cases for each interface; The constructed test cases are assembled according to the project type to obtain a test case set.

4. The method according to claim 1, characterized in that: The step of responding to at least one linkage operation of the system to be tested by the user in the project management area to establish a test task for the system to be tested includes: Identifying at least one interface to be tested in the system to be tested selected by the linkage operation; Get a set of test cases that match the interface attributes to be tested.

5. The method according to claim 1, characterized in that The obtaining of at least one test plan having a mapping relationship with the test case set includes: Obtaining the test purpose and test risk of the test case set; Performing path analysis on each of the systems to be tested to determine the critical paths in the test cases; Generate a test plan based on the critical path, test objectives, and test risks.

6. The method according to claim 5, characterized in that Generating a test plan according to the critical path, test purpose and test risk includes: Based on the test purpose, the test case corresponding to the critical path is used as the first execution case in the test plan; Corresponding backup test cases are specified according to the test risks.

7. An interface test display device, characterized in that: The interface test display device comprises: A task response module, configured to respond to at least one linkage operation of a user on a system to be tested in a project management area, so as to establish a test task for the system to be tested; A test case acquisition module, used to acquire a test case set of the interface to be tested with the system to be tested according to the test task; A result display module is used to obtain at least one test plan having a mapping relationship with the test case set, switch different test environments according to the test plan to execute the test cases in the test case set, and output the test results to be displayed in the scheduling management area.

8. The device according to claim 7, characterized in that Before the task response module, it also includes: The system configuration module is used to receive the system name, module configuration, environment configuration and associated personnel information input by the user through the project management area to obtain the defined system to be tested; An interface identification module, used to identify at least one interface in the system to be tested; An attribute determination module, used to specify interface attributes for each of the interfaces; wherein the interface attributes include a specified name, a module to which it belongs, a request method, a parameter format, and an interface path; The information display module is used to display the attributes of each interface in the interface management area.

9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the interface test display method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the interface test display method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Embedded device dynamic test method and system

    CN121935148A

  • A method and system for dynamic testing of embedded devices

    CN121935148B