Test methods and apparatus

By decoupling the attribute information of atomic events from those of composite events, atomic events only need to be configured and modified once, thus solving the problem of high configuration and maintenance costs for composite events and achieving cost reduction.

CN116263743BActive Publication Date: 2026-11-24DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111539669.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2026-11-24
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

In the existing technology, the configuration and maintenance costs of combined events are relatively high, especially when there are identical atomic events among multiple combined events, it is necessary to repeatedly configure and modify the attribute information of atomic events.

Method used

The attribute information of atomic events is decoupled from that of composite events. The attribute information of atomic events is configured separately, while only the identifiers of the included atomic events are specified in the composite events. The configuration information of the composite events is generated by splitting the test requirement text and then executed in the target software.

Benefits of technology

It reduces the configuration cost of combined events, and only requires modification to a separate configuration when modifying atomic events, thus reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116263743B_ABST
    Figure CN116263743B_ABST
Patent Text Reader

Abstract

This disclosure provides a testing method and apparatus, relating to the field of automated testing technology. The method includes: splitting the test requirement text of target software into at least two descriptive terms; if a first descriptive term is not present in the atomic event library, adding the attribute information of a first atomic event corresponding to the first descriptive term to the atomic event library, the attribute information including: the descriptive term of the atomic event, the identifier of the atomic event, and the operation attribute of the atomic event; generating configuration information for a target combined event based on the identifier of the first atomic event and the identifier of the second atomic event, wherein the second atomic event is an atomic event other than the first atomic event; and executing the target combined event in the target version of the target software based on the configuration information of the target combined event and the attribute information of the target atomic events. This disclosure configures the attribute information of atomic events separately, and only specifies the identifiers of the included atomic events in the combined event, thereby reducing configuration and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of automated testing technology, and in particular to a testing method and device. Background Technology

[0002] In the field of computer software technology, software needs to be tested before release to ensure it functions correctly. For example, before releasing an application, its installation, startup, and operation processes need to be thoroughly tested to ensure that users can use the application normally. In some complex software, multiple events can be combined for testing. For instance, in an application, the events "take a picture" and "release" can be combined for testing.

[0003] In the above test scenario, it is necessary to pre-configure combined events, that is, to specify multiple events to form a combined event. Therefore, how to reduce the configuration and maintenance costs of combined events is an urgent problem to be solved. Summary of the Invention

[0004] This disclosure provides a testing method and apparatus that can reduce the configuration and maintenance costs of combined events.

[0005] In a first aspect, embodiments of this disclosure provide a testing method, the method comprising:

[0006] The test requirement text of the target software is split into at least two descriptive words, and each descriptive word corresponds to a target atomic event;

[0007] If at least one of the at least two descriptors is not present in the atomic event library, then the attribute information of the first atomic event corresponding to the first descriptor is added to the atomic event library. The atomic event library is used to store the attribute information of atomic events, and the attribute information includes: the descriptor of the atomic event, the identifier of the atomic event, and the operation attribute of the atomic event.

[0008] Based on the identifier of the first atomic event and the identifier of the second atomic event, configuration information of the target combined event corresponding to the test requirement text is generated, wherein the second atomic event is an atomic event other than the first atomic event among at least two target atomic events;

[0009] Based on the configuration information of the target combined event and the attribute information of the target atomic event, the target combined event is executed in the target version of the target software.

[0010] Secondly, embodiments of this disclosure provide a testing apparatus, the apparatus comprising:

[0011] The test requirement text splitting module is used to split the test requirement text of the target software into at least two descriptive words, each of which corresponds to a target atomic event;

[0012] An attribute information adding module is used to add the attribute information of the first atomic event corresponding to the first descriptor to the atomic event library if at least one of the at least two descriptors is not present in the atomic event library. The atomic event library is used to store the attribute information of atomic events, and the attribute information includes: the descriptor of the atomic event, the identifier of the atomic event, and the operation attribute of the atomic event.

[0013] The configuration information generation module is used to generate configuration information for the target combined event corresponding to the test requirement text based on the identifier of the first atomic event and the identifier of the second atomic event, wherein the second atomic event is an atomic event other than the first atomic event among at least two target atomic events;

[0014] The combined event execution module is used to execute the target combined event in the target version of the target software based on the configuration information of the target combined event and the attribute information of the target atomic event.

[0015] Thirdly, embodiments of this disclosure provide an electronic device, including: at least one processor and a memory;

[0016] The memory stores computer-executed instructions;

[0017] The at least one processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as described in the first aspect.

[0018] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause a computing device to implement the method described in the first aspect.

[0019] Fifthly, embodiments of this disclosure provide a computer program for implementing the method as described in the first aspect.

[0020] This disclosure provides a testing method and apparatus. The method includes: splitting the test requirement text of target software into at least two descriptive words, each descriptive word corresponding to a target atomic event; if at least one first descriptive word among the at least two descriptive words is not present in the atomic event library, then adding the attribute information of the first atomic event corresponding to the first descriptive word to the atomic event library, the atomic event library being used to store the attribute information of atomic events, the attribute information including: the descriptive word of the atomic event, the identifier of the atomic event, and the operation attribute of the atomic event; generating configuration information of a target combined event corresponding to the test requirement text based on the identifier of the first atomic event and the identifier of the second atomic event, the second atomic event being an atomic event other than the first atomic event among the at least two target atomic events; and executing the target combined event in the target version of the target software based on the configuration information of the target combined event and the attribute information of the target atomic events. This disclosure can decouple the attribute information of atomic events and combined events, that is, the attribute information of atomic events is configured separately, and the combined event only specifies the identifiers of the included atomic events. In this way, atomic events only need to be configured once, reducing configuration costs. Furthermore, when modifying an atomic event, only the individual configuration of that atomic event needs to be modified, rather than modifying it in every combined event, thus reducing maintenance costs. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram illustrating the relationship between the testing process and the development process to which this invention applies;

[0023] Figure 2 This is a flowchart of one step of the testing method provided in this embodiment of the disclosure;

[0024] Figure 3 This is a schematic diagram of the testing process based on test requirement text provided in an embodiment of this disclosure;

[0025] Figure 4 This is a structural block diagram of a testing apparatus provided in an embodiment of this disclosure;

[0026] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0028] The embodiments disclosed herein can be applied to automated software testing scenarios. Automated software testing is typically performed after the software has been developed. In practice, the development process is usually carried out in multiple iterations or in parallel. Figure 1 This is a schematic diagram illustrating the relationship between the testing and development processes applicable to embodiments of the present invention. (Refer to...) Figure 1 As shown, software module S1 and software module S2 are two independent modules. In actual development, they can be developed independently, with S1 undergoing test process T1 and S2 undergoing test process T2. Test processes T1 and T2 can also be independent. After software modules S1 and S2 pass the tests, they can be merged and tested in process T3. After test T3 passes, the software resulting from the merged modules S1 and S2 can be released.

[0029] This invention can be applied to any of the above-described test processes, where the combined events used in the test process need to be pre-configured.

[0030] In existing technologies, the configuration of combined events includes all information about each atomic event, such as the interface where the atomic event is located, the action type of the atomic event, the operation control of the atomic event, and the operation control corresponding to the atomic event. Therefore, if multiple combined events share the same atomic event, that atomic event needs to be configured multiple times, resulting in high configuration costs. Furthermore, if the properties of the atomic event need to be modified, it needs to be modified in multiple combined events, leading to high maintenance costs.

[0031] To address the aforementioned issues, embodiments of this disclosure decouple the attribute information of atomic events from combined events. Specifically, the attribute information of atomic events is configured separately, while combined events only specify the identifiers of the included atomic events. This way, atomic events only need to be configured once, reducing configuration costs. Furthermore, when modifying an atomic event, only its individual configuration needs to be changed, rather than modifying it in every combined event, further reducing maintenance costs.

[0032] The technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present disclosure will now be described with reference to the accompanying drawings.

[0033] Figure 2 This is a flowchart of one step of the testing method provided in the embodiments of this disclosure. Figure 2 The method shown can be applied to electronic devices. (See reference...) Figure 2 As shown, the test method includes:

[0034] S101: Split the test requirement text of the target software into at least two descriptive words, each descriptive word corresponding to a target atomic event.

[0035] The target software can be any software to be tested, including applications and web pages. This disclosure does not limit its scope.

[0036] Test requirement text is used to describe test requirements in text. For example, test requirement text could be "Log in, take a video, and publish it." It can be seen that each test requirement text corresponds to a test case, which is used to test the target software through one or more atomic events. Here, an atomic event is the atomic event corresponding to the descriptive words in the test requirement text. An atomic event is the smallest executable sequence of events. For example, when a test case is used to test the target software's video recording function, the corresponding atomic event could be the "take a video" event. As another example, when a test case is used to test the function of taking and publishing videos after logging in, the corresponding atomic events could be the "login" event, the "take a video" event, and the "publish" event.

[0037] It can be seen that there is an execution order among the above atomic events.

[0038] For test cases that test the target software using multiple atomic events, the test case can only be executed after the multiple atomic events are grouped into a combined event, based on the configuration information of that combined event. Therefore, for existing test cases, the configuration information for the corresponding combined event already exists, and the test case can be executed directly. However, for newly added test cases, the configuration information for the combined event corresponding to the new test case must be created first, and then the test case can be executed.

[0039] It is understood that in this embodiment of the disclosure, at least two atomic events corresponding to the descriptive words in the test requirement text are referred to as target atomic events for the convenience of subsequent reference, and do not constitute a limitation on atomic events.

[0040] S102: If at least one of the above two descriptors is not present in the atomic event library, the attribute information of the first atomic event corresponding to the first descriptor is added to the atomic event library. The atomic event library is used to store the attribute information of atomic events, including: the descriptor of the atomic event, the identifier of the atomic event, and the operation attribute of the atomic event.

[0041] Understandably, the first descriptor is one of at least two descriptors that does not exist in the atomic event library, meaning the first atomic event corresponding to this first descriptor is not configured. In this case, it is necessary to manually set the attribute information of the first atomic event and add the set attribute information of the first atomic event to the atomic event library to configure the first atomic event.

[0042] Of course, the first atomic event mentioned above may not exist in at least two target atomic events. That is, the descriptor of each target atomic event already exists in the atomic event library. Therefore, it is not necessary to configure atomic events for the test cases of the test requirement text, but only to configure combined events for the test cases of the test requirement text. In this case, the configuration cost of test cases is minimized to the greatest extent.

[0043] The attribute information of the aforementioned atomic event may include, but is not limited to, at least one of the following: public attributes and operational attributes. Public attributes include at least one of the following: the identifier of the atomic event, the descriptor of the atomic event, and the type of the atomic event. Operational attributes correspond to the type of the atomic event.

[0044] The atomic event identifier is used to uniquely identify an atomic event and can be a number or a string. The atomic event identifier is used to search for atomic events and to generate combined events, which include the atomic event identifier.

[0045] The descriptor of an atomic event is a textual description of the atomic event, such as "login".

[0046] Atomic events can be of at least one of the following types, including but not limited to: operation events, blocking events, blacklist events, whitelist events, and jump events. Different types of atomic events correspond to different operation attributes.

[0047] When an atomic event is classified as an operation event, it indicates that the atomic event is used to perform an operation on the interface. Operation events can include, but are not limited to, operations on controls within the interface and swipe operations on the interface. Therefore, the operation attributes of this atomic event include: the interface where the atomic event occurs, the action type of the atomic event, and the control corresponding to the atomic event.

[0048] The interface where the atomic event occurs is used to indicate which interface the operation is performed on. The interface can usually be represented by a unique identifier, such as the activity name.

[0049] The action types of atomic events can include, but are not limited to: click, long press, swipe, etc.

[0050] The corresponding control for an atomic event can be represented by its path in the interface, for example, using XPath. The control may or may not exist. When the control exists and the atomic event's action type is "click," the atomic event can be a click on the control in the interface. When the control does not exist and the atomic event's action type is "swipe," the atomic event can be a swipe on the interface.

[0051] This disclosure embodiment can test whether each operation control of each interface in the target software is normal through operation events, thereby testing the basic functions of the target software and ensuring that the basic functions of the target software are normal.

[0052] When an atomic event is classified as a masking event, it means that the atomic event is used to mask the operation controls in the interface, that is, to disallow operation on the corresponding operation controls in the interface. Therefore, the operation attributes of this atomic event include: the interface masked by the atomic event and the operation control corresponding to the atomic event.

[0053] The interface that is masked by atomic events can also be represented by a unique identifier for the interface, such as the activity name.

[0054] The operation controls corresponding to atomic events are operation controls that do not perform any operations. They can be represented by the path of the operation control in the interface, for example, by XPath.

[0055] The embodiments disclosed herein can test whether the functions that do not allow operation of certain controls on certain interfaces are normal by blocking events, which can cover more test scenarios and help improve test coverage.

[0056] When the type of an atomic event is a blacklist event or a whitelist event, the operation attributes of the atomic event include: the interface where the atomic event is located.

[0057] When the type of an atomic event is a blacklist event, the interface containing the atomic event will not be displayed.

[0058] When the type of an atomic event is a whitelist event, the interface where the atomic event is located is the displayed interface.

[0059] This disclosure embodiment can test whether certain functions that are not displayed on certain interfaces are normal by using blacklist events, and test whether certain functions that are displayed on certain interfaces are normal by using whitelist events. This can cover more test scenarios and help improve test coverage.

[0060] When the type of an atomic event is a jump event, the operation attribute of the atomic event includes the target interface to jump to.

[0061] The target interface to navigate to can be either an interface within the target software or an interface outside the target software. When the target interface is within the target software, it can be represented by its activity name. When the target interface is outside the target software, a navigation path is required to represent it. This navigation typically does not require user intervention; it automatically navigates to the target interface after entering another interface.

[0062] The embodiments disclosed herein can test whether the interface jump is normal by jumping events, which helps to improve test coverage.

[0063] Figure 3 This is a schematic diagram of a testing process based on test requirement text provided in an embodiment of this disclosure. (Refer to...) Figure 3 As shown, under the premise that both the atomic event library and the combined event library are empty, two target combined events are executed sequentially.

[0064] After obtaining the test requirement text "Log in, shoot a video and publish it", the test requirement text is first split into three descriptive words: "Log in", "Shoot", and "Publish", which correspond to three atomic events: login event, shooting event, and publishing event.

[0065] Then, since the descriptors "login", "take a picture", and "publish" do not exist in the atomic event library, it is necessary to manually set the attribute information of the login event, the take a picture event, and the publish event to add them to the atomic event library. At this point, the atomic event library contains three atomic events.

[0066] Next, configuration information for the combined event CE1 is generated based on the identifiers corresponding to the login event, shooting event, and publishing event, and this configuration information is stored in the combined event library.

[0067] Finally, execute CE1.

[0068] When the test requirement text "Log in and take a picture to use special effects" is obtained, the test requirement text is first split into three descriptive words: "log in", "take a picture" and "special effects processing".

[0069] Then, since the descriptors "login" and "shoot" both exist in the atomic event library, it is only necessary to manually set the attribute information of the effect processing event to add it to the atomic event library. At this point, the atomic event library contains four atomic events.

[0070] Next, configuration information for the combined event CE2 is generated based on the identifiers of the login event, shooting event, and special effects processing event, and this configuration information is stored in the combined event library.

[0071] Finally, execute CE2.

[0072] S103: Based on the identifier of the first atomic event and the identifier of the second atomic event, generate configuration information for the target combined event corresponding to the test requirement text, wherein the second atomic event is an atomic event other than the first atomic event among at least two target atomic events.

[0073] The configuration information for the target combined event includes the identifiers of the first atomic event and the second atomic event. The second atomic event is an atomic event whose descriptor already exists in the atomic event library among at least two target atomic events; that is, an atomic event that has been configured among at least two atomic events.

[0074] The configuration information for the target combined event can be stored in the combined event library for easy re-execution during subsequent testing. The configuration information for the combined event typically records the identifiers of the atomic events in sequence, which indicates the execution order of the atomic events.

[0075] Of course, the aforementioned combined events also have an identifier for uniquely identifying the combined event and for retrieval. Thus, a combined event can include an identifier for the combined event and identifiers for at least two atomic events. For example, a combined event {ID1, (ID2, ID3, ID4, ID5)}, where ID1 is the identifier for the combined event, and ID2 to ID5 are the identifiers of the four atomic events included in the combined event, and the atomic events are executed in the following order: atomic event corresponding to ID2 -> atomic event corresponding to ID3 -> atomic event corresponding to ID4 -> atomic event corresponding to ID5.

[0076] As can be seen, since there is a second atomic event that does not need to be configured in this embodiment, only the combined event needs to be configured when testing the requirement text, and the first atomic event needs to be configured when the first atomic event exists, thus reducing the configuration cost.

[0077] S104: Execute the target combination event in the target software of the target version based on the configuration information of the target combination event and the attribute information of the target atomic event.

[0078] In practical applications, target software is typically under continuous iterative development, with each iteration resulting in a different version of the target software. These different versions have minor differences. Therefore, successful execution of a combined event in one version does not guarantee success in other versions. The target version in S104 refers to any version of the target software to be tested.

[0079] When executing a target composite event, the process can begin by extracting the identifier of the target atomic event from the target composite event; then, based on the identifier, the attribute information of the target atomic event is retrieved from the atomic event library; finally, the target atomic event is executed based on its attribute information. For example, when the target atomic event is an operation event, its attribute information might contain the interface, action type, and operation control P1, click, and BT1, respectively. Therefore, executing the target atomic event would involve clicking BT1 within P1.

[0080] Optionally, the configuration information of the target combined event may also include an execution strategy between at least two target atomic events, which may include: the order in which the at least two target atomic events are executed, and the time interval between the at least two target atomic events.

[0081] This order can be the order in which the identifiers of the target atomic events are listed in the configuration information, or it can be understood as the priority of the target atomic events.

[0082] In practical applications, the time interval between two adjacent target atomic events can be the same or different.

[0083] The embodiments disclosed herein can flexibly set the execution order and time interval of target atomic events by means of an execution strategy when executing target combined events, thereby improving the flexibility of combined events.

[0084] During the execution of the above target combined events, if each target atomic event executes successfully, it means that the target combined event has been executed successfully, and the test case has been executed successfully. If some or all target atomic events fail to execute, it means that the target combined event has failed, and the test case has failed.

[0085] In this embodiment of the disclosure, the atomic event that is successfully executed out of at least two target atomic events is referred to as the third atomic event. Therefore, the aforementioned target version can be recorded in the atomic event library as the effective version of the third atomic event.

[0086] Furthermore, an atomic event that fails to execute among at least two target atomic events can be designated as the fourth atomic event. Therefore, the aforementioned target version can be recorded in the atomic event library as the failed version of the fourth atomic event.

[0087] Through the above process, the validity or invalidation status of each atomic event can be queried in the atomic event database, which helps in the management of atomic events.

[0088] Specifically, it can receive a first viewing instruction and, in response to the first viewing instruction, display the atomic events and the invalid version that exist.

[0089] Optionally, it can also prompt for modification of the corresponding atomic events in the invalid version.

[0090] In addition, it can receive a second viewing command and, in response to the second viewing command, display the atomic events and the effective version that exist.

[0091] Corresponding to the test method in the above embodiments, Figure 4 This is a structural block diagram of a testing apparatus provided in an embodiment of this disclosure, applied to the aforementioned testing system. For ease of explanation, only the parts related to the embodiments of this disclosure are shown. (Refer to...) Figure 4 The aforementioned testing device 200 includes: a test requirement text splitting module 201, an attribute information adding module 202, a configuration information generating module 203, and a combined event execution module 204.

[0092] The test requirement text splitting module 201 is used to split the test requirement text of the target software into at least two descriptive words, each of which corresponds to a target atomic event.

[0093] The attribute information adding module 202 is used to add the attribute information of the first atomic event corresponding to the first descriptor to the atomic event library if at least one of the at least two descriptors does not exist in the atomic event library. The atomic event library is used to store the attribute information of atomic events, and the attribute information includes: the descriptor of the atomic event, the identifier of the atomic event, and the operation attribute of the atomic event.

[0094] The configuration information generation module 203 is used to generate configuration information for the target combined event corresponding to the test requirement text based on the identifier of the first atomic event and the identifier of the second atomic event, wherein the second atomic event is an atomic event other than the first atomic event among at least two target atomic events.

[0095] The combined event execution module 204 is used to execute the target combined event in the target version of the target software according to the configuration information of the target combined event and the attribute information of the target atomic event.

[0096] Optionally, the device further includes:

[0097] The effective record module is used to record the target version as the effective version of the third atomic event in the atomic event library if the third atomic event of at least two target atomic events is executed successfully.

[0098] The failure recording module is used to record the target version as the failed version of the fourth atomic event in the atomic event library if the fourth atomic event of at least two target atomic events fails to execute.

[0099] Optionally, the device further includes:

[0100] The first viewing instruction receiving module is used to receive the first viewing instruction.

[0101] The first display module is configured to, in response to the first viewing instruction, display the atomic event with a failed version and the failed version.

[0102] Optionally, the device further includes:

[0103] The second viewing instruction receiving module is used to receive the second viewing instruction.

[0104] The second display module is used to respond to the second viewing instruction to display the atomic events with effective versions and the effective versions.

[0105] Optionally, the device further includes:

[0106] The modification prompt module is used to prompt the corresponding atomic event to be modified in the invalid version.

[0107] Optionally, the configuration information of the target combined event may also include an execution strategy between at least two target atomic events, the execution strategy including: the order of execution between the at least two target atomic events and the time interval between execution between the at least two target atomic events.

[0108] Optionally, the attribute information of the atomic event may further include at least one of the following: the type of the atomic event, wherein the operation attribute corresponds to the type of the atomic event.

[0109] Optionally, when the type of the atomic event is an operation event, the operation attributes include: the interface where the atomic event is located, the action type of the atomic event, and the operation control corresponding to the atomic event.

[0110] When the type of the atomic event is a masking event, the operation attributes include: the interface masked by the atomic event and the operation control corresponding to the atomic event.

[0111] When the type of the atomic event is a blacklist event or a whitelist event, the operation attribute includes: the interface where the atomic event is located.

[0112] When the type of the atomic event is a jump event, the operation attribute includes the target interface to jump to.

[0113] The testing apparatus provided in this embodiment can be used to perform the above-described test. Figure 2 The technical solutions of the method embodiments shown are similar in implementation principle and technical effect, and will not be described again here.

[0114] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device 600 includes a memory 602 and at least one processor 601.

[0115] Among them, memory 602 stores computer-executed instructions.

[0116] At least one processor 601 executes computer execution instructions stored in memory 602, causing electronic device 601 to perform the aforementioned functions. Figure 2 The method in the middle.

[0117] In addition, the electronic device may also include a receiver 603 and a transmitter 604, wherein the receiver 603 is used to receive information from other devices or equipment and forward it to the processor 601, and the transmitter 604 is used to send information to other devices or equipment.

[0118] In a first example of the first aspect, this disclosure provides a testing method, the method comprising:

[0119] The test requirement text of the target software is split into at least two descriptive words, and each descriptive word corresponds to a target atomic event;

[0120] If at least one of the at least two descriptors is not present in the atomic event library, then the attribute information of the first atomic event corresponding to the first descriptor is added to the atomic event library. The atomic event library is used to store the attribute information of atomic events, and the attribute information includes: the descriptor of the atomic event, the identifier of the atomic event, and the operation attribute of the atomic event.

[0121] Based on the identifier of the first atomic event and the identifier of the second atomic event, configuration information of the target combined event corresponding to the test requirement text is generated, wherein the second atomic event is an atomic event other than the first atomic event among at least two target atomic events;

[0122] Based on the configuration information of the target combined event and the attribute information of the target atomic event, the target combined event is executed in the target version of the target software.

[0123] Based on the first example of the first aspect, in the second example of the first aspect, the method further includes:

[0124] If the third atomic event in at least two target atomic events is executed successfully, then the target version is recorded in the atomic event library as the effective version of the third atomic event;

[0125] If the fourth atomic event in at least two target atomic events fails to execute, the target version is recorded in the atomic event library as the failed version of the fourth atomic event.

[0126] Based on the second example of the first aspect, in the third example of the first aspect, the method further includes:

[0127] Receive the first viewing instruction;

[0128] In response to the first viewing command, the atomic events with failed versions and the failed versions are displayed.

[0129] Based on the second example of the first aspect, in the fourth example of the first aspect, the method further includes:

[0130] Receive the second viewing command;

[0131] In response to the second viewing instruction, the atomic events with effective versions and the effective versions are displayed.

[0132] Based on the third example of the first aspect, in the fifth example of the first aspect, the method further includes:

[0133] The suggestion is to modify the corresponding atomic event in the invalid version.

[0134] Based on any one of the first to fifth examples of the first aspect, in the sixth example of the first aspect, the configuration information of the target combined event further includes an execution strategy between at least two target atomic events, the execution strategy including: the order of execution between the at least two target atomic events and the time interval between execution between the at least two target atomic events.

[0135] Based on any one of the first to fifth examples of the first aspect, in the seventh example of the first aspect, the attribute information of the atomic event further includes at least one of the following: the type of the atomic event, and the operation attribute corresponds to the type of the atomic event.

[0136] Based on the seventh example of the first aspect, in the eighth example of the first aspect, when the type of the atomic event is an operation event, the operation attribute includes: the interface where the atomic event is located, the action type of the atomic event, and the operation control corresponding to the atomic event;

[0137] When the type of the atomic event is a masking event, the operation attributes include: the interface masked by the atomic event and the operation control corresponding to the atomic event;

[0138] When the type of the atomic event is a blacklist event or a whitelist event, the operation attribute includes: the interface where the atomic event is located;

[0139] When the type of the atomic event is a jump event, the operation attribute includes the target interface to jump to.

[0140] In a first example of the second aspect, a testing apparatus is provided, the apparatus comprising:

[0141] The test requirement text splitting module is used to split the test requirement text of the target software into at least two descriptive words, each of which corresponds to a target atomic event;

[0142] An attribute information adding module is used to add the attribute information of the first atomic event corresponding to the first descriptor to the atomic event library if at least one of the at least two descriptors is not present in the atomic event library. The atomic event library is used to store the attribute information of atomic events, and the attribute information includes: the descriptor of the atomic event, the identifier of the atomic event, and the operation attribute of the atomic event.

[0143] The configuration information generation module is used to generate configuration information for the target combined event corresponding to the test requirement text based on the identifier of the first atomic event and the identifier of the second atomic event, wherein the second atomic event is an atomic event other than the first atomic event among at least two target atomic events;

[0144] The combined event execution module is used to execute the target combined event in the target version of the target software based on the configuration information of the target combined event and the attribute information of the target atomic event.

[0145] Based on the first example of the second aspect, in the second example of the second aspect, the device further includes:

[0146] An effective record module is used to record the target version as the effective version of the third atomic event in the atomic event library if the third atomic event in at least two target atomic events is executed successfully.

[0147] The failure recording module is used to record the target version as the failed version of the fourth atomic event in the atomic event library if the fourth atomic event of at least two target atomic events fails to execute.

[0148] Based on the second example of the second aspect, in the third example of the second aspect, the device further includes:

[0149] The first viewing instruction receiving module is used to receive the first viewing instruction;

[0150] The first display module is configured to, in response to the first viewing instruction, display the atomic event with a failed version and the failed version.

[0151] Based on the second example of the second aspect, in the fourth example of the second aspect, the device further includes:

[0152] The second viewing instruction receiving module is used to receive the second viewing instruction;

[0153] The second display module is used to respond to the second viewing instruction to display the atomic events with effective versions and the effective versions.

[0154] Based on the third example of the second aspect, in the fifth example of the second aspect, the device further includes:

[0155] The modification prompt module is used to prompt the corresponding atomic event to be modified in the invalid version.

[0156] Based on any one of the first to fifth examples of the second aspect, in the sixth example of the second aspect, the configuration information of the target combined event further includes an execution strategy between at least two target atomic events, the execution strategy including: the order of execution between the at least two target atomic events and the time interval between execution between the at least two target atomic events.

[0157] Based on any one of the first to fifth examples of the second aspect, in the seventh example of the second aspect, the attribute information of the atomic event further includes at least one of the following: the type of the atomic event, and the operation attribute corresponds to the type of the atomic event.

[0158] Based on the seventh example of the second aspect, in the eighth example of the second aspect, when the type of the atomic event is an operation event, the operation attribute includes: the interface where the atomic event is located, the action type of the atomic event, and the operation control corresponding to the atomic event;

[0159] When the type of the atomic event is a masking event, the operation attributes include: the interface masked by the atomic event and the operation control corresponding to the atomic event;

[0160] When the type of the atomic event is a blacklist event or a whitelist event, the operation attribute includes: the interface where the atomic event is located;

[0161] When the type of the atomic event is a jump event, the operation attribute includes the target interface to jump to.

[0162] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;

[0163] The memory stores computer-executed instructions;

[0164] The at least one processor executes computer execution instructions stored in the memory, causing the electronic device to implement the method described in any of the first aspects.

[0165] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause a computing device to implement the method described in any one of the first aspects.

[0166] Fifthly, according to one or more embodiments of the present disclosure, a computer program is provided for implementing the method described in any of the first aspects.

[0167] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0168] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0169] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A testing method, characterized in that, The method includes: The test requirement text of the target software is split into at least two descriptive words, and each descriptive word corresponds to a target atomic event; If at least one of the at least two descriptors is not present in the atomic event library, then the attribute information of the first atomic event corresponding to the first descriptor is added to the atomic event library. The atomic event library is used to store the attribute information of atomic events. The attribute information includes: the descriptor of the atomic event, the identifier of the atomic event, the operation attribute of the atomic event, and the type of the atomic event. The operation attribute corresponds to the type of the atomic event. Based on the identifier of the first atomic event and the identifier of the second atomic event, configuration information of the target combined event corresponding to the test requirement text is generated, wherein the second atomic event is an atomic event other than the first atomic event among at least two target atomic events; Based on the configuration information of the target combined event and the attribute information of the target atomic event, the target combined event is executed in the target version of the target software.

2. The method according to claim 1, characterized in that, The method further includes: If the third atomic event in at least two target atomic events is executed successfully, then the target version is recorded in the atomic event library as the effective version of the third atomic event; If the fourth atomic event in at least two target atomic events fails to execute, the target version is recorded in the atomic event library as the failed version of the fourth atomic event.

3. The method according to claim 2, characterized in that, The method further includes: Receive the first viewing instruction; In response to the first viewing command, the atomic events with failed versions and the failed versions are displayed.

4. The method according to claim 2, characterized in that, The method further includes: Receive the second viewing command; In response to the second viewing instruction, the atomic events with effective versions and the effective versions are displayed.

5. The method according to claim 3, characterized in that, The method further includes: The suggestion is to modify the corresponding atomic event in the invalid version.

6. The method according to any one of claims 1 to 5, characterized in that, The configuration information of the target combined event also includes an execution strategy between at least two target atomic events, the execution strategy including: the order of execution between at least two target atomic events and the time interval between execution between at least two target atomic events.

7. The method according to claim 1, characterized in that, When the type of the atomic event is an operation event, the operation attributes include: the interface where the atomic event is located, the action type of the atomic event, and the operation control corresponding to the atomic event; When the type of the atomic event is a masking event, the operation attributes include: the interface masked by the atomic event and the operation control corresponding to the atomic event; When the type of the atomic event is a blacklist event or a whitelist event, the operation attribute includes: the interface where the atomic event is located; When the type of the atomic event is a jump event, the operation attribute includes the target interface to jump to.

8. A testing apparatus, characterized in that, The device includes: The test requirement text splitting module is used to split the test requirement text of the target software into at least two descriptive words, each of which corresponds to a target atomic event; An attribute information adding module is used to add the attribute information of the first atomic event corresponding to the first descriptor to the atomic event library if at least one of the at least two descriptors is not present in the atomic event library. The atomic event library is used to store the attribute information of atomic events. The attribute information includes: the descriptor of the atomic event, the identifier of the atomic event, the operation attribute of the atomic event, and the type of the atomic event. The operation attribute corresponds to the type of the atomic event. The configuration information generation module is used to generate configuration information for the target combined event corresponding to the test requirement text based on the identifier of the first atomic event and the identifier of the second atomic event, wherein the second atomic event is an atomic event other than the first atomic event among at least two target atomic events; The combined event execution module is used to execute the target combined event in the target version of the target software based on the configuration information of the target combined event and the attribute information of the target atomic event.

9. An electronic device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, cause a computing device to implement the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Dynamic event execution method and device

    CN107133030A

  • Test method and device, electronic equipment and computer readable storage medium

    CN112685282A