Test method and device of notification scene and related equipment

By analyzing the test configuration file of the notification scenario, the test cases are generated and run, which solves the problem of inefficient testing of notification scenarios in the existing technology, realizes automated testing, and improves testing efficiency.

CN119883906APending Publication Date: 2025-04-25ROX MOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411941531.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art is inefficient in notification scenario testing, and it is easy to miss testing a certain scenario.

Method used

By getting the test profile for the notification scenario, parsing the profile generates multiple test cases, and running these test cases to trigger the test scenario in the target test server, and finally obtain and send the test results.

Benefits of technology

Automatic notification scenario testing is implemented, which improves testing efficiency and avoids missed testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883906A_ABST
    Figure CN119883906A_ABST
Patent Text Reader

Abstract

The invention discloses a notification scene testing method and device and related equipment, and relates to the technical field of vehicle testing. The method is applied to a first device end and comprises the steps that a test configuration file of a notification scene is obtained, and the test configuration file comprises configuration parameters of multiple test scenes; the test configuration file is analyzed, a plurality of test cases are generated through combination, and different test cases correspond to different configuration parameters; running each test case, and triggering each test scene in a target test server, so that the target test server sends a notification corresponding to each test scene; and obtaining a test result of each test case, and sending the test results of the plurality of test cases to a user terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of vehicle testing technology, and in particular, relates to a testing method, device, equipment and storage medium. Background Art

[0002] As vehicle cockpit functions become more and more intelligent, the interactive functions provided to users are becoming more and more abundant, such as camping mode, sentry mode, remote locking, etc.; as the number of interactive scenarios increases, the need to send timely reminders and alarm notifications to users in combination with various scenarios will also increase. For example, when the system detects that the vehicle is unlocked and no one is in the car for more than 15 minutes, it will push a reminder to the user's APP and mobile phone text message that the vehicle is not locked, reminding the user to check the current vehicle in time to reduce the potential risk of property loss. For this type of notification scenario, the existing technology is based on manual notification scenario testing, which is not only inefficient, but also prone to missing a scenario due to errors. Summary of the invention

[0003] The embodiments of the present application provide a testing method, apparatus and related equipment for a notification scenario, which can improve testing efficiency.

[0004] In a first aspect, an embodiment of the present application provides a method for testing a notification scenario, which is applied to a first device, and the method includes:

[0005] Obtaining a test configuration file for the notification scenario, wherein the test configuration file includes configuration parameters of multiple test scenarios;

[0006] Parsing the test configuration file, combining and generating a plurality of test cases, wherein different test cases correspond to different configuration parameters;

[0007] Running each of the test cases to trigger each of the test scenarios in the target test server, so that the target test server sends notifications corresponding to each of the test scenarios;

[0008] The test results of each of the test cases are obtained, and the test results of the multiple test cases are sent to a user terminal.

[0009] In a second aspect, an embodiment of the present application provides a testing device for a notification scenario, which is applied to a first device end, and the device includes:

[0010] A first acquisition module, configured to acquire a test configuration file of the notification scenario, wherein the test configuration file includes configuration parameters of multiple test scenarios;

[0011] A parsing module, used for parsing the test configuration file, combining and generating a plurality of test cases, wherein different test cases correspond to different configuration parameters;

[0012] A running module, used for running each of the test cases, triggering each of the test scenarios in the target test server, so that the target test server sends notifications corresponding to each of the test scenarios;

[0013] The second acquisition module is used to acquire the test results of each of the test cases and send the test results of the multiple test cases to the user terminal.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, a testing method for the notification scenario as described in any one of the above is implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, a testing method for a notification scenario as described in any one of the above items is implemented.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the testing method for the notification scenario as described in any one of the above.

[0017] The testing method, apparatus and related equipment of the notification scenario in the embodiment of the present application are applied to the first device end, and can obtain the test configuration file of the notification scenario, the test configuration file includes the configuration parameters of multiple test scenarios; parse the test configuration file, combine and generate multiple test cases, different test cases correspond to different configuration parameters; run each test case, trigger each test scenario in the target test server, so that the target test server sends the notification corresponding to each test scenario; obtain the test result of each test case, and send the test results of multiple test cases to the user terminal. In this way, in the embodiment of the present application, the first device end can parse the test configuration file of the notification scenario to generate multiple test cases, and run each test case to trigger the notification of each test scenario in the target test server, and finally obtain the test results of multiple test cases and send them to the user terminal, so as to realize automatic notification scenario testing and improve testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] Figure 1 It is a flowchart of a testing method for a notification scenario provided in an embodiment of the present application;

[0020] Figure 2 This is a flowchart of a scenario embodiment provided by an embodiment of the present application;

[0021] Figure 3 It is a schematic diagram of defining field names in an Excel configuration file provided in an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of configuration parameters of a test scenario provided in an embodiment of the present application;

[0023] Figure 5 is a structural schematic diagram of a testing device for a notification scenario provided by another embodiment of the present application;

[0024] Figure 6 It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0025] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0026] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also 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 statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0027] As vehicle cockpit functions become more and more intelligent, the interactive functions provided to users are becoming more and more abundant, such as camping mode, sentry mode, remote locking, etc.; as the number of interactive scenarios increases, the need to send timely reminders and alarm notifications to users in combination with various scenarios will also increase. For example, when the system detects that the vehicle is unlocked and no one is in the car for more than 15 minutes, it will push a reminder to the user's APP and mobile phone text message that the vehicle is not locked, reminding the user to check the current vehicle in time to reduce the potential risk of property loss. For this type of notification scenario, the existing technology is based on manual notification scenario testing, which is not only inefficient, but also prone to missing a scenario due to errors.

[0028] In order to solve the problems of the prior art, the embodiments of the present application provide a method, apparatus and related equipment for testing a notification scenario. The following first introduces the method for testing a notification scenario provided by the embodiments of the present application.

[0029] Figure 1 The flowchart of the testing method of the notification scenario provided by one embodiment of the present application is shown. Figure 1 As shown, a method for testing a notification scenario, applied to a first device, may include the following steps S101 to S104:

[0030] S101, obtaining a test configuration file of a notification scenario, where the test configuration file includes configuration parameters of multiple test scenarios;

[0031] S102, parsing the test configuration file, combining and generating multiple test cases, where different test cases correspond to different configuration parameters;

[0032] S103, running each test case, triggering each test scenario in the target test server, so that the target test server sends a notification corresponding to each test scenario;

[0033] S104: Obtain the test result of each test case, and send the test results of multiple test cases to the user terminal.

[0034] The testing method for notification scenarios in the embodiments of the present application is applied to the first device end, and can obtain a test configuration file for the notification scenario, the test configuration file includes configuration parameters for multiple test scenarios; parse the test configuration file, combine to generate multiple test cases, different test cases correspond to different configuration parameters; run each test case, trigger each test scenario in the target test server, so that the target test server sends notifications corresponding to each test scenario; obtain the test results of each test case, and send the test results of multiple test cases to the user terminal. In this way, in the embodiments of the present application, the first device end can parse the test configuration file of the notification scenario to generate multiple test cases, and run each test case to trigger the notification of each test scenario in the target test server, and finally obtain the test results of multiple test cases and send them to the user terminal, so as to realize automatic notification scenario testing and improve testing efficiency.

[0035] In S101, the first device end may be a device that simulates a vehicle communication control unit (Telematics BOX, TBox) to report the vehicle status to trigger the test scenario. The first device end may also be a local device end (such as a local computer) or a local server.

[0036] The above test configuration file, illustratively, can be an Excel configuration file, which serves as a test input and contains key configuration parameters. After being parsed by the test script, a test case is automatically generated.

[0037] The above test configuration file may include configuration parameters of multiple test scenarios, and the multiple test scenarios may include, for example, unlocked car reminder, unlocked window reminder, low power battery reminder, locked car but not closing charging port, abnormal charging exit, etc. In the embodiment of the present application, the test scenarios are not limited to these, and can also be set according to actual test requirements.

[0038] The configuration parameters of the above-mentioned test scenarios may include multiple judgment signals and numerical values ​​of the monitoring duration field. The multiple judgment signals include at least one notification signal and at least one non-notification signal. Exemplarily, the multiple judgment signals may be 201=[0, 1, 2, 3], 701=[0, 3, 4], 241=[0, 1], wherein 701=[0] is one notification signal and 701=[3, 4] are two non-notification signals.

[0039] In S102, the test case may refer to a set of inputs, execution steps, expected results, and actual results designed to verify whether a function, module, or system works as expected. Different test cases correspond to different configuration parameters.

[0040] The above-mentioned parsing test configuration file is combined to generate multiple test cases. Exemplarily, each notification signal in each test scenario can be combined with a judgment signal other than at least one notification signal in multiple judgment signals to obtain multiple first test cases, where the first test case is a test case that needs to send a notification; or, each non-notification signal in each test scenario can be combined with a judgment signal other than at least one notification signal in multiple judgment signals to obtain multiple second test cases, where the second test case is a test case that does not need to send a notification. The multiple test cases include multiple first test cases and multiple second test cases.

[0041] In S103, the target test server may be a device that simulates a vehicle-mounted terminal and sends notifications corresponding to each test scenario when triggered, or may be a telematics service provider (TSP).

[0042] The above-mentioned running of each test case triggers each test scenario in the target test server, so that the target test server sends a notification corresponding to each test scenario. Exemplarily, when the value of the monitoring duration field of the test case does not exist, the test case is run to trigger the test scenario in the target test server, so that the target test server directly sends the notification corresponding to the test scenario; or, when the value of the monitoring duration field of the test case exists, the test case is run to trigger the test scenario in the target test server, so that the target test server sends the notification corresponding to the test scenario according to the monitoring duration of the test scenario.

[0043] In S104, the test result may refer to the comparison between the actual result and the expected result after the test case is executed, which may reflect whether the test case successfully verifies the function of the notification scenario.

[0044] The user terminal refers to a device or system directly used by a user, which can be connected to the first test server for communication and is responsible for receiving test results of multiple test cases.

[0045] The above-mentioned obtaining of the test results of each test case can be, when the value of the monitoring duration field of the test case does not exist, directly obtaining the test result of the test case; when the value of the monitoring duration field of the test case exists, obtaining the test result of the test case by polling according to a preset time period.

[0046] In some embodiments, the configuration parameters of each test scenario may include multiple judgment signals, and the multiple judgment signals may include at least one notification signal. The above S102 may specifically include:

[0047] Combine each notification signal in each test scenario with a judgment signal other than at least one notification signal in the plurality of judgment signals to obtain a plurality of first test cases, wherein the first test case is a test case for which a notification needs to be sent,

[0048] The plurality of test cases includes a plurality of first test cases.

[0049] The above-mentioned multiple judgment signals may be signals involved in logic judgment, including their enumerated values, for example: 201=[0,1,2,3], 701=[0,3,4], 241=[0,1].

[0050] The above-mentioned multiple judgment signals may include at least one notification signal, wherein the notification signal may be a signal whose value change may affect the triggering notification, for example: 701=[0].

[0051] The multiple test cases include multiple first test cases, wherein the first test case may be a test case that needs to send a notification.

[0052] In an embodiment of the present application, each notification signal in each test scenario is combined with a judgment signal other than at least one notification signal among multiple judgment signals to obtain multiple first test cases that require sending notifications, which can cover more test scenarios and avoid missing a scenario.

[0053] In some embodiments, the plurality of determination signals further include at least one non-notification signal, and the S102 may further include:

[0054] Combining each non-notification signal in each test scenario with a judgment signal other than at least one notification signal in the plurality of judgment signals to obtain a plurality of second test cases, where the second test cases are test cases that do not require sending a notification.

[0055] The plurality of test cases also includes a plurality of second test cases.

[0056] The above-mentioned multiple judgment signals also include at least one non-notification signal, wherein the non-notification signal can be a signal whose value change will not trigger a notification, for example: 701 = [3, 4].

[0057] The plurality of test cases mentioned above also include a plurality of second test cases, wherein the second test case may be a test case that does not require sending a notification.

[0058] In an embodiment of the present application, each non-notification signal in each test scenario is combined with a judgment signal other than at least one notification signal in multiple judgment signals to obtain multiple second test cases that do not require notification to be sent, which can cover more test scenarios and avoid missing a scenario.

[0059] As an implementation of the present application, in order to automatically perform asynchronous notification scenario testing, the configuration parameters of the above test scenarios may further include a value of a monitoring duration field. Before S103, the above method may further include:

[0060] If the value of the monitoring duration field of the test case exists, the value of the monitoring duration field of the test case is sent to the target test server, so that the target test server sets the monitoring duration of the test scenario according to the value of the monitoring duration field of the test case, and different test cases correspond to different monitoring durations;

[0061] The above S103 may specifically include:

[0062] Run each test case and trigger each test scenario in the target test server, so that the target test server sends notifications corresponding to each test scenario according to the monitoring duration of each test scenario.

[0063] The value of the monitoring duration field may refer to the duration of a monitoring behavior or monitoring task of a test scenario in the second test service. The existence of the value of the monitoring duration field of the test case means that monitoring needs to be performed according to the value.

[0064] In an embodiment of the present application, when the value of the monitoring duration field of the test case exists, the value of the monitoring duration field of the test case is sent to the target test server, so that the target test server sets the monitoring duration of the test scenario according to the value of the monitoring duration field of the test case, and then runs each test case to trigger each test scenario in the target test server, so that the target test server sends notifications corresponding to each test scenario according to the monitoring duration of each test scenario, thereby realizing automatic asynchronous notification scenario testing.

[0065] In some embodiments, the above S104 may specifically include:

[0066] When the value of the monitoring duration field of the test case does not exist, obtaining the test result of the test case;

[0067] When the value of the monitoring duration field of the test case exists, the test result of the test case is obtained according to the preset time period.

[0068] The fact that the value of the monitoring duration field of the above test case does not exist means that there is no need to monitor the test case, and the test result of the test case can be directly obtained.

[0069] The existence of a value in the monitoring duration field of the above test case means that the test case needs to be monitored according to the value, so the test result of the test case can be obtained according to a preset time period.

[0070] In an embodiment of the present application, the test result of the test case can be directly obtained when the value of the monitoring duration field of the test case does not exist, and the test result of the test case can be obtained by polling according to a preset time period when the value of the monitoring duration field of the test case exists. Multiple acquisition methods can meet the needs of synchronous testing and asynchronous testing in notification scenario testing.

[0071] As another implementation of the present application, in order to further improve the test efficiency, before the above S102, the above method may further include:

[0072] receiving a target value input by a user for a target field, where the target field is a monitoring duration field of a target test scenario in a test configuration file;

[0073] Modify the value of the target field to the target value, which is a value smaller than the value in the target field;

[0074] The above-mentioned sending the value of the monitoring duration field of the test case to the target test server may specifically include:

[0075] Sending the target value to the target test server so that the target test server sets the target monitoring duration of the target test scenario according to the target value;

[0076] The above S103 may specifically include:

[0077] Run the test case of the target test scenario, trigger the target test scenario in the target test server, so that the target test server sends a notification corresponding to the target test scenario according to the monitoring duration.

[0078] The target field is the monitoring duration field of the target test scenario in the test configuration file, wherein the target test scenario may be a test scenario selected by the user to be modified.

[0079] The target value may be a value smaller than the value in the target field. The above-mentioned modification of the value of the target field to the target value may be, for example, modification of the value of the target field from 15 minutes to a target value of 5 seconds.

[0080] In an embodiment of the present application, by receiving the target value input by the user for the target field, the numerical value of the monitoring duration field of the target test scenario in the test configuration file is modified to the target value, and then the target value is sent to the target test server, so that the target test server sets the target monitoring duration of the target test scenario according to the target value, and finally runs the test case of the target test scenario to trigger the target test scenario in the target test server, so that the target test server sends a notification corresponding to the target test scenario according to the monitoring duration, without actually waiting for the formally required monitoring duration, thereby greatly shortening the test time and further improving the test efficiency.

[0081] In order to facilitate the understanding of the testing method of the notification scenario in the embodiment of the present application, the actual application process of the testing method of this notification scenario is described as follows:

[0082] like Figure 2 As shown, the embodiment of the present application provides a solution for automated testing notification scenarios, which can automatically generate cases and automatically execute them, thereby effectively improving testing efficiency. Figure 2 The modules are summarized as follows:

[0083] 1. Excel configuration file (i.e. the test configuration file mentioned above): as the test input, it contains key parameters and automatically generates test cases after being parsed by the test script.

[0084] like Figure 3 As shown, the first line (i.e., the table header) defines the field names to be entered:

[0085] test_scene: test scene field

[0086]

[0087]

[0088] monitor_duration: monitoring configuration item field and duration value (i.e. the monitoring duration field and value mentioned above), unit (s)

[0089] unlock_duration=5;

[0090] If monitoring duration is not required, leave it blank.

[0091] Signal: The signal involved in the logic judgment and the existing enumeration value, for example: 201 = [0, 1, 2, 3], 701 = [0, 3, 4], 241 = [0, 1]. (equivalent to the above judgment signal)

[0092] signal_notify: value changes will affect the signal and value that triggers the notification, for example: 701 = [0].

[0093] (equivalent to the above notification signal)

[0094] signal_unnotify: Signals and values ​​whose value changes will not trigger notifications, for example: 701 = [3,4].

[0095] (equivalent to the above-mentioned no notification signal)

[0096] Starting from the second line, the configuration parameters of each test scenario are defined, such as Figure 4 shown.

[0097] 2. Local service (equivalent to the first device end mentioned above) test script: responsible for parsing the input Excel file, automatically generating test cases (ie the above test cases), and recording the case results of non-asynchronous verification (ie the above test results).

[0098] 1). Parse the Excel configuration file and generate test cases:

[0099] Start parsing from the second line.

[0100] The same signal jumps from the signal column to the value of the signal_notify column, and then combines other signals that do not participate in the notification judgment to form multiple cases that need to send notifications.

[0101] The same signal jumps from the signal column to the value of the signal_unnotify column, and then combines other signals that do not participate in notification judgment to form multiple cases that do not need to send notifications.

[0102] 2). Determine whether the monitor_duration field has a value:

[0103] If it exists, it will be saved in the Redis service with the time when the case was executed and the time when the monitoring ended.

[0104] If it does not exist, the script asserts directly and stores the result of the case execution in the Redis service.

[0105] 3). Trigger the test scenario

[0106] The test scenario is triggered by simulating tbox reporting the vehicle status.

[0107] The reported value is the combination of signal values ​​in the case generated by the first step of analysis.

[0108] It should be noted that if other scenario notifications are added in the future, you can continue to write trigger methods in the script to meet new requirements.

[0109] 3. Auxiliary testing service: The Redis service is used to store the case names that need to be monitored for a certain period of time and obtain results; the scheduled task is used to obtain the cases that need to obtain test results in Redis, summarize the final test results, and notify the testers.

[0110] 1). Redis service

[0111] -Store case test results;

[0112] -Store cases with monitoring duration;

[0113] 2). Scheduled tasks

[0114] Periodically poll the case with monitoring duration to determine whether the current time has reached the time to verify the test results (equivalent to obtaining the test results of the test case according to the preset time period):

[0115] - If it arrives, verify the result and store it;

[0116] -If not reached, continue to the next round of polling;

[0117] 3). Summarize test case results

[0118] Until all cases have verification results, they are summarized and sent to the tester.

[0119] 4. Cloud-based service under test (equivalent to the target test server mentioned above): stores business configuration items and can provide API calls to modify configuration items (only for test environments). For example, normal business regulations stipulate that a notification will be sent only after no one is on the monitoring vehicle for 15 minutes. In the actual configuration Excel file, 15 minutes is configured. If the configuration item is modified to 5s through the API, the test waiting time is shortened from 15 minutes to 5s. The corresponding test scenario is triggered according to the test script, and the corresponding notification is issued.

[0120] In the embodiment of the present application, the test script is written in code, which is highly flexible and can be customized according to the scenario to meet more complex business needs. There is no need to actually wait for the formally required monitoring time, which greatly shortens the test time. There is no need to frequently check the performance of the mobile terminal, only one check is needed to confirm that the link is normal, which greatly improves the test efficiency. There is no need to switch between multiple devices and multiple accounts. By pushing logs from the server, it is possible to determine whether the push results are correct, improve efficiency, and reduce costs.

[0121] Based on the testing method of the notification scenario provided in the above embodiment, the present application also provides a specific implementation of the testing device of the notification scenario. Please refer to the following embodiment.

[0122] like Figure 5As shown, the testing device 500 for the notification scenario provided in the embodiment of the present application is applied to the first device end and may include the following modules: a first acquisition module 501 , a parsing module 502 , an operation module 503 and a second acquisition module 504 .

[0123] A first acquisition module 501 is used to acquire a test configuration file of a notification scenario, where the test configuration file includes configuration parameters of multiple test scenarios;

[0124] The parsing module 502 is used to parse the test configuration file and generate multiple test cases in combination, where different test cases correspond to different configuration parameters;

[0125] The running module 503 is used to run each test case and trigger each test scenario in the target test server so that the target test server sends a notification corresponding to each test scenario;

[0126] The second acquisition module 504 is used to acquire the test results of each test case and send the test results of multiple test cases to the user terminal.

[0127] The testing device for the notification scenario of the embodiment of the present application is applied to the first device end, and can obtain the test configuration file of the notification scenario, the test configuration file includes the configuration parameters of multiple test scenarios; parse the test configuration file, combine and generate multiple test cases, different test cases correspond to different configuration parameters; run each test case, trigger each test scenario in the target test server, so that the target test server sends the notification corresponding to each test scenario; obtain the test result of each test case, and send the test results of multiple test cases to the user terminal. In this way, in the embodiment of the present application, the first device end can parse the test configuration file of the notification scenario to generate multiple test cases, and run each test case to trigger the notification of each test scenario in the target test server, and finally obtain the test results of multiple test cases and send them to the user terminal, so as to realize automatic notification scenario testing and improve test efficiency.

[0128] In some embodiments, the configuration parameters of each test scenario may include multiple judgment signals, and the multiple judgment signals may include at least one notification signal. The analysis module 502 may specifically include:

[0129] A first combining unit is used to combine each notification signal in each test scenario with a judgment signal other than at least one notification signal in the plurality of judgment signals to obtain a plurality of first test cases, wherein the first test case is a test case for which a notification needs to be sent.

[0130] The plurality of test cases includes a plurality of first test cases.

[0131] In some embodiments, the plurality of determination signals may further include at least one non-notification signal, and the analysis module 502 may further include:

[0132] The second combining unit is used to combine each non-notification signal in each test scenario with a judgment signal other than at least one notification signal in the multiple judgment signals to obtain multiple second test cases, where the second test cases are test cases that do not require sending notifications.

[0133] The plurality of test cases also includes a plurality of second test cases.

[0134] As an implementation of the present application, in order to automatically perform asynchronous notification scenario testing, the configuration parameters of the above-mentioned test scenarios may further include a value of a monitoring duration field, and the above-mentioned device 500 may further include:

[0135] A sending module, used for sending the value of the monitoring duration field of the test case to the target test server if the value of the monitoring duration field of the test case exists, so that the target test server sets the monitoring duration of the test scenario according to the value of the monitoring duration field of the test case, and different test cases correspond to different monitoring durations;

[0136] The above-mentioned running module 503 is specifically used to run each test case and trigger each test scenario in the target test server, so that the target test server sends a notification corresponding to each test scenario according to the monitoring duration of each test scenario.

[0137] In some embodiments, the second acquisition module 504 may specifically include:

[0138] A first acquisition unit, configured to acquire a test result of the test case when a value of a monitoring duration field of the test case does not exist;

[0139] The second acquisition unit is used to acquire the test result of the test case according to a preset time period when the value of the monitoring duration field of the test case exists.

[0140] As another implementation of the present application, in order to further improve the test efficiency, the above-mentioned device 500 may also include:

[0141] A receiving module, used to receive a target value input by a user for a target field, where the target field is a monitoring duration field of a target test scenario in a test configuration file;

[0142] A modification module, used to modify the value of the target field to a target value, the target value being a value less than the value in the target field;

[0143] The sending module is specifically used to send the target value to the target test server, so that the target test server sets the target monitoring duration of the target test scenario according to the target value;

[0144] The above-mentioned running module 503 is specifically used to run the test case of the target test scenario, trigger the target test scenario in the target test server, so that the target test server sends a notification corresponding to the target test scenario according to the monitoring duration.

[0145] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0146] The electronic device may include a processor 601 and a memory 602 storing computer program instructions.

[0147] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0148] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.

[0149] In certain embodiments, the memory 602 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0150] The processor 601 implements any one of the notification scenario testing methods in the above embodiments by reading and executing computer program instructions stored in the memory 602 .

[0151] In one example, the electronic device may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.

[0152] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0153] Bus 610 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 610 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0154] The electronic device can execute the testing method of the notification scenario in the embodiment of the present application, thereby realizing the combination Figure 1 and Figure 5 A testing method and apparatus for a notification scenario is described.

[0155] In addition, in combination with the testing method of the notification scenario in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the testing method of any notification scenario in the above embodiment is implemented.

[0156] In combination with the testing method for notification scenarios in the above embodiments, an embodiment of the present application may provide a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes any one of the testing methods for notification scenarios as above.

[0157] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0158] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0159] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0160] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box 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, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0161] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for testing a notification scenario, characterized in that: Applied to a first device, the method includes: Obtaining a test configuration file for the notification scenario, wherein the test configuration file includes configuration parameters of multiple test scenarios; Parsing the test configuration file, combining and generating a plurality of test cases, wherein different test cases correspond to different configuration parameters; Running each of the test cases to trigger each of the test scenarios in the target test server, so that the target test server sends notifications corresponding to each of the test scenarios; The test results of each of the test cases are obtained, and the test results of the multiple test cases are sent to a user terminal.

2. The method according to claim 1, characterized in that: The configuration parameters of each of the test scenarios include multiple judgment signals, the multiple judgment signals include at least one notification signal, and the parsing of the test configuration files and combining to generate multiple test cases include: Combining each of the notification signals in each of the test scenarios with a judgment signal other than the at least one notification signal in the multiple judgment signals to obtain multiple first test cases, where the first test cases are test cases that require sending notifications, The plurality of test cases includes the plurality of first test cases.

3. The method according to claim 2, characterized in that The multiple judgment signals also include at least one non-notification signal, and the parsing of the test configuration file and combining to generate multiple test cases also includes: Combining each of the non-notification signals in each of the test scenarios with a judgment signal other than the at least one notification signal in the multiple judgment signals to obtain multiple second test cases, where the second test cases are test cases that do not require sending notifications, The plurality of test cases also includes the plurality of second test cases.

4. The method according to claim 3, characterized in that The configuration parameters of each test scenario also include a value of a monitoring duration field. Before running each test case and triggering each test scenario in the target test server, the method further includes: If the value of the monitoring duration field of the test case exists, the value of the monitoring duration field of the test case is sent to the target test server, so that the target test server sets the monitoring duration of the test scenario according to the value of the monitoring duration field of the test case, and different test cases correspond to different monitoring durations; The running of each of the test cases to trigger each of the test scenarios in the target test server includes: Run each of the test cases to trigger each of the test scenarios in the target test server, so that the target test server sends notifications corresponding to each of the test scenarios according to the monitoring duration of each of the test scenarios.

5. The method according to claim 4, characterized in that The obtaining of the test results of each of the test cases comprises: If the value of the monitoring duration field of the test case does not exist, obtaining the test result of the test case; When the value of the monitoring duration field of the test case exists, the test result of the test case is obtained according to a preset time period.

6. The method according to claim 4, characterized in that Before parsing the test configuration file and combining to generate a plurality of test cases, the method further includes: receiving a target value input by a user for a target field, wherein the target field is a monitoring duration field of a target test scenario in the test configuration file; Modify the value of the target field to the target value, where the target value is a value smaller than the value in the target field; The sending the value of the monitoring duration field of the test case to the target test server includes: Sending the target value to the target test server, so that the target test server sets the target monitoring duration of the target test scenario according to the target value; The running of each of the test cases to trigger each of the test scenarios in the target test server includes: Run the test case of the target test scenario, trigger the target test scenario in the target test server, so that the target test server sends a notification corresponding to the target test scenario according to the monitoring duration.

7. A testing device for a notification scenario, characterized in that: Applied to a first device, the apparatus comprises: A first acquisition module, configured to acquire a test configuration file of the notification scenario, wherein the test configuration file includes configuration parameters of multiple test scenarios; A parsing module, used for parsing the test configuration file, combining and generating a plurality of test cases, wherein different test cases correspond to different configuration parameters; A running module, used to run each of the test cases and trigger each of the test scenarios in the target test server, so that the target test server sends notifications corresponding to each of the test scenarios; The second acquisition module is used to acquire the test results of each of the test cases and send the test results of the multiple test cases to the user terminal.

8. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the testing method for the notification scenario according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for testing the notification scenario according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the testing method for the notification scenario as described in any one of claims 1-6.