WO2020186808A1 - 页面权限测试方法、装置、计算机设备及存储介质 - Google Patents

页面权限测试方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020186808A1
WO2020186808A1 PCT/CN2019/120592 CN2019120592W WO2020186808A1 WO 2020186808 A1 WO2020186808 A1 WO 2020186808A1 CN 2019120592 W CN2019120592 W CN 2019120592W WO 2020186808 A1 WO2020186808 A1 WO 2020186808A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
permission
target
matrix
program
Prior art date
Application number
PCT/CN2019/120592
Other languages
English (en)
French (fr)
Inventor
闫国虹
刘慧众
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020186808A1 publication Critical patent/WO2020186808A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Definitions

  • This application relates to the technical field of software testing, and in particular to a page permission testing method, device, computer equipment and storage medium.
  • Software testing refers to the evaluation process of operating software programs under specific conditions to find software program errors and measure whether the software quality can meet the design requirements.
  • a permission type test is involved on the page to test whether a certain page in the software program has a specific permission, such as whether a certain page has the permission to access the network or the camera.
  • the test cases corresponding to the page that needs permission testing are sorted out mainly based on the tester's personal experience, which easily leads to incomplete test coverage, long test cycles, and test results affected by the tester's experience or other subjective factors.
  • the embodiments of the present application provide a page permission testing method, device, computer equipment, and storage medium to solve the problem of manually determining the test case corresponding to the page that needs to be tested during the current page permission test.
  • a page permission testing method including:
  • a static code scan is performed on the main program code of the target software program corresponding to the target program ID to obtain a second permission list corresponding to the target software program.
  • the second permission list includes M page identifiers and information related to each User authority corresponding to the page identifier;
  • orthogonal matrix of use case permissions corresponding to the target software program from the test case database, where the orthogonal matrix of page permissions is a matrix formed based on A scenario test cases and N user permissions;
  • a page authority testing device including:
  • the permission test request obtaining module is used to obtain the permission test request, and the permission test request includes the target program ID;
  • the first permission list obtaining module is configured to perform a static code scan on the permission declaration code of the target software program corresponding to the target program ID to obtain a first permission list corresponding to the target software program, the first permission list including N User permissions;
  • the second permission list obtaining module is configured to perform a static code scan on the main program code of the target software program corresponding to the target program ID to obtain a second permission list corresponding to the target software program, and the second permission list includes M Each page identifier and the user authority corresponding to each said page identifier;
  • the page permission matrix obtaining module is configured to generate a page permission orthogonal matrix based on the first permission list and the second permission list, and the page permission orthogonal matrix is formed based on M page identifiers and N user permissions matrix;
  • the use case permission matrix obtaining module is used to obtain the use case permission orthogonal matrix corresponding to the target software program from the test case database.
  • the page permission orthogonal matrix is a matrix formed based on A scenario test cases and N user permissions ;
  • the page use case matrix obtaining module is configured to obtain the page use case orthogonal matrix corresponding to the target program ID based on the page permission orthogonal matrix and the use case permission orthogonal matrix, and the page use case orthogonal matrix is based on A matrix formed by M page identifiers and A scenario test cases;
  • the target test case obtaining module is configured to obtain the target test case corresponding to each page identifier based on the orthogonal matrix of the page use cases.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • a static code scan is performed on the main program code of the target software program corresponding to the target program ID to obtain a second permission list corresponding to the target software program.
  • the second permission list includes M page identifiers and information related to each User authority corresponding to the page identifier;
  • orthogonal matrix of use case permissions corresponding to the target software program from the test case database, where the orthogonal matrix of page permissions is a matrix formed based on A scenario test cases and N user permissions;
  • One or more readable storage media storing computer readable instructions
  • the computer readable storage medium storing computer readable instructions
  • the one Or multiple processors perform the following steps:
  • a static code scan is performed on the main program code of the target software program corresponding to the target program ID to obtain a second permission list corresponding to the target software program.
  • the second permission list includes M page identifiers and information related to each User authority corresponding to the page identifier;
  • orthogonal matrix of use case permissions corresponding to the target software program from the test case database, where the orthogonal matrix of page permissions is a matrix formed based on A scenario test cases and N user permissions;
  • FIG. 1 is a schematic diagram of an application environment of a page permission testing method in an embodiment of the present application
  • FIG. 2 is a flowchart of a page permission testing method in an embodiment of the present application
  • FIG. 3 is another flowchart of a page permission testing method in an embodiment of the present application.
  • FIG. 4 is another flowchart of a page permission testing method in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a page permission testing device in an embodiment of the present application.
  • Fig. 6 is a schematic diagram of a computer device in an embodiment of the present application.
  • the page permission testing method provided by the embodiment of the present application can be applied to the application environment shown in FIG. 1.
  • this page permission testing method is applied in a software testing system, which includes a client and a server as shown in Figure 1.
  • the client and server communicate through the network to achieve precise positioning that requires permission testing.
  • the test cases corresponding to the page do not require the intervention of testers, which improves test efficiency and reduces test costs, and guarantees permission test coverage.
  • the client is also called the client, which refers to the program that corresponds to the server and provides local services to the client.
  • the client can be installed on, but not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a page permission testing method is provided.
  • the method is applied to the server in FIG. 1 as an example for description, including the following steps:
  • the permission test request is a request used to trigger the server to perform permission test on the target software program.
  • the target program ID is an identifier used to identify the target software program that needs to be tested.
  • the target software program is specifically a software program that requires permission testing, and may specifically be an Android APP. Understandably, the software testing system stores multiple software programs uploaded by developers that need to be tested, and the target software program for this permission test request can be determined according to the target program ID.
  • S202 Perform a static code scan on the permission declaration code of the target software program corresponding to the target program ID, and obtain a first permission list corresponding to the target software program.
  • the first permission list includes N user permissions.
  • static source code scanning is one of the software application security solutions that have been mentioned more in recent years. It means that in software engineering, after a developer has written the source code, it does not need to be compiled by a compiler, but directly scans it with some scanning tools to find out the solutions to some semantic defects and security vulnerabilities in the code.
  • the source code written by the developer can be scanned without compiling or setting up a running environment. It can save a lot of manpower and time costs, improve development efficiency, and can find many security vulnerabilities that cannot be discovered by manpower. From the perspective of hackers, review the code written by developers, greatly reduce security risks in the project, and improve software quality .
  • the permission declaration code is a code used to record all user permissions included in the target software program.
  • the permission declaration code is recorded in a permission declaration file to realize unified management of user permissions in the target software program.
  • the permission declaration code of the Android application is stored in AndroidManifest.xml, which is used to declare the user permissions applied in the Android application.
  • AndroidManifest.xml is used to declare the user permissions applied in the Android application.
  • the target software program is an Android application
  • all user permissions are declared on its AndroidManifest.xml
  • the permission declaration code on AndroidManifest.xml can be scanned through static code to obtain all user permissions in the target software program, and store these user permissions in Data table to form the first permission list.
  • the number of user permissions stored in the first permission list is set to N, that is, the first permission list includes N user permissions.
  • the user permissions declared by the permission declaration code include, but are not limited to, the usage permissions such as access to the camera, access to the network, access to the address book, storage, microphone, device location, and read and write access in this embodiment.
  • the permission declaration file CAMERA can be used to declare the camera that can access the device, that is, the user permission to access the camera;
  • ACCESS_COARSE_LOCATION can be used to declare that the program is allowed to access the network to roughly determine the location of its own device, that is, users with device positioning Permission;
  • ACCESS_NETWORK_STATE can be used to declare that the application is allowed to access network information, that is, it has user permissions to access the network.
  • step S202 which is to perform a static code scan on the permission declaration code of the target software program corresponding to the target program ID, to obtain the first permission list corresponding to the target software program, specifically includes the following steps:
  • a static code scanning tool and a grammatical rule corresponding to the target program ID are used to perform a static code scan on the permission declaration code of the target software program corresponding to the target program ID to obtain the first permission list corresponding to the target software program.
  • the static code scanning tool is an open source static code scanning tool, such as a SonarQube scanning tool.
  • SonarQube scanning tool adopts B/S architecture to help check code defects, improve code quality, and increase development speed. Through plug-in form, it can support code quality management and detection of more than 20 programming languages such as Java, C, C++, and JavaScripe.
  • the grammatical rule corresponding to the target program ID is a custom grammatical rule that is pre-configured during the development of the target software program to achieve the purpose of static code scanning.
  • the grammar rules match the programming language collected by writing the target software program.
  • the target software program edited by JAVA must conform to the grammatical rules of JAVA, and the target software program edited by C++ must conform to the grammatical rules of C++.
  • the server uses an open source static code scanning tool (including but not limited to SonarQube) to perform static code scanning on the permission declaration code in the permission declaration file AndroidManifest.xml of the target software program, which will conform to the preset and
  • the user permissions of the grammar rules corresponding to the target program ID are identified and stored in the first permission list to obtain all user permissions contained in the target software program, so as to realize the automatic acquisition of user permissions.
  • S203 Perform a static code scan on the main program code of the target software program corresponding to the target program ID, and obtain a second permission list corresponding to the target software program.
  • the second permission list includes M page identifiers and users corresponding to each page identifier Permissions.
  • the main program code of the target software program is the code for realizing the software function in the target software program, and the main program code is recorded in the main program file. Because in the target software program, different pages correspond to different software functions, and the software functions of this page are realized by function modules, which form the main program code.
  • the function module of any page may or may not include user permissions. For example, in the page function that needs to access the network, it includes the user permission to access the network; when the front-end page jumps, it does not include The user right to access the network.
  • the server scans the main program code of the target software program by using an open source static code scanning tool (including but not limited to SonarQube) to obtain all the page identifiers included in the main program code and their corresponding user rights , Forming a second authority list based on the page identifier and its corresponding user authority.
  • the page identifier is an identifier used to uniquely identify different pages in the target software program.
  • M page identifiers containing user permissions and user permissions corresponding to each page identifier are stored when scanning the main program code.
  • the M page identifiers here can be understood as the unique identifiers corresponding to the M pages containing the user authority.
  • step S203 that is, performing a static code scan on the main program code of the target software program corresponding to the target program ID, to obtain the second permission list corresponding to the target software program, specifically includes the following steps:
  • the permission keywords refer to keywords used to limit the use of specific user permissions on the page during the development of the target software program.
  • the general keyword Manifest.permission is used as the permission keyword, that is, the expression Manifest.permission X is used in the main program code of the target software program to show that it can realize user permission X, that is, on any page If the expression Manifest.permission X appears in the corresponding function module, the function module is deemed to be a function module that includes user permissions, and X is a specific user permission.
  • the server uses an open source static code scanning tool (including but not limited to SonarQube) to perform a static code scan on the main program code of the target software program to obtain at least one functional module containing a permission keyword (such as Manifest.permission) , Determine these functional modules as target codes, so as to obtain at least one target code corresponding to the permission keyword.
  • a permission keyword such as Manifest.permission
  • the target code is a functional module that contains user permissions.
  • the page keyword is used to match the page identifier in each target code, and the user authority after the authority keyword is obtained to determine the corresponding page identifier and user authority.
  • the target code including permission keywords include Manifest.permission XCCESS_NETWORK_STATE to determine that its user permission is ACCESS_NETWORK_STATE, that is, allow applications to access network information (referred to as access network for short).
  • the page keyword refers to the keyword used to limit the code to a specific page during the development of the target software program. The process of determining the page identifier is similar to the process of determining the user authority, and will not be repeated.
  • the preset data table is a preset two-dimensional data table.
  • the server After obtaining the page identifier and user authority corresponding to at least one target code, the server stores the page identifier corresponding to each target code and its corresponding user authority as a piece of page authority data in the preset data table to form a second authority list .
  • the first column stores the page identifiers
  • the second column the third column...the Kth column are respectively used to store the user permissions corresponding to each page identifier.
  • the server uses an open source static code scanning tool (including but not limited to SonarQube) to perform a static code scan on the main program code of the target software program to quickly obtain the target code containing user permissions; and then identify the target code
  • the included page identifiers and user permissions form a second permission list to display the user permissions applied to each page in the target software program in the form of a data table, so as to implement subsequent testing of the user permissions applied to different pages. Ensure test coverage and improve test efficiency.
  • S204 Generate a page permission orthogonal matrix based on the first permission list and the second permission list, where the page permission orthogonal matrix is a matrix formed based on M page identifiers and N user permissions.
  • the server After the server obtains the first permission list and the second permission list, it forms a page permission orthogonal matrix based on the first permission list and the second permission list, and the page permission orthogonal matrix uses M page identifiers as rows. A matrix formed with N user permissions as columns. The matrix values in the matrix are represented by 1 and 0, where 1 indicates that the functional module corresponding to the page identifier contains the corresponding user authority, and 0 indicates that the functional module corresponding to the page identifier does not contain the corresponding User rights. Understandably, the first permission list and the second permission list can clearly reflect the mapping relationship between the user permissions corresponding to each page in the target software program and all the user permissions in the entire target software program.
  • step S204 that is, generating an orthogonal matrix of page permissions based on the first permission list and the second permission list, specifically includes the following steps:
  • all user permissions stored in the first permission list in the target software program include access to the network, access to WIFI, statistical battery information, access to the camera, read and write access and positioning, which are represented by P1, P2, P3, P4, P5, and P6, respectively , Then N is 6.
  • the second permission list contains 4 pages, which are represented by page identifiers Y1, Y2, Y3, and Y4, then M is 4, set the user permissions corresponding to the Y1 page to access the network, access WIFI and location, and the user permissions corresponding to the Y2 page To access the network and access the camera; the user authority corresponding to the Y3 page is read and write access and battery information statistics, and the Y4 page corresponds to access to WIFI, statistical battery information, camera access, read and write access and positioning, the page permissions formed are orthogonal
  • Table 1 Table 1 below, which can clearly reflect the mapping relationship between the user permissions corresponding to each page in the target software program and all user permissions in the entire target software program.
  • S205 Obtain an orthogonal matrix of use case permissions corresponding to the target software program from the test case database, where the orthogonal matrix of page permissions is a matrix formed based on A scenario test cases and N user permissions.
  • the test case database is a database used to store all scenario test cases corresponding to the target software program.
  • each time a tester creates a scenario test case he needs to store the scenario test case and its tested user permissions in the orthogonal matrix of use case permissions in order to achieve unified management of the scenario test cases so that The user permissions tested by each scenario test case are more intuitive, so that the subsequent scenario test cases made by the page permission test process are determined based on the orthogonal matrix of the permission use cases. That is, after obtaining the permission test request, the server needs to obtain the use case permission orthogonal matrix corresponding to the target software program from the test case database based on the target program ID to assist in determining the scenario test cases collected during the page permission test.
  • L1, L2...LA are used to represent A scenario test cases in the test case database, as shown in Table 2 below. It can be seen from Table 2 that the scenario test case corresponding to L1 tests the user permissions of P1, P2, and P6, and tests the user permissions of accessing the network, accessing WIFI, and positioning.
  • the scenario test cases used in this embodiment include, but are not limited to, the following test cases: 1) Authorization_calling of related scenario pages_available when running is allowed. 2) Reject authorization at startup & tick Don’t pop up the window _call related scene page_prompt not to be used. 3) Reject authorization & uncheck no longer pop-up window _ call related scene page pop-up window prompts to select allow _ available at startup. 4) Reject authorization when starting running & don't check no longer pop-up window _ call related scene page pop-up window prompts that selection is not allowed _ cannot be used. 5) When the startup is allowed, choose to ask for authorization_call related scene page_continue pop-up prompt.
  • S206 Obtain a page use case orthogonal matrix corresponding to the target program ID based on the page permission orthogonal matrix and the use case permission orthogonal matrix.
  • the page use case orthogonal matrix is a matrix formed based on M page identifiers and A scene test cases.
  • the server After the server obtains the page permission orthogonal matrix and the use case permission orthogonal matrix, it forms a page use case orthogonal matrix based on the page permission orthogonal matrix and the use case permission orthogonal matrix, and the page use case orthogonal matrix is M pages Identified as a row, taking A scene test cases as columns to form a matrix.
  • the matrix values in the matrix are represented by 1 and 0. 1 means that the user authority corresponding to the page identifier is the same as the user authority corresponding to the scene test case, and 0 means the page identifier corresponds to The user authority of is different from the user authority corresponding to the scenario test case.
  • the orthogonal matrix of page use cases it can clearly reflect the scenario test cases that can be used on each page in the target software program.
  • step S206 based on the orthogonal matrix of page permissions and the orthogonal matrix of use case permissions, obtaining the orthogonal matrix of page use cases corresponding to the target program ID specifically includes the following steps:
  • the constructed orthogonal matrix of page use cases is shown in Table 3 below. Since the user permissions corresponding to Y1 are P1, P2, and P6, and the user permissions corresponding to L1 are also P1, P2, and P6, the matrix values corresponding to Y1 and L1 in the original page use case matrix are set to 1; and the user corresponding to L2 The permissions are P1, P2, P4, and P5, and the matrix values corresponding to Y1 and L2 in the original page use case matrix are set to 0.
  • S207 Obtain a target test case corresponding to each page identifier based on the orthogonal matrix of page use cases.
  • the page use case orthogonal matrix displays the relationship between the page corresponding to each page identifier and all the scenario test cases provided in the test case database in a structured form, according to the matrix value in the page use case orthogonal matrix, Determine whether all user permissions corresponding to a page will be tested during the test process of any scenario test case.
  • the server may determine, based on the orthogonal matrix of page use cases, that the scenario test case corresponding to each page identifier with a matrix value of 1 is its corresponding target test case, so that the functional modules of the page corresponding to the page identifier can be subsequently tested At the same time, it can accurately locate the target test case corresponding to each page identifier, and test based on the target test case, which helps to ensure the coverage of the page permission test, and avoids the testers from determining the test case corresponding to the page.
  • the problems of incomplete test coverage and long test cycles help to reduce the labor and time costs of testers.
  • the target software program is scanned statically to quickly obtain the first permission list and the second permission list.
  • the scanning process does not need to compile and build an operating environment, which can save a lot of manpower. And time cost, improve efficiency.
  • the page permission orthogonal matrix is formed, and then based on the formed page permission orthogonal matrix and the preset use case permission orthogonal matrix, the use case permission orthogonal matrix is formed, so that the The orthogonal matrix of use case permissions displays the available scenario test cases for each page in a structured form, which helps determine the corresponding scenario test cases during page permission testing.
  • the page permission testing method in order to ensure the quality of the software program, multiple regression tests are performed during the development of the target software program.
  • the regression test refers to modifying the old code and re-testing to confirm that the modification does not introduce new errors or cause other The process of code error. Since the target software program needs to modify the main program code or other codes in the target software program many times during the development process, it needs to be subjected to multiple regression tests. If the code change involves some page changes that contain user permissions, It is necessary to perform page permission testing based on these changed pages. Therefore, it is necessary to analyze the regression test cases required for page permission testing after the code changes.
  • the regression test case can be understood as a scenario test case used in the regression test process. As shown in FIG. 3, after step 206, that is, after obtaining the orthogonal matrix of page use cases corresponding to the target program ID, the page permission testing method further includes:
  • the regression test analysis request includes the target program ID and the target version ID.
  • the regression test analysis request is a request used to trigger the server to perform regression test analysis to determine the regression test case.
  • the target program ID is an identifier used to identify the target software program that needs to be tested. Specifically, the target version program code that needs to be regression tested this time can be uniquely determined according to the target program ID and target version ID.
  • S302 Query the code warehouse based on the target program ID and the target version ID, and obtain the target version program code and the historical version program code.
  • a code repository is a database used to store all versions of a specific software program's code.
  • the specific software program here is the target software program corresponding to the target program ID.
  • the target version program code is a program code corresponding to the target program ID and the target version ID.
  • the historical version program code is the program code corresponding to the historical version before the target version corresponding to the target program ID.
  • the target program ID can uniquely identify the WeChat program to avoid the identification of other apps;
  • the target version ID refers to the identifier used to uniquely identify the WeChat version, such as V5.0, the target version program
  • the code is the program code corresponding to V5.0; for WeChat programs, historical versions such as V3.0 and V4.0 are also included before V5.0, and the program codes corresponding to V3.0 and V4.0 are historical version programs. Code.
  • the server can directly obtain the program code of the target version after querying the code warehouse based on the target program ID and target version ID; then, query all the historical version program codes before the target version program code based on the target version ID, and select the current time from the system The most recent historical version program code is used as the historical version program code required for this regression test analysis, so as to execute the subsequent step S303 to realize the regression test analysis of the closest historical version program code.
  • S303 Use a code comparison tool to compare the target version program code with the historical version program code, and obtain the modified code module.
  • the code comparison tool refers to a tool used to achieve code comparison.
  • the code comparison tool can use open source tools, such as Beyond compare, DiffMerge and WinMerge.
  • the server uses an open source code comparison tool to compare the target version program code and the historical version program code to obtain the modified code module.
  • the modified code module is specifically a functional module whose target version program code is modified relative to the historical version program code. Understandably, the code comparison tool analyzes that the changed code module has undergone code changes. Therefore, regression testing is required for the changed code module to ensure that the changed code module does not introduce new errors or cause errors in other codes.
  • S304 Perform a static code scan on the changed code module to obtain a change page identifier.
  • the changed code module Since the changed code module is a functional module whose code has been changed, the changed code module includes a page identifier.
  • the server can use an open source static code scanning tool to perform static code scanning on the modified code module to obtain the page identifier contained in the modified code module, which is determined to be the modified page identifier.
  • the process of obtaining the changed page identifier in this step is similar to the process in step S203, that is, static code scanning is performed on the changed code module by using a static code scanning tool and preset permission keywords to extract the changed page identifier from the changed code module .
  • S305 Query an orthogonal matrix of page use cases corresponding to the target program ID based on the changed page identifier, and obtain regression test cases.
  • the server determines the target test case corresponding to the modified page identifier as a regression test case based on the modified page identifier matching the orthogonal matrix of page use cases corresponding to the target program ID.
  • the regression test case determined in step S305 can test all user permissions contained in the page corresponding to the changed page identifier, so as to ensure the coverage of page testing, improve the accuracy of regression test case positioning, and ensure regression testing The test results.
  • the target version program code and the historical version program code are compared through the code comparison tool, and the modified code module can be quickly obtained to determine the code of the page permission test targeted by the regression test.
  • the corresponding modified page identifier can be quickly obtained.
  • the orthogonal matrix of query page use cases can be used to accurately locate the corresponding regression test cases and improve the accuracy of regression test case positioning. , To ensure the test effect of regression testing.
  • the page permission testing method further includes:
  • S401 Perform a user authority test based on the target test case corresponding to each page identifier, and obtain the authority test result corresponding to the page identifier.
  • the server After the server obtains the target test case corresponding to each page identifier in the target software program, it executes the target test case to implement the user authority test for the functional module corresponding to the page identifier to obtain the corresponding authority test result.
  • the permission test result includes test success and test failure. That is, a successful test means that the function module corresponding to the page identifier can execute its corresponding user authority; and a test failure means that the function module corresponding to the page identifier cannot Execute its corresponding user authority.
  • the server first obtains the user authority that failed the test.
  • the user authority that failed the test refers to the multiple user authority corresponding to the target test case, which corresponds to the page identifier
  • the user permission of the function module test failed.
  • a target test case includes two user permissions: access to the network and location, and when testing the function module corresponding to a page identifier, the access to the network can be performed but the location cannot be located, indicating that the user permission of location is the test failure User rights. Then, query the set permission repair schedule according to the user permission of the test failed, and obtain the defect repair period corresponding to the user permission of the test failed.
  • the permission repair schedule is a data table that determines the relationship between each user permission and its corresponding repair time based on the repair difficulty of the software code corresponding to each user permission in advance.
  • the server also triggers a defect repair listener, and the defect repair listener is a program that monitors whether a successful repair event is received. Understandably, the defect repair listener is an event listener for monitoring whether a specific event occurs.
  • the server may obtain the defect repair result monitored by the defect repair monitoring program during the defect repair period.
  • the defect repair results include repair success and repair failure.
  • the repair success refers to the repair result formed when the defect repair listener can monitor the event formed by the successful repair of a certain defect during the defect repair period.
  • repair failure refers to the repair result formed when the defect repair listener fails to monitor the event that a certain defect is successfully repaired during the defect repair period.
  • the server fills the permission test result and defect repair result into the preset configured analysis report template, and the corresponding permission test analysis report can be automatically and quickly obtained.
  • the page ID is used as the row ID
  • the target test case is the column ID in the first column
  • the target test case contains several user permissions as the column ID in the second and subsequent columns.
  • the permission test result is obtained, and the corresponding defect repair result is obtained through the defect repair monitor program, and then the permission test result and defect repair result are used to automatically generate the permission Test analysis report, so that the authority test analysis report can clearly and intuitively reflect the user authority test results and repair results, which is helpful for the quality audit of the target software program.
  • a page permission testing device is provided, and the page permission testing device corresponds to the page permission testing method in the foregoing embodiment one-to-one.
  • the page permission testing device includes a permission test request obtaining module 501, a first permission list obtaining module 502, a second permission list obtaining module 503, a page permission matrix obtaining module 504, a use case permission matrix obtaining module 505, and a page Use case matrix acquisition module 506 and target test case acquisition module 507.
  • each functional module is as follows:
  • the permission test request obtaining module 501 is configured to obtain a permission test request, and the permission test request includes the target program ID.
  • the first permission list obtaining module 502 is configured to perform a static code scan on the permission declaration code of the target software program corresponding to the target program ID, and obtain a first permission list corresponding to the target software program.
  • the first permission list includes N user permissions.
  • the second permission list obtaining module 503 is configured to perform a static code scan on the main program code of the target software program corresponding to the target program ID to obtain a second permission list corresponding to the target software program.
  • the second permission list includes M page identifiers and Each page identifies the corresponding user authority.
  • the page permission matrix obtaining module 504 is configured to generate a page permission orthogonal matrix based on the first permission list and the second permission list.
  • the page permission orthogonal matrix is a matrix formed based on M page identifiers and N user permissions.
  • the use case permission matrix obtaining module 505 is used to obtain the use case permission orthogonal matrix corresponding to the target software program from the test case database.
  • the page permission orthogonal matrix is a matrix formed based on A scenario test cases and N user permissions.
  • the page use case matrix obtaining module 506 is used to obtain the page use case orthogonal matrix corresponding to the target program ID based on the page permission orthogonal matrix and the use case permission orthogonal matrix.
  • the page use case orthogonal matrix is based on M page identifiers and A A matrix of scenario test cases.
  • the target test case obtaining module 507 is configured to obtain the target test case corresponding to each page identifier based on the orthogonal matrix of page use cases.
  • the first permission list obtaining module 502 is configured to use a static code scanning tool and grammatical rules corresponding to the target program ID to perform static code scanning on the permission declaration code of the target software program corresponding to the target program ID to obtain the target software The first permission list corresponding to the program.
  • the second permission list obtaining module 503 includes a static scanning processing unit, an identification permission extraction unit, and a permission list obtaining unit.
  • the static scanning processing unit is configured to use a static code scanning tool and a preset permission keyword to perform a static code scan on the main program code of the target software program corresponding to the target program ID, and obtain at least one target code corresponding to the permission keyword .
  • the identification authority extraction unit is configured to extract the page identification and user authority corresponding to each target code from at least one target code.
  • the permission list obtaining unit is configured to store the page identifier and user permission corresponding to at least one target code in the preset data table, and obtain the second permission list corresponding to the target software program.
  • the page authority matrix obtaining module 504 includes an original page authority matrix obtaining unit and an orthogonal page authority matrix obtaining unit.
  • the original page permission matrix acquisition unit is used to construct an M*N original page permission matrix based on M page identifiers and N user permissions.
  • the orthogonal page permission matrix acquisition unit is used to traverse the first permission list and the second permission list, and compare whether the user permission corresponding to each row of page identifiers is the same as the user permission in the column; if they are the same, the matrix in the original page matrix The value is set to 1; if they are not the same, the matrix value in the original page matrix is set to 0 to generate an orthogonal matrix of page permissions.
  • the page use case matrix obtaining module 506 includes an original page use case matrix obtaining unit and an orthogonal page use case matrix obtaining unit.
  • the original page use case matrix acquisition unit is used to construct an M*A original page use case matrix based on M page identifiers and A scene test cases.
  • the orthogonal page use case matrix acquisition unit is used to traverse the page permission orthogonal matrix and the use case permission orthogonal matrix, and compare whether the user permission corresponding to each page identifier is the same as the user permission corresponding to the scenario test case; if they are the same, the original page
  • the matrix value in the use case matrix is set to 1; if they are not the same, the matrix value in the original page use case matrix is set to 0 to generate the page use case orthogonal matrix.
  • the page authority testing device further includes a test analysis request acquisition unit, a program code acquisition unit, a modified code module acquisition unit, a modified page identification acquisition unit, and a regression test case acquisition unit.
  • the test analysis request obtaining unit is used to obtain a regression test analysis request, and the regression test analysis request includes a target program ID and a target version ID.
  • the program code acquisition unit is used to query the code warehouse based on the target program ID and the target version ID, and obtain the target version program code and the historical version program code.
  • the modified code module acquisition unit is used to compare the target version program code with the historical version program code by using the code comparison tool to obtain the modified code module.
  • the change page identification acquisition unit is used to perform static code scanning on the changed code module to obtain the change page identification.
  • the regression test case acquisition unit is used to query the orthogonal matrix of page use cases corresponding to the target program ID based on the changed page identifier to obtain regression test cases.
  • the page permission testing device further includes a permission test result acquisition unit, a listener trigger unit, a defect repair result acquisition unit, and a test analysis report acquisition unit.
  • the permission test result obtaining unit is used to perform user permission test based on the target test case corresponding to each page ID, and obtain the permission test result corresponding to the page ID;
  • the monitor trigger unit is used to trigger the defect repair monitor during the defect repair period corresponding to the user authority of the failed test if the permission test result is a test failure;
  • the defect repair result obtaining unit is used to obtain the defect repair result monitored by the defect repair monitor during the defect repair period;
  • the test analysis report obtaining unit is used to obtain the permission test analysis report based on the permission test result and the defect repair result.
  • Each module in the above-mentioned page authority testing device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 6.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer device is used for the data adopted or generated in the process of executing the page permission test method, such as the use case permission orthogonal matrix or the page use case orthogonal matrix.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer readable instruction is executed by the processor, a page permission testing method is realized.
  • a computer device including a memory, a processor, and computer readable instructions stored in the memory and capable of running on the processor.
  • the processor executes the computer readable instructions, the page in the above embodiment is realized.
  • the steps of the permission test method such as steps S201-S207 shown in FIG. 2, or the steps shown in FIGS. 3 to 4, are not repeated here to avoid repetition.
  • the processor implements the functions of the modules/units in this embodiment of the page permission testing device when the processor executes the computer-readable instructions, for example, the permission test request obtaining module 501, the first permission list obtaining module 502, and the 2.
  • the functions of the permission list obtaining module 503, the page permission matrix obtaining module 504, the use case permission matrix obtaining module 505, the page use case matrix obtaining module 506, and the target test case obtaining module 507 are not repeated here to avoid repetition.
  • one or more readable storage media storing computer readable instructions are provided.
  • the computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by one or more processors.
  • the steps of the page permission testing method in the foregoing embodiment are realized when the one or more processors execute, for example, steps S201-S207 shown in FIG. 2, or the steps shown in FIGS. 3 to 4, are To avoid repetition, I won't repeat it here.
  • the computer-readable instruction is executed by the processor, the function of each module/unit in the embodiment of the above-mentioned page permission testing device is realized, for example, the permission test request obtaining module 501 and the first permission list obtaining module shown in FIG. 5 502.
  • the functions of the second permission list obtaining module 503, the page permission matrix obtaining module 504, the use case permission matrix obtaining module 505, the page use case matrix obtaining module 506, and the target test case obtaining module 507 are not repeated here to avoid repetition.
  • the readable storage medium in this embodiment includes a nonvolatile readable storage medium and a volatile readable storage medium.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

一种页面权限测试方法、装置、计算机设备及存储介质。该方法包括:获取包括目标程序ID的权限测试请求(S201);对目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取第一权限列表(S202);对目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取第二权限列表(S203);基于第一权限列表和第二权限列表,生成页面权限正交矩阵(S204);从测试用例数据库中,获取目标软件程序对应的用例权限正交矩阵(S205);基于页面权限正交矩阵和用例权限正交矩阵,获取与目标程序ID相对应的页面用例正交矩阵(S206);基于页面用例正交矩阵,获取与每一页面标识相对应的目标测试用例(S207)。本方法可实现对目标测试用例的精确定位,提高用户权限测试的覆盖率。

Description

页面权限测试方法、装置、计算机设备及存储介质
本申请以2019年3月19日提交的申请号为201910207523.6,名称为“页面权限测试方法、装置、计算机设备及存储介质”的中国发明申请为基础,并要求其优先权。
技术领域
本申请涉及软件测试技术领域,尤其涉及一种页面权限测试方法、装置、计算机设备及存储介质。
背景技术
软件测试是指在特定条件下对软件程序进行操作,以发现软件程序错误,衡量软件质量能否满足设计要求的评估过程。在软件程序的测试过程中,会涉及对页面进行权限类测试,以测试软件程序中某一页面是否具有特定的权限,如某一页面是否具有访问网络或者访问相机的权限。在页面权限测试过程中,主要依据测试人员个人经验梳理需要进行权限测试的页面对应的测试用例,容易导致测试覆盖不全、测试周期长且测试结果受测试人员经验或者其他主观因素影响。
发明内容
本申请实施例提供一种页面权限测试方法、装置、计算机设备及存储介质,以解决当前页面权限测试时人工确定需要进行测试的页面对应的测试用例所存在的问题。
一种页面权限测试方法,包括:
获取权限测试请求,所述权限测试请求包括目标程序ID;
对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,所述第一权限列表包括N个用户权限;
对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,所述第二权限列表包括M个页面标识和与每一所述页面标识相对应的用户权限;
基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,所述页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵;
从测试用例数据库中,获取所述目标软件程序对应的用例权限正交矩阵,所述页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵;
基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,所述页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵;
基于所述页面用例正交矩阵,获取与每一所述页面标识相对应的目标测试用例。
一种页面权限测试装置,包括:
权限测试请求获取模块,用于获取权限测试请求,所述权限测试请求包括目标程序ID;
第一权限列表获取模块,用于对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,所述第一权限列表包括N个用户权限;
第二权限列表获取模块,用于对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,所述第二权限列表包括M个页面标识和与每一所述页面标识相对应的用户权限;
页面权限矩阵获取模块,用于基于所述第一权限列表和所述第二权限列表,生成页面 权限正交矩阵,所述页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵;
用例权限矩阵获取模块,用于从测试用例数据库中,获取所述目标软件程序对应的用例权限正交矩阵,所述页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵;
页面用例矩阵获取模块,用于基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,所述页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵;
目标测试用例获取模块,用于基于所述页面用例正交矩阵,获取与每一所述页面标识相对应的目标测试用例。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
获取权限测试请求,所述权限测试请求包括目标程序ID;
对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,所述第一权限列表包括N个用户权限;
对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,所述第二权限列表包括M个页面标识和与每一所述页面标识相对应的用户权限;
基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,所述页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵;
从测试用例数据库中,获取所述目标软件程序对应的用例权限正交矩阵,所述页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵;
基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,所述页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵;
基于所述页面用例正交矩阵,获取与每一所述页面标识相对应的目标测试用例。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
获取权限测试请求,所述权限测试请求包括目标程序ID;
对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,所述第一权限列表包括N个用户权限;
对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,所述第二权限列表包括M个页面标识和与每一所述页面标识相对应的用户权限;
基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,所述页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵;
从测试用例数据库中,获取所述目标软件程序对应的用例权限正交矩阵,所述页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵;
基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,所述页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵;
基于所述页面用例正交矩阵,获取与每一所述页面标识相对应的目标测试用例。
本申请的一个或多个实施例的细节在下面的附图及描述中提出。本申请的其他特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中页面权限测试方法的一应用环境示意图;
图2是本申请一实施例中页面权限测试方法的一流程图;
图3是本申请一实施例中页面权限测试方法的另一流程图;
图4是本申请一实施例中页面权限测试方法的另一流程图;
图5是本申请一实施例中页面权限测试装置的一示意图;
图6是本申请一实施例中计算机设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供的页面权限测试方法,该页面权限测试方法可应用如图1所示的应用环境中。具体地,该页面权限测试方法应用在软件测试系统中,该软件测试系统包括如图1所示的客户端和服务器,客户端与服务器通过网络进行通信,用于实现精确定位需要进行权限测试的页面对应的测试用例,无需测试人员干预,提高测试效率并降低测试成本,保证权限测试覆盖率。其中,客户端又称为用户端,是指与服务器相对应,为客户提供本地服务的程序。客户端可安装在但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备上。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一实施例中,如图2所示,提供一种页面权限测试方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:
S201:获取权限测试请求,权限测试请求包括目标程序ID。
其中,权限测试请求是用于触发服务器对目标软件程序进行权限测试的请求。目标程序ID是用于识别需要进行测试的目标软件程序的标识。该目标软件程序具体为需要进行权限测试的软件程序,具体可以为一Android APP。可以理解地,该软件测试系统上存储有多个开发人员上传的需要进行测试的软件程序,可根据目标程序ID确定本次权限测试请求的目标软件程序。
S202:对目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取目标软件程序对应的第一权限列表,第一权限列表包括N个用户权限。
其中,静态源代码扫描是近年被人提及较多的软件应用安全解决方案之一。它是指在软件工程中,开发人员写好源代码后,无需经过编译器编译,而直接使用一些扫描工具对其进行扫描,找出代码当中存在的一些语义缺陷、安全漏洞的解决方案。静态代码扫描过程,无需进行编译、也无需去搭建运行环境就可以对开发人员所写的源代码进行扫描。其可以节省大量的人力和时间成本,提高开发效率,并且能够发现很多靠人力无法发现的安全漏洞,站在黑客的角度上去审查开发人员编写的代码,大大降低项目中的安全风险,提高软件质量。
权限声明代码是用于记录目标软件程序所包含的所有用户权限的代码。该权限声明代码记录在一权限声明文件中,以实现对目标软件程序中的用户权限进行统一管理。例如,Android应用程序的权限声明代码存储在AndroidManifest.xml中,用于对Android应用 程序中应用到的用户权限进行声明。在目标软件程序为Android应用程序时,在其AndroidManifest.xml上声明所有用户权限,可以通过静态代码扫描AndroidManifest.xml上的权限声明代码,获取目标软件程序中所有用户权限,将这些用户权限存储在数据表中,以形成第一权限列表。本实施例中,设置第一权限列表中存储的用户权限的数量为N个,即第一权限列表中包含N个用户权限。
本实施例中,权限声明代码所声明的用户权限包括但不限于本实施例中的访问相机、访问网络、访问通讯录、存储、麦克风、设备定位和读写访问等使用权限。例如,权限声明文件中,可采用CAMERA来声明能够访问设备的相机,即具有访问相机的用户权限;可采用ACCESS_COARSE_LOCATION来声明允许程序通过访问网络来大致确定自己设备的位置,即具有设备定位的用户权限;可采用ACCESS_NETWORK_STATE来声明允许应用程序访问网络信息,即具有访问网络的用户权限。
在一实施例中,步骤S202,即对目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取目标软件程序对应的第一权限列表,具体包括如下步骤:
采用静态代码扫描工具和与目标程序ID相对应的语法规则,对目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取目标软件程序对应的第一权限列表。
其中,该静态代码扫描工具是开源的静态代码扫描工具,如可以是SonarQube扫描工具。SonarQube扫描工具采用B/S架构,帮助检查代码缺陷,改善代码质量,提高开发速度,通过插件形式,可以支持Java、C、C++、JavaScripe等二十几种编程语言的代码质量管理与检测。
其中,与目标程序ID相对应的语法规则是在目标软件程序开发过程中预先配置可实现静态代码扫描目的自定义语法规则。该语法规则与编写该目标软件程序所采集的编程语言相匹配。一般来说,采用JAVA编辑的目标软件程序需符合JAVA的语法规则,采用C++编辑的目标软件程序需符合C++的语法规则。
本实施例中,服务器采用开源的静态代码扫描工具(包括但不限于SonarQube),对目标软件程序的AndroidManifest.xml这一权限声明文件中的权限声明代码进行静态代码扫描,将符合预先设置的与目标程序ID相对应的语法规则的用户权限的识别出来,存储在第一权限列表中,以获取目标软件程序中所包含的所有用户权限,实现用户权限的自动获取。
S203:对目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取目标软件程序对应的第二权限列表,第二权限列表包括M个页面标识和与每一页面标识相对应的用户权限。
目标软件程序的主程序代码是目标软件程序中实现软件功能的代码,该主程序代码记录在主程序文件中。由于目标软件程序中,不同页面对应不同的软件功能,而这个页面的软件功能通过功能模块实现,这些功能模块形成主程序代码。在任一页面的功能模块中,可能包含用户权限,也可能不包含用户权限,例如,在需要访问网络的页面功能中,其包含访问网络这一用户权限;在前端页面跳转时,其不包含访问网络这一用户权限。
本实施例中,服务器通过采用开源的静态代码扫描工具(包括但不限于SonarQube),对目标软件程序的主程序代码进行扫描,以获取主程序代码中包括的所有页面标识及其对应的用户权限,基于该页面标识及其对应的用户权限形成第二权限列表。其中,页面标识是用于唯一识别目标软件程序中不同页面的标识。在第二权限列表中,存储有从主程序代码扫描时出的包含用户权限的M个页面标识以及与每一页面标识相对应的用户权限。此处的M个页面标识可以理解为包含用户权限的M个页面对应的唯一标识。
在一实施例中,步骤S203,即对目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取目标软件程序对应的第二权限列表,具体包括如下步骤:
(1)采用静态代码扫描工具和预先设置的权限关键字,对目标程序ID对应的目标软 件程序的主程序代码进行静态代码扫描,获取与权限关键字相对应的至少一个目标代码。
其中,权限关键字是指在目标软件程序开发过程中,用于限定页面使用特定用户权限的关键字。例如,在Android应用程序中,采用通用关键字Manifest.permission作为权限关键字,即在目标软件程序的主程序代码中采用Manifest.permission X这种表述说明其可实现用户权限X,即在任一页面对应的功能模块中出现Manifest.permission X这种表述,则认定该功能模块为包含用户权限的功能模块,X为具体的用户权限。
本实施例中,服务器采用开源的静态代码扫描工具(包括但不限于SonarQube),对目标软件程序的主程序代码进行静态代码扫描,获取包含权限关键字(如Manifest.permission)的至少一个功能模块,将这些功能模块确定为目标代码,从而获取与权限关键字相对应的至少一个目标代码。即该目标代码是包含用户权限的功能模块。
(2)从至少一个目标代码中,提取与每一目标代码相对应的页面标识和用户权限。
在静态代码扫描工具扫描出至少一个目标代码之后,采用页面关键字匹配成每一目标代码中的页面标识,并获取权限关键字之后的用户权限,从而确定其对应的页面标识和用户权限。例如,在包括权限关键字的目标代码中,包括Manifest.permission XCCESS_NETWORK_STATE来确定其用户权限为ACCESS_NETWORK_STATE,即允许应用程序访问网络信息(简称为访问网络)。页面关键字是指目标软件程序开发过程中,用于限定代码为特定页面的关键字,其确定页面标识的过程与确定用户权限的过程类似,不再赘述。
(3)将至少一个目标代码对应的页面标识和用户权限存储在预设数据表中,获取目标软件程序对应的第二权限列表。
其中,预设数据表是预先设置的二维数据表。服务器在获取至少一个目标代码对应的页面标识和用户权限之后,将每一目标代码对应的页面标识及其对应的用户权限作为一条页面权限数据存储在预设数据表中,以形成第二权限列表。例如,在第二权限列表中,第一列存储页面标识,第二列、第三列……第K列分别用于存储每一页面标识对应的用户权限。
本实施例中,服务器采用开源的静态代码扫描工具(包括但不限于SonarQube),对目标软件程序的主程序代码进行静态代码扫描,可快速获取包含用户权限的目标代码;再识别出目标代码中包含的页面标识和用户权限,以形成第二权限列表,以将目标软件程序中每一页面所应用的用户权限采用数据表形式展示,以便后续实现对不同页面所应用到的用户权限进行测试,保证测试的覆盖率,提高测试效率。
S204:基于第一权限列表和第二权限列表,生成页面权限正交矩阵,页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵。
具体地,服务器在获取第一权限列表和第二权限列表之后,基于第一权限列表和第二权限列表形成一页面权限正交矩阵,该页面权限正交矩阵是以M个页面标识为行,以N个用户权限为列形成的矩阵,矩阵中的矩阵值采用1和0表示,其中,1表示页面标识对应的功能模块包含对应的用户权限,0表示页面标识对应的功能模块没有包含对应的用户权限。可以理解地,通过第一权限列表和第二权限列表,可以清楚明了地反映目标软件程序中的每一页面对应的用户权限与整个目标软件程序中所有的用户权限之间的映射关系。
在一实施例中,步骤S204,即基于第一权限列表和第二权限列表,生成页面权限正交矩阵,具体包括如下步骤:
(1)基于M个页面标识与N个用户权限,构建M*N的原始页面权限矩阵。即构建以M个页面标识为行,N个用户权限为列的原始页面权限矩阵。
(2)遍历第一权限列表和第二权限列表,对比每一行页面标识对应的用户权限与所在列的用户权限是否相同;若相同,则将原始页面矩阵中的矩阵值设置为1;若不相同,则将原始页面矩阵中的矩阵值设置为0,生成页面权限正交矩阵。
例如,目标软件程序中第一权限列表中存储的所有用户权限包括访问网络、访问WIFI、 统计电池信息、访问相机、读写访问和定位,分别用P1、P2、P3、P4、P5和P6表示,则N为6。第二权限列表中包含4个页面,分别用页面标识Y1、Y2、Y3和Y4表示,则M为4,设Y1页面对应的用户权限为访问网络、访问WIFI和定位,Y2页面对应的用户权限为访问网络和访问相机;Y3页面对应的用户权限为读写访问和统计电池信息,Y4页面对应的访问WIFI、统计电池信息、访问相机、读写访问和定位,则其形成的页面权限正交矩阵如下表一所示,可清楚地反映目标软件程序中每一页面对应的用户权限与整个目标软件程序中所有的用户权限之间的映射关系。
表一 页面权限正交矩阵
  P1 P2 P3 P4 P5 P6
Y1 1 1 0 0 0 1
Y2 1 0 0 1 0 0
Y3 0 0 1 0 1 0
Y4 0 1 1 1 1 1
S205:从测试用例数据库中,获取目标软件程序对应的用例权限正交矩阵,页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵。
其中,测试用例数据库是用于存储所有与目标软件程序相对应的场景测试用例的数据库。在软件测试过程中,测试人员每一创建一个场景测试用例,需将该场景测试用例与其所测试到的用户权限存储在用例权限正交矩阵中,以便实现对场景测试用例的统一管理,以使每一场景测试用例所测试的用户权限更直观,以便后续基于该权限用例正交矩阵确定页面权限测试过程使得的场景测试用例。即服务器在获取权限测试请求之后,需基于目标程序ID,从测试用例数据库中,获取目标软件程序相对应的用例权限正交矩阵,以便辅助确定页面权限测试过程中采集的场景测试用例。
在用例权限正交矩阵中,采用L1、L2……LA分别表示测试用例数据库中的A个场景测试用例,如下表二所示。由表二可知,L1对应的场景测试用例对P1、P2和P6这几个用户权限进行测试,则对访问网络、访问WIFI和定位这几个用户权限进行测试。
表二 用例权限正交矩阵
  P1 P2 P3 P4 P5 P6
L1 1 1 0 0 0 1
L2 1 1 0 1 1 0
…… …… …… …… …… …… ……
LA 0 0 1 0 1 0
本实施例中所采用的场景测试用例包括但不限于如下测试用例:1)启动运行时允许授权_调用相关场景页面_可使用。2)启动运行时拒绝授权&勾选不再弹窗_调用相关场景页面_提示不可使用。3)启动运行时拒绝授权&不勾选不再弹窗_调用相关场景页面弹窗提示选择允许_可使用。4)启动运行时拒绝授权&不勾选不再弹窗_调用相关场景页面弹窗提示选择不允许_不可使用。5)启动允许时选择询问授权_调用相关场景页面_继续弹窗提示。6)已允许授权&后台设置禁止_调用相关场景页面_不可使用。7)已允许授权&后台设置询问_调用相关场景页面_弹窗询问。8)已拒绝授权&勾选不再弹窗&后台设置询问_调用相关场景页面_弹窗询问。9)已拒绝授权&勾选不再弹窗&后台设置允许_调用相关场景页面_可使用。
S206:基于页面权限正交矩阵和用例权限正交矩阵,获取与目标程序ID相对应的页面用例正交矩阵,页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵。
具体地,服务器在获取页面权限正交矩阵和用例权限正交矩阵之后,基于页面权限正交矩阵和用例权限正交矩阵形成一页面用例正交矩阵,该页面用例正交矩阵是以M个页面标识为行,以A个场景测试用例为列形成的矩阵,矩阵中的矩阵值采用1和0表示,1表 示页面标识对应的用户权限与场景测试用例对应的用户权限相同,0表示页面标识对应的用户权限与场景测试用例对应的用户权限不相同。通过该页面用例正交矩阵,可清楚明了地反映目标软件程序中的每一页面可采用的场景测试用例。
在一实施例中,步骤S206中,基于页面权限正交矩阵和用例权限正交矩阵,获取与目标程序ID相对应的页面用例正交矩阵,具体包括如下步骤:
(1)基于M个页面标识与A个场景测试用例,构建M*A的原始页面用例矩阵。即构建以M个页面标识为行,A个场景测试用例为列的原始页面用例矩阵。
(2)遍历页面权限正交矩阵和用例权限正交矩阵,对比每一页面标识对应的用户权限与场景测试用例对应的用户权限是否相同;若相同,则将原始页面用例矩阵中的矩阵值设置为1;若不相同,则将原始页面用例矩阵中的矩阵值设置为0,生成页面用例正交矩阵。
例如,基于上述表一所提供的页面权限正交矩阵和表二所提供的用例权限正交矩阵,构建的页面用例正交矩阵如下表三所示。由于Y1对应的用户权限为P1、P2和P6,而L1对应的用户权限也为P1、P2和P6,则将原始页面用例矩阵中Y1和L1对应的矩阵值设置为1;而L2对应的用户权限为P1、P2、P4和P5,则将原始页面用例矩阵中Y1与L2对应的矩阵值设置为0。
表三 页面用例正交矩阵
  L1 L2 …… LA
Y1 1 0 …… 0
Y2 0 0 …… 0
Y3 0 0 …… 1
Y4 0 0 …… 0
S207:基于页面用例正交矩阵,获取与每一页面标识相对应的目标测试用例。
由于页面用例正交矩阵中,以结构化形式显示每一页面标识对应的页面与测试用例数据库中提供的所有场景测试用例之间的相互关系,可根据该页面用例正交矩阵中的矩阵值,确定任一场景测试用例测试过程中是否会测试某一页面对应的所有用户权限。具体地,服务器可基于页面用例正交矩阵,确定每一页面标识对应的矩阵值为1的场景测试用例为其对应的目标测试用例,以使后续对该页面标识对应的页面的功能模块进行测试时,实现准确定位到与每一页面标识对应的目标测试用例,基于该目标测试用例进行测试,有助于保障页面权限测试的覆盖率,避免测试人员自主确定页面对应的测试用例过程中存在的测试覆盖不全和测试周期长的问题,有助于降低测试人员的人工成本和时间成本。
本实施例所提供的页面权限测试方法中,通过对目标软件程序进行静态代码扫描,以实现快速获取第一权限列表和第二权限列表,其扫描过程无需编译和搭建运行环境,可节省大量人力和时间成本,提高效率。先基于第一权限列表和第二权限列表,以形成页面权限正交矩阵,再基于所形成的页面权限正交矩阵和预先设置的用例权限正交矩阵,形成用例权限正交矩阵,以使该用例权限正交矩阵以结构化的形式,显示每一页面可采用的场景测试用例,有助于页面权限测试时确定对应的场景测试用例。再基于页面用例正交矩阵确定每一页面标识对应的目标测试用例,可实现对目标测试用例的精确定位,以便采用该目标测试用例对页面标识对应的页面进行页面权限测试,提高页面权限测试过程中对用户权限测试的覆盖率。
在一实施例中,为了保障软件程序的质量,目标软件程序开发过程中进行多次回归测试,该回归测试是指修改了旧代码后,重新进行测试以确认修改没有引入新的错误或导致其他代码产生错误的过程。由于目标软件程序在开发过程中,需要多次修改目标软件程序中的主程序代码或者其他代码,使得其需要进行多次回归测试,若代码改动涉及到某些包含用户权限的页面改动时,还需要基于这些改动页面进行页面权限测试,因此,需分析代 码改动之后,进行页面权限测试所需采用的回归测试用例。该回归测试用例可以理解为在回归测试过程中采用的场景测试用例。如图3所示,在步骤206之后,即在获取与目标程序ID相对应的页面用例正交矩阵之后,页面权限测试方法还包括:
S301:获取回归测试分析请求,回归测试分析请求包括目标程序ID和目标版本ID。
其中,回归测试分析请求是用于触发服务器进行回归测试分析,以确定回归测试用例的请求。目标程序ID是用于识别需要进行测试的目标软件程序的标识。具体地,可根据目标程序ID和目标版本ID可唯一确定本次需要进行回归测试的目标版本程序代码。
S302:基于目标程序ID和目标版本ID查询代码仓库,获取目标版本程序代码和历史版本程序代码。
代码仓库是用于存储特定软件程序所有版本的代码的数据库。此处的特定软件程序为目标程序ID对应的目标软件程序。目标版本程序代码是与目标程序ID和目标版本ID相对应的程序代码。历史版本程序代码是与目标程序ID相对应的在目标版本之前的历史版本对应的程序代码。例如,对于微信程序而言,其目标程序ID可唯一识别微信程序,以避免于其他APP的标识;目标版本ID是指用于唯一识别该微信版本的标识,例如V5.0,则目标版本程序代码为V5.0对应的程序代码;对于微信程序而言,在V5.0之前还包括V3.0和V4.0等历史版本,则V3.0和V4.0对应的程序代码为历史版本程序代码。
进一步地,服务器在基于目标程序ID和目标版本ID查询代码仓库,可直接获取目标版本程序代码;然后,基于目标版本ID查询该目标版本程序代码之前的所有历史版本程序代码,选取距离系统当前时间最近的历史版本程序代码作为本次回归测试分析所需的历史版本程序代码,以便执行后续的步骤S303,实现对最接近的历史版本程序代码进行回归测试分析。
S303:采用代码对比工具对目标版本程序代码和历史版本程序代码进行对比,获取改动代码模块。
其中,代码对比工具是指用于实现代码对比的工具。该代码对比工具可以采用开源的工具,如Beyond compare、DiffMerge和WinMerge等。具体地,服务器采用开源的代码对比工具对目标版本程序代码和历史版本程序代码进行对比,以获取改动代码模块。该改动代码模块具体为目标版本程序代码相对于历史版本程序代码发生改动的功能模块。可以理解地,通过代码对比工具分析出来改动代码模块已经发生代码改动,因此,需针对该改动代码模块进行回归测试,以保证改动代码模块没有引入新的错误或导致其他代码产生错误。
S304:对改动代码模块进行静态代码扫描,获取改动页面标识。
由于改动代码模块是已经发生代码改动的功能模块,该改动代码模块包含页面标识。本实施例中,服务器在获取改动代码模块之后,可采用开源的静态代码扫描工具对该改动代码模块进行静态代码扫描,以获取该改动代码模块中包含的页面标识,确定为改动页面标识。本步骤在获取改动页面标识的过程与步骤S203中的过程类似,即采用静态代码扫描工具和预先设置的权限关键字,对改动代码模块进行静态代码扫描,以从改动代码模块中提取改动页面标识。
S305:基于改动页面标识查询与目标程序ID相对应的页面用例正交矩阵,获取回归测试用例。
具体地,服务器在获取改动页面标识之后,基于该改动页面标识匹配与目标程序ID相对应的页面用例正交矩阵,将与该改动页面标识相对应的目标测试用例确定为回归测试用例。可以理解地,步骤S305所确定的回归测试用例可实现对改动页面标识对应的页面所包含的所有用户权限进行测试,以保证页面测试的覆盖率,提高回归测试用例定位的准确率,保证回归测试的测试效果。
本实施例所提供的页面权限测试方法中,通过代码对比工具对目标版本程序代码和历 史版本程序代码进行对比,可快速获取改动代码模块,以确定回归测试所针对的页面权限测试的代码。通过对改动代码模块进行静态代码扫描,可快速获取其对应的改动页面标识,基于该改动页面标识查询页面用例正交矩阵,可准确定位其对应的回归测试用例,提高回归测试用例定位的准确率,保证回归测试的测试效果。
在一实施例中,如图4所示,在步骤S207之后,即在获取与每一页面标识相对应的目标测试用例之后,页面权限测试方法还包括:
S401:基于每一页面标识对应的目标测试用例进行用户权限测试,获取页面标识相对应的权限测试结果。
具体地,服务器在获取目标软件程序中,每一页面标识对应的目标测试用例之后,执行该目标测试用例,以实现对该页面标识相对应的功能模块进行用户权限测试,以获取对应的权限测试结果。可以理解地,该权限测试结果包括测试成功和测试失败两种,即测试成功是指该页面标识对应的功能模块可执行其对应的用户权限;而测试失败是指该页面标识对应的功能模块不能执行其对应的用户权限。
S402:若权限测试结果为测试失败,获取与测试失败的用户权限相对应的缺陷修复期间,触发缺陷修复监听程序。
具体地,服务器在任一页面标识对应的权限测试结果为测试失败时,先获取测试失败的用户权限,该测试失败的用户权限是指在目标测试用例对应的多个用户权限中,对页面标识对应的功能模块测试失败的用户权限。例如,一目标测试用例包括访问网络和定位这两个用户权限,而对某一页面标识对应的功能模块进行测试时,可进行访问网络但不可定位,则说明定位这一用户权限为测试失败的用户权限。然后,根据测试失败的用户权限查询设置的权限修复时间表,获取与该测试失败的用户权限相对应的缺陷修复期间。该权限修复时间表是预先基于每一种用户权限对应的软件代码的修复难度,确定每一种用户权限及其对应的修复时间之间关系的数据表。进而,服务器还触发缺陷修复监听程序,缺陷修复监听程序用于监听是否收到修复成功的事件的程序。可以理解地,该缺陷修复监听程序为一事件监听程序,用于监听特定事件是否发生。
S403:获取缺陷修复监听程序在缺陷修复期间内,监听到的缺陷修复结果。
具体地,服务器可获取缺陷修复监听程序在缺陷修复期限内监听到的缺陷修复结果。该缺陷修复结果包括修复成功和修复失败两种,其中,修复成功是指缺陷修复监听程序可在缺陷修复期间内,监听到某一缺陷被成功修复形成的事件时形成的修复结果。相应地,修复失败是指缺陷修复监听程序在缺陷修复期间内,未监听到某一缺陷被成功修复形成的事件时形成的修复结果。
S404:基于权限测试结果和缺陷修复结果,获取权限测试分析报告。
具体地,服务器在获取到权限测试结果和缺陷修复结果之后,将权限测试结果和缺陷修复结果填充到预设配置的分析报告模板中,即可自动快速获取相应的权限测试分析报告。例如,在一权限测试分析报告中,以页面标识为行标识,以目标测试用例为第1列的列标识,以目标测试用例中包含若干用户权限为第2列及其之后列的列标识,并将测试成功、测试失败、修复成功和修复失败等结果填充到相应填充区域,以形成权限测试分析报告,以使该权限测试分析报告可直观反映用户权限测试结果及修复结果,实现权限测试分析报告的自动生成。
本实施例所提供的页面权限测试方法中,在对用户权限测试过程中,获取权限测试结果,并通过缺陷修复监听程序获取相应的缺陷修复结果,再利用权限测试结果和缺陷修复结果自动化生成权限测试分析报告,以使该权限测试分析报告可清楚直观反映用户权限测试结果及修复结果,有助于对目标软件程序进行质量审核。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种页面权限测试装置,该页面权限测试装置与上述实施例中页面权限测试方法一一对应。如图5所示,该页面权限测试装置包括权限测试请求获取模块501、第一权限列表获取模块502、第二权限列表获取模块503、页面权限矩阵获取模块504、用例权限矩阵获取模块505、页面用例矩阵获取模块506和目标测试用例获取模块507。各功能模块详细说明如下:
权限测试请求获取模块501,用于获取权限测试请求,权限测试请求包括目标程序ID。
第一权限列表获取模块502,用于对目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取目标软件程序对应的第一权限列表,第一权限列表包括N个用户权限。
第二权限列表获取模块503,用于对目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取目标软件程序对应的第二权限列表,第二权限列表包括M个页面标识和与每一页面标识相对应的用户权限。
页面权限矩阵获取模块504,用于基于第一权限列表和第二权限列表,生成页面权限正交矩阵,页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵。
用例权限矩阵获取模块505,用于从测试用例数据库中,获取目标软件程序对应的用例权限正交矩阵,页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵。
页面用例矩阵获取模块506,用于基于页面权限正交矩阵和用例权限正交矩阵,获取与目标程序ID相对应的页面用例正交矩阵,页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵。
目标测试用例获取模块507,用于基于页面用例正交矩阵,获取与每一页面标识相对应的目标测试用例。
优选地,第一权限列表获取模块502,用于采用静态代码扫描工具和与目标程序ID相对应的语法规则,对目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取目标软件程序对应的第一权限列表。
优选地,第二权限列表获取模块503包括静态扫描处理单元、标识权限提取单元和权限列表获取单元。
静态扫描处理单元,用于采用静态代码扫描工具和预先设置的权限关键字,对目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取与权限关键字相对应的至少一个目标代码。
标识权限提取单元,用于从至少一个目标代码中,提取与每一目标代码相对应的页面标识和用户权限。
权限列表获取单元,用于将至少一个目标代码对应的页面标识和用户权限存储在预设数据表中,获取目标软件程序对应的第二权限列表。
优选地,页面权限矩阵获取模块504包括原始页面权限矩阵获取单元和正交页面权限矩阵获取单元。
原始页面权限矩阵获取单元,用于基于M个页面标识与N个用户权限,构建M*N的原始页面权限矩阵。
正交页面权限矩阵获取单元,用于遍历第一权限列表和第二权限列表,对比每一行页面标识对应的用户权限与所在列的用户权限是否相同;若相同,则将原始页面矩阵中的矩阵值设置为1;若不相同,则将原始页面矩阵中的矩阵值设置为0,生成页面权限正交矩阵。
优选地,页面用例矩阵获取模块506包括原始页面用例矩阵获取单元和正交页面用例矩阵获取单元。
原始页面用例矩阵获取单元,用于基于M个页面标识与A个场景测试用例,构建M*A的原始页面用例矩阵。
正交页面用例矩阵获取单元,用于遍历页面权限正交矩阵和用例权限正交矩阵,对比每一页面标识对应的用户权限与场景测试用例对应的用户权限是否相同;若相同,则将原始页面用例矩阵中的矩阵值设置为1;若不相同,则将原始页面用例矩阵中的矩阵值设置为0,生成页面用例正交矩阵。
优选地,在目标测试用例获取模块507之后,页面权限测试装置还包括测试分析请求获取单元、程序代码获取单元、改动代码模块获取单元、改动页面标识获取单元和回归测试用例获取单元。
测试分析请求获取单元,用于获取回归测试分析请求,回归测试分析请求包括目标程序ID和目标版本ID。
程序代码获取单元,用于基于目标程序ID和目标版本ID查询代码仓库,获取目标版本程序代码和历史版本程序代码。
改动代码模块获取单元,用于采用代码对比工具对目标版本程序代码和历史版本程序代码进行对比,获取改动代码模块。
改动页面标识获取单元,用于对改动代码模块进行静态代码扫描,获取改动页面标识。
回归测试用例获取单元,用于基于改动页面标识查询与目标程序ID相对应的页面用例正交矩阵,获取回归测试用例。
优选地,在目标测试用例获取模块507之后,页面权限测试装置还包括权限测试结果获取单元、监听程序触发单元、缺陷修复结果获取单元和测试分析报告获取单元。
权限测试结果获取单元,用于基于每一页面标识对应的目标测试用例进行用户权限测试,获取页面标识相对应的权限测试结果;
监听程序触发单元,用于若权限测试结果为测试失败,获取与测试失败的用户权限相对应的缺陷修复期间,触发缺陷修复监听程序;
缺陷修复结果获取单元,用于获取缺陷修复监听程序在缺陷修复期间内,监听到的缺陷修复结果;
测试分析报告获取单元,用于基于权限测试结果和缺陷修复结果,获取权限测试分析报告。
关于页面权限测试装置的具体限定可以参见上文中对于页面权限测试方法的限定,在此不再赘述。上述页面权限测试装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于执行页面权限测试方法过程中采用或者生成的数据,如用例权限正交矩阵或页面用例正交矩阵。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种页面权限测试方法。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中页面权限测试方法的步骤,例如图2所示的步骤S201-S207,或者图3至图4中所示的步骤,为避免重复,这里不再赘述。或者,处理器执行计算机可读指令时实现页面权限测试装置这一实施例中的各模块/单元的功能,例如图5所示的权限测试请求获取模块501、第一权限列表获取模块502、第二权限列表获取模块503、页面权限矩阵获取模块504、用例权限 矩阵获取模块505、页面用例矩阵获取模块506和目标测试用例获取模块507的功能,为避免重复,这里不再赘述。
在一实施例中,提供一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行时实现上述实施例中页面权限测试方法的步骤,例如图2所示的步骤S201-S207,或者图3至图4中所示的步骤,为避免重复,这里不再赘述。或者,该计算机可读指令被处理器执行时实现上述页面权限测试装置这一实施例中的各模块/单元的功能,例如图5所示的权限测试请求获取模块501、第一权限列表获取模块502、第二权限列表获取模块503、页面权限矩阵获取模块504、用例权限矩阵获取模块505、页面用例矩阵获取模块506和目标测试用例获取模块507的功能,为避免重复,这里不再赘述。本实施例中的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一非易失性可读存储介质也可以存储在易失性可读存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种页面权限测试方法,其特征在于,包括:
    获取权限测试请求,所述权限测试请求包括目标程序ID;
    对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,所述第一权限列表包括N个用户权限;
    对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,所述第二权限列表包括M个页面标识和与每一所述页面标识相对应的用户权限;
    基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,所述页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵;
    从测试用例数据库中,获取所述目标软件程序对应的用例权限正交矩阵,所述页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵;
    基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,所述页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵;
    基于所述页面用例正交矩阵,获取与每一所述页面标识相对应的目标测试用例。
  2. 如权利要求1所述的页面权限测试方法,其特征在于,所述对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,包括:
    采用静态代码扫描工具和与所述目标程序ID相对应的语法规则,对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表。
  3. 如权利要求1所述的页面权限测试方法,其特征在于,所述对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,包括:
    采用静态代码扫描工具和预先设置的权限关键字,对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取与所述权限关键字相对应的至少一个目标代码;
    从至少一个所述目标代码中,提取与每一所述目标代码相对应的页面标识和用户权限;
    将至少一个所述目标代码对应的页面标识和用户权限存储在预设数据表中,获取所述目标软件程序对应的第二权限列表。
  4. 如权利要求1所述的页面权限测试方法,其特征在于,所述基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,包括:
    基于M个页面标识与N个用户权限,构建M*N的原始页面权限矩阵;
    遍历所述第一权限列表和所述第二权限列表,对比每一行所述页面标识对应的用户权限与所在列的用户权限是否相同;若相同,则将所述原始页面矩阵中的矩阵值设置为1;若不相同,则将所述原始页面矩阵中的矩阵值设置为0,生成页面权限正交矩阵。
  5. 如权利要求1所述的页面权限测试方法,其特征在于,所述基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,包括:
    基于M个页面标识与A个场景测试用例,构建M*A的原始页面用例矩阵;
    遍历所述页面权限正交矩阵和所述用例权限正交矩阵,对比每一所述页面标识对应的用户权限与所述场景测试用例对应的用户权限是否相同;若相同,则将所述原始页面用例 矩阵中的矩阵值设置为1;若不相同,则将所述原始页面用例矩阵中的矩阵值设置为0,生成所述页面用例正交矩阵。
  6. 如权利要求1所述的页面权限测试方法,其特征在于,在所述获取与所述目标程序ID相对应的页面用例正交矩阵之后,所述页面权限测试方法还包括:
    获取回归测试分析请求,所述回归测试分析请求包括目标程序ID和目标版本ID;
    基于所述目标程序ID和所述目标版本ID查询代码仓库,获取目标版本程序代码和历史版本程序代码;
    采用代码对比工具对所述目标版本程序代码和所述历史版本程序代码进行对比,获取改动代码模块;
    对所述改动代码模块进行静态代码扫描,获取改动页面标识;
    基于所述改动页面标识查询与所述目标程序ID相对应的页面用例正交矩阵,获取回归测试用例。
  7. 如权利要求1所述的页面权限测试方法,其特征在于,在所述获取与每一所述页面标识相对应的目标测试用例之后,所述页面权限测试方法还包括:
    基于每一所述页面标识对应的目标测试用例进行用户权限测试,获取所述页面标识相对应的权限测试结果;
    若所述权限测试结果为测试失败,获取与测试失败的用户权限相对应的缺陷修复期间,触发缺陷修复监听程序;
    获取所述缺陷修复监听程序在所述缺陷修复期间内,监听到的缺陷修复结果;
    基于所述权限测试结果和所述缺陷修复结果,获取权限测试分析报告。
  8. 一种页面权限测试装置,其特征在于,包括:
    权限测试请求获取模块,用于获取权限测试请求,所述权限测试请求包括目标程序ID;
    第一权限列表获取模块,用于对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,所述第一权限列表包括N个用户权限;
    第二权限列表获取模块,用于对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,所述第二权限列表包括M个页面标识和与每一所述页面标识相对应的用户权限;
    页面权限矩阵获取模块,用于基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,所述页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵;
    用例权限矩阵获取模块,用于从测试用例数据库中,获取所述目标软件程序对应的用例权限正交矩阵,所述页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵;
    页面用例矩阵获取模块,用于基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,所述页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵;
    目标测试用例获取模块,用于基于所述页面用例正交矩阵,获取与每一所述页面标识相对应的目标测试用例。
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取权限测试请求,所述权限测试请求包括目标程序ID;
    对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,所述第一权限列表包括N个用户权限;
    对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,所述第二权限列表包括M个页面标识和与每一所述页面标识相对应的用户权限;
    基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,所述页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵;
    从测试用例数据库中,获取所述目标软件程序对应的用例权限正交矩阵,所述页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵;
    基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,所述页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵;
    基于所述页面用例正交矩阵,获取与每一所述页面标识相对应的目标测试用例。
  10. 如权利要求9所述的计算机设备,其特征在于,所述对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,包括:
    采用静态代码扫描工具和预先设置的权限关键字,对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取与所述权限关键字相对应的至少一个目标代码;
    从至少一个所述目标代码中,提取与每一所述目标代码相对应的页面标识和用户权限;
    将至少一个所述目标代码对应的页面标识和用户权限存储在预设数据表中,获取所述目标软件程序对应的第二权限列表。
  11. 如权利要求9所述的计算机设备,其特征在于,所述基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,包括:
    基于M个页面标识与N个用户权限,构建M*N的原始页面权限矩阵;
    遍历所述第一权限列表和所述第二权限列表,对比每一行所述页面标识对应的用户权限与所在列的用户权限是否相同;若相同,则将所述原始页面矩阵中的矩阵值设置为1;若不相同,则将所述原始页面矩阵中的矩阵值设置为0,生成页面权限正交矩阵。
  12. 如权利要求9所述的计算机设备,其特征在于,所述基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,包括:
    基于M个页面标识与A个场景测试用例,构建M*A的原始页面用例矩阵;
    遍历所述页面权限正交矩阵和所述用例权限正交矩阵,对比每一所述页面标识对应的用户权限与所述场景测试用例对应的用户权限是否相同;若相同,则将所述原始页面用例矩阵中的矩阵值设置为1;若不相同,则将所述原始页面用例矩阵中的矩阵值设置为0,生成所述页面用例正交矩阵。
  13. 如权利要求9所述的计算机设备,其特征在于,在所述获取与所述目标程序ID相对应的页面用例正交矩阵之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    获取回归测试分析请求,所述回归测试分析请求包括目标程序ID和目标版本ID;
    基于所述目标程序ID和所述目标版本ID查询代码仓库,获取目标版本程序代码和历史版本程序代码;
    采用代码对比工具对所述目标版本程序代码和所述历史版本程序代码进行对比,获取改动代码模块;
    对所述改动代码模块进行静态代码扫描,获取改动页面标识;
    基于所述改动页面标识查询与所述目标程序ID相对应的页面用例正交矩阵,获取回归测试用例。
  14. 如权利要求9所述的计算机设备,其特征在于,在所述获取与每一所述页面标识相对应的目标测试用例之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    基于每一所述页面标识对应的目标测试用例进行用户权限测试,获取所述页面标识相对应的权限测试结果;
    若所述权限测试结果为测试失败,获取与测试失败的用户权限相对应的缺陷修复期间,触发缺陷修复监听程序;
    获取所述缺陷修复监听程序在所述缺陷修复期间内,监听到的缺陷修复结果;
    基于所述权限测试结果和所述缺陷修复结果,获取权限测试分析报告。
  15. 一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    获取权限测试请求,所述权限测试请求包括目标程序ID;
    对所述目标程序ID对应的目标软件程序的权限声明代码进行静态代码扫描,获取所述目标软件程序对应的第一权限列表,所述第一权限列表包括N个用户权限;
    对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,所述第二权限列表包括M个页面标识和与每一所述页面标识相对应的用户权限;
    基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,所述页面权限正交矩阵为基于M个页面标识与N个用户权限形成的矩阵;
    从测试用例数据库中,获取所述目标软件程序对应的用例权限正交矩阵,所述页面权限正交矩阵为基于A个场景测试用例与N个用户权限形成的矩阵;
    基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,所述页面用例正交矩阵为基于M个页面标识与A个场景测试用例形成的矩阵;
    基于所述页面用例正交矩阵,获取与每一所述页面标识相对应的目标测试用例。
  16. 如权利要求15所述的可读存储介质,其特征在于,所述对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取所述目标软件程序对应的第二权限列表,包括:
    采用静态代码扫描工具和预先设置的权限关键字,对所述目标程序ID对应的目标软件程序的主程序代码进行静态代码扫描,获取与所述权限关键字相对应的至少一个目标代码;
    从至少一个所述目标代码中,提取与每一所述目标代码相对应的页面标识和用户权限;
    将至少一个所述目标代码对应的页面标识和用户权限存储在预设数据表中,获取所述目标软件程序对应的第二权限列表。
  17. 如权利要求15所述的可读存储介质,其特征在于,所述基于所述第一权限列表和所述第二权限列表,生成页面权限正交矩阵,包括:
    基于M个页面标识与N个用户权限,构建M*N的原始页面权限矩阵;
    遍历所述第一权限列表和所述第二权限列表,对比每一行所述页面标识对应的用户权限与所在列的用户权限是否相同;若相同,则将所述原始页面矩阵中的矩阵值设置为1;若不相同,则将所述原始页面矩阵中的矩阵值设置为0,生成页面权限正交矩阵。
  18. 如权利要求15所述的可读存储介质,其特征在于,所述基于所述页面权限正交矩阵和所述用例权限正交矩阵,获取与所述目标程序ID相对应的页面用例正交矩阵,包括:
    基于M个页面标识与A个场景测试用例,构建M*A的原始页面用例矩阵;
    遍历所述页面权限正交矩阵和所述用例权限正交矩阵,对比每一所述页面标识对应的用户权限与所述场景测试用例对应的用户权限是否相同;若相同,则将所述原始页面用例矩阵中的矩阵值设置为1;若不相同,则将所述原始页面用例矩阵中的矩阵值设置为0,生成所述页面用例正交矩阵。
  19. 如权利要求15所述的可读存储介质,其特征在于,在所述获取与所述目标程序ID相对应的页面用例正交矩阵之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    获取回归测试分析请求,所述回归测试分析请求包括目标程序ID和目标版本ID;
    基于所述目标程序ID和所述目标版本ID查询代码仓库,获取目标版本程序代码和历史版本程序代码;
    采用代码对比工具对所述目标版本程序代码和所述历史版本程序代码进行对比,获取改动代码模块;
    对所述改动代码模块进行静态代码扫描,获取改动页面标识;
    基于所述改动页面标识查询与所述目标程序ID相对应的页面用例正交矩阵,获取回归测试用例。
  20. 如权利要求15所述的可读存储介质,其特征在于,在所述获取与每一所述页面标识相对应的目标测试用例之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    基于每一所述页面标识对应的目标测试用例进行用户权限测试,获取所述页面标识相对应的权限测试结果;
    若所述权限测试结果为测试失败,获取与测试失败的用户权限相对应的缺陷修复期间,触发缺陷修复监听程序;
    获取所述缺陷修复监听程序在所述缺陷修复期间内,监听到的缺陷修复结果;
    基于所述权限测试结果和所述缺陷修复结果,获取权限测试分析报告。
PCT/CN2019/120592 2019-03-19 2019-11-25 页面权限测试方法、装置、计算机设备及存储介质 WO2020186808A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910207523.6 2019-03-19
CN201910207523.6A CN110096431A (zh) 2019-03-19 2019-03-19 页面权限测试方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020186808A1 true WO2020186808A1 (zh) 2020-09-24

Family

ID=67443315

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/120592 WO2020186808A1 (zh) 2019-03-19 2019-11-25 页面权限测试方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110096431A (zh)
WO (1) WO2020186808A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096431A (zh) * 2019-03-19 2019-08-06 深圳壹账通智能科技有限公司 页面权限测试方法、装置、计算机设备及存储介质
CN111274133B (zh) * 2020-01-17 2023-07-25 Oppo广东移动通信有限公司 一种静态扫描方法、装置及计算机可读存储介质
CN112487405B (zh) * 2020-12-18 2023-07-28 中国农业银行股份有限公司 一种权限信息处理方法及装置
CN113448839B (zh) * 2020-12-24 2024-01-26 北京新氧科技有限公司 一种应用程序测试方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462970A (zh) * 2014-12-17 2015-03-25 中国科学院软件研究所 一种基于进程通信的Android应用程序权限滥用检测方法
US9846634B2 (en) * 2014-06-25 2017-12-19 Vmware, Inc. Visual graphical user interface verification
US20180239693A1 (en) * 2017-02-21 2018-08-23 International Business Machines Corporation Testing web applications using clusters
CN108572911A (zh) * 2017-03-14 2018-09-25 北京京东尚科信息技术有限公司 自动化安全测试方法、装置、电子设备和可读存储介质
CN110096431A (zh) * 2019-03-19 2019-08-06 深圳壹账通智能科技有限公司 页面权限测试方法、装置、计算机设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9304893B1 (en) * 2013-03-08 2016-04-05 Emc Corporation Integrated software development and test case management system
US9892262B2 (en) * 2013-07-12 2018-02-13 EntIT Software, LLC Analyzing target software for security vulnerabilities
CN107832619B (zh) * 2017-10-10 2020-12-15 电子科技大学 Android平台下应用程序漏洞自动化挖掘系统及方法
CN108304327B (zh) * 2018-02-02 2021-01-19 平安证券股份有限公司 静态代码扫描结果处理方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846634B2 (en) * 2014-06-25 2017-12-19 Vmware, Inc. Visual graphical user interface verification
CN104462970A (zh) * 2014-12-17 2015-03-25 中国科学院软件研究所 一种基于进程通信的Android应用程序权限滥用检测方法
US20180239693A1 (en) * 2017-02-21 2018-08-23 International Business Machines Corporation Testing web applications using clusters
CN108572911A (zh) * 2017-03-14 2018-09-25 北京京东尚科信息技术有限公司 自动化安全测试方法、装置、电子设备和可读存储介质
CN110096431A (zh) * 2019-03-19 2019-08-06 深圳壹账通智能科技有限公司 页面权限测试方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN110096431A (zh) 2019-08-06

Similar Documents

Publication Publication Date Title
WO2020186808A1 (zh) 页面权限测试方法、装置、计算机设备及存储介质
CN109032611B (zh) 脚本部署方法、装置、计算机设备及存储介质
WO2020186809A1 (zh) 基于大数据平台的hive任务调度方法、装置、设备及存储介质
CN110569035B (zh) 软件开发项目的代码编译方法、装置、设备和存储介质
CN109800258B (zh) 数据文件部署方法、装置、计算机设备及存储介质
CN110941546A (zh) Web页面用例的自动化测试方法、装置、设备及存储介质
US20160283357A1 (en) Call stack relationship acquiring method and apparatus
CN110704297B (zh) 代码评审方法、装置、计算机设备及存储介质
CN106940695B (zh) 数据源信息的校验方法及装置
CN111078568B (zh) 代码规范方法、装置、计算机设备和存储介质
CN110737594B (zh) 自动生成测试用例的数据库标准符合性测试方法及装置
TW201610735A (zh) 利用運行期代理器及動態安全分析之應用程式逐點保護技術
CN113791979B (zh) 软件产品的动态调试方法、装置、计算机设备及存储介质
CN110704306A (zh) 测试中的断言处理方法、装置、设备及存储介质
CN110879781A (zh) 程序调试方法、装置、电子设备及计算机可读存储介质
CN111897727A (zh) 软件测试方法、装置、计算机设备及存储介质
KR20220085290A (ko) 소프트웨어 검증 방법 및 이를 위한 장치
EP3514680B1 (en) Identification of changes in functional behavior and runtime behavior of a system during maintenance cycles
US10592703B1 (en) Method and system for processing verification tests for testing a design under test
CN112612706A (zh) 自动化测试方法、计算机设备及存储介质
CN110032781B (zh) 编辑时序约束方法、装置、计算机设备及存储介质
CN110990249A (zh) 代码扫描结果处理方法、装置、计算机设备及存储介质
CN113282476B (zh) 接口性能测试方法、装置和电子设备
CN115357598A (zh) 数据修改方法、装置、计算机设备及存储介质
CN115048645A (zh) 超范围采集隐私信息的检测方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19920183

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19920183

Country of ref document: EP

Kind code of ref document: A1