Automatic testing method and device, electronic equipment and storage medium
By using encryption and decryption algorithms in the automated test framework, the privacy information in the automated test script is encrypted and decrypted, which solves the problem of privacy information security in automated tests and achieves efficient protection of private information.
Patent Information
- Application Number
- CN202411525796.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
When writing automated test scripts, privacy information such as ID number, mobile phone number and password are easily recorded in plain text, resulting in privacy and security risks.
An automated testing method is adopted to encrypt the target data associated with the target account using the encryption algorithm in the automated testing framework, and the encrypted data and the target account are stored in the configuration file of the automation script. When running an automated script, the encrypted data is decrypted using the decryption algorithm in the automation testing framework to ensure that privacy information is always stored in encrypted form.
By storing privacy information in an encrypted form and decrypting and using it during the test, the security of privacy information is improved. Even if the encrypted information is intercepted, it cannot be decrypted, effectively preventing privacy leakage.
Smart Images

Figure CN119513889A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to an automated testing method, device, electronic device and storage medium. Background Art
[0002] In related technologies, when writing automated test scripts, private information such as ID card numbers, mobile phone numbers, and passwords are recorded in plain text in the automated scripts. This makes it easy for private information to be obtained, posing a privacy security risk. Therefore, how to improve the security of private information in automated testing has become an urgent problem to be solved. Summary of the invention
[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, the first purpose of this application is to propose an automated testing method so that private information is always stored in encrypted form. Even if the encrypted private information is intercepted, the encryption and decryption algorithm cannot be obtained, and thus the intercepted encrypted private information cannot be decrypted, thereby improving the security of the private information.
[0005] The second objective of the present application is to provide an automated testing device.
[0006] The third objective of the present application is to provide an electronic device.
[0007] A fourth objective of the present application is to provide a computer-readable storage medium.
[0008] A fifth object of the present application is to provide a computer program product.
[0009] To achieve the above objectives, the first embodiment of the present application proposes an automated testing method, including:
[0010] Based on the encryption algorithm in the automated testing framework, the target data associated with the target account is encrypted to obtain the encrypted target data, wherein the automated testing framework is in the whl standard library format;
[0011] storing the target account and the encrypted target data in association with each other in a configuration file corresponding to an automation script, wherein a storage location of the automation script is different from a storage location of the automation testing framework;
[0012] Running the automation script, and obtaining the encrypted target data from the configuration file based on the target account in the automation script;
[0013] Decrypting the encrypted target data based on the decryption algorithm in the automated testing framework to obtain the decrypted target data;
[0014] Based on the target account and the decrypted target data, the object under test is accessed.
[0015] To achieve the above-mentioned purpose, the second embodiment of the present application proposes an automated testing device, including:
[0016] An encryption module, used to encrypt the target data associated with the target account based on the encryption algorithm in the automated testing framework to obtain the encrypted target data, wherein the automated testing framework is in the whl standard library format;
[0017] A storage module, used for associating and storing the target account and the encrypted target data in a configuration file corresponding to the automation script, wherein the storage location of the automation script is different from the storage location of the automation test framework;
[0018] an acquisition module, configured to run the automation script and acquire the encrypted target data from the configuration file based on the target account in the automation script;
[0019] A decryption module, used to decrypt the encrypted target data based on a decryption algorithm in the automated testing framework to obtain the decrypted target data;
[0020] An access module is used to access the object under test based on the target account and the decrypted target data.
[0021] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including:
[0022] A processor, and a memory communicatively connected to the processor;
[0023] The memory stores computer-executable instructions;
[0024] The processor executes the computer-executable instructions stored in the memory to implement the method as described in the embodiment of the first aspect.
[0025] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method described in the first aspect embodiment.
[0026] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, a computer program, which implements the method described in the first aspect when executed by a processor.
[0027] The automated testing method, device, electronic device and storage medium provided by the present application, based on the encryption algorithm in the automated testing framework, encrypt the target data associated with the target account to obtain the encrypted target data, wherein the automated testing framework is in the whl standard library format, the target account and the encrypted target data are associated and stored in the configuration file corresponding to the automated script, wherein the storage location of the automated script is different from the storage location of the automated testing framework, the automated script is run, and based on the target account in the automated script, the encrypted target data is obtained from the configuration file, based on the decryption algorithm in the automated testing framework, the encrypted target data is decrypted to obtain the decrypted target data, and finally based on the target account and the decrypted target data, the object under test is accessed. Thus, the automated testing framework and the automated script in the whl standard library format are stored separately, the encryption and decryption algorithm in the automated testing framework is used to encrypt the privacy information involved in the automated script, and the encrypted privacy information is decrypted during the running of the automated testing script and then the object under test is accessed, so that the privacy information is always stored in an encrypted form, even if the encrypted privacy information is intercepted, the encryption and decryption algorithm cannot be obtained from the automated testing framework, so that the intercepted encrypted privacy information cannot be decrypted, thereby improving the security of the privacy information.
[0028] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0030] Figure 1 A flowchart of an automated testing method provided in an embodiment of the present application;
[0031] Figure 2 A flowchart of another automated testing method provided in an embodiment of the present application; and
[0032] Figure 3 A schematic diagram of the structure of an automated testing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0034] The automated testing method and device according to the embodiments of the present application are described below with reference to the accompanying drawings.
[0035] Figure 1 A flowchart of an automated testing method provided in an embodiment of the present application.
[0036] like Figure 1 As shown, the automated testing method includes the following steps:
[0037] Step 101, based on the encryption algorithm in the automated testing framework, encrypt the target data associated with the target account to obtain the encrypted target data, wherein the automated testing framework is in the whl standard library format.
[0038] In some embodiments, after the development of an automated testing framework including encryption and decryption algorithms is completed, the command python setup.py sdist bdist_wheel is used in the same directory as setup.py to publish the automated testing framework as a whl format standard library. The whl format automated testing framework is subsequently released in a restricted location on the company's intranet, thereby ensuring the security, controllability and unification of the automated testing framework.
[0039] In some embodiments, all dependent libraries of the automated test framework are sorted out and then organized into requirement.txt (this file does not include the whl file of the automated test framework), which sorts out the list and version numbers of all dependent libraries of the automated test framework, and prepares the install.bat batch file. The user only needs to click the batch file to complete the installation and deployment of all dependent libraries. The user can obtain the automated test framework from the restricted release location according to the whl standard library and complete the installation and deployment of the automated test framework.
[0040] In some embodiments, if the automated testing framework subsequently has new functions and features, a new automated testing framework is distributed, and then the user uninstalls the originally installed automated testing framework to complete the upgrade of the automated testing framework.
[0041] The target data may include at least one of the following information: a password, an ID number, a mobile phone number, etc. corresponding to the target account.
[0042] In the technical solution disclosed herein, the acquisition, storage and application of user personal information (such as passwords, ID numbers, mobile phone numbers) involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0043] In some embodiments, the automated testing framework may provide an interface for calling encryption and decryption algorithms, so that the interface in the automated testing framework may be called to implement encryption of target data.
[0044] In some embodiments, the encryption and decryption algorithms of the automated testing framework may include an asymmetric encryption algorithm, a symmetric encryption algorithm, etc. This disclosure does not limit this.
[0045] In some embodiments, the target data is encrypted based on a public key of an asymmetric encryption algorithm to obtain binary ciphertext data; the binary ciphertext data is converted into hexadecimal ciphertext data; and the hexadecimal ciphertext data is encrypted based on a private key of a symmetric encryption algorithm to obtain encrypted target data.
[0046] In some embodiments, the target data is first encrypted using an RSA asymmetric encryption algorithm with a user-defined number of bits (if the user does not specify the number of bits, the default is 2048 bits), and the target data is encrypted into binary data. Since the encrypted binary ciphertext data is long and inconvenient to store and process, the binary ciphertext data is converted into hexadecimal ciphertext data.
[0047] In the disclosed embodiment, the target data is first encrypted using an asymmetric encryption algorithm, and then the encrypted target data is encrypted again using a symmetric encryption algorithm, which can further improve the security of the target data.
[0048] Step 102, the target account and the encrypted target data are associated and stored in a configuration file corresponding to the automation script, wherein the storage location of the automation script is different from the storage location of the automation test framework.
[0049] It should be noted that step 101 and step 102 are executed before running the automated test script.
[0050] Step 103: Run the automation script and obtain the encrypted target data from the configuration file based on the target account in the automation script.
[0051] Step 104, based on the decryption algorithm in the automated testing framework, decrypt the encrypted target data to obtain the decrypted target data.
[0052] In some embodiments, the encrypted target data is decrypted based on the private key of the symmetric encryption algorithm to obtain hexadecimal ciphertext data, the hexadecimal ciphertext data is converted into binary ciphertext data, and the binary ciphertext data is converted based on the private key corresponding to the asymmetric encryption algorithm to obtain the decrypted target data.
[0053] Step 105: Access the object under test based on the target account and the decrypted target data.
[0054] In some embodiments, the object to be tested may be a database, an application server, etc. This disclosure does not limit this.
[0055] In this embodiment, based on the encryption algorithm in the automated test framework, the target data associated with the target account is encrypted to obtain the encrypted target data, wherein the automated test framework is in the whl standard library format, the target account and the encrypted target data are associated and stored in the configuration file corresponding to the automated script, wherein the storage location of the automated script is different from the storage location of the automated test framework, the automated script is run, and based on the target account in the automated script, the encrypted target data is obtained from the configuration file, based on the decryption algorithm in the automated test framework, the encrypted target data is decrypted to obtain the decrypted target data, and finally based on the target account and the decrypted target data, the object under test is accessed. Thus, the automated test framework and the automated script in the whl standard library format are stored separately, the encryption and decryption algorithm in the automated test framework is used to encrypt the privacy information involved in the automated script, and the encrypted privacy information is decrypted during the running of the automated test script to access the object under test, so that the privacy information is always stored in an encrypted form, even if the encrypted privacy information is intercepted, the encryption and decryption algorithm cannot be obtained from the automated test framework, so that the intercepted encrypted privacy information cannot be decrypted, thereby improving the security of the privacy information.
[0056] Figure 2 The following is a flow chart of an automated testing method provided in an embodiment of the present application. Figure 2 As shown, the automated testing method may include the following steps:
[0057] Step 201, based on the encryption algorithm in the automated testing framework, encrypt the target data associated with the target account to obtain the encrypted target data, wherein the automated testing framework is in the whl standard library format.
[0058] Step 202 , associate and store the target account and the encrypted target data in a configuration file corresponding to the automation script, wherein the storage location of the automation script is different from the storage location of the automation test framework.
[0059] Step 203: Run the automation script and obtain the encrypted target data from the configuration file based on the target account in the automation script.
[0060] Step 204, based on the decryption algorithm in the automated testing framework, decrypt the encrypted target data to obtain the decrypted target data.
[0061] Step 205: Access the object under test based on the target account and the decrypted target data.
[0062] Step 206: Acquire initial test data returned by the object under test.
[0063] It should be noted that during the running of the automated script, the object under test may return the account and target data to the automated testing framework. In order to prevent the automated testing framework from recording the plaintext target data in the log file and test report file, this application replaces the privacy information involved in the test data after obtaining the initial test data returned by the object under test, thereby avoiding the risk of account and target data being stolen.
[0064] In some embodiments, the initial test data is displayed in a display interface, thereby facilitating the development of automated scripts and maintenance of scripts by maintenance personnel.
[0065] Step 207: Perform keyword matching on the initial test data based on the preset keyword library.
[0066] In some embodiments, the preset keyword library includes keywords related to user privacy, such as password, pwd, password, ID card, identity, phone number, mobile phone number, etc. This disclosure does not limit this.
[0067] Step 208 , when any character string in the initial test data is identical to any keyword in the preset keyword library, a target character string corresponding to any character string in the initial test data is replaced with the preset character string to obtain target test data.
[0068] For example, if any string is "password", the corresponding target string is the string "abcd" after "password", where "abcd" is the password.
[0069] In some embodiments, the preset character string may be for security reasons, password masking, etc. This disclosure is not limited to this.
[0070] Step 209: Store the target test data in a log file and / or a test report file.
[0071] In the disclosed embodiment, in the process of running the automated script, the initial test data returned by the tested object is obtained, and the initial test data is matched with keywords based on the preset keyword library. When any character string in the initial test data is the same as any keyword in the preset keyword library, the target character string corresponding to any character string in the initial test data is replaced with the preset character string to obtain the target test data, and finally the target test data is stored in the log file and / or the test report file. In this way, the privacy information in the initial test data returned by the tested object can be replaced, thereby avoiding the risk of account and target data being stolen, and further improving the security of privacy data.
[0072] In order to implement the above embodiments, the present application also proposes an automatic testing device.
[0073] Figure 3 This is a schematic diagram of the structure of an automated testing device provided in an embodiment of the present application. Figure 3 As shown, the automated testing device comprises:
[0074] The encryption module 301 is used to encrypt the target data associated with the target account based on the encryption algorithm in the automated testing framework to obtain the encrypted target data, wherein the automated testing framework is in the whl standard library format;
[0075] A storage module 302 is used to associate and store the target account and the encrypted target data in a configuration file corresponding to the automation script, wherein the storage location of the automation script is different from the storage location of the automation test framework;
[0076] The acquisition module 303 is used to run the automation script and obtain the encrypted target data from the configuration file based on the target account in the automation script;
[0077] The decryption module 304 is used to decrypt the encrypted target data based on the decryption algorithm in the automated testing framework to obtain the decrypted target data;
[0078] The access module 305 is used to access the object under test based on the target account and the decrypted target data.
[0079] Furthermore, in a possible implementation of the embodiment of the present application, a cleaning module is also included, which is used to:
[0080] Get the initial test data returned by the object under test;
[0081] Based on the preset keyword library, keyword matching is performed on the initial test data;
[0082] When any character string in the initial test data is identical to any keyword in the preset keyword library, a target character string corresponding to any character string in the initial test data is replaced with the preset character string to obtain target test data;
[0083] Store target test data into log files and / or test report files.
[0084] Furthermore, in a possible implementation of the embodiment of the present application, a display module is also included, which is used to:
[0085] The initial test data is displayed on the display interface.
[0086] Furthermore, in a possible implementation of the embodiment of the present application, the encryption module 301 is used to:
[0087] Based on the public key of the asymmetric encryption algorithm, the target data is encrypted to obtain binary ciphertext data;
[0088] Convert binary ciphertext data into hexadecimal ciphertext data;
[0089] Based on the private key of the symmetric encryption algorithm, the hexadecimal ciphertext data is encrypted to obtain the encrypted target data.
[0090] Furthermore, in a possible implementation of the embodiment of the present application, the decryption module 304 is used to:
[0091] Based on the private key of the symmetric encryption algorithm, the encrypted target data is decrypted to obtain the hexadecimal ciphertext data;
[0092] Convert hexadecimal ciphertext data into binary ciphertext data;
[0093] Based on the private key corresponding to the asymmetric encryption algorithm, the binary ciphertext data is processed to obtain the decrypted target data.
[0094] It should be noted that the above explanations of the embodiment of the automated testing method are also applicable to the automated testing device of this embodiment, and will not be repeated here.
[0095] In this embodiment, based on the encryption algorithm in the automated test framework, the target data associated with the target account is encrypted to obtain the encrypted target data, wherein the automated test framework is in the whl standard library format, the target account and the encrypted target data are associated and stored in the configuration file corresponding to the automated script, wherein the storage location of the automated script is different from the storage location of the automated test framework, the automated script is run, and based on the target account in the automated script, the encrypted target data is obtained from the configuration file, based on the decryption algorithm in the automated test framework, the encrypted target data is decrypted to obtain the decrypted target data, and finally based on the target account and the decrypted target data, the object under test is accessed. Thus, the automated test framework and the automated script in the whl standard library format are stored separately, the encryption and decryption algorithm in the automated test framework is used to encrypt the privacy information involved in the automated script, and the encrypted privacy information is decrypted during the running of the automated test script to access the object under test, so that the privacy information is always stored in an encrypted form, even if the encrypted privacy information is intercepted, the encryption and decryption algorithm cannot be obtained from the automated test framework, so that the intercepted encrypted privacy information cannot be decrypted, thereby improving the security of the privacy information.
[0096] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0097] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0098] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0099] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0100] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0101] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0102] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0103] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0104] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0105] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0106] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0107] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0108] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-accessible storage medium.
[0109] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. An automated testing method, characterized in that: The following steps are involved: Based on the encryption algorithm in the automated testing framework, the target data associated with the target account is encrypted to obtain the encrypted target data, wherein the automated testing framework is in the whl standard library format; storing the target account and the encrypted target data in association with each other in a configuration file corresponding to an automation script, wherein a storage location of the automation script is different from a storage location of the automation testing framework; Running the automation script, and obtaining the encrypted target data from the configuration file based on the target account in the automation script; Decrypting the encrypted target data based on the decryption algorithm in the automated testing framework to obtain the decrypted target data; Based on the target account and the decrypted target data, the object under test is accessed.
2. The method according to claim 1, characterized in that After accessing the tested object based on the target account and the decrypted target data, the method further includes: Obtaining initial test data returned by the object under test; Based on a preset keyword library, keyword matching is performed on the initial test data; When any character string in the initial test data is identical to any keyword in the preset keyword library, a target character string corresponding to any character string in the initial test data is replaced with a preset character string to obtain target test data; The target test data is stored in a log file and / or a test report file.
3. The method according to claim 2, characterized in that After obtaining the initial test data returned by the object under test, the method further includes: The initial test data is displayed in a display interface.
4. The method according to claim 1, characterized in that The target data associated with the target account is encrypted based on the encryption algorithm in the automated testing framework to obtain the encrypted target data, including: Based on the public key of the asymmetric encryption algorithm, the target data is encrypted to obtain binary ciphertext data; Convert the binary ciphertext data into hexadecimal ciphertext data; Based on the private key of the symmetric encryption algorithm, the hexadecimal ciphertext data is encrypted to obtain the encrypted target data.
5. The method according to claim 4, characterized in that Decrypting the encrypted target data based on the decryption algorithm in the automated test framework to obtain the decrypted target data includes: Decrypting the encrypted target data based on the private key of the symmetric encryption algorithm to obtain the hexadecimal ciphertext data; Convert the hexadecimal ciphertext data into the binary ciphertext data; Based on the private key corresponding to the asymmetric encryption algorithm, the binary ciphertext data is decrypted to obtain the decrypted target data.
6. An automated testing device, characterized in that: include: An encryption module, used to encrypt the target data associated with the target account based on the encryption algorithm in the automated testing framework to obtain the encrypted target data, wherein the automated testing framework is in the whl standard library format; A storage module, used for associating and storing the target account and the encrypted target data in a configuration file corresponding to the automation script, wherein the storage location of the automation script is different from the storage location of the automation test framework; an acquisition module, configured to run the automation script and acquire the encrypted target data from the configuration file based on the target account in the automation script; A decryption module, used to decrypt the encrypted target data based on a decryption algorithm in the automated testing framework to obtain the decrypted target data; An access module is used to access the object under test based on the target account and the decrypted target data.
7. The device according to claim 6, characterized in that Also includes a cleaning module for: Obtaining initial test data returned by the object under test; Based on a preset keyword library, keyword matching is performed on the initial test data; When any character string in the initial test data is identical to any keyword in the preset keyword library, a target character string corresponding to any character string in the initial test data is replaced with a preset character string to obtain target test data; The target test data is stored in a log file and / or a test report file.
8. The device according to claim 7, characterized in that Also included is a display module for: The initial test data is displayed in a display interface.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Test data forming method, test data forming device, electronic equipment and medium
CN110298328A
Data safety protection method and device and storage medium
CN111444528A
Automatic testing method and device, computer equipment and storage medium
CN115437933A
Automated software testing framework using independent test scripts
US20080282231A1