CN115794609A - Script sharing method and device, electronic equipment and storage medium - Google Patents

Script sharing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115794609A
CN115794609A CN202211352125.1A CN202211352125A CN115794609A CN 115794609 A CN115794609 A CN 115794609A CN 202211352125 A CN202211352125 A CN 202211352125A CN 115794609 A CN115794609 A CN 115794609A
Authority
CN
China
Prior art keywords
script
shared
platform
repeated
sharing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211352125.1A
Other languages
Chinese (zh)
Inventor
吴明华
郑献
沙倩慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211352125.1A priority Critical patent/CN115794609A/en
Publication of CN115794609A publication Critical patent/CN115794609A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a script sharing method and device, electronic equipment and a storage medium. The script sharing method is applied to a script sharing platform and comprises the following steps: determining a platform test case of the script to be shared according to a preset incidence relation; checking the repeated condition of the script to be shared according to the identification of the platform test case; and sharing the script to be shared based on the repeated condition. The embodiment of the invention realizes the sharing of the script to be shared in the platform, so that a user can use the script to be shared through the platform, and the script is effectively prevented from being repeatedly compiled. The platform test case of the script to be shared is determined through the preset incidence relation, the standardization of the platform test case is improved, the repeated condition of the script to be shared is checked according to the identification of the platform test case, the script to be shared is shared based on the repeated condition, repeated sharing of the script to be shared is avoided, and the use experience of a user is improved.

Description

Script sharing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a script sharing method and apparatus, an electronic device, and a storage medium.
Background
At present, a script is used as an executable file and widely applied to the test process of various projects, some types of scripts can only be stored locally, and different users may write scripts with the same function due to the fact that the scripts cannot be shared among the users, and the working efficiency is low.
In the prior art, a user can package scripts and transmit script package files to other users, but the sharing mode may cause inconsistency of script information acquired by each user, and when a developed system is complex and a large number of scripts are applied, a large number of script files need to be packaged, so that communication cost and test efficiency between users can be greatly increased. Therefore, a script sharing method capable of reducing repetitive work becomes a problem to be solved urgently at present.
Disclosure of Invention
The invention provides a script sharing method and device, electronic equipment and a storage medium, which are used for realizing the sharing of scripts, so that a user can use the shared scripts through a platform, the repeated script writing is effectively avoided, and the use experience of the user is improved.
According to an aspect of the present invention, there is provided a script sharing method, applied to a script sharing platform, the method including:
determining a platform test case of the script to be shared according to a preset incidence relation;
checking the repeated condition of the script to be shared according to the identification of the platform test case;
and sharing the script to be shared based on the repeated condition.
According to another aspect of the present invention, there is provided a script sharing apparatus, applied to a script sharing platform, the apparatus including:
the script conversion module is used for determining a platform test case of the script to be shared according to a preset incidence relation;
the repeated checking module is used for checking the repeated condition of the script to be shared according to the identification of the platform test case;
and the script sharing module is used for sharing the script to be shared based on the repeated condition.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a script sharing method of any of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a script sharing method according to any one of the embodiments of the present invention when executed.
According to the technical scheme of the embodiment of the invention, the platform test case of the script to be shared is determined through the preset incidence relation, the repeated condition of the script to be shared is detected according to the identification of the platform test case, and the script to be shared is shared based on the repeated condition. The platform test case of the script to be shared is determined through the preset incidence relation, the standardization of the platform test case is improved, the repeated condition of the script to be shared is checked according to the identification of the platform test case, the script to be shared is shared based on the repeated condition, repeated sharing of the script to be shared is avoided, and the use experience of a user is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart of a script sharing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a script sharing method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a script sharing method according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a script checking method according to a third embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a script sharing apparatus according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device implementing a script sharing method according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a script sharing method according to an embodiment of the present invention, where the embodiment is applicable to a case of sharing a script, and the method may be performed by a script sharing apparatus, which may be implemented in a form of hardware and/or software, and the script sharing apparatus may be configured in a server, which may include a script sharing platform, for example. As shown in fig. 1, the method includes:
and S110, determining a platform test case of the script to be shared according to the preset incidence relation.
The preset incidence relation can be a preset incidence relation between the script to be shared and the platform test case. The preset incidence relation can be determined according to actual needs, and the script to be shared can be converted into a platform test case according to the preset incidence relation. In actual operation, the preset association relationship may be stored locally in the script sharing platform or locally in the computer, and when a platform test case of the script to be shared is determined, the preset association relationship may be extracted. The script to be shared may refer to an executable file written by a programmer according to a certain format in a computer locally, and may be a script shared on a script sharing platform, and the writing tool of the script to be shared may include various tools, which may be, for example, but is not limited to Postman. The platform test case is a case determined by the script to be shared according to the preset incidence relation, and can be stored in the script sharing platform and operated.
In the embodiment of the invention, the preset incidence relation stored in the script sharing platform or the local computer can be extracted, wherein the preset incidence relation can comprise the corresponding relation between the script to be shared and the platform test case, and the platform test case of the script to be shared can be determined according to the preset incidence relation. In one embodiment, the platform test case may be determined according to the attribute information of the script to be shared. One or more platform test cases may be determined from a script to be shared. For example, one script to be shared may include a plurality of test requests, one script to be shared may correspond to one platform test case, a file name of the script to be shared may correspond to a file name of the platform test case, and the test requests included therein may be used as test requests in the platform test case. Alternatively, a script to be shared may include a plurality of request packet sets, and each request packet set may include a plurality of test requests. Each request grouping set can correspond to one platform test case, the file name of each request grouping set corresponds to the file name of one platform test case, and the included test requests can be used as test requests in the platform test cases. The request packet set may be created when a script to be shared is written, and test requests with the same property or the same function may be written in the same request packet set.
And S120, checking the repeated condition of the script to be shared according to the identification of the platform test case.
The identifier of the platform test case may include attribute information of the platform test case, and may be used to check a repeat condition of the script to be shared. The identification of the platform test case may be generated according to the corresponding script to be shared. By way of example, the identification of the platform test case may include, but is not limited to, a file name of the platform test case, a test request, and the like.
In the embodiment of the invention, the identification of the platform test case can be extracted, and the repeated condition of the script to be shared is checked according to the identification. The repetition case may include script repetition and script non-repetition. In an embodiment, since the file name of the platform test case may be the same as the corresponding to-be-shared script file name, the file name of the to-be-shared script may be extracted, the platform test case having the same file name as the to-be-shared script file may be searched, and if there is a platform test case having the same file name as the to-be-shared script file, the repetition condition may be considered as script repetition; if the platform test case with the same file name as the script to be shared does not exist, the repeated condition can be considered as that the script is not repeated. In an embodiment, when there is a platform test case with the same file name as the script to be shared, the test request of the script to be shared and the test request of the platform test case with the same file name as the script to be shared can also be extracted. The test requests of the scripts to be shared can be multiple, so that whether the test requests contained in the scripts to be shared are completely the same as the test requests of the platform test cases can be compared, and if the test requests are completely the same, the repeated condition can be considered as script repetition; if there is at least one test request that is different, the duplication case may be considered as script non-duplication. In one embodiment, the test request of the script to be shared and the test request of the platform test case can be directly extracted, the test request of the script to be shared is searched in the test requests of the platform test case, and if the test requests are completely the same, the repeated condition can be considered as script repetition; if there is at least one test request that is different, the duplication case may be considered as script no duplication.
And S130, sharing the script to be shared based on the repeated condition.
In the embodiment of the invention, whether the script to be shared is shared can be determined according to the repeated condition of the script to be shared. When the repetition condition is repetition, it can be considered that a platform test case corresponding to the script to be shared exists in the script sharing platform, and the script to be shared can not be repeatedly saved, that is, the script to be shared is not repeatedly shared. When the repetition condition is not repeated, it can be considered that a platform test case corresponding to the script to be shared does not exist in the script sharing platform, and the script to be shared can be stored, so that the script to be shared is shared. In one embodiment, when the platform test cases with the same name of the script file to be shared exist and the corresponding test requests are not completely the same, the platform test cases can be selected to be covered or new platform test cases can be established; or, whether the script to be shared is consistent with the input person of the locally stored platform test case can be checked, if so, the platform test case can be selected to be covered or a new platform test case can be established, and if not, the platform test case cannot be covered. In an embodiment, when the script sharing platform shares the script to be shared, the script to be shared and the corresponding platform test case may be stored in the platform respectively.
According to the embodiment of the invention, the platform test case of the script to be shared is determined through the preset incidence relation, the standardization of the platform test case is improved, the repeated condition of the script to be shared is checked according to the identification of the platform test case, the script to be shared is shared based on the repeated condition, the repeated sharing of the script to be shared is avoided, a user can use the script to be shared through the platform, repeated script compiling is effectively avoided, and the use experience of the user is improved.
In some embodiments, further comprising:
and extracting the uniform resource locator of the script to be shared, and searching the uniform resource locator in local storage to determine the correct condition of the environmental information.
The Uniform Resource Locator (URL) is a string used to identify the script to be shared, and the Uniform Resource identifier of each script to be shared is unique, so that the correct condition of the environment information can be determined according to the Uniform Resource identifier.
In the embodiment of the invention, the uniform resource identifier of the script to be shared can be stored in the script sharing platform in advance. In actual operation, extracting the uniform resource identifier of the script to be shared and the locally stored uniform resource locator, searching the uniform resource locator of the script to be shared in local storage, and if the uniform resource locator which is the same as the script to be shared exists, considering that the environment information is correct; when the same uniform resource locator as the script to be shared does not exist, the environment information can be considered to be incorrect. In an embodiment, the uniform resource identifier or the uniform resource name of the script to be shared may be extracted, and the corresponding uniform resource identifier or the uniform resource name may be searched in the local storage to determine the correct condition of the environment information.
In some embodiments, further comprising: and acquiring the script to be shared according to the user information to perform software testing.
In the embodiment of the present invention, the user information may be used to determine whether the user has a right to acquire the script to be shared, and the user information may include, but is not limited to, a platform account, a private password, and the like of the user. The script to be shared uploaded by other users on the script sharing platform can be inquired according to the user information, the user can use the script to be shared to perform software testing on the sharing script platform, or the script to be shared can be downloaded to a computer to locally execute the script to be shared to perform software testing.
Example two
Fig. 2 is a flowchart of a script sharing method according to a second embodiment of the present invention, and this embodiment is a specific embodiment based on the above embodiments. As shown in fig. 2, the method includes:
and S210, extracting a request packet set of the script to be shared.
The request grouping set may be a preset set for storing test requests, and may be used to group the test requests. In actual operation, multiple request packet sets may be created when writing a script to be shared, and test requests of the same property or the same function may be written in the same request packet set. Wherein a request packet set may include a plurality of test requests.
In the embodiment of the invention, the script to be shared can be analyzed, and the request packet set of the script to be shared is extracted. For example, the field information corresponding to the request packet set may be queried, and the field information corresponding to the request packet set may be extracted to implement the extraction of the request packet set. Wherein, one script to be shared can comprise at least one request packet set.
S220, determining a target case according to the request grouping set and a preset incidence relation; the transaction of the target case corresponds to the test request of the request grouping set.
The target case may be determined according to the request packet set, and since the request packet set may include a plurality of test requests, the target case may include a plurality of transactions.
In the embodiment of the invention, the preset incidence relation stored in the script sharing platform or the local computer can be extracted, and the target case is determined according to the preset incidence relation. One set of request packets may correspond to one target case. In one embodiment, the file name of the request grouping set may correspond to the file name of the target case, and the request in the request grouping set may be used as the transaction request of the target case. In one embodiment, the uniform resource locator of the test request may be extracted as the transaction name, or alternatively, the test request name may be the transaction name. For example, when the uniform resource locator is used as the transaction name, the non-public part of the uniform resource locator may be extracted as the transaction name, or the uniform resource locator may be directly used as the transaction name.
And S230, extracting the file name of the request grouping set corresponding to the platform test case, and searching the file name in local storage to determine the repeated condition.
In an embodiment, the file name of the request packet set corresponding to the platform test case may be extracted by extracting the file name corresponding field of the request packet set corresponding to the platform test case, so as to determine whether the file name of the request packet set is duplicated with the local file name. In one embodiment, all the file names stored locally may be extracted, and sequentially compared to determine whether the file names stored locally have the same file name as the file name of the target case. When the same file name exists, the repetition case can be considered as script repetition; when the same file name does not exist, the duplicate case may be considered as a script non-duplicate. In an embodiment, when the same file name exists, the test request requesting the packet set may also be extracted, and further, whether the test request requesting the packet set and the test request corresponding to the same file name are repeated is compared.
S240, extracting the test request of the platform test case, and searching the test request in the local storage to determine the repeated condition.
In the embodiment of the invention, the corresponding test request of the platform test case can be extracted by extracting the field corresponding to the test request of the platform test case, and the repeated condition is determined according to the test request of the platform test case. In one embodiment, all test requests of the local storage may be extracted, and whether the test request of the target case is the same as the test request of the platform test case is searched in the local storage. When all the test requests of the target case exist in the platform test case, the repeated condition can be considered as script repetition; when the test request including at least one of the target cases does not exist in the platform test case, the repeated case can be regarded as a script which is not repeated.
And S250, storing the script to be shared for sharing under the condition that the script is not repeated under the repeated condition.
In some embodiments, the script does not repeat at least one of: all test requests of the script to be shared are not repeated, and part of test requests of the script to be shared are not repeated.
In the embodiment of the invention, when all the test requests of the script to be shared are not repeated or part of the test requests of the script to be shared are not repeated, the repeated condition of the script can be considered as not repeated. That is, when there is at least one test request that is not repeated, the repetition condition of the script to be shared may be considered as not repeated; or, when all the test requests are not repeated, the repeated condition of the script to be shared can be considered as not repeated. When the repetition condition is not repeated, it can be considered that a platform test case corresponding to the script to be shared does not exist in the script sharing platform, and the script to be shared can be stored, so that the script to be shared is shared. In a real-time example, the script sharing platform may store the file name of the request packet set corresponding to the storage platform test case corresponding to the script to be shared, and store the corresponding S260 in the request packet set, or not store the script to be shared in the case that the repetition condition is script repetition.
In the embodiment of the invention, when the repeated condition is repeated, it can be considered that a platform test case corresponding to the script to be shared exists in the script sharing platform, and the script to be shared is not repeatedly stored.
The method comprises the steps of extracting a request packet set of the script to be shared, determining a target case according to a preset incidence relation of the request packet set, extracting the request packet set corresponding to a platform test case and a test request to determine a repetition condition, storing the script to be shared for sharing under the condition that the script is not repeated under the repetition condition, and not storing the script to be shared under the condition that the script is repeated under the repetition condition. The sharing of the script to be shared in the platform is realized, the repeated sharing of the script to be shared is avoided, and the use experience of a user is improved.
EXAMPLE III
Fig. 3 is a flowchart of a script sharing method according to a third embodiment of the present invention, where the third embodiment of the present invention is based on the above embodiments, and the third embodiment of the present invention uses a local Postman script as a script to be shared, an automated testing platform as a script sharing platform, a Collection file as a Request packet set, and a case number platform testing case file as an example, and uses an automated testing platform script as a platform testing case, and the method further describes a script sharing method, and as shown in fig. 3, the method includes:
s310, identifying the local Postman script by taking the Postman exported script as output.
In an embodiment, the local Postman script may be parsed, and a preset association relationship between the local Postman script and the automated testing platform script may be created. The preset incidence relation can comprise that a Collection file of the local Postman script corresponds to a case of the automatic test platform, a Collection file name of the local Postman script can correspond to a case number of the automatic test platform script, a Collection file description of the local Postman script can correspond to a case name of the automatic test platform script (if the description is null, the default is consistent with the case number), a Request in the Collection file of the local Postman script corresponds to a transaction in the case of the automatic test platform, a URL non-public part of the Request of the local Postman script corresponds to the transaction number of the automatic test platform script, and a Request name of the local Postman script corresponds to the transaction description of the automatic test platform script. Wherein a local Postman script may include at least one Collection file, and a Collection file may include at least one Request.
In an embodiment, after the local Postman script is identified, the local Postman script can be verified, and the analyzed content of the local Postman script and the existing content of the automated testing platform can be verified. Fig. 4 is a flowchart of a script checking method according to a third embodiment of the present invention, as shown in fig. 4, the method includes:
inputting the local Postman script into the automatic test platform, checking whether the URL of the local Postman script is consistent with the locally stored URL or not, determining the correct condition of the environmental information, and if not, prompting that the environmental information is wrong and considering that the checking fails; and if so, checking whether the Collection name corresponding to the local Postman script and the case number stored by the automatic test platform are repeated. The case number of the automated testing platform is used as a main key of the automated case of the platform. And if the case number is inconsistent, prompting whether the case number is to be covered or newly built repeatedly, and if the case number is inconsistent, prompting that the case is modified without permission temporarily. If the name of the Collection of the local Postman script and the case number stored by the automatic testing platform are not repeated, whether the transaction of the Request of the local Postman script exists on the automatic testing platform is checked, wherein the judgment of whether the transaction exists is judged through the transaction number, and if the value of the URL non-public part of the Request is consistent with the transaction number of the automatic testing platform, the transaction of the Request is considered to exist on the automatic testing platform. If not, the verification can be considered to be successful; if yes, checking whether the transaction formats are consistent, if not, prompting that the transaction formats are changed, and if so, successfully checking. In an embodiment, when the value of the non-public part of the URL of the Request is different from the stored transaction number of the automatic test platform, the transaction is considered to be a new transaction, the transaction content of the Request of the local Postman script can be converted into the format of the transaction of the automatic test platform, and a new transaction is added to the automatic test platform.
And S320, converting the local Postman script passing the verification into an automatic test platform script, and storing the original script and the converted script to the platform.
In an embodiment, after the verification is passed, the local Postman script can be converted into the automatic testing platform script according to the preset incidence relation, one Collection file of the local Postman script is converted into one case of the automatic testing platform, and the case can include all the requests in the Collection file and fields contained in each Request and assignment of the fields. In an embodiment, when the Request transaction in the Collection file is identified as a new transaction, the automatic test platform records the case and simultaneously records and stores the new transaction on the platform. After the local Postman script is converted, the automatic testing platform can simultaneously store the unconverted local Postman script and the converted automatic testing platform script in the platform.
S330, according to the original automatic test platform system, the converted script can be executed and modified, an execution result is recorded, and a user with authority can inquire related information.
In the embodiment, the user logs in the automatic test platform through the user information, can query the automatic test platform scripts uploaded by other users, query the execution results of the automatic test platform scripts of other users, and also can execute test cases of other members. The user information may include, but is not limited to, a personal account number.
S340, the authorized user can download the uploaded script and execute the script on the local Postman tool.
In an embodiment, the automatic testing platform can also download the unconverted local Postman script uploaded by other users, and the downloaded local Postman script can also execute the script on the local Postman tool for testing.
According to the embodiment of the invention, the local Postman script is uploaded and converted into the automatic test platform script, and the local Postman script is shared through the platform, so that the problem that the local Postman script cannot be shared is solved. The local Postman script is converted and uploaded to the automatic testing platform script, the script can be executed according to the original system of the platform, the execution result is stored, the testing case is automatically called, and the accumulation of the execution result can be realized. After being uploaded, the local Postman script can be inquired and downloaded, the sharing management function of the Postman script is realized through the platform, the communication cost of the user is reduced, and the development and test efficiency is improved.
Example four
Fig. 5 is a schematic structural diagram of a script sharing apparatus according to a fourth embodiment of the present invention. As shown in fig. 5, the apparatus includes: a script conversion module 51, a duplication checking module 52 and a script sharing module 53.
And the script conversion module 51 is configured to determine a platform test case of the script to be shared according to the preset association relationship.
And the repeated checking module 52 is used for checking the repeated condition of the script to be shared according to the identification of the platform test case.
And the script sharing module 53 is configured to share the script to be shared based on the repetition condition.
According to the embodiment of the invention, the script conversion module determines the platform test case of the script to be shared through the preset incidence relation, the standardization of the platform test case is improved, the repeated condition of the script to be shared is detected by the repeated detection module according to the identification of the platform test case, the script sharing module shares the script to be shared based on the repeated condition, the repeated sharing of the script to be shared is avoided, a user can use the script to be shared through the platform, the repeated script writing is effectively avoided, and the use experience of the user is improved.
In some embodiments, the script conversion module 51 includes:
and the collection extracting unit is used for extracting the request packet collection of the script to be shared.
The target case determining unit is used for determining the target cases according to the request grouping set and the preset incidence relation; wherein the transaction of the target case corresponds to the test request of the request packet set.
In some embodiments, the duplication verification module 52 includes at least one of:
and the first repetition determining unit is used for extracting the file name of the request grouping set corresponding to the platform test case, and searching the file name in the local storage to determine the repetition condition.
And the second repeated determining unit is used for extracting the test request of the platform test case and searching the test request in the local storage to determine the repeated condition.
In some embodiments, a script sharing apparatus further comprises:
and the environment information determining module is used for extracting the uniform resource identifier of the script to be shared and searching the uniform resource identifier in local storage to determine the correct condition of the environment information.
In some embodiments, the script sharing module 53 includes:
and the first sharing unit is used for saving the script to be shared for sharing under the condition that the script is not repeated under the repeated condition.
And the second sharing unit is used for not saving the script to be shared under the condition that the repeated condition is script repetition.
In some embodiments, the non-duplication of scripts in the first shared cell includes at least one of:
all test requests of the script to be shared are not repeated, and part of test requests of the script to be shared are not repeated.
In some embodiments, a script sharing apparatus further comprises:
and the software testing module is used for obtaining the script to be shared according to the user information to perform software testing.
The script sharing device provided by the embodiment of the invention can execute the script sharing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an electronic device 10 implementing a script sharing method according to an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as a script sharing method.
In some embodiments, a script sharing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of a script sharing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a script sharing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A script sharing method is applied to a script sharing platform, and comprises the following steps:
determining a platform test case of the script to be shared according to a preset incidence relation;
checking the repeated condition of the script to be shared according to the identification of the platform test case;
and sharing the script to be shared based on the repeated condition.
2. The method of claim 1, wherein the determining the platform test case of the script to be shared according to the preset association relationship comprises:
extracting a request packet set of the script to be shared;
determining a target case according to the request grouping set and the preset incidence relation;
and the transaction of the target case corresponds to the test request of the request packet set.
3. The method of claim 1, wherein the verifying the duplicate condition of the script to be shared according to the identity of the platform test case comprises at least one of:
extracting the file name of the request grouping set corresponding to the platform test case, and searching the file name in local storage to determine the repeated condition;
and extracting the test request of the platform test case, and searching the test request in a local storage to determine the repeated condition.
4. The method of claim 1, further comprising:
and extracting the uniform resource locator of the script to be shared, and locally storing and searching the uniform resource locator to determine the correct condition of the environmental information.
5. The method according to claim 1, wherein the sharing the script to be shared based on the repetition condition comprises:
if the repeated condition is that the script is not repeated, storing the script to be shared for sharing;
and under the condition that the repeated condition is repeated script, the script to be shared is not stored.
6. The method of claim 5, wherein the script does not repeat comprising at least one of:
all test requests of the script to be shared are not repeated, and part of test requests of the script to be shared are not repeated.
7. The method of claim 1, further comprising: and acquiring the script to be shared according to the user information to perform software testing.
8. A script sharing apparatus, applied to a script sharing platform, the apparatus comprising:
the script conversion module is used for determining a platform test case of the script to be shared according to a preset incidence relation;
the repeated checking module is used for checking the repeated condition of the script to be shared according to the identification of the platform test case;
and the script sharing module is used for sharing the script to be shared based on the repeated condition.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the script sharing method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a processor, when executed, to implement the script sharing method of any one of claims 1-7.
CN202211352125.1A 2022-10-31 2022-10-31 Script sharing method and device, electronic equipment and storage medium Pending CN115794609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211352125.1A CN115794609A (en) 2022-10-31 2022-10-31 Script sharing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211352125.1A CN115794609A (en) 2022-10-31 2022-10-31 Script sharing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115794609A true CN115794609A (en) 2023-03-14

Family

ID=85434707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211352125.1A Pending CN115794609A (en) 2022-10-31 2022-10-31 Script sharing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115794609A (en)

Similar Documents

Publication Publication Date Title
CN108984388B (en) Method and terminal equipment for generating automatic test case
CN110532168B (en) Full-link interface pressure measurement method and device, computer equipment and storage medium
CN112491602B (en) Behavior data monitoring method and device, computer equipment and medium
CN109241014B (en) Data processing method and device and server
CN115599769A (en) Data migration method and device, electronic equipment and storage medium
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN116204428A (en) Test case generation method and device
CN113641628B (en) Data quality detection method, device, equipment and storage medium
CN115168509A (en) Processing method and device of wind control data, storage medium and computer equipment
CN114443493A (en) Test case generation method and device, electronic equipment and storage medium
CN115203158A (en) Data comparison method, device, equipment and storage medium
CN115794609A (en) Script sharing method and device, electronic equipment and storage medium
CN114444087A (en) Unauthorized vulnerability detection method and device, electronic equipment and storage medium
CN110348984B (en) Automatic credit card data input method and related equipment under different transaction channels
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN112860780B (en) Data export method and device and terminal equipment
CN115756575A (en) Submission record acquisition method, device, equipment and storage medium
CN115759969A (en) Asset management method, device, equipment and medium applied to power swapping station
CN117453747A (en) Data quality detection method and device, electronic equipment and storage medium
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN115525614A (en) Data access method, device, equipment, system and storage medium
CN115309717A (en) Database loading method, device, equipment, medium and computer program product
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium
CN117076427A (en) Server data management method, device, equipment and storage medium
CN118227580A (en) Log analysis method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination