Software testing method and system
By obtaining user access rights and environmental data to adjust the calling permissions of software development programs, the compatibility issues caused by source code separation in software development are resolved, the security and reliability of software testing are improved, and the efficiency of code development is increased.
Patent Information
- Application Number
- CN202211176601.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-09-26
AI Technical Summary
In the prior art, compatibility issues caused by source code separation during software development lead to low software testing reliability and inability to detect compatibility issues in a timely manner, thereby reducing code development efficiency and security.
By obtaining the user's access rights and login information, generating corresponding access rights, calling the software development program, and adjusting permissions based on environmental data and operation requests, a centralized software testing method is implemented to prevent source code separation and improve security and reliability.
It enables timely discovery of source code compatibility issues during the software development process, improves the security and reliability of software testing, prevents source code leakage, and improves code development efficiency.
Smart Images

Figure CN115454874B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology, and in particular to a software testing method and system. Background Art
[0002] During software development, in order to prevent data leakage, programs are usually split according to their specific functions. The split parts are then assigned to different program developers to write the source code. This achieves split source code management, prevents program developers from mastering the entire source code, reduces the risk of complete program leakage, and improves security during the software development process. However, the above management method has the following defects: the source code controlled by each program developer is completely separated. There are no problems when the source code runs independently, but the integrated code fails when it is run. This leads to low reliability of software testing during the code writing process. The reason for this is that during the software development process, it is impossible to promptly discover the incompatibility of the source code of each part, and thus it is impossible to perform error correction in a timely manner, which reduces the efficiency of code development.
[0003] Therefore, there is an urgent need to provide a software testing method and system that can call the corresponding software development program for operation according to the user's access rights and access requests, improve the security of the software testing system, and at the same time ensure that developers can promptly verify whether the source code written by other developers is compatible during the software development process, thereby facilitating timely error correction, improving the reliability of software testing, and improving code development efficiency. Summary of the Invention
[0004] The present invention provides a software testing method and system, which can call the corresponding software development program for operation according to the user's access rights and access requests, thereby improving the security of the software testing system, while preventing the user's access rights from limiting the scope of its running tests, thereby improving the reliability of software testing.
[0005] The present invention provides a basic solution 1:
[0006] The software testing method comprises the following steps:
[0007] S100, obtaining the user's login information and access request, and generating access rights based on the user's login information; the access rights include user access rights and background operation rights;
[0008] S200, calling a software development program according to the access request and access rights;
[0009] S300, obtaining user operation information and updating the called software development program according to the user operation information;
[0010] S400: Obtain the user's operation request, expand the user's background operation authority according to the user's operation request, and test the software development program.
[0011] Beneficial effects of Basic Solution 1: In this solution, different software development programs are not directly assigned to different program developers through the division of writing tasks. Instead, a centralized management method is still adopted to uniformly manage all parts of the software development program. However, at the same time, the corresponding software development program will be called to the corresponding user for review and writing based on the access rights of different users. In this way, while preventing the complete separation of source codes, it is guaranteed that during the software development process, users can only access according to their personal access rights. Under the premise of providing the implementation conditions for subsequent software testing, it prevents program developers from obtaining source codes that are not related to their work content, thereby improving the security of software development.
[0012] Furthermore, during the software development process, when a user requests software testing, their backend execution permissions can be expanded based on their request. This means they can call source code written by other developers for unified testing. This helps identify problems like source code incompatibilities early, allowing for timely corrections. This improves the integrity and accuracy of software testing, eliminating the need to discover issues only during final integration and testing, thereby increasing software development efficiency. Furthermore, by not expanding user access permissions, we can prevent source code leaks while still allowing users to be aware of the results of the tests.
[0013] In summary, this solution can call the corresponding software development program for operation based on the user's access rights and access requests, thereby improving the security of the software testing system, while preventing the user's access rights from limiting the scope of its running tests, thereby improving the reliability of software testing.
[0014] Furthermore, S100 includes:
[0015] S101, obtaining user login information;
[0016] S102, obtaining a pre-stored access permission comparison table, wherein the access permission comparison table includes user information and permissions corresponding to the user information; comparing the user's login information with the user information, and generating access permissions based on the comparison result.
[0017] Beneficial effect: Based on the pre-stored user information, the user's login information can be confirmed, thereby analyzing whether the user is the preset user, and then extracting the permissions corresponding to the corresponding user information, thereby generating the user's access permissions.
[0018] Furthermore, S100 also includes:
[0019] S103, obtaining the user's access request;
[0020] S104, compare the user's access request with the access rights to analyze whether there is an abnormal request. If not, execute S200; if so, execute S105;
[0021] S105, obtaining environmental data and generating an authority adjustment range based on the environmental data;
[0022] S106: Adjust the access permission according to the permission adjustment range.
[0023] Beneficial Effect: Analyzes whether a user's access request complies with their access rights. If so, the corresponding software development program is directly called for. If not, the system analyzes whether the user's access rights can be adjusted based on environmental data, and then calls the corresponding software development program based on the adjusted results. This increases the flexibility of access rights regulation to adapt to different usage environments.
[0024] Furthermore, the environmental data includes audio data; S105 includes:
[0025] S1052, obtaining audio data, identifying the conversation content and conversation participants in the audio data, and generating a conversation recognition result;
[0026] S1053: Generate a permission adjustment range based on the session identification result.
[0027] Beneficial Effects: By analyzing the conversation content and participants in the audio data, it is possible to determine whether a user has been granted temporary authorization. For example, during a briefing meeting, if the general manager needs to review the entire software development program, the user can be granted temporary expanded permissions, allowing them to access the source code of other developers through their own login account for the general manager's review. This solution allows for the adjustment of access rights based on the user's usage environment, improving the flexibility of the software testing system.
[0028] Furthermore, the environmental data also includes location data; S105 also includes:
[0029] S1051, obtaining location data, and determining whether the user is located in a preset area based on the location data, if so, executing S1052, if not, executing S200.
[0030] Beneficial Effect: By determining whether the user is within a preset area based on the location data, the user's login environment is secured, preventing source code leakage during the invocation of software development programs due to malicious intrusion by the user or others, thereby improving the security of the software testing system. The principle is that when logging in from an unknown computer outside the user's environment, it is unclear whether the login environment is secure, and there is a high possibility that the computer may be infected with a virus. Therefore, when the user is outside the preset area, the expansion of their permissions is prohibited, thereby improving source code security.
[0031] Furthermore, in S1051, it is determined based on the location data whether the user is located in a preset area. If not, an abnormality alarm is generated.
[0032] Beneficial effects: When a user makes an access request that exceeds their access rights in a preset area, an abnormal alarm is generated, so that the abnormal operation of the program developer can be promptly understood, so as to trace the reason for the access request and hold the developer accountable in the event of a source code leak.
[0033] Furthermore, in S1052, the audio data is analyzed using speech recognition technology to identify the conversation content in the audio data; and the audio data is analyzed using voiceprint recognition technology to identify the conversation participants in the audio data.
[0034] Beneficial effect: Speech recognition technology and voiceprint recognition technology are used to identify the conversation content and conversation participants in audio data respectively.
[0035] The present invention provides a second basic solution:
[0036] The software testing system uses the above software testing method.
[0037] Beneficial effects of Basic Solution 2: In this solution, different software development programs are not directly assigned to different program developers through the division of writing tasks. Instead, a centralized management method is still adopted to uniformly manage all parts of the software development program. However, at the same time, the corresponding software development program will be called to the corresponding user for review and writing based on the access rights of different users. In this way, while preventing the complete separation of source codes, it is guaranteed that during the software development process, users can only access according to their personal access rights. Under the premise of providing the implementation conditions for subsequent software testing, it prevents program developers from obtaining source codes that are not related to their work content, thereby improving the security of software development.
[0038] Furthermore, during the software development process, when a user requests software testing, their backend execution permissions can be expanded based on their request. This means they can call source code written by other developers for unified testing. This helps identify problems like source code incompatibilities early, allowing for timely corrections. This improves the integrity and accuracy of software testing, eliminating the need to discover issues only during final integration and testing, thereby increasing software development efficiency. Furthermore, by not expanding user access permissions, we can prevent source code leaks while still allowing users to be aware of the results of the tests.
[0039] In summary, this solution can call the corresponding software development program for operation based on the user's access rights and access requests, thereby improving the security of the software testing system, while preventing the user's access rights from limiting the scope of its running tests, thereby improving the reliability of software testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flowchart of the software testing method and system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The following is further described in detail through specific implementation methods:
[0042] Example 1:
[0043] Example 1 is basically as shown in the attached Figure 1 As shown:
[0044] The software testing method comprises the following steps:
[0045] S100, obtaining the user's login information and access request, and generating access rights based on the user's login information; the access rights include user access rights and background operation rights; S100 includes:
[0046] S101, obtaining the user's login information, wherein the login information includes the user's account number and password.
[0047] S102: Obtain a pre-stored access permission comparison table, which includes user information and the permissions corresponding to the user information; compare the user's login information with the user information, and generate access permissions based on the comparison results. Specifically, after successful password authentication, the user's account number is compared with the pre-stored user information. If the comparison is successful, the permissions corresponding to the corresponding user information are extracted as the access permissions.
[0048] S103: Obtain the user's access request.
[0049] At step S104, the user's access request is compared with the access rights to determine whether there is an abnormal request. If not, the process proceeds to step S200; if so, the process proceeds to step S105. Specifically, the process analyzes whether the user's access request is within the access rights. If so, there is no abnormal request; otherwise, there is an abnormal request. If the user's access request is within their personal access rights, the corresponding software development program is directly invoked for their use. Otherwise, the rationality of the abnormal request is analyzed.
[0050] S105, acquiring environmental data and generating a permission adjustment range based on the environmental data; the environmental data includes audio data and location data; S105 includes:
[0051] S1051, obtaining location data, and determining whether the user is located in a preset area based on the location data, if so, executing S1052, if not, generating an abnormality alarm, and executing S200.
[0052] S1052: Acquire audio data, identify the conversation content and participants in the audio data, and generate a conversation recognition result. Specifically, use speech recognition technology to analyze the audio data to identify the conversation content in the audio data; use voiceprint recognition technology to analyze the audio data to identify the participants in the audio data. Compare the participant's voiceprint with the user's voiceprint information corresponding to the pre-stored user information. If the comparison result shows that the participant's voiceprint matches the user's voiceprint, the conversation content of the participant is identified.
[0053] S1053: Generate a permission adjustment scope based on the session identification results. If the session identification results indicate that the session content includes a preset sentence, the user's access rights are expanded based on the access rights of the corresponding session participants. For example, if user A's access rights are for the first software development program and user B's access rights are for the second software development program, and the session content includes the preset sentence "Run the first software development program and the second software development program," a permission adjustment scope is generated for the second software development program.
[0054] S106, adjusting the access rights according to the permission adjustment range. In this embodiment, the user's access rights are expanded according to the permission adjustment range, so that the user can call the first software development program and the second software development program.
[0055] S200: Invoke a software development program according to the access request and access rights. Specifically, invoke the software development program according to the user access rights and the access request.
[0056] S300: Obtain user operation information and update the called software development program according to the user operation information.
[0057] S400: Obtain the user's operation request, expand the user's background operation authority according to the user's operation request, and test the software development program.
[0058] The software testing system uses the above software testing method.
[0059] Example 2:
[0060] Example 2 is basically as shown in the attached Figure 1 As shown:
[0061] The basic principle of Example 2 is the same as that of Example 1, except that S400 in Example 2 includes:
[0062] S401, obtaining a user's operation request;
[0063] S402: Analyze the software development programs associated with the user's run request and set them as associated programs, expanding the user's background run permissions to include software development programs and associated programs within the background run permissions. In this embodiment, analysis is performed based on the correlation of various data during program execution. For example, if a variable X exists in a first software development program and is generated in a second software development program, then the first software development program needs to be tested, and if the specific code to be tested contains variable X, the second software development program is considered the associated software development program. This prevents excessive running of programs and the increase of irrelevant load, thereby improving software testing efficiency and not providing excessive permissions to access other irrelevant software development programs, further enhancing the security of the software testing system.
[0064] S403, obtaining the completion status of the associated program, and calling the source code in the associated program according to the completion status; in this embodiment, when the completion status shows that the completion rate of the associated program is greater than the preset completion rate, the source code written by the program developer is called, otherwise test data is automatically generated according to the requirements of the associated program for use by the software development program to be tested; when the completion rate of the associated program is high, if a problem occurs during operation, it can be easily determined whether the cause of the problem is that the source code of the associated program has not been completed. When the completion rate is too low, the target data is directly generated and brought into the software development program to be tested to ensure its normal testing.
[0065] S404, testing the software development program.
[0066] The software testing system uses the above software testing method.
[0067] The above are only embodiments of the present invention. Common knowledge such as the known specific structures and characteristics in the scheme are not described in detail here. Ordinary technicians in the field are aware of all common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all existing technologies in the field, and have the ability to apply conventional experimental means before that date. Ordinary technicians in the field can improve and implement this scheme in combination with their own abilities under the inspiration given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several variations and improvements can be made, which should also be regarded as the scope of protection of the present invention. These will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A software testing method, characterized in that: The following steps are involved: S100, obtaining the user's login information and access request, and generating access rights based on the user's login information; the access rights include user access rights and background operation rights; S200, calling a software development program according to the access request and access rights; S300, obtaining user operation information and updating the called software development program according to the user operation information; S400, obtaining a user's operation request, and expanding the user's background operation authority according to the user's operation request, and testing the software development program, including: S401, obtaining a user's operation request; S402: Analyze the software development programs associated with the user's execution request and set them as associated programs. Expand the user's background execution privileges to include software development programs and associated programs within the background execution privileges. Analyze the correlation between various data during program execution. If a first software development program contains a variable X, and variable X is generated in a second software development program, then the first software development program needs to be tested. If the specific code to be tested contains variable X, then the second software development program is the associated software development program. Obtaining the completion status of the associated program and calling the source code in the associated program based on the completion status; when the completion status shows that the completion rate of the associated program is greater than a preset completion rate, calling the source code written by the program developer; otherwise, automatically generating test data based on the requirements of the associated program for use by the software development program to be tested; when the completion rate of the associated program is high, if a problem occurs during runtime, it can be determined whether the cause of the problem is that the source code of the associated program has not been completed; when the completion rate is too low, directly generating target data and bringing it into the software development program to be tested; The S100 also includes: S103, obtaining the user's access request; S104, compare the user's access request with the access rights to analyze whether there is an abnormal request. If not, execute S200; if so, execute S105; S105, obtaining environmental data and generating an authority adjustment range based on the environmental data; S106, adjusting the access rights according to the permission adjustment range; S105 includes: S1052, obtaining audio data, identifying the conversation content and conversation participants in the audio data, and generating a conversation recognition result; S1053, generating a permission adjustment range based on the session identification result; The S105 also includes: S1051, obtaining location data, and determining whether the user is located in a preset area based on the location data, if so, executing S1052, if not, executing S200.
2. The software testing method according to claim 1, wherein: S100 includes: S101, obtaining user login information; S102, obtaining a pre-stored access permission comparison table, wherein the access permission comparison table includes user information and permissions corresponding to the user information; comparing the user's login information with the user information, and generating access permissions based on the comparison result.
3. The software testing method according to claim 1, wherein: In S1051, it is determined based on the location data whether the user is within the preset area. If not, an abnormality alarm is generated.
4. The software testing method according to claim 1, wherein: In S1052, the audio data is analyzed using speech recognition technology to identify the conversation content in the audio data; Voiceprint recognition technology is used to analyze audio data and identify the conversation participants in the audio data.
5. Software testing system, characterized by: The software testing method according to any one of claims 1 to 4 is used.
Citation Information
Patent Citations
Software development method and system
CN104090776A
Product data document management system and authority control method thereof
CN114398603A