Page plug-in testing method, device and equipment, readable storage medium and product
The client generates and sends test cases, receives and monitors test data in real time, and promptly discovers and automatically corrects exceptions, solving the problem of inefficient page plug-in testing in the existing technology, and achieving an efficient and automatic testing process.
Patent Information
- Application Number
- CN202411894715.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art tests inefficient testing of multiple page plug-ins, especially when there are abnormalities in the test results, testers need to spend a lot of time checking problems and modifying the test environment.
Provides a page plug-in testing method, which generates test cases through the client and sends test requests to the server, receives test data in real time and automatically sends correction instructions when abnormalities are found, ensuring test quality and efficiency.
Real-time monitoring of test progress and results, timely discover exceptions and automatically correct them, minimize the impact of exceptions and improve testing efficiency.
Smart Images

Figure CN119988211A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to a page plug-in testing method, device, equipment, readable storage medium and product. Background Art
[0002] With the popularity of smart phones and mobile devices, the App (application) market is growing rapidly. In order to meet the diverse needs of users and control development costs, many developers will embed more beautiful and rich pages, referred to as plug-ins, in the APP. At present, the technical forms of plug-in pages in APP are mature and diverse. Different technologies have different underlying implementations, rendering mechanisms, and state acquisition. Therefore, the test requirements for testing these page plug-ins are also different.
[0003] In the related art, testers usually manually operate various function buttons, menu options, etc. of the plug-in to check whether the plug-in can correctly perform the expected functions according to pre-designed test cases. However, when the above method is used to test multiple page plug-ins, the test efficiency is low. Especially when the page plug-in test results are abnormal, the testers need to spend a lot of time to check the test problems one by one and manually modify the test environment. Especially when the plug-in has multiple input combinations and interaction scenarios, the number of test cases will increase dramatically, and the time cost of manual testing will be very high. Summary of the invention
[0004] The embodiments of the present invention provide a page plug-in testing method, device, electronic device, readable storage medium and computer program product, which can obtain the progress of the test in real time during the page plug-in testing, promptly discover anomalies in the test status and results, and automatically prompt the server to correct the test instance, thereby ensuring the test quality and improving the test efficiency.
[0005] In order to solve the above problems, in a first aspect, an embodiment of the present invention discloses a page plug-in testing method, which is applied to a client and includes:
[0006] In response to a user's input operation, a test case is generated; the test case includes test steps of the current test;
[0007] Sending a test request to the server, the test request including the test case, the test request being used to request the server to run a test instance corresponding to the test case, the test instance being an execution instance of executing the test case in the server using a first target test suite;
[0008] Receive the running data of the test case sent by the server according to a preset period, the running data including the test status of the current test in the preset period, and the test result of the current test in the preset period;
[0009] When it is determined that at least one of the test status and the test result is abnormal, a correction instruction is sent to the server, where the correction instruction is used to instruct the server to correct the running test instance.
[0010] Optionally, the test case includes a plurality of test sub-cases; and the receiving, according to a preset period, the running data of the test case sent by the server includes:
[0011] receiving the running data of the test sub-case sent by the server in a target cycle; the target cycle is the test cycle corresponding to the test sub-case;
[0012] When it is determined that the test status and the test result of the test subcase are both normal, sending response information to the server, wherein the response information indicates that the test is normal;
[0013] In a next cycle adjacent to the target cycle, receiving the operation data of the next sub-case adjacent to the test sub-case sent by the server; until it is determined that one of the test state and the test result is abnormal.
[0014] Optionally, the correction instruction includes a test stop instruction or a test change instruction; and sending the correction instruction to the server includes:
[0015] Sending a test stop instruction to the server, wherein the test stop instruction is used to instruct the server to stop running the test instance corresponding to the test case; or,
[0016] A test change instruction is sent to the server, wherein the test change instruction is used to instruct the server to select a preset test suite that matches the test instance from multiple preset test suites, and to use the matching preset test suite as a second target test suite, and is also used to instruct the server to use the second target test suite to execute the test instance, wherein the multiple preset test suites include the first target test suite, and the first target test suite is different from the second target test suite.
[0017] Optionally, the test change instruction includes an exception type corresponding to the test state and an exception type corresponding to the test result; the method further includes:
[0018] When it is determined that at least one of the test status and the test result has an exception, the exception type corresponding to the test status and the exception type corresponding to the test result are obtained, so that the server selects the preset test suite that matches the exception type from the multiple preset test suites according to the exception type in the test change instruction and a preset correspondence, and the preset correspondence includes a correspondence between the exception type and the preset test suite.
[0019] Optionally, the method further comprises:
[0020] In response to the user's input operation, a connection request is sent to the server;
[0021] Receive the connection response information returned by the server to establish a duplex communication connection with the server.
[0022] In a second aspect, an embodiment of the present invention discloses a page plug-in testing method, the method is applied to a server, the server is connected to multiple clients, and the method includes:
[0023] Receiving a test request sent by a client, the test request including a test case generated by the client in response to an input operation of a user;
[0024] According to the received test request, run a test instance corresponding to the test case, wherein the test instance is an execution instance of the test case executed by using a first target test suite in the server;
[0025] Sending the running data of the test case to the client according to a preset period, the running data including the test status of the current test in the preset period and the test result of the current test in the preset period;
[0026] Receive a correction instruction sent by the client, and correct the running test instance according to the correction instruction, wherein the correction instruction is an instruction sent by the client to the server when it is determined that at least one of the test status and the test result is abnormal.
[0027] Optionally, the test case includes a plurality of test sub-cases; and sending the running data of the test case to the client according to a preset period includes:
[0028] Sending the running data of the test sub-case to the client in a target cycle; the target cycle is the test cycle corresponding to the test sub-case;
[0029] Receiving response information sent by the client, wherein the response information is information indicating that the test is normal and sent by the client when it is determined that the test status and the test result of the test subcase are not abnormal;
[0030] In the next cycle adjacent to the target cycle, the running data of the next sub-case adjacent to the test sub-case is sent to the client; until the target response information sent by the client is received, and the target response information is the information characterizing the test abnormality sent by the client when it is determined that one of the test status and the test result is abnormal.
[0031] Optionally, the correction instruction includes a test stop instruction or a test change instruction; the receiving the correction instruction sent by the client and correcting the running test instance according to the correction instruction includes:
[0032] receiving a test stop instruction sent by the client, and stopping running the test instance corresponding to the test case according to the test stop instruction; or,
[0033] Receive a test change instruction sent by the client, and according to the test change instruction, select a preset test suite that matches the test instance from multiple preset test suites, and use the matching preset test suite as a second target test suite; use the second target test suite to execute the test instance, wherein the multiple preset test suites include the first target test suite, and the first target test suite is different from the second target test suite.
[0034] Optionally, the test change instruction includes the exception type corresponding to the test state and the exception type corresponding to the test result;
[0035] The selecting a preset test suite matching the test instance from a plurality of preset test suites comprises:
[0036] According to the exception type and a preset correspondence in the test change instruction, the preset test suite matching the exception type is selected from the multiple preset test suites, wherein the preset correspondence includes a correspondence between the exception type and the preset test suite.
[0037] Optionally, the method further comprises:
[0038] Receiving a connection request sent by the client;
[0039] A duplex communication connection is established with the client according to the connection request, and connection response information is sent to the client, where the connection response information is used to indicate that a duplex communication connection has been established with the client.
[0040] In a third aspect, an embodiment of the present invention provides a page plug-in testing device, which is applied to a client and includes:
[0041] A generating module, used to generate a test case in response to a user's input operation; the test case includes the test steps of the current test;
[0042] A first sending module, configured to send a test request to the server, wherein the test request includes the test case, and the test request is used to request the server to run a test instance corresponding to the test case, wherein the test instance is an execution instance of executing the test case in the server using a first target test suite;
[0043] A second sending module, configured to receive the running data of the test case sent by the server according to a preset period, wherein the running data includes the test status of the current test in the preset period and the test result of the current test in the preset period;
[0044] The third sending module is used to send a correction instruction to the server when it is determined that at least one of the test status and the test result is abnormal, wherein the correction instruction is used to instruct the server to correct the running test instance.
[0045] In a fourth aspect, an embodiment of the present invention provides a page plug-in testing device, the device is applied to a server, the server is connected to multiple clients, and the device includes:
[0046] A first receiving module, configured to receive a test request sent by a client, wherein the test request includes a test case generated by the client in response to an input operation of a user;
[0047] A running module, configured to run a test instance corresponding to the test case according to the received test request, wherein the test instance is an execution instance of the test case executed in the server using a first target test suite;
[0048] A fourth sending module, configured to send the running data of the test case to the client according to a preset period, wherein the running data includes the test status of the current test in the preset period and the test result of the current test in the preset period;
[0049] A correction module is used to receive a correction instruction sent by the client and correct the running test instance according to the correction instruction. The correction instruction is an instruction sent by the client to the server when it is determined that at least one of the test status and the test result is abnormal.
[0050] In a fifth aspect, an embodiment of the present invention further discloses an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor; when the processor executes the program, the method of the first or second aspect described above is implemented.
[0051] In a sixth aspect, an embodiment of the present invention further discloses a readable storage medium, which, when instructions in the readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method of the first aspect or the second aspect mentioned above.
[0052] In the seventh aspect, an embodiment of the present invention further discloses a computer program product, including instructions or transactions, which, when executed by a processor in an electronic device, enable the electronic device to execute the method of the first aspect or the second aspect mentioned above.
[0053] The embodiments of the present invention include the following advantages:
[0054] The page plug-in testing method provided by the embodiment of the present invention generates a test case by responding to the user's input operation; the test case includes the test steps of the current test; a test request is sent to the server, the test request includes the test case, the test request is used to request the server to run the test instance corresponding to the test case, and the test instance is an execution instance of the test case executed in the server using a first target test suite; the running data of the test case sent by the server is received according to a preset period, the running data includes the test status of the current test in the preset period, and the test result of the current test in the preset period; when it is determined that at least one of the test status and the test result is abnormal, a correction instruction is sent to the server, and the correction instruction is used to instruct the server to correct the running test instance. In this way, the operation data can be received according to the preset cycle, the status and results of the test can be grasped in real time, and whether there are deviations or unexpected situations in the test process can be known in time. When it is determined that the test status or test results are abnormal, correction instructions can be automatically sent to the server, so that the server can adjust and correct the running test instances in time. In this way, the automatic and fast feedback correction mechanism can minimize the impact of abnormal problems on the test quality, without the need for testers to manually correct the test environment, which can improve test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a flow chart of a page plug-in testing method provided in an embodiment of the present application;
[0056] Figure 2 is a flow chart of another page plug-in testing method provided by an embodiment of the present application;
[0057] Figure 3 is a flow chart of another page plug-in testing method provided by an embodiment of the present application;
[0058] Figure 4 is a block diagram of a page plug-in testing device provided in an embodiment of the present application;
[0059] Figure 5 is a block diagram of another page plug-in testing device provided in an embodiment of the present application;
[0060] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0062] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0063] Before introducing the page plug-in testing method, device, electronic device, readable storage medium and computer program product provided by the present disclosure, the application scenarios involved in each embodiment of the present disclosure are first introduced. The present disclosure can be applied to the scenario of page plug-in testing, and the page plug-in testing method provided by the embodiment of the present disclosure can be applied to the client and the server, wherein the client may include a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, and various forms of user equipment (UE) (for example, a mobile phone) and other devices, and the server may include a physical server and a cloud server.
[0064] With the popularity of smart phones and mobile devices, the App (application) market is growing rapidly. In order to meet the diverse needs of users and control development costs, many developers will embed more beautiful and rich pages, referred to as plug-ins, in the APP. At present, the technical forms of plug-in pages in APP are mature and diverse. Different technologies have different underlying implementations, rendering mechanisms, and state acquisition. Therefore, the test requirements for testing these page plug-ins are also different.
[0065] In the related art, testers usually manually operate various function buttons, menu options, etc. of the plug-in to check whether the plug-in can correctly perform the expected functions according to pre-designed test cases. However, when the above method is used to test multiple page plug-ins, the test efficiency is low. Especially when the page plug-in test results are abnormal, the testers need to spend a lot of time to check the test problems one by one and manually modify the test environment. Especially when the plug-in has multiple input combinations and interaction scenarios, the number of test cases will increase dramatically, and the time cost of manual testing will be very high.
[0066] In order to solve the above problems, the present disclosure provides a page plug-in testing method, device, electronic device, readable storage medium and computer program product, which can receive operation data according to a preset period, can grasp the status and results of the test in real time, and promptly know whether there are deviations or unexpected situations in the test process, and when it is determined that the test status or test results are abnormal, it can automatically send correction instructions to the server, so that the server can adjust and correct the running test instances in time accordingly. In this way, the automatic and fast feedback correction mechanism can minimize the impact of abnormal problems on the test quality, without the need for testers to manually correct the test environment, and can improve the test efficiency.
[0067] Method Embodiment
[0068] The page plug-in testing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0069] Figure 1 is a flow chart of a page plug-in testing method provided by an embodiment of the present application, such as Figure 1 As shown, the method is applied to a client, which may include a physical server and a cloud server.
[0070] The method may include the following steps.
[0071] In step S101 , a test case is generated in response to a user's input operation; the test case includes test steps of the current test.
[0072] The test is used to represent the activities of operating the software in order to find defects in the page plug-in, verify whether the page plug-in meets user needs, or evaluate the page plug-in. And the test case is a document or data structure, which is used to describe the goals, steps and expected results of a specific test on the page plug-in.
[0073] In some embodiments, when generating a test case in response to a user input operation, first, a connection request may be sent to a server in response to the user input operation; and connection response information returned by the server may be received to establish a duplex communication connection with the server.
[0074] In this step, the user's input operation may be first obtained, and the operation intention corresponding to the user's input operation may be determined.
[0075] Optionally, the client can be used to capture various user input operations. For example, in a web-based plug-in test scenario, the browser's event monitoring mechanism can be used to monitor the user's mouse clicks, keyboard button presses and releases, page scrolling and other operations. For example, the user clicks a button on the plug-in interface, enters specific content in the input box, uses shortcut keys to operate the plug-in, and other behaviors will be recorded by the system. For mobile plug-in testing, the interactive event capture function provided by the mobile operating system is used to collect user touch screen (click, long press, slide, etc.), shake the device and other operation behaviors.
[0076] After obtaining the user's input operation, the intention behind the user's operation can be determined based on the obtained input operation. For example, if the user clicks the "Previous Page" and "Next Page" buttons in the plug-in continuously, it can be considered that the intention may be to test the smoothness and accuracy of the plug-in page switching function; and if the user enters a very long text in a text input plug-in, it can be considered that the intention may be to verify the plug-in's ability to handle large amounts of data input and whether an error will occur.
[0077] In this step, the test case can be generated based on the user's input operation.
[0078] The test case may include the number, test name, test purpose, preconditions, test steps, expected results, and actual results.
[0079] For example, for a test case of an image editing plug-in, the number can be set to "TC001", the test name can be "Image cropping function test", and the test purpose can be to verify whether the cropping function of the plug-in can accurately crop images according to the set parameters.
[0080] Optionally, the user's input operations may first be converted into specific test steps according to the order in which the user inputs.
[0081] For example, if the user input operations obtained are: opening the plug-in, selecting a picture, clicking the cropping tool button, dragging the cropping frame to adjust the cropping area, and clicking the "Confirm Crop" button, then the test steps included in the test case may include the following steps:
[0082] S1. Start the image editing plug-in;
[0083] S2. Select a picture with a resolution of [X] from the local photo album and import it into the plug-in;
[0084] S3. Click the "Crop Tool" button on the plug-in interface to activate the crop function;
[0085] S4. Use your mouse (or finger, on mobile devices) to drag the cropping frame and set the cropping area to [specific size and position];
[0086] S5. Click the "Confirm Cropping" button to complete the cropping operation.
[0087] In this way, by arranging and converting user input operations in order, a test case containing clear test steps can be generated, which can provide test steps for subsequent plug-in testing work.
[0088] In step S102, a test request is sent to the server, where the test request includes the test case.
[0089] The test request is used to request the server to run a test instance corresponding to the test case, and the test instance is an execution instance of the test case executed in the server using a first target test suite.
[0090] The test suite is a comprehensive set of tools, scripts, and related configurations used by the server to execute the test case. The test suite may include components that can simulate various user operations, create different test environments, collect and analyze test data, etc. For example, the test suite may include automated script tools that can simulate mouse clicks and keyboard inputs, virtual environment configuration modules for creating different operating systems and browser environments, and data processing scripts that record test execution time and determine whether the operation is successful.
[0091] In this step, after the server receives the test request containing the test case, it can call the relevant resources and tools in the first target test suite corresponding to the test case according to the test request, and simulate operations, collect data, judge results, etc. according to the test steps specified in the test case, so that the test case is transformed from a plan on paper into a specific test process that is actually run on the server, that is, the corresponding test instance is generated.
[0092] By adopting this step, the client transmits the test case to the server, and the server can convert the test case into an actual running test instance through the first target test suite, and then carry out subsequent testing work and feedback corresponding test data and other contents.
[0093] The server includes a test suite library. Considering that the test suite library may include test suites for various purposes, in some embodiments, the first target test suite corresponding to the test case may be called according to the test request.
[0094] Optionally, when the server receives the test request, it can first parse the test request to extract the test elements of the test case, which can include the type of test case (such as functional testing, compatibility testing, performance testing, etc.), test objectives (such as testing the login function of the plug-in, display effects in a specific browser, etc.) and test steps (specific operation sequence).
[0095] For example, if the test case in the test request is a test of the form submission function of the page plug-in, through analysis, it can be concluded that the type of case is functional testing, and the test goal is to verify whether the form submission is successful and whether the data is processed correctly. The test steps may include operations such as entering data and clicking the submit button.
[0096] Then, when the test elements are extracted, a test suite that matches the test case can be selected from a variety of test suites for different purposes based on the test elements of the parsed test case and the mapping relationship pre-stored in the server, and the matching test suite can be used as the first target test suite corresponding to the test case.
[0097] For example, a functional test case can be mapped to a test suite containing a large number of functional test tools and scripts; a compatibility test case can be associated with a test suite that can simulate multiple operating systems and browser environments. It should be noted that the mapping relationship can be determined by pre-defined rules, configuration files, or database records.
[0098] Specifically, the test case parameters parsed from the test request can be passed to the first target test suite. For example, if the test case specifies a specific version number of the plug-in or a user role (such as administrator, ordinary user) of the test, these parameters can be passed to the first target test suite so that the test suite can adjust the test strategy according to these parameters.
[0099] In a possible implementation, the first target test suite can be adapted to better meet the requirements of the test case. Specifically, it can include adjusting the execution order of the test script, modifying the configuration parameters of certain tools, etc. For example, if the test case requires testing in a special network environment, and the default network environment setting of the first target test suite does not match it, it is necessary to adjust the parameters of the network simulation tool in the test suite to adapt to the requirements of the test case.
[0100] In some embodiments, when the server uses the first target test suite to run the test instance corresponding to the test case, the server can load the first target test suite into the memory and perform initialization operations when the first target test suite is determined. Specifically, it can include loading various tool scripts in the first target test suite, configuring related parameters, and establishing connections related to the test environment (such as database connections, network connections, etc.). For example, a first target test suite for performance testing can include initializing performance monitoring tools, setting parameters such as the frequency and range of data collection, so as to be ready to test the performance of the page plug-in.
[0101] In step S103, the running data of the test case sent by the server is received according to a preset period.
[0102] The operation data includes a test status of the current test in the preset period and a test result of the current test in the preset period.
[0103] Furthermore, the preset period can be a time interval determined in advance before the start of the entire page plug-in testing process, and the running data of the test case sent by the server is received according to the preset period. This allows the client to regularly and orderly obtain feedback information from the server about the execution of the test case, avoiding the waste of network resources caused by the client's continuous requests for data. At the same time, it can also make the monitoring of the test process more rhythmic, making it convenient for testers to analyze and control the progress of the test according to a fixed rhythm.
[0104] For example, you can set a preset period of every 5 minutes, every 10 minutes, or every hour. The specific duration should be considered comprehensively based on factors such as the complexity of the test, the number of test cases, and the overall test duration. If the test case is relatively simple and the execution speed is fast, the preset period can be set shorter; conversely, for complex and time-consuming tests, the period can be appropriately extended.
[0105] In some embodiments, the test case includes multiple test sub-cases; the running data of the test sub-case sent by the server can be received in a target cycle; the target cycle is the test cycle corresponding to the test sub-case; and when it is determined that there is no abnormality in the test status and the test result of the test sub-case, a response message is sent to the server, and the response message indicates that the test is normal; then in the next cycle adjacent to the target cycle, the running data of the next sub-case adjacent to the test sub-case sent by the server is received; until it is determined that one of the test status and the test result is abnormal.
[0106] Among them, in the page plug-in test, when the content covered by a complete test case is relatively complex and has many functions, the test case can be split into multiple test sub-cases. Each test sub-case can correspond to a specific aspect of the plug-in's function, feature, or test in a specific scenario. For example, for a comprehensive office document editing page plug-in, the test goal of a complete test case can be "verify the overall functional integrity of the document editing plug-in", and the test goals of the test sub-cases it contains can be "test text input and editing function sub-cases", "test image insertion and typesetting function sub-cases", "test document saving and opening function sub-cases", etc. After such subdivision, the testing work can be carried out more specifically, and it is also convenient to accurately track and locate the problem.
[0107] Each of the test sub-cases can correspond to a specific test cycle, namely the target cycle. This cycle is determined based on factors such as the complexity of the test content involved in the sub-case, the expected execution time, and the requirements for timely data feedback. For example, for the relatively simple and fast-executing "test text input and editing function sub-case", its target cycle may be set to receive operation data every 2 minutes; while for the "test document saving and opening function sub-case" that involves more operation steps and takes a longer time, the target cycle may be set to receive operation data every 5 minutes.
[0108] In this way, by tailoring appropriate target cycles for different sub-cases, it can be ensured that the client obtains the most valuable test feedback information at appropriate time intervals, without wasting resources too frequently or missing the opportunity to discover problems in a timely manner.
[0109] In this step, the client can receive the running data of the corresponding test sub-case sent by the server at a fixed time according to the set target period. These running data also include two important information: test status and test results.
[0110] For example, taking the "test picture insertion and layout function sub-case" as an example, in the operation data received in a certain target period, the test status may show "inserting the third picture operation is being executed", and if the test results of the previously completed operations are in line with expectations, they may be recorded as "the layout of the two inserted pictures meets the requirements, and the current test is normal." By continuously receiving these operation data, the client can grasp the test progress of each sub-case in real time.
[0111] When the client determines that there are no abnormalities in the test status and test results of a certain test sub-case based on the received running data, it will send a response message to the server, indicating that the test sub-case is currently testing normally.
[0112] For example, after receiving the normal test response information for the "test text input and editing function sub-case", the server can continue to execute subsequent operations of the sub-case, or prepare to enter the test phase of the next sub-case according to the overall test arrangement.
[0113] And, after confirming that the current test sub-case is tested normally, the client will continue to receive the running data of the next sub-case adjacent to the current test sub-case sent by the server in the next cycle adjacent to the target cycle. This cycle repeats, and the test feedback information of each sub-case is obtained in sequence according to the order of the test sub-cases.
[0114] For example, after completing the "test text input and editing function sub-case" and confirming that it is normal, the client will start to receive the running data of the "test image insertion and typesetting function sub-case" in the next cycle, and so on, and carry out the testing work of all sub-cases covered by the entire test case in turn.
[0115] In step S104, when it is determined that at least one of the test state and the test result is abnormal, a correction instruction is sent to the server.
[0116] The correction instruction is used to instruct the server to correct the running test instance.
[0117] Optionally, it can be determined that at least one of the test status and the test result is abnormal in the following manner:
[0118] Method 1: Determine whether the test status is abnormal by checking the execution step sequence and progress.
[0119] Specifically, the test step sequence pre-set in the test case can be compared to check whether the test status information sent by the server completely covers these steps. In addition, the execution progress of each step can be judged to be within a reasonable range by estimating the normal execution time of each step.
[0120] For example, for a test case with three steps (open plugin, set parameters, save configuration), if in the received test status, it jumps directly from "open plugin" to "save configuration", missing the key step of "set parameters", then it can be determined that the test status is abnormal. And for a data loading step, according to past experience or performance requirements, the loading should be completed within 5 seconds under normal circumstances, but the test status shows that the step has lasted for 5 seconds and has not been completed, which may indicate an abnormality.
[0121] Method 2: Determine whether the test status is abnormal by monitoring system resource usage and performance indicators.
[0122] Specifically, you can check the information about system resources (such as processor usage, memory usage, disk input and output, etc.) in the test status fed back by the server to determine whether there is an abnormality in system resource usage. If the resource usage suddenly increases abnormally when executing a certain test step, exceeding the range that the plug-in can withstand for normal operation, there may be an abnormality. For example, when the text display plug-in is loading text content, the processor usage suddenly reaches 100% and lasts for a period of time. This may indicate that there are abnormal conditions such as code dead loops or resource leaks inside the plug-in.
[0123] And if the test status shows that the response time of the plug-in far exceeds the range specified by the performance requirements, or the throughput is significantly lower than expected, it can be determined that the test status is abnormal in terms of performance. For example, if the response time of a data query plug-in when querying a small amount of data is several times longer than normal, it may be caused by database connection problems or inefficient query algorithms.
[0124] Method 3: Determine whether the test result is abnormal by comparing the expected result with the actual result.
[0125] Specifically, the expected functional implementation of each test step set in the test case can be compared with the actual test results one by one. If the expected results and the actual results are inconsistent, it can be determined that the test results are abnormal. For example, for a form submission plug-in, the expected result is that after the form is correctly filled out and the submit button is clicked, the data can be successfully sent to the server and a prompt of successful submission is returned; if the actual test result returns an error prompt after submission or the data is not sent correctly, then it can be determined that the test results are abnormal.
[0126] It is also possible to check whether the data in the actual test results are consistent with the expected data format, content, accuracy and other requirements, and if it is determined that it is not consistent, it is determined that the test results are abnormal. For example, in a data encryption test sub-case, the expected result is that the encrypted data should comply with specific encryption algorithm rules and length requirements. If the actual encrypted result does not meet these requirements, it indicates that the test result is abnormal.
[0127] In this step, the correction instruction includes a test stop instruction or a test change instruction.
[0128] In a possible implementation, a test stop instruction may be sent to the server, where the test stop instruction is used to instruct the server to stop running the test instance corresponding to the test case.
[0129] In another possible implementation, a test change instruction may be sent to the server.
[0130] Among them, the test change instruction is used to instruct the server to select a preset test suite that matches the test instance from multiple preset test suites, and use the matching preset test suite as the second target test suite, and is also used to instruct the server to use the second target test suite to execute the test instance, wherein the multiple preset test suites include the first target test suite, and the first target test suite is different from the second target test suite.
[0131] During the page plug-in test, the client can receive the running data of the test case (or test sub-case) from the server according to a preset period, and the running data includes two key information: test status and test result. When the running data is analyzed and it is determined that at least one of the test status and test result is abnormal, the trigger condition for sending the test change instruction is met.
[0132] For example, when testing a product display plug-in for an e-commerce page, if the test status shows that it is in the step of loading product images and is in a state of waiting for resource loading for a long time (exceeding the reasonable waiting time setting), or the test results show that the product image is loaded but is not displayed fully or distorted, which is not in line with expectations, then it means that an abnormal situation has occurred. At this time, the client can consider sending a test change instruction to the server to adjust the subsequent test execution method.
[0133] In addition, in the resource configuration of the entire test system, multiple preset test suites are pre-configured, and each test suite is designed and configured accordingly for different test focuses, scenarios or problem types. For example, some preset test suites are good at detecting functional details, and contain a wealth of scripts to simulate various user operations and accurately determine whether the various function buttons and menus of the plug-in can respond normally; some focus on compatibility testing, and can simulate different operating systems, browsers, and device environments to check the adaptability of the plug-in on multiple platforms; others focus on performance testing, and are equipped with professional tools to monitor plug-in response time, resource usage and other performance indicators.
[0134] Therefore, when it is determined that at least one of the test status and the test result is abnormal, a test change instruction can be sent to the server. After receiving the test change instruction, the server can select a matching test suite from a number of preset test suites as the second target test suite.
[0135] In some embodiments, the test change instruction may also include an exception type corresponding to the test status and an exception type corresponding to the test result.
[0136] When the client determines that at least one of the test status and the test result has an exception, the client can obtain the exception type corresponding to the test status and the exception type corresponding to the test result, and send the exception type to the server through the test change instruction, so that the server selects the preset test suite that matches the exception type from the multiple preset test suites based on the exception type in the test change instruction and the preset correspondence.
[0137] The preset corresponding relationship includes a corresponding relationship between anomaly types and preset test suites.
[0138] For example, during the page plug-in test process, any of the test status and test results are abnormal, and the above-mentioned abnormalities can be divided into different types according to factors such as their specific manifestations and causes. For example, for the test status, the abnormality type may include "execution step timeout", that is, the time taken by a certain test step exceeds the normal expected range; there is also "resource usage abnormality", such as when the plug-in is running a certain function, the processor usage rate suddenly soars to an excessively high level, affecting the stability of the entire system. And for the test results, the abnormality type may include "functional implementation does not meet expectations", which means that after the plug-in executes the corresponding operation, the actual functional effect achieved is inconsistent with the pre-set expected result; and there is also "boundary condition processing error", when the test involves the boundary value of the input data (maximum value, minimum value, etc.), the plug-in fails to handle it correctly, and a crash or error feedback occurs.
[0139] After receiving the test change instruction containing the exception type, the server can find the preset test suite matching the exception type in the instruction by querying the preset correspondence table. The preset correspondence table can be stored in the form of a database or a configuration file.
[0140] For example, if the received exception type is "boundary condition processing error", the server can determine the corresponding preset test suite for boundary condition testing, which includes various boundary value input scenarios and corresponding verification scripts, by looking up the preset correspondence, and select it as the second target test suite.
[0141] By adopting the above technical scheme, a test case is generated by responding to the user's input operation; the test case includes the test steps of the current test; a test request is sent to the server, the test request includes the test case, the test request is used to request the server to run the test instance corresponding to the test case, and the test instance is an execution instance of the test case executed in the server using the first target test suite; the running data of the test case sent by the server is received according to a preset period, the running data includes the test status of the current test in the preset period, and the test result of the current test in the preset period; when it is determined that at least one of the test status and the test result is abnormal, a correction instruction is sent to the server, and the correction instruction is used to instruct the server to correct the running test instance. In this way, the operation data can be received according to the preset cycle, the status and results of the test can be grasped in real time, and whether there are deviations or unexpected situations in the test process can be known in time. When it is determined that the test status or test results are abnormal, correction instructions can be automatically sent to the server, so that the server can adjust and correct the running test instances in time. In this way, the automatic and fast feedback correction mechanism can minimize the impact of abnormal problems on the test quality, without the need for testers to manually correct the test environment, which can improve test efficiency.
[0142] Figure 2 is a flow chart of another page plug-in testing method provided by an embodiment of the present application, such as Figure 2 As shown, the method is applied to a server, which is connected to multiple clients, which may include physical servers and cloud servers, and which may include handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (UE) (e.g., mobile phones) and other devices.
[0143] The method may include the following steps.
[0144] In step S201, a test request sent by a client is received.
[0145] The test request includes a test case generated by the client in response to an input operation of a user.
[0146] In some embodiments, a connection request sent by the client may be first received; a duplex communication connection may be established with the client according to the connection request, and connection response information may be sent to the client, where the connection response information is used to indicate that a duplex communication connection has been established with the client.
[0147] In step S202, according to the received test request, the test instance corresponding to the test case is run.
[0148] The test instance is an execution instance of the test case executed in the server using the first target test suite, and the test request is a request for the client to request the server to run the test instance corresponding to the test case.
[0149] The test suite is a comprehensive set of tools, scripts, related configurations and other testing resources used by the server to execute the test case.
[0150] In this step, after the server receives the test request containing the test case, it can call the relevant resources and tools in the first target test suite corresponding to the test case according to the test request, and simulate operations, collect data, judge results, etc. according to the test steps specified in the test case, so that the test case is transformed from a plan on paper into a specific test process that is actually run on the server, that is, the corresponding test instance is generated.
[0151] By adopting this step, the client transmits the test case to the server, and the server can convert the test case into an actual running test instance through the first target test suite, and then carry out subsequent testing work and feedback corresponding test data and other contents.
[0152] In step S203, the running data of the test case is sent to the client according to a preset period.
[0153] The operation data includes a test status of the current test in the preset period and a test result of the current test in the preset period.
[0154] The preset period can be a time interval determined in advance before the start of the entire page plug-in testing process. The running data of the test case sent by the server is received according to the preset period. This allows the client to regularly and orderly obtain feedback information from the server about the execution of the test case, avoiding the waste of network resources caused by the client's continuous requests for data. At the same time, it can also make the monitoring of the test process more rhythmic, making it convenient for testers to analyze and control the progress of the test according to a fixed rhythm.
[0155] In some embodiments, the test case includes multiple test sub-cases; the running data of the test sub-case can be sent to the client in a target cycle; the target cycle is the test cycle corresponding to the test sub-case; and the response information sent by the client is received, and the response information is the information characterizing that the test is normal and sent by the client when it is determined that there is no abnormality in the test status and the test result of the test sub-case; then in the next cycle adjacent to the target cycle, the running data of the next sub-case adjacent to the test sub-case is sent to the client; until the target response information sent by the client is received, and the target response information is the information characterizing the test abnormality and sent by the client when it is determined that there is an abnormality in one of the test status and the test result.
[0156] In this step, the running data of the corresponding test sub-case can be sent to the client regularly according to the set target period. These running data also contain two important information: test status and test results. When the client determines that there are no abnormalities in the test status and test results of a certain test sub-case based on the running data received, it will send a response message to the server, indicating that the test sub-case is currently testing normally.
[0157] And, after the server confirms that the current test sub-case is tested normally according to the received response information, the server continues to send the running data of the next sub-case adjacent to the current test sub-case in the next cycle adjacent to the target cycle. This cycle repeats, and the test feedback information of each sub-case is sent in sequence according to the order of the test sub-cases.
[0158] In step S204, a correction instruction sent by the client is received, and the running test instance is corrected according to the correction instruction.
[0159] The correction instruction is an instruction sent by the client to the server when it is determined that at least one of the test status and the test result is abnormal.
[0160] In this step, the correction instruction includes a test stop instruction or a test change instruction.
[0161] In a possible implementation, a test stop instruction sent by the client may be received, and the running of the test instance corresponding to the test case may be stopped according to the test stop instruction.
[0162] In another possible implementation, a test change instruction sent by the client can be received, and based on the test change instruction, a preset test suite matching the test instance can be selected from multiple preset test suites, and the matching preset test suite can be used as a second target test suite; the second target test suite can be used to execute the test instance.
[0163] The plurality of preset test suites include the first target test suite, and the first target test suite is different from the second target test suite.
[0164] During the page plug-in testing process, the server can send the running data of the test case (or test sub-case) according to the preset period, and the running data contains two key information: test status and test results. When the client analyzes these running data and determines that at least one of the test status and test results is abnormal, it will send a test change instruction.
[0165] In addition, in the resource configuration of the entire test system, multiple preset test suites are pre-configured, and each test suite is designed and configured accordingly for different test focuses, scenarios or problem types. For example, some preset test suites are good at detecting functional details, and contain a wealth of scripts to simulate various user operations and accurately determine whether the various function buttons and menus of the plug-in can respond normally; some focus on compatibility testing, and can simulate different operating systems, browsers, and device environments to check the adaptability of the plug-in on multiple platforms; others focus on performance testing, and are equipped with professional tools to monitor plug-in response time, resource usage and other performance indicators.
[0166] Therefore, when it is determined that at least one of the test status and the test result is abnormal, a test change instruction sent by the client can be received, and a matching test suite can be selected from a plurality of preset test suites as the second target test suite.
[0167] In some embodiments, the test change instruction may also include an exception type corresponding to the test status and an exception type corresponding to the test result.
[0168] A test change instruction including an exception type corresponding to the test status and an exception type corresponding to the test result sent by a client can be received, and according to the exception type in the test change instruction and the preset correspondence, the preset test suite matching the exception type is selected from the multiple preset test suites.
[0169] The preset corresponding relationship includes a corresponding relationship between anomaly types and preset test suites.
[0170] For example, during the page plug-in test, if any of the test status and the test result is abnormal, the above abnormality can be divided into different types according to factors such as its specific manifestation and cause.
[0171] After receiving the test change instruction containing the exception type, the server can find the preset test suite that matches the exception type contained in the instruction by querying the preset corresponding relationship table.
[0172] By adopting the above technical solution, it is possible to receive operation data according to a preset cycle, grasp the status and results of the test in real time, and promptly know whether there are deviations or unexpected situations in the test process. When it is determined that the test status or test results are abnormal, correction instructions can be automatically sent to the server, so that the server can adjust and correct the running test instances in time. In this way, the automatic and fast feedback correction mechanism can minimize the impact of abnormal problems on the test quality, without the need for testers to manually correct the test environment, which can improve test efficiency.
[0173] Figure 3 is a flow chart of another page plug-in testing method provided by an embodiment of the present application, such as Figure 3 As shown, the method is applied to a server and a client, the server is connected to multiple clients, the clients may include physical servers and cloud servers, the clients may include handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of user equipment (UE) (e.g., mobile phones) and other devices.
[0174] The method may include the following steps.
[0175] In step S301, the client sends a connection request to the server in response to a user input operation.
[0176] In step S302, the server receives the connection request sent by the client, establishes a duplex communication connection with the client according to the connection request, and sends connection response information to the client.
[0177] In step S303, the client receives the connection response information returned by the server to establish a duplex communication connection with the server.
[0178] In step S304, the server sends the running data of the test subcase to the client in the target period.
[0179] In step S305, the client receives the running data of the test subcase sent by the server in the target period.
[0180] In step S306, when the client determines that there is no abnormality in the test status and the test result of the test subcase, the client sends a response message to the server.
[0181] This response information indicates that the test is normal.
[0182] In step S307, the server receives the response information sent by the client.
[0183] In step S308, the server sends the running data of the next sub-case adjacent to the test sub-case to the client in the next cycle adjacent to the target cycle.
[0184] Until the target response information sent by the client is received, the target response information is the information indicating the test abnormality sent by the client when it is determined that one of the test status and the test result is abnormal.
[0185] In step S309, the client receives the running data of the next sub-case adjacent to the test sub-case sent by the server in the next cycle adjacent to the target cycle.
[0186] Until it is determined that one of the test status and the test result is abnormal.
[0187] When it is determined that at least one of the test state and the test result is abnormal, executing steps S310, S311, or steps S312-S316;
[0188] In step S310, the client sends a test stop instruction to the server.
[0189] In step S311, the server receives the test stop instruction sent by the client, and stops running the test instance corresponding to the test case according to the test stop instruction.
[0190] In step S312, the client obtains the exception type corresponding to the test status and the exception type corresponding to the test result.
[0191] In step S313, the client sends a test change instruction to the server.
[0192] The test change instruction includes the exception type corresponding to the test state and the exception type corresponding to the test result.
[0193] In step S314, the server receives the test change instruction sent by the client.
[0194] In step S315, the server selects a preset test suite that matches the test instance from multiple preset test suites according to the test change instruction, and uses the matching preset test suite as the second target test suite.
[0195] In step S316, the server uses the second target test suite to execute the test instance.
[0196] By adopting the above technical solution, it is possible to receive operation data according to a preset cycle, grasp the status and results of the test in real time, and promptly know whether there are deviations or unexpected situations in the test process. When it is determined that the test status or test results are abnormal, correction instructions can be automatically sent to the server, so that the server can adjust and correct the running test instances in time. In this way, the automatic and fast feedback correction mechanism can minimize the impact of abnormal problems on the test quality, without the need for testers to manually correct the test environment, which can improve test efficiency.
[0197] Figure 4 is a block diagram of a page plug-in testing device provided in an embodiment of the present application, such as Figure 4 As shown, the device is applied to a client, and the device 400 may include:
[0198] The generating module 401 is used to generate a test case in response to a user's input operation; the test case includes the test steps of the current test;
[0199] A first sending module 402 is used to send a test request to the server, the test request including the test case, the test request being used to request the server to run a test instance corresponding to the test case, the test instance being an execution instance of the test case executed in the server using a first target test suite;
[0200] The second sending module 403 is used to receive the running data of the test case sent by the server according to a preset period, and the running data includes the test status of the current test in the preset period and the test result of the current test in the preset period;
[0201] The third sending module 404 is used to send a correction instruction to the server when it is determined that at least one of the test state and the test result is abnormal, wherein the correction instruction is used to instruct the server to correct the running test instance.
[0202] Optionally, the test case includes multiple test sub-cases; the second sending module 403 is used to receive the running data of the test sub-case sent by the server in a target cycle; the target cycle is the test cycle corresponding to the test sub-case; when it is determined that there is no abnormality in the test status and the test result of the test sub-case, a response message is sent to the server, and the response message indicates that the test is normal; in the next cycle adjacent to the target cycle, the running data of the next sub-case adjacent to the test sub-case sent by the server is received; until it is determined that one of the test status and the test result is abnormal.
[0203] Optionally, the correction instruction includes a test stop instruction or a test change instruction; the third sending module 404 is used to send a test stop instruction to the server, and the test stop instruction is used to instruct the server to stop running the test instance corresponding to the test case; or,
[0204] A test change instruction is sent to the server, wherein the test change instruction is used to instruct the server to select a preset test suite that matches the test instance from multiple preset test suites, and to use the matching preset test suite as a second target test suite, and is also used to instruct the server to use the second target test suite to execute the test instance, wherein the multiple preset test suites include the first target test suite, and the first target test suite is different from the second target test suite.
[0205] Optionally, the test change instruction includes an exception type corresponding to the test state and an exception type corresponding to the test result; the third sending module 404 is used to obtain the exception type corresponding to the test state and the exception type corresponding to the test result when it is determined that at least one of the test state and the test result is abnormal, so that the server selects the preset test suite that matches the exception type from the multiple preset test suites according to the exception type in the test change instruction and a preset correspondence, and the preset correspondence includes a correspondence between the exception type and the preset test suite.
[0206] Optionally, the device further comprises:
[0207] A fifth sending module, used to send a connection request to the server in response to an input operation of the user;
[0208] The first connection module is used to receive the connection response information returned by the server to establish a duplex communication connection with the server.
[0209] Figure 5 is a block diagram of another page plug-in testing device provided in an embodiment of the present application, such as Figure 5As shown, the device is applied to a server, and the server is connected to multiple clients. The device 500 may include:
[0210] The receiving module 501 is used to receive a test request sent by a client, where the test request includes a test case generated by the client in response to a user's input operation;
[0211] An operation module 502 is used to run a test instance corresponding to the test case according to the received test request, where the test instance is an execution instance of the test case executed in the server using the first target test suite;
[0212] The fourth sending module 503 is used to send the running data of the test case to the client according to a preset period, and the running data includes the test status of the current test in the preset period and the test result of the current test in the preset period;
[0213] The correction module 504 is used to receive the correction instruction sent by the client and correct the running test instance according to the correction instruction. The correction instruction is an instruction sent by the client to the server when it is determined that at least one of the test status and the test result is abnormal.
[0214] Optionally, the test case includes multiple test sub-cases; the fourth sending module 503 is used to send the running data of the test sub-case to the client in a target cycle; the target cycle is the test cycle corresponding to the test sub-case; receive the response information sent by the client, the response information is the information characterizing that the test is normal and sent by the client when it is determined that there is no abnormality in the test status and the test result of the test sub-case; in the next cycle adjacent to the target cycle, send the running data of the next sub-case adjacent to the test sub-case to the client; until receiving the target response information sent by the client, the target response information is the information characterizing the test abnormality and sent by the client when it is determined that there is an abnormality in one of the test status and the test result.
[0215] Optionally, the correction instruction includes a test stop instruction or a test change instruction; the correction module 504 is used to receive the test stop instruction sent by the client, and stop running the test instance corresponding to the test case according to the test stop instruction; or,
[0216] Receive a test change instruction sent by the client, and according to the test change instruction, select a preset test suite that matches the test instance from multiple preset test suites, and use the matching preset test suite as a second target test suite; use the second target test suite to execute the test instance, wherein the multiple preset test suites include the first target test suite, and the first target test suite is different from the second target test suite.
[0217] Optionally, the test change instruction includes the exception type corresponding to the test status and the exception type corresponding to the test result; the correction module 504 is used to select the preset test suite that matches the exception type from the multiple preset test suites according to the exception type in the test change instruction and the preset correspondence relationship, and the preset correspondence relationship includes the correspondence between the exception type and the preset test suite.
[0218] Optionally, the device further comprises:
[0219] A second receiving module is used to receive a connection request sent by the client;
[0220] The second connection module is used to establish a duplex communication connection with the client according to the connection request, and send connection response information to the client, where the connection response information is used to indicate that a duplex communication connection has been established with the client.
[0221] In summary, a page plug-in testing device provided by an embodiment of the present invention can receive operation data according to a preset period, can grasp the status and results of the test in real time, and promptly know whether there are deviations or unexpected situations in the test process. When it is determined that the test status or test results are abnormal, it can automatically send correction instructions to the server, so that the server can adjust and correct the running test instance in time. In this way, the automatic and fast feedback correction mechanism can minimize the impact of abnormal problems on the test quality, without the need for testers to manually correct the test environment, and can improve test efficiency.
[0222] The page plug-in test device in the embodiment of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplary, the electronic device can be a GPU BOX, a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) equipment, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobilepersonal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
[0223] The page plug-in testing device provided in the embodiment of the present application can achieve Figure 1 or Figure 2 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0224] Alternatively, if Figure 6 As shown, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the various steps of the above-mentioned page plug-in testing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0225] In an embodiment of the present application, the memory may be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0226] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.
[0227] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned page plug-in testing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0228] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0229] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned page plug-in testing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0230] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0231] 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 relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0232] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A page plug-in testing method, characterized in that: The method is applied to a client, and the method comprises: In response to a user's input operation, a test case is generated; the test case includes test steps of the current test; Sending a test request to the server, the test request including the test case, the test request being used to request the server to run a test instance corresponding to the test case, the test instance being an execution instance of executing the test case in the server using a first target test suite; Receive the running data of the test case sent by the server according to a preset period, the running data including the test status of the current test in the preset period, and the test result of the current test in the preset period; When it is determined that at least one of the test status and the test result is abnormal, a correction instruction is sent to the server, where the correction instruction is used to instruct the server to correct the running test instance.
2. The method according to claim 1, characterized in that The test case includes a plurality of test sub-cases; and the receiving, according to a preset period, the running data of the test case sent by the server includes: receiving the running data of the test sub-case sent by the server in a target cycle; the target cycle is the test cycle corresponding to the test sub-case; When it is determined that the test status and the test result of the test subcase are both normal, sending response information to the server, wherein the response information indicates that the test is normal; In a next cycle adjacent to the target cycle, receiving the operation data of the next sub-case adjacent to the test sub-case sent by the server; until it is determined that one of the test state and the test result is abnormal.
3. The method according to claim 1, characterized in that The correction instruction includes a test stop instruction or a test change instruction; and sending the correction instruction to the server includes: Sending a test stop instruction to the server, wherein the test stop instruction is used to instruct the server to stop running the test instance corresponding to the test case; or, A test change instruction is sent to the server, wherein the test change instruction is used to instruct the server to select a preset test suite that matches the test instance from multiple preset test suites, and to use the matching preset test suite as a second target test suite, and is also used to instruct the server to use the second target test suite to execute the test instance, wherein the multiple preset test suites include the first target test suite, and the first target test suite is different from the second target test suite.
4. The method according to claim 3, characterized in that The test change instruction includes the exception type corresponding to the test state and the exception type corresponding to the test result; the method further includes: When it is determined that at least one of the test status and the test result has an exception, the exception type corresponding to the test status and the exception type corresponding to the test result are obtained, so that the server selects the preset test suite that matches the exception type from the multiple preset test suites according to the exception type in the test change instruction and a preset correspondence, and the preset correspondence includes a correspondence between the exception type and the preset test suite.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In response to the user's input operation, a connection request is sent to the server; Receive the connection response information returned by the server to establish a duplex communication connection with the server.
6. A page plug-in testing method, characterized in that: The method is applied to a server, the server is connected to multiple clients, and the method includes: Receiving a test request sent by a client, the test request including a test case generated by the client in response to an input operation of a user; According to the received test request, run a test instance corresponding to the test case, wherein the test instance is an execution instance of the test case executed in the server using a first target test suite; Sending the running data of the test case to the client according to a preset period, the running data including the test status of the current test in the preset period and the test result of the current test in the preset period; Receive a correction instruction sent by the client, and correct the running test instance according to the correction instruction, wherein the correction instruction is an instruction sent by the client to the server when it is determined that at least one of the test status and the test result is abnormal.
7. The method according to claim 6, characterized in that The test case includes a plurality of test sub-cases; and the sending the running data of the test case to the client according to a preset period includes: Sending the running data of the test sub-case to the client in a target cycle; the target cycle is the test cycle corresponding to the test sub-case; Receiving response information sent by the client, wherein the response information is information indicating that the test is normal and sent by the client when it is determined that the test status and the test result of the test subcase are not abnormal; In the next cycle adjacent to the target cycle, the running data of the next sub-case adjacent to the test sub-case is sent to the client; until the target response information sent by the client is received, and the target response information is the information characterizing the test abnormality sent by the client when it is determined that one of the test status and the test result is abnormal.
8. The method according to claim 6, characterized in that The correction instruction includes a test stop instruction or a test change instruction; the receiving the correction instruction sent by the client and correcting the running test instance according to the correction instruction includes: receiving a test stop instruction sent by the client, and stopping running the test instance corresponding to the test case according to the test stop instruction; or, Receive a test change instruction sent by the client, and according to the test change instruction, select a preset test suite that matches the test instance from multiple preset test suites, and use the matching preset test suite as a second target test suite; use the second target test suite to execute the test instance, wherein the multiple preset test suites include the first target test suite, and the first target test suite is different from the second target test suite.
9. The method according to claim 8, characterized in that The test change instruction includes the exception type corresponding to the test state and the exception type corresponding to the test result; The selecting a preset test suite matching the test instance from a plurality of preset test suites comprises: According to the exception type and a preset correspondence in the test change instruction, the preset test suite matching the exception type is selected from the multiple preset test suites, wherein the preset correspondence includes a correspondence between the exception type and the preset test suite.
10. The method according to any one of claims 6 to 9, characterized in that: The method further comprises: Receiving a connection request sent by the client; A duplex communication connection is established with the client according to the connection request, and connection response information is sent to the client, where the connection response information is used to indicate that a duplex communication connection has been established with the client.
11. A page plug-in testing device, characterized in that: The device is applied to a client, and comprises: A generating module, used to generate a test case in response to a user's input operation; the test case includes the test steps of the current test; A first sending module, configured to send a test request to the server, wherein the test request includes the test case, and the test request is used to request the server to run a test instance corresponding to the test case, wherein the test instance is an execution instance of executing the test case in the server using a first target test suite; A second sending module, configured to receive the running data of the test case sent by the server according to a preset period, wherein the running data includes the test status of the current test in the preset period and the test result of the current test in the preset period; The third sending module is used to send a correction instruction to the server when it is determined that at least one of the test status and the test result is abnormal, wherein the correction instruction is used to instruct the server to correct the running test instance.
12. A page plug-in testing device, characterized in that: The device is applied to a server, the server is connected to multiple clients, and the device includes: A first receiving module, configured to receive a test request sent by a client, wherein the test request includes a test case generated by the client in response to an input operation of a user; A running module, configured to run a test instance corresponding to the test case according to the received test request, wherein the test instance is an execution instance of the test case executed in the server using a first target test suite; A fourth sending module, configured to send the running data of the test case to the client according to a preset period, wherein the running data includes the test status of the current test in the preset period and the test result of the current test in the preset period; A correction module is used to receive a correction instruction sent by the client and correct the running test instance according to the correction instruction. The correction instruction is an instruction sent by the client to the server when it is determined that at least one of the test status and the test result is abnormal.
13. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the detection method as described in any one of claims 1 to 5 or the detection method as described in any one of claims 6 to 10 is implemented.
14. A readable storage medium, characterized in that: When the instructions or transactions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any one of claims 1 to 5, or the detection method described in any one of claims 6 to 10.
15. A computer program product, characterized in that Comprising instructions or transactions, which, when executed by a processor in an electronic device, cause the electronic device to execute the method described in any one of claims 1 to 5, or the detection method described in any one of claims 6 to 10.