Disclosure of Invention
The present invention is directed to provide a method, an apparatus, a device and a storage medium for testing scene entry, so as to solve the above technical problems.
In a first aspect, an embodiment of the present application provides a test scenario entry method, where the method includes:
retrieving and judging whether the scene library has the content to be input:
if yes, the content to be input is not stored in a scene library any more;
and if not, inputting the content to be input into a scene library.
With reference to the first aspect, in a first implementation manner of the first aspect, the method further includes:
setting a mapping relation between modules belonging to the test scene content and the action and a mapping relation between the modules and the resource to form a mapping relation network;
judging whether a complete mapping relation network of the content to be input exists in a scene library according to the mapping relation network:
and if not, additionally inputting the test scene content with the mapping relation with the content to be input into a scene library.
With reference to the first aspect and the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the setting a mapping relationship between modules and actions belonging to the test scenario content and a mapping relationship between the modules and resources to form a mapping relationship network includes:
setting mapping relations of a plurality of modules corresponding to a plurality of actions;
and setting a mapping relation of one module corresponding to a plurality of resources.
With reference to the first aspect and the first implementation manner of the first aspect, in a third implementation manner of the first aspect, the method further includes:
according to whether all corresponding operation details exist in the content retrieval database of the content to be entered and the test scene content which has a mapping relation with the content to be entered:
and if not, the missing corresponding operation details are additionally recorded into the scene library.
In a second aspect, an embodiment of the present application provides a test scenario entry apparatus, where the apparatus includes:
the retrieval unit is configured for retrieving and judging whether the content to be input exists in the scene library or not;
the stopping unit is configured to store the content to be input to the scene library no longer;
and the recording unit is configured to record the content to be recorded into the scene library.
With reference to the second aspect, in a first implementation manner of the second aspect, the apparatus further includes:
the mapping setting unit is configured for setting a mapping relation between the module and the action belonging to the test scene content and a mapping relation between the module and the resource to form a mapping relation network;
the mapping searching unit is configured to judge whether a complete mapping relation network of the content to be input exists in a scene library according to the mapping relation network;
and the mapping and supplementing unit is configured for supplementing the test scene content with the content to be input into a scene library.
With reference to the second aspect and the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the mapping setting unit includes:
the first setting module is used for setting mapping relations of a plurality of modules corresponding to a plurality of actions;
and the second setting module is configured to set the mapping relation of one module corresponding to the plurality of resources.
With reference to the second aspect and the first implementation manner of the second aspect, in a third implementation manner of the second aspect, the apparatus further includes:
the operation retrieval unit is configured to retrieve whether all corresponding operation details exist in a database according to the content to be entered and the test scene content which has a mapping relation with the content to be entered;
and the operation supplementary recording unit is configured to supplement and record the lacking corresponding operation details into the scene library.
In a third aspect, an embodiment of the present application provides an apparatus, including: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform the method according to any of the embodiments of the first aspect and the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, where the computer program is executed by a processor to implement the method according to any one of the embodiments of the first aspect and the first aspect.
The beneficial effect of the invention is that,
according to the test scene entry method provided by the invention, a big data-based method is adopted, the file to be entered is retrieved, and the preset extensible scene library is adopted, so that the entry mode of the scene library is simplified, the repeated scene entry of the scene library is effectively reduced, and the scene entry efficiency is improved.
The test scene entry device provided by the invention has the advantages that the method based on big data is adopted, the file to be entered is retrieved, the preset extensible scene library is adopted, the entry mode of the scene library is simplified, the repeated scene entry of the scene library is effectively reduced, and the scene entry efficiency is improved.
The device provided by the invention can execute the test scene entry method provided by the invention, and the method based on big data is adopted, the file to be entered is retrieved, and the preset extensible scene library is adopted, so that the entry mode of the scene library is simplified, the repeated scene entry of the scene library is effectively reduced, and the scene entry efficiency is improved.
The computer readable storage medium storing the computer program provided by the invention can realize the test scene entry method provided by the invention when the program is executed by the processor, and the entry mode of the scene library is simplified by retrieving the file to be entered and adopting the preset extensible scene library, thereby effectively reducing the repeated scene entry of the scene library and improving the scene entry efficiency.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
The embodiment of the application provides a test scene entry method, which comprises the following steps:
retrieving and judging whether the scene library has the content to be input:
if yes, the content to be input is not stored in a scene library any more;
and if not, inputting the content to be input into a scene library.
In a preferred embodiment, the method further comprises:
setting a mapping relation between modules and actions belonging to the content of a test scene and a mapping relation between the modules and resources to form a mapping relation network (preferably, setting a mapping relation that a plurality of modules correspond to a plurality of actions; setting a mapping relation that one module corresponds to a plurality of resources);
judging whether a complete mapping relation network of the content to be input exists in a scene library according to the mapping relation network:
and if not, additionally inputting the test scene content with the mapping relation with the content to be input into a scene library.
In another preferred embodiment, the method further comprises:
according to whether all corresponding operation details exist in the content retrieval database of the content to be entered and the test scene content which has a mapping relation with the content to be entered: if not, the missing corresponding operation details are additionally recorded into the scene library
In order to facilitate understanding of the invention, the test scenario entry method provided by the invention is further described below by using the principle of entering the test scenario in the invention and combining the process of entering the test scenario in the embodiment.
Example 1
Referring to fig. 1, the present embodiment provides a test scenario entry method, which includes the following specific steps:
the test scenario content includes modules (e.g., calculation, storage), actions (e.g., addition, deletion, modification, query), resources (e.g., host, hard disk, network), and operation details formed by the combination of the modules, the actions, and the resources.
And S1, before the test scene content is recorded into the scene library, searching and judging whether the content to be recorded exists in the scene library.
And S2, if the same test scene content exists in the scene library, stopping recording.
And S3, if the same test scene content does not exist in the scene library, recording the content to be recorded into the scene library.
Example 2
And S1, before the test scene content is recorded into the scene library, searching and judging whether the content to be recorded exists in the scene library.
And S2, if the same test scene content exists in the scene library, stopping recording.
And S3, if the same test scene content does not exist in the scene library, recording the content to be recorded into the scene library.
And S4, setting the mapping relations of a plurality of modules corresponding to a plurality of actions and the mapping relations of one module corresponding to a plurality of resources to form a mapping relation network among the test scene contents.
S5, judging whether a complete mapping relation network of the content to be recorded exists in the scene library according to the mapping relation network: if the complete mapping relation network of the content to be input does not exist, the test scene content having the mapping relation with the content to be input is additionally input into the scene library.
And searching whether all corresponding operation details exist in a database according to the content to be entered and the test scene content which has a mapping relation with the content to be entered, and if the scene library does not include all corresponding operation details, additionally entering the lacking corresponding operation details into the scene library.
For example, the user enters a module, action, and resource universe:
(1) if the module, the action and the resource to be recorded are completely matched with the existing records in the scene library, displaying the operation details, and if the operation details exist, abandoning the recording; and if the operation details do not exist, entering the operation details, and associating the entered module, action, resource and operation details through the ID.
(2) If the module to be recorded is matched with the existing records in the scene library, and the action and the resource are not matched, the action and the resource are respectively recorded into the corresponding areas in the scene library, then the operation details are recorded, and the recorded module, the action, the resource and the operation details are associated through the ID.
(3) If the module to be recorded, the action and the resource are matched with the existing records in the scene library and the resource is not matched, recording the resource into the corresponding position in the scene library, then recording operation details, and associating the recorded module, action, resource and operation details through the ID.
(4) And (3) if the module to be recorded is not matched with the existing records in the scene library, recording the module into the scene library, and then executing the methods (2) and (3).
If the user only inputs the content of the test scene of the action and the resource part:
(1) and if the resources and the actions to be input are matched with the existing records in the scene library, automatically matching the existing module according to the mapping relationship network of the resources and the actions and displaying the operation details, and inputting the operation details if the operation details are not repeated.
(2) And if the resources are matched and the resources are not matched, automatically matching the existing module, inputting the action into the corresponding position in the scene library, inputting operation details, and associating the input module, the action, the resources and the operation details through the ID.
(3) And (3) if the resources are not matched, recording the resources, and executing the method in the step (2) according to a mapping relation network recording module of the three.
The embodiment of the application provides a test scene input device, the device includes:
the retrieval unit is configured for retrieving and judging whether the content to be input exists in the scene library or not;
the stopping unit is configured to store the content to be input to the scene library no longer;
and the recording unit is configured to record the content to be recorded into the scene library.
In a preferred embodiment, the apparatus further comprises:
the mapping setting unit is configured for setting a mapping relation between the module and the action belonging to the test scene content and a mapping relation between the module and the resource to form a mapping relation network;
the mapping searching unit is configured to judge whether a complete mapping relation network of the content to be input exists in a scene library according to the mapping relation network;
and the mapping and supplementing unit is configured for supplementing the test scene content with the content to be input into a scene library.
Wherein the mapping setting unit includes:
the first setting module is used for setting mapping relations of a plurality of modules corresponding to a plurality of actions;
and the second setting module is configured to set the mapping relation of one module corresponding to the plurality of resources.
In another preferred embodiment, the apparatus further comprises:
the operation retrieval unit is configured to retrieve whether all corresponding operation details exist in a database according to the content to be entered and the test scene content which has a mapping relation with the content to be entered;
and the operation supplementary recording unit is configured to supplement and record the lacking corresponding operation details into the scene library.
An embodiment of the present application provides an apparatus, including: one or more processors; a memory for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to perform the methods provided by embodiments of the present application.
The embodiment of the present application provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to implement the method provided by the embodiment of the present application when executed by a processor.
The above disclosure is only for the preferred embodiments of the present invention, but the present invention is not limited thereto, and any non-inventive changes that can be made by those skilled in the art and several modifications and amendments made without departing from the principle of the present invention shall fall within the protection scope of the present invention.