Interface testing method and device and storage medium
Through the automatic verification and simulation of response data of the agent, the problem of low testing efficiency of traditional interfaces is solved, automated testing is realized, and testing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510201150.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-05-13
AI Technical Summary
Traditional interface testing processes rely on manual operations and customized scripting, which are inefficient and require a lot of human resources.
The output data of the interface to be tested is automatically verified by the agent, and the response data is generated based on the preset knowledge base to simulate user behavior to generate the response data to realize the automated test process.
Reduces time to manually write and execute test cases, reduces tester workload, and improves interface test efficiency and accuracy of test results.
Smart Images

Figure CN119988235A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of Internet technology, and in particular to an interface testing method, device and storage medium. Background Art
[0002] In modern software development, interface testing is one of the key steps to ensure software quality and stability. Interface testing mainly verifies whether the behavior of the interface under different input conditions meets expectations, that is, whether the interface request can be successfully processed and return the correct response result. Through interface testing, defects in the system can be discovered and repaired in a timely manner to ensure system reliability and user experience.
[0003] Traditional testing processes usually rely on manual operations and customized script writing. Testers need to manually sort out test requirements and design detailed test cases based on these requirements. Based on these test cases and the interface design documents, testers write special interface test scripts to simulate various usage scenarios and verify whether the interface behavior meets expectations. However, writing, debugging, and maintaining a large number of test scripts not only consumes a lot of human resources, but also relies on manual operations in every link from requirements analysis to script writing, which is inefficient. Summary of the invention
[0004] In order to solve the above problems, the embodiments of the present invention provide an interface testing method, device and storage medium, which are used to automatically test the test interface.
[0005] In a first aspect, an embodiment of the present invention provides an interface testing method, the method comprising:
[0006] Obtain input parameters corresponding to each of the multiple test tasks in the test scenario, wherein the input parameters are used to trigger the interface to be tested to perform a specific function;
[0007] According to the test execution order of the multiple test tasks, a first input parameter of the current test task to be executed and first response data generated in a previous test task are obtained, wherein the first response data is generated by the first agent based on first output data output by the interface to be tested in the previous test task, and the first output data is determined by calling the interface to be tested and using a second input parameter in the previous test task;
[0008] Merging the first input parameter and the first response data to obtain merged input data;
[0009] Inputting the combined input data into the interface to be tested to obtain second output data corresponding to the current test task to be executed;
[0010] In response to the first agent successfully verifying the second output data, driving the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data;
[0011] Based on the verification results of the output data corresponding to each of the multiple test tasks determined by the first agent, a test result corresponding to the scenario to be tested is generated.
[0012] In a second aspect, an embodiment of the present invention provides an interface testing device, the device comprising:
[0013] A first acquisition module is used to acquire input parameters corresponding to each of a plurality of test tasks in a test scenario, wherein the input parameters are used to trigger the test interface to execute a specific function;
[0014] A second acquisition module is used to acquire, according to the test execution order of the multiple test tasks, a first input parameter of the current test task to be executed and first response data generated in a previous test task, wherein the first response data is generated by the first agent based on first output data output by the interface to be tested in the previous test task, and the first output data is determined by calling the interface to be tested and using the second input parameter in the previous test task;
[0015] A merging module, used for merging the first input parameter and the first response data to obtain merged input data;
[0016] An input module, used for inputting the combined input data into the interface to be tested to obtain second output data corresponding to the current test task to be executed;
[0017] a verification module, configured to drive the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data in response to successful verification of the second output data by the first agent;
[0018] A generation module is used to generate a test result corresponding to the scenario to be tested based on the verification results of the output data corresponding to each of the multiple test tasks determined by the first intelligent agent.
[0019] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the interface testing method described in the first aspect.
[0020] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the interface testing method described in the first aspect.
[0021] In a fifth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the interface testing method as described in the first aspect can be implemented.
[0022] In an embodiment of the present invention, input parameters corresponding to each of the multiple test tasks in the scene to be tested are obtained, and the input parameters are used to trigger the interface to be tested to perform a specific function. The test tasks are respectively executed based on the input parameters corresponding to each test task to test the functions and performance corresponding to the interface to be tested in the scene to be tested. For any of the test tasks: first, according to the test execution order of the multiple test tasks, the first input parameter of the current test task to be executed and the first response data generated in the previous test task are obtained, and the first response data is generated by the first agent based on the first output data output by the interface to be tested in the previous test task, and the first output data is determined by calling the interface to be tested and using the second input parameter in the previous test task. Then, the first input parameter and the first response data are merged to obtain the merged input data, and the merged input data is input into the interface to be tested to obtain the second output data corresponding to the current test task to be executed. Then, in response to the successful verification of the second output data by the first agent, the first agent is driven to simulate user behavior based on a preset knowledge base to generate a second response data corresponding to the second output data. Finally, based on the verification results of the output data corresponding to each of the multiple test tasks in the scenario to be tested determined by the first intelligent agent, a test result corresponding to the scenario to be tested is generated.
[0023] The above technical solution, by using an intelligent agent to automatically verify whether the output data of the interface to be tested meets the expected requirements, to determine whether the function of the interface to be tested is normal, and to generate response data simulating user behavior based on a preset knowledge base, to further verify the interactive logic of the interface, realizes an automated testing process, can reduce the time of manually writing and executing test cases, reduce the workload of testers, and improve the testing efficiency of interface testing. In addition, by merging the response data of the previous test task with the input parameters of the current test task, the continuity of actual user operations can be simulated, the authenticity of the test scenario is improved, and the test is closer to the actual usage, thereby improving the accuracy of the test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A flowchart of an interface testing method provided by an embodiment of the present invention;
[0026] Figure 2 A schematic diagram of a process for obtaining input parameters corresponding to multiple tasks to be tested in a scene to be tested provided by an embodiment of the present invention;
[0027] Figure 3 A flowchart of another interface testing method provided by an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of an application of an interface testing method provided by an embodiment of the present invention;
[0029] Figure 5 A schematic diagram of the structure of an interface testing device provided by an embodiment of the present invention;
[0030] Figure 6 For Figure 5 A schematic structural diagram of an electronic device corresponding to an interface testing method provided in the embodiment. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.
[0033] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.
[0034] In the current field of software development and testing, especially in the development process of AI interview systems, efficient and comprehensive testing of AI interview interfaces is a key step to ensure system stability and reliability. Through interface testing, defects in the system can be discovered and repaired in a timely manner, ensuring system reliability and user experience.
[0035] The TestNG framework is usually used to automate the testing of AI interview interfaces. However, this testing solution requires manual writing of test cases and test scripts so that during the test process, the test framework automatically sends requests to the AI interview interface and uses manually written assertion statements to verify whether the interface response meets expectations. It mainly relies on manual operations and has low efficiency. In addition, with the continuous iteration of the AI interview system and the continuous introduction of new functions, the input data of the AI interview interface also needs to be continuously updated to adapt to new testing requirements. Using the above solution requires rewriting test cases, test scripts, assertion statements, etc., and the update efficiency is low.
[0036] In order to solve the above technical problems, an embodiment of the present invention proposes a new interface testing method. When testing the interface to be tested, an intelligent agent is used to verify whether the output of the interface to be tested meets expectations, and an intelligent agent is used to simulate user behavior to interact with the interface to be tested to reproduce the real interaction process, so as to test the function and performance of the interface to be tested in advance. This not only realizes automated testing, but also improves the accuracy of the test results.
[0037] The following is a detailed description of the technical solutions provided by various embodiments of the present invention in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and features in the embodiments can be combined with each other.
[0038] The interface testing method provided in the embodiment of the present invention can be performed by an electronic device, which can be a terminal device such as a PC, a laptop, a smart phone, or a server. The server can be a physical server including an independent host, or a virtual server, or a server or server cluster in the cloud.
[0039] Figure 1 A flow chart of an interface testing method provided by an embodiment of the present invention is as follows: Figure 1 As shown, the method comprises the following steps:
[0040] 101. Obtain input parameters corresponding to each of the multiple test tasks in the test scenario, where the input parameters are used to trigger the test interface to execute a specific function.
[0041] 102. According to the test execution order of multiple test tasks, obtain the first input parameter of the current test task to be executed and the first response data generated in the previous test task, where the first response data is generated by the first agent based on the first output data output by the interface to be tested in the previous test task.
[0042] 103. Combine the first input parameter and the first response data to obtain combined input data.
[0043] 104. Input the combined input data into the interface to be tested to obtain second output data corresponding to the current test task to be executed.
[0044] 105. In response to successful verification of the second output data by the first agent, drive the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data.
[0045] 106. Based on the verification results of the output data corresponding to each of the multiple test tasks determined by the first intelligent agent, generate a test result corresponding to the scenario to be tested.
[0046] The key to interface testing is to verify whether the behavior of the interface under different input conditions is in line with expectations, that is, whether the interface request can be successfully processed and return the correct response result. Through interface testing, defects in the system can be discovered and repaired in a timely manner to ensure system reliability and user experience.
[0047] In order to verify whether the behavior of the interface to be tested meets expectations under different input conditions corresponding to the test scenario, an intelligent agent can be used to verify whether the output data fed back by the interface to be tested for different input data meets expectations, so as to realize automatic testing of the interface to be tested. In addition, when the output data fed back by the interface to be tested meets expectations, the intelligent agent is driven to simulate user behavior and continue to interact with the interface to be tested to generate response data corresponding to the output data, further verify the interaction logic of the interface, make the test closer to the actual usage, and thus improve the accuracy of the test results.
[0048] The following is a detailed description of the above interface test implementation process:
[0049] 101: Obtain input parameters corresponding to each of the multiple test tasks in the test scenario, where the input parameters are used to trigger the interface to be tested to execute a specific function.
[0050] The test scenarios mentioned here can be understood as the test scenarios corresponding to the test of the interface to be tested. The test scenario refers to a collection of operation steps designed to verify whether the interface to be tested works as expected under various conditions. For example, when the interface to be tested is an AI interview interface, the test scenarios can be user identity authentication scenarios, various dialogue scenarios for interviews with AI interviewers, etc.
[0051] Continuing with the above example, suppose that in order to verify whether the AI interview function corresponding to the AI interview interface is normal, a request is initiated by transmitting input data to the AI interview interface to call the AI interview interface to conduct an interview with the AI interviewer. Since the interview process usually includes multiple rounds of questions and answers, when testing the AI interview interface, it is necessary to test whether the output data fed back by the AI interview interface in each round of dialogue in the current corresponding test dialogue scenario meets expectations. Each execution of the verification process can be called a test task. That is, in a dialogue scenario to be tested, it usually includes multiple test tasks. Then when testing the AI interview interface, the input parameters corresponding to each of the multiple test tasks in the dialogue scenario to be tested can be obtained.
[0052] Among them, the input parameters can be data items that need to be passed when calling the interface to be tested, and the output parameters can be one data or multiple data, without limitation. For example, when the interface to be tested is an AI interview interface, the input parameters can be the operation entry, user identity, and question response information. Alternatively, when the interface to be tested is an interface for querying the weather, when the user calls the interface for querying the weather, the city name and date need to be passed in as input parameters so that the interface can return the corresponding weather data. At this time, the city name and date are the corresponding input parameters.
[0053] In addition, the input parameters of the interface to be tested can control the logical branches executed by the interface to be tested. The interface to be tested can execute the corresponding branch logic according to the input parameters and determine the final result returned. When testing the interface to be tested, multiple input parameters corresponding to each test scenario can be pre-designed to determine the execution flow corresponding to the interface to be tested and test whether the execution flow corresponding to the interface to be tested meets expectations.
[0054] 102. According to the test execution order of multiple test tasks, obtain the first input parameter of the current test task to be executed and the first response data generated in the previous test task, where the first response data is generated by the first agent based on the first output data output by the interface to be tested in the previous test task.
[0055] Each scenario to be tested includes multiple test tasks, and the test execution order corresponding to the multiple test tasks can be determined in sequence according to the input order of the input parameters. Then, when testing the interface to be tested, the output data fed back by the interface to be tested for each input parameter can be verified in sequence according to the test execution order corresponding to the multiple test tasks.
[0056] Among them, the execution process of each task to be tested is roughly the same, and only the specific test process of the current test task to be executed is described in detail here. When executing the current test task to be executed in the test scenario, you can first obtain the first input parameter of the current test task to be executed and the first response data generated in the previous test task according to the test execution order of multiple test tasks.
[0057] The first response data is generated by the first agent based on the first output data output by the interface to be tested in the previous test task. The first output data is determined by calling the interface to be tested and using the second input parameter in the previous test task.
[0058] In actual applications, each round of interaction in a dialogue scenario is carried out in a certain logical order, and the content of the previous round of dialogue may affect the content of the next round. In order to better simulate the real interaction process, when determining the input data corresponding to the current task to be tested, the input data input to the interface to be tested in the current task to be tested can be determined based on the first response data generated by the first agent in the previous test task and the preset first input parameter.
[0059] 103. Combine the first input parameter and the first response data to obtain combined input data.
[0060] After obtaining the first response data generated by the first agent in the previous test task and the preset first input parameter, the first input parameter and the first response data are merged to obtain merged input data.
[0061] For example, when the interface to be tested is an AI interview room interface, the input parameters include operation entry information, user identity identification, and user question and answer information. The first output data includes the first interviewer question output by the AI interview interface in the previous test task, and the first response data includes the first reply information generated by the first intelligent agent in the previous test task to the first interviewer question.
[0062] Among them, the specific implementation process of merging the first input parameter and the first response data to obtain the merged input data can be: merging the user question and answer information corresponding to the current test task to be executed and the first reply information generated by the first intelligent agent in the previous test task to the first interviewer's question to obtain the merged user question and answer information; based on the operation entry information, user identity information, and merged user question and answer information corresponding to the current test task to be executed, the merged input data is generated.
[0063] Optionally, the first input parameter and the first response data may be merged to obtain merged input data. For example, the first input parameter includes user question and answer information, and the first response data includes reply information generated in response to the interviewer's question. The preset user question and answer information and the generated reply information may be merged to obtain merged user question and answer content.
[0064] From the above description, it can be seen that by merging the response data of the previous test task with the input parameters of the current test task, the continuity of actual user operations can be simulated, the authenticity of the test scenario is improved, the test is closer to actual usage, and the accuracy of the test results is improved.
[0065] 104. Input the combined input data into the interface to be tested to obtain second output data corresponding to the current test task to be executed.
[0066] When processing a test task for the interface to be tested, the merged input data can be input into the interface to be tested to simulate a user calling the interface to be tested to perform corresponding processing, so as to obtain second output data corresponding to the current task to be tested fed back by the interface to be tested.
[0067] Continuing with the above example, the merged input data is input into the AI interview interface to call the AI interview interface to obtain the second interviewer's questions corresponding to the merged input data.
[0068] 105. In response to successful verification of the second output data by the first agent, drive the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data.
[0069] After obtaining the second output data fed back by the interface to be tested for the corresponding input data in the current task to be tested, the first agent can be used to verify whether the second output data fed back by the interface to be tested meets the expected result.
[0070] After obtaining the interviewer's questions fed back by the AI interview interface, the first intelligent agent is used to verify the interviewer's questions. If the verification is successful, the verification success information can be output. When the verification success information sent by the first intelligent agent is received, in response to the successful verification of the interviewer's questions by the first intelligent agent, the first intelligent agent is driven to simulate user behavior based on a preset knowledge base to generate reply information corresponding to the interviewer's questions.
[0071] Optionally, in response to successful verification of the second output data by the first agent, the specific implementation process of driving the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data can be: based on the second interviewer's question and a third preset prompt word template, generate a third prompt instruction, the third prompt instruction is used to instruct to check whether the second interviewer's question is the expected interview question; input the third prompt instruction into the first agent, so that after the first agent checks that the second interviewer's question is the expected interview question, the first agent uses the preset knowledge base to retrieve a question-answer pair that matches the second interviewer's question, and generates second reply information corresponding to the second interviewer's question based on the question-answer pair.
[0072] That is, when the first agent verifies that the second output data meets the expected result, the first agent can be driven to generate reply information corresponding to the first output data based on the preset knowledge base. Then, the next test task can be executed based on the reply information generated by the first agent and the input parameters corresponding to the next test task.
[0073] 106. Based on the verification results of the output data corresponding to each of the multiple test tasks determined by the first intelligent agent, generate a test result corresponding to the scenario to be tested.
[0074] Each test task will obtain the verification result of the output data fed back by the first agent for the interface to be tested. When all test tasks are completed, the test result corresponding to the current scene to be tested can be determined based on the verification results corresponding to all test tasks. If the verification result corresponding to each test task is successful, the test result of the current scene to be tested can be determined to be successful.
[0075] Optionally, after the first agent fails to verify the second output data, the first agent can be further used to analyze the failure result to determine the cause of the failure. Specifically, in response to the failure of the first agent to verify the second output data, the first agent is driven to analyze the second output data to determine the abnormal information corresponding to the interface to be tested.
[0076] After determining the exception information corresponding to the interface to be tested, the exception information may be sent to the corresponding developer so that the developer can adjust the corresponding execution code or timely adjust the multiple input parameters corresponding to the scenario to be tested.
[0077] In summary, the embodiment of the present invention can automatically verify whether the output data of the interface to be tested meets the expected requirements by using an intelligent agent to determine whether the function of the interface to be tested is normal, and generate response data simulating user behavior based on a preset knowledge base to further verify the interactive logic of the interface, thereby realizing an automated testing process, reducing the time for manually writing and executing test cases, reducing the workload of testers, and improving the test efficiency of interface testing. In addition, by merging the response data of the previous test task with the input parameters of the current test task, the continuity of actual user operations can be simulated, the authenticity of the test scenario is improved, and the test is closer to actual usage, thereby improving the accuracy of the test results.
[0078] The acquisition of input parameters corresponding to the plurality of tasks to be tested in the scenario to be tested in the above embodiment is described in detail.
[0079] Figure 2 A schematic diagram of a process for obtaining input parameters corresponding to multiple tasks to be tested in a test scenario provided by an embodiment of the present invention, such as Figure 2 As shown, the method comprises the following steps:
[0080] 201. Determine a target scene identifier corresponding to the scene to be tested.
[0081] 202. Filter out multiple input parameters that match the target scene identifier from the preset parameter set.
[0082] 203. Sort the multiple input parameters according to a preset question-and-answer sequence corresponding to the scenario to be tested to determine a test execution sequence of the multiple input parameters.
[0083] 204. According to the test execution order of the multiple input parameters, corresponding input parameters are sequentially allocated to each test task in the scenario to be tested.
[0084] In order to better test whether the behavior of the interface to be tested in each test scenario under different input conditions meets expectations, a test data set can be designed in advance, and the test data set includes multiple test cases. Based on the designed test cases, multiple input parameters corresponding to each test scenario are determined.
[0085] Specifically, for the scenario to be tested, a requirement text corresponding to the scenario to be tested is generated, and the requirement text is input into a pre-trained test case generation model to generate a test case corresponding to the requirement text. Based on the test case, multiple input parameters corresponding to the scenario to be tested are determined, and the multiple input parameters are stored in a preset parameter set.
[0086] Among them, the requirement documents corresponding to the system to be tested can be collected. These documents should describe the system functions, business logic and user interactions in detail. And prepare corresponding test cases as annotation data for each requirement text. Use the annotation data to train the test case generation model to generate a trained test case generation model.
[0087] The test case generation model may be a traditional machine learning model, such as a decision tree, random forest, or support vector machine (SVM), or a deep learning model, such as a sequence-to-sequence model (Seq2Seq), a Transformer model, etc.
[0088] When designing test cases corresponding to the scenarios to be tested, a pre-trained test case generation model is used to generate them. This can reduce the workload of developers, improve the rationality of the designed test cases, and further improve the accuracy of the test results.
[0089] After obtaining multiple test cases, multiple input parameters corresponding to the scenario to be tested are determined based on the test cases, and the multiple input parameters are stored in a preset parameter set. In this way, when obtaining input parameters corresponding to multiple test tasks in the scenario to be tested, the input parameters corresponding to the multiple test tasks in the scenario to be tested can be filtered out from the preset parameter set.
[0090] Specifically, to determine the target scenario identifier corresponding to the scenario to be tested, the corresponding scenario identifier can be set in advance for each test scenario, and the corresponding scenario identifier can also be marked for each input parameter. In this way, after determining the target scenario identifier corresponding to the scenario to be tested, multiple input parameters matching the target scenario identifier can be screened out from the preset parameter set according to the target scenario identifier. According to the preset question-and-answer sequence corresponding to the scenario to be tested, the multiple input parameters are sorted to determine the test execution order of the multiple input parameters. According to the test execution order of the multiple input parameters, the corresponding input parameters are assigned to each test task in the scenario to be tested in turn.
[0091] In addition, in practical applications, with the continuous iteration of the system and the continuous introduction of new functions, the input data of the interface to be tested also needs to be continuously updated to adapt to new test requirements. In order to adapt to new test requirements more quickly, in an embodiment of the present invention, a second agent is used to detect whether the function of the interface to be tested has changed. If it is detected that the function of the interface to be tested has changed, the preset knowledge base associated with the first agent is updated in time, and the latest knowledge base after the change is used to simulate user behavior. This process is described in detail below in conjunction with the following embodiments.
[0092] Figure 3 A flow chart of another interface testing method provided by an embodiment of the present invention is as follows: Figure 3 As shown, the method comprises the following steps:
[0093] 301. Obtain input parameters corresponding to each of a plurality of test tasks in a scenario to be tested, where the input parameters are used to trigger the interface to be tested to execute a specific function.
[0094] 302. In response to determining through the second agent that the function of the interface to be tested has changed, drive the second agent to determine the function change content corresponding to the interface to be tested, and update the preset knowledge base associated with the first agent based on the function change content.
[0095] 303. According to the test execution order of multiple test tasks, obtain the first input parameter of the current test task to be executed and the first response data generated in the previous test task, where the first response data is generated by the first agent based on the first output data output by the interface to be tested in the previous test task.
[0096] 304. Combine the first input parameter and the first response data to obtain combined input data.
[0097] 305. Input the combined input data into the interface to be tested to obtain second output data corresponding to the current test task to be executed.
[0098] 306. In response to successful verification of the second output data by the first agent, drive the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data.
[0099] 307. Based on the verification results of the output data corresponding to each of the multiple test tasks determined by the first intelligent agent, generate a test result corresponding to the scenario to be tested.
[0100] When testing the interface to be tested, first obtain the input parameters corresponding to each of the multiple test tasks in the test scene. Before inputting the input parameters to the interface to be tested, the second agent can be used to determine whether the function of the current interface to be tested has changed. Then, each test task is executed in sequence.
[0101] Among them, the second intelligent agent can determine whether the function of the current interface to be tested has changed by comparing the number of multiple input parameters obtained by the current scene to be tested. Alternatively, the second intelligent agent can determine whether the function of the current interface to be tested has changed by comparing whether the multiple input parameters corresponding to the scene to be tested obtained by the current test are the same as the input parameters corresponding to the scene to be tested stored in the database. Alternatively, the second intelligent agent can determine whether the function of the current interface to be tested has changed by detecting whether the source code corresponding to the interface to be tested has changed. Other implementation methods can also be used to determine whether the function of the current interface to be tested has changed, which is not limited.
[0102] In addition, in practical applications, in order to improve the accuracy of the result of the second agent determining whether the function of the current interface to be tested has changed, a corresponding preset prompt word template can be pre-set, and the corresponding prompt instruction of the second agent can be generated based on the preset prompt word template.
[0103] Specifically, in an optional embodiment, a first prompt instruction is generated based on multiple input parameters and a first preset prompt word template, the first prompt instruction is used to indicate whether the multiple input parameters corresponding to the test scenario obtained by the current test are the same as the input parameters corresponding to the test scenario stored in the database, and the first prompt instruction is input into the second intelligent agent so that the second intelligent agent determines whether the function of the interface to be tested has changed according to the first prompt instruction.
[0104] Among them, the first preset prompt word template is a structured template, which includes a standard format for how to construct a first prompt instruction, and the first preset prompt word template includes placeholders, and multiple input parameters corresponding to each test scenario can be filled in the corresponding positions in the first preset prompt word template (i.e., in the placeholders) to generate the corresponding first prompt instruction. For example, the first preset prompt word template can be: Please check and compare whether the input parameters {param1}, {param2}... are consistent with the records in the database. Here, {param1} and {param2} represent placeholders.
[0105] In addition, in actual applications, before testing the interface to be tested, a first preset prompt word template corresponding to the second agent can be pre-configured so that the second agent can accurately determine whether the function of the current interface to be tested has changed based on the generated prompt instruction.
[0106] In another optional embodiment, it is possible to determine whether the function of the interface to be tested has changed by comparing whether the source code corresponding to the interface to be tested has changed. Specifically, the source code corresponding to the interface to be tested is obtained, and a second prompt instruction is generated based on the source code and a second preset prompt word template, the second prompt instruction is used to indicate whether the source code has changed; the second prompt instruction is input into the second intelligent agent, so that the second intelligent agent determines whether the function of the interface to be tested has changed according to the second prompt instruction.
[0107] Among them, the second preset prompt word template is a structured template, which includes a standard format for how to construct a second prompt instruction, and the second preset prompt word template includes a placeholder, and the source code corresponding to the interface to be tested currently obtained can be filled in the corresponding position in the second preset prompt word template (i.e., in the placeholder) to generate the corresponding second prompt instruction. For example, the second preset prompt word template can be: Please check and compare whether the source code {param13} corresponding to the interface to be tested is consistent with the source code corresponding to the interface to be tested stored in the database. Here, {param3} represents the placeholder.
[0108] When the second agent determines that the function of the interface to be tested has not changed, no update operation is required, and multiple test tasks can be directly executed. When the second agent determines that the function of the interface to be tested has changed, the change information can be sent to the interface testing device. In response to the second agent determining that the function of the interface to be tested has changed, the second agent is driven to determine the function change content corresponding to the interface to be tested, and the preset knowledge base associated with the first agent is updated based on the function change content.
[0109] The workflow corresponding to the second agent may be preset, and when it is determined that the function of the interface to be tested has changed, the second agent may be driven to automatically update the preset knowledge base associated with the first agent according to the preset workflow.
[0110] Next, execute multiple tasks to be tested corresponding to the scenario to be tested. For the current test task to be executed: according to the test execution order of the multiple test tasks, obtain the first input parameter of the current test task to be executed and the first response data generated in the previous test task, the first response data is generated by the first agent based on the first output data output by the interface to be tested in the previous test task. The first input parameter and the first response data are merged to obtain the merged input data. The merged input data is input into the interface to be tested to obtain the second output data corresponding to the current test task to be executed. In response to the successful verification of the second output data by the first agent, the first agent is driven to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data. Based on the verification results of the output data corresponding to each of the multiple test tasks determined by the first agent, a test result corresponding to the scenario to be tested is generated.
[0111] In the embodiment of the present invention, the second agent is used to detect whether the function of the interface to be tested has changed. If a change occurs, the second agent is driven to update the preset knowledge base associated with the second agent according to the preset workflow, so that changes in test requirements can be quickly responded to. In addition, during version update and maintenance, the update can be completed by only updating the input parameters corresponding to each test scenario in the test data set and the preset knowledge base. The update operation is simple and can keep up with the update rhythm in time, thereby improving the accuracy of the test results.
[0112] In order to understand the specific implementation process of the above interface test, Figure 4 The specific application scenario shown in the figure is used to illustrate the interface testing process. The function and performance of the AI interview room interface in the AI interview system are tested. The input parameters include operation entry information, user identity, and user question and answer information. The output data includes the interviewer's questions output by the AI interview interface, and the response data includes the reply information generated by the first agent to the interviewer's questions. When used specifically:
[0113] First, the input parameter data corresponding to the interview room interface is obtained from the preset parameter set, wherein the input parameter data includes the input parameters corresponding to multiple test tasks in each test scenario.
[0114] Then, use AI agent I to determine whether the function corresponding to the AI interview interface has changed.
[0115] Among them, a preset prompt word template can be used to generate a prompt instruction corresponding to the AI agent I, so that the prompt instruction is input into the AI agent I to determine whether the function corresponding to the AI interview interface has changed. Specifically, based on multiple input parameters and a preset prompt word template, a prompt instruction is generated, and the prompt instruction is used to indicate whether the multiple input parameters corresponding to the scene to be tested obtained by the current test are the same as the input parameters corresponding to the scene to be tested stored in the database, and the prompt instruction is input into the AI agent I, so that the AI agent I determines whether the function of the interface to be tested has changed according to the prompt instruction.
[0116] The generated prompt instruction can be:
[0117] You are a maintenance staff responsible for updating the knowledge base based on whether the data has changed. You can implement knowledge base updates by executing workflows. Your main responsibility is to execute workflows to update knowledge base information based on the input data change flags.
[0118] ##Skill
[0119] ###Skill 1: Execute workflow and return execution results
[0120] -**Task**: pass input information into the workflow, execute the workflow, and complete the task
[0121] -Executing the workflow is the highest priority, and the results are returned after successful execution
[0122] ##limit
[0123] - Prioritize workflow execution
[0124] - No additional work is required.
[0125] If the function corresponding to the AI interview room interface changes, in response to the AI agent I determining that the function of the interface to be tested has changed, the AI agent I is driven to determine the function change content corresponding to the interface to be tested, and the preset knowledge base associated with the first agent is updated based on the function change content. The AI agent can update the preset knowledge base according to the configured workflow.
[0126] Next, according to the data identifier corresponding to the input parameter data, each input parameter in the test scenario is determined, and the test execution order corresponding to each input parameter is determined. According to the test execution order of multiple input parameters, the corresponding input parameters are sequentially assigned to each test task in the test scenario.
[0127] Then, request the AI interview interface, input the first input parameter into the AI interview interface, and obtain the interviewer questions returned by the AI interview interface. Filter the interviewer questions fed back by the AI interview interface, and use the filtered interviewer questions as the input parameters of AI agent II. Request the API interface of AI agent II to use AI agent II to verify the interviewer questions returned by the AI interview interface. If the verification is successful, in response to the successful verification of the interviewer questions by AI agent II, drive AI agent II to simulate user behavior based on the preset knowledge base to generate reply information corresponding to the interviewer questions.
[0128] Among them, a preset prompt word template can be used to generate prompt instructions corresponding to AI agent II. Specifically, based on the interviewer's question and the preset prompt word template, a prompt instruction is generated, and the prompt instruction is used to instruct to check whether the second interviewer's question is an expected interview question. And the generated prompt instruction is input into AI agent II, so that after AI agent II checks that the interviewer's question is an expected interview question, it uses the preset knowledge base to retrieve a question-answer pair that matches the interviewer's question, and generates reply information corresponding to the interviewer's question based on the question-answer pair.
[0129] The generated prompt instruction may be: You are a domestic interviewer assistant with 3 years of interview experience, with accurate text recognition and difference verification capabilities. Your main responsibility is to organize answers to the questions input. If any abnormality is found, please judge the abnormality and give final repair suggestions.
[0130] ##Skill
[0131] ###Skill 1: Compare questions entered by users and return answers
[0132] -**Task**: Reply based on the input question and the information in the knowledge base. If the text matching is successful, return TRUE. If the question does not exist or the matching is unsuccessful, return FALSE and give the expected content.
[0133] -In the knowledge base, the Q column is the question and the R column is the answer. Compare Q and R to see if they match.
[0134] -If there are any mismatches in the questions you enter, please ignore them.
[0135] -There is no corresponding relationship, and you don’t need to make any judgment. You just need to pay attention to whether the problem itself exists and return the answer.
[0136] -Just match according to the knowledge base, don't play freely.
[0137] - Provide detailed error information if the problem does not exist or does not match.
[0138] ##limit
[0139] - Strictly prohibited words: I'm so sorry, thank you
[0140] -The output must be based on the information in the knowledge base.
[0141] Next, obtain the input parameters corresponding to the second test task, merge the input parameters corresponding to the second test task and the reply information corresponding to the interviewer's questions generated by AI agent II in the first test task, and obtain the merged user reply information. Input the first input parameter to the AI interview interface to obtain the interviewer's questions returned by the AI interview interface. Filter the interviewer's questions fed back by the AI interview interface, and use the filtered interviewer's questions as the input parameters of AI agent II. Request the API interface of AI agent II to use AI agent II to verify the interviewer's questions returned by the AI interview interface. If the verification is successful, in response to the successful verification of the interviewer's questions by AI agent II, drive AI agent II to simulate user behavior based on the preset knowledge base to generate reply information corresponding to the interviewer's questions.
[0142] All test tasks are executed in sequence according to the above process, and the test results corresponding to the scenario to be tested are generated based on the verification results of the output data corresponding to each of the multiple test tasks determined by the AI agent II.
[0143] Moreover, after the test cases of each scenario are executed, the next scenario is automatically triggered to ensure that all scenarios are fully tested and cover all possible situations. When the test tasks of all test scenarios are completed, the final results returned by AI Agent II are used for judgment. If the tests of all test scenarios are successful, the execution is considered successful; if a failure occurs, the problem is tracked and repaired.
[0144] By combining AI agents, the automated testing solution of the present invention can quickly achieve the regression of all services in the AI interview room, reducing the access to manual testing, and the overall regression time does not exceed 5 minutes, greatly improving the testing efficiency. This solution combines different test data sets and AI agents. In the subsequent version update and maintenance process, only small adjustments to the business data sets and are required, which simplifies the maintenance of automated testing; and it can monitor and analyze the interface execution of the AI interview room in real time. The AI agent can automatically locate problems and provide repair suggestions for use cases, avoiding the cost of manual troubleshooting of failed use cases. In addition, by simplifying the programming process, this solution allows testers to easily define business data sets, adjust the agent knowledge base and instructions, and complete the automated testing of the corresponding business without in-depth understanding of programming details. This design lowers the development threshold, allowing more non-technical personnel to participate in automated testing, thereby improving the overall capabilities of the testing team.
[0145] The interface testing device of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these devices can be configured using commercially available hardware components through the steps taught in this solution.
[0146] Figure 5 The following is a schematic diagram of the structure of an interface testing device provided by an embodiment of the present invention. Figure 5 As shown, the device 500 includes: a first acquisition module 11, a second acquisition module 12, a merging module 13, an input module 14, a verification module 15 and a generation module 16, wherein:
[0147] The first acquisition module 11 is used to acquire input parameters corresponding to each of a plurality of test tasks in a test scenario, wherein the input parameters are used to trigger the interface to be tested to execute a specific function.
[0148] The second acquisition module 12 is used to acquire the first input parameter of the current test task to be executed and the first response data generated in the previous test task according to the test execution order of the multiple test tasks, the first response data is generated by the first agent based on the first output data output by the interface to be tested in the previous test task, and the first output data is determined by calling the interface to be tested and using the second input parameter in the previous test task.
[0149] The merging module 13 is used to merge the first input parameter and the first response data to obtain merged input data.
[0150] The input module 14 is used to input the combined input data into the interface to be tested to obtain second output data corresponding to the current test task to be executed.
[0151] The verification module 15 is used to drive the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data in response to the first agent successfully verifying the second output data.
[0152] The generation module 16 is used to generate a test result corresponding to the scenario to be tested based on the verification results of the output data corresponding to each of the multiple test tasks determined by the first agent.
[0153] In an optional embodiment, after obtaining multiple input parameters corresponding to the scenario to be tested, the device also includes an update module, which is used to: in response to the second agent determining that the function of the interface to be tested has changed, drive the second agent to determine the function change content corresponding to the interface to be tested, and update the preset knowledge base associated with the first agent based on the function change content.
[0154] In an optional embodiment, the update module is also used to: generate a first prompt instruction based on the multiple input parameters and a first preset prompt word template, wherein the first prompt instruction is used to indicate whether the multiple input parameters corresponding to the scene to be tested obtained by the current test are the same as the input parameters corresponding to the scene to be tested stored in the database; input the first prompt instruction into the second intelligent agent, so that the second intelligent agent determines whether the function of the interface to be tested has changed according to the first prompt instruction.
[0155] In an optional embodiment, the update module is also used to: obtain the source code corresponding to the interface to be tested; generate a second prompt instruction based on the source code and the second preset prompt word template, the second prompt instruction is used to indicate whether the source code is changed; input the second prompt instruction into the second intelligent agent, so that the second intelligent agent determines whether the function of the interface to be tested is changed according to the second prompt instruction.
[0156] In an optional embodiment, the interface to be tested is an AI interview room interface, the input parameters include operation entry information, user identity identification, and user question and answer information, the first output data includes the first interviewer question output by the AI interview interface in the previous test task, and the first response data includes the first reply information generated by the first agent in the previous test task for the first interviewer question; the merging module 13 is specifically used to: merge the user question and answer information corresponding to the current test task to be executed and the first reply information generated by the first agent in the previous test task for the first interviewer question to obtain merged user question and answer information; generate merged input data based on the operation entry information, user identity information, and the merged user question and answer information corresponding to the current test task to be executed.
[0157] In an optional embodiment, the input module 14 is specifically used to: input the merged input data into the AI interview interface to call the AI interview interface to obtain a second interviewer question corresponding to the merged input data.
[0158] In an optional embodiment, the verification module 15 is specifically used to: generate a third prompt instruction based on the second interviewer question and a third preset prompt word template, wherein the third prompt instruction is used to instruct to check whether the second interviewer question is an expected interview question; input the third prompt instruction into the first intelligent agent, so that after the first intelligent agent checks that the second interviewer question is the expected interview question, it uses a preset knowledge base to retrieve a question-answer pair that matches the second interviewer question, and generates second reply information corresponding to the second interviewer question based on the question-answer pair.
[0159] In an optional embodiment, the device further includes an analysis module, and the analysis module is used to: in response to failure of verification of the second output data by the first agent, drive the first agent to analyze the second output data to determine abnormal information corresponding to the interface to be tested.
[0160] In an optional embodiment, the first acquisition module 11 is specifically used to: determine the target scenario identifier corresponding to the scenario to be tested; filter out multiple input parameters that match the target scenario identifier from a preset parameter set; sort the multiple input parameters according to a preset question-and-answer order corresponding to the scenario to be tested to determine a test execution order for the multiple input parameters; and assign corresponding input parameters to each test task in the scenario to be tested in turn according to the test execution order for the multiple input parameters.
[0161] In an optional embodiment, the first acquisition module 11 is also used to: generate a requirement text corresponding to the scenario to be tested; input the requirement text into a pre-trained test case generation model to generate a test case corresponding to the requirement text; determine multiple input parameters corresponding to the scenario to be tested based on the test case; and store the multiple input parameters in the preset parameter set.
[0162] Figure 5 The device shown can execute the steps in the interface testing method in the aforementioned embodiment. The detailed execution process and technical effects can be found in the description in the aforementioned embodiment, which will not be repeated here.
[0163] The embodiment of the present invention also provides an electronic device, such as Figure 6 As shown, the electronic device may include: a processor 21, a memory 22, and a communication interface 23. The memory 22 stores executable codes, and when the executable codes are executed by the processor 21, the processor 21 implements the interface testing method in the above-mentioned embodiment.
[0164] In addition, an embodiment of the present invention provides a non-temporary machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the interface testing method provided in the aforementioned embodiment.
[0165] An embodiment of the invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the processor can at least implement the interface testing method provided in the above embodiment.
[0166] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0167] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0168] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable resource update device to produce a machine, so that the instructions executed by the processor of the computer or other programmable resource update device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable resource update device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0170] These computer program instructions can also be loaded onto a computer or other programmable resource update device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0171] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0172] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0173] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An interface testing method, characterized in that: include: Obtain input parameters corresponding to each of the multiple test tasks in the test scenario, wherein the input parameters are used to trigger the interface to be tested to perform a specific function; According to the test execution order of the multiple test tasks, a first input parameter of the current test task to be executed and first response data generated in a previous test task are obtained, wherein the first response data is generated by the first agent based on first output data output by the interface to be tested in the previous test task, and the first output data is determined by calling the interface to be tested and using a second input parameter in the previous test task; Merging the first input parameter and the first response data to obtain merged input data; Inputting the combined input data into the interface to be tested to obtain second output data corresponding to the current test task to be executed; In response to the first agent successfully verifying the second output data, driving the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data; Based on the verification results of the output data corresponding to each of the multiple test tasks determined by the first agent, a test result corresponding to the scenario to be tested is generated.
2. The method according to claim 1, characterized in that: After obtaining a plurality of input parameters corresponding to the scenario to be tested, the method further includes: In response to the second agent determining that the function of the interface to be tested has changed, the second agent is driven to determine the function change content corresponding to the interface to be tested, and the preset knowledge base associated with the first agent is updated based on the function change content.
3. The method according to claim 2, characterized in that The method further comprises: Based on the multiple input parameters and the first preset prompt word template, a first prompt instruction is generated, wherein the first prompt instruction is used to indicate whether the multiple input parameters corresponding to the scenario to be tested obtained by the current test are compared with the input parameters corresponding to the scenario to be tested stored in the database to determine whether they are the same; The first prompt instruction is input into the second agent, so that the second agent determines whether the function of the interface to be tested is changed according to the first prompt instruction.
4. The method according to claim 2, characterized in that: The method further comprises: Obtain source code corresponding to the interface to be tested; generating a second prompt instruction based on the source code and the second preset prompt word template, wherein the second prompt instruction is used to instruct to detect whether the source code is changed; The second prompt instruction is input into the second agent, so that the second agent determines whether the function of the interface to be tested is changed according to the second prompt instruction.
5. The method according to claim 1, characterized in that The interface to be tested is an AI interview room interface, the input parameters include operation entry information, user identity, and user question and answer information, the first output data includes the first interviewer question output by the AI interview interface in the previous test task, and the first response data includes the first reply information generated by the first agent in the previous test task to the first interviewer question; The merging of the first input parameter and the first response data to obtain the merged input data includes: Merging the user question and answer information corresponding to the current test task to be executed and the first reply information generated by the first agent in the previous test task to the first interviewer's question to obtain merged user question and answer information; Based on the operation entry information corresponding to the current test task to be executed, the user identity information, and the merged user question and answer information, the merged input data is generated.
6. The method according to claim 5, characterized in that The step of inputting the combined input data into the interface to be tested to obtain second output data corresponding to the current test task to be executed includes: Inputting the combined input data into the AI interview interface to call the AI interview interface and obtain a second interviewer question corresponding to the combined input data; In response to the first agent successfully verifying the second output data, driving the first agent to simulate user behavior based on a preset knowledge base to generate second response data corresponding to the second output data includes: Based on the second interviewer's question and a third preset prompt word template, generating a third prompt instruction, wherein the third prompt instruction is used to instruct to check whether the second interviewer's question is an expected interview question; The third prompt instruction is input into the first intelligent agent, so that after checking that the second interviewer's question is the expected interview question, the first intelligent agent uses a preset knowledge base to retrieve a question-answer pair that matches the second interviewer's question, and generates second reply information corresponding to the second interviewer's question based on the question-answer pair.
7. The method according to claim 1, characterized in that The method further comprises: In response to failure of verification of the second output data by the first agent, the first agent is driven to analyze the second output data to determine abnormal information corresponding to the interface to be tested.
8. The method according to claim 1, characterized in that The step of obtaining input parameters corresponding to each of the multiple test tasks in the test scenario includes: Determine a target scene identifier corresponding to the scene to be tested; Filtering out a plurality of input parameters matching the target scene identifier from a preset parameter set; Sorting the multiple input parameters according to a preset question-and-answer sequence corresponding to the scenario to be tested to determine a test execution sequence of the multiple input parameters; According to the test execution order of the multiple input parameters, corresponding input parameters are allocated to each test task in the scenario to be tested in turn.
9. The method according to claim 8, characterized in that The method further comprises: For the scenario to be tested, generating a requirement text corresponding to the scenario to be tested; Inputting the requirement text into a pre-trained test case generation model to generate a test case corresponding to the requirement text; Based on the test case, determining a plurality of input parameters corresponding to the scenario to be tested; The plurality of input parameters are stored in the preset parameter set.
10. An electronic device, characterized in that: include: Memory and processor; The memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program to implement the steps in the interface testing method according to any one of claims 1 to 9.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to implement the steps in the interface testing method according to any one of claims 1 to 9.
Citation Information
Cited By
Interview system, method, program and device.
JP7763553B1