WO2019019647A1 - 应用程序测试范围确定方法、系统、服务器和存储介质 - Google Patents

应用程序测试范围确定方法、系统、服务器和存储介质 Download PDF

Info

Publication number
WO2019019647A1
WO2019019647A1 PCT/CN2018/078321 CN2018078321W WO2019019647A1 WO 2019019647 A1 WO2019019647 A1 WO 2019019647A1 CN 2018078321 W CN2018078321 W CN 2018078321W WO 2019019647 A1 WO2019019647 A1 WO 2019019647A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
function point
storage path
file
changed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/078321
Other languages
English (en)
French (fr)
Inventor
王庆丰
柯星
张远平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Publication of WO2019019647A1 publication Critical patent/WO2019019647A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version

Definitions

  • the present application relates to the field of computer technology, and in particular, to an application test range determining method, system, server, and storage medium.
  • the application Application, APP for short
  • the regression test of the application in order to improve the test speed, you can consider narrowing the test scope and testing only the modified function or the newly added function.
  • the test range there are two main ways to determine the test range: 1. It can determine a thicker test range according to the functional requirements of the APP and the personal experience of the tester; 2. It can also be based on the individual by the R&D personnel. Experience provides a range of code modifications to determine the scope of the test.
  • An application test scope determining method comprising:
  • the first mapping file includes a function point, a storage path, and a corresponding test case of the current version; and acquiring a second mapping file corresponding to the previous version of the application to be tested;
  • the second mapping file includes a function point, a storage path, and a corresponding test case of the previous version; comparing the first mapping file with the second mapping file to obtain a changed function point and/or a change a storage path for identifying the function point to be tested by using the changed function point and/or the changed storage path; acquiring the test case corresponding to the function point to be tested by using the first mapping file,
  • the test case record is the test range corresponding to the current version.
  • An application test scope determining system comprising: a first test terminal, configured to send a query request of a current version test scope; and a server, configured to obtain a first mapping file corresponding to the current version according to the query request;
  • the first mapping file includes a function point of the current version, a storage path, and a corresponding test case; acquiring a second mapping file corresponding to a previous version of the application; the second mapping file includes a function point, a storage path, and a previous version.
  • Corresponding test case comparing the first mapping file with the second mapping file to obtain a changed function point and/or a changed storage path; using the changed function point and/or the The changed storage path identifies the function point to be tested; the test case corresponding to the function point to be tested is obtained by using the first mapping file, and the test case is recorded as a test range corresponding to the current version; the first test terminal It is also used to receive the test range corresponding to the current version returned by the server.
  • a server includes a memory and a processor, wherein the memory stores computer readable instructions, and when the instructions are executed by the processor, the following steps are performed: acquiring a first mapping file corresponding to a current version of the application to be tested; The first mapping file includes a function point, a storage path, and a corresponding test case of the current version; and a second mapping file corresponding to a previous version of the application to be tested; the second mapping file includes a function point and a storage of the previous version.
  • a path and a corresponding test case comparing the first mapping file with the second mapping file to obtain a changed function point and/or a changed storage path; using the changed function point and/or The changed storage path identifies the function point to be tested; the test case corresponding to the function point to be tested is obtained by using the first mapping file, and the test case is recorded as a test range corresponding to the current version.
  • One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of: acquiring an application under test a first mapping file corresponding to the current version of the program; the first mapping file includes a function point, a storage path, and a corresponding test case of the current version; and a second mapping file corresponding to the previous version of the application to be tested;
  • the mapping file includes a function point, a storage path, and a corresponding test case of the previous version; comparing the first mapping file with the second mapping file to obtain a changed function point and/or a changed storage path; Identifying the function point to be tested by using the changed function point and/or the changed storage path; acquiring the test case corresponding to the function point to be tested by using the first mapping file, and recording the test case as The test range corresponding to the current version.
  • the above application test scope determining method, system, server and storage medium can accurately determine the first mapping file corresponding to the current version of the application and the second mapping file corresponding to the previous version in the regression test of the application. Test range to improve test efficiency.
  • FIG. 1 is a schematic diagram of an application environment of an application test range determining method in an embodiment
  • FIG. 2 is a flow chart of a method for determining an application test range in an embodiment
  • FIG. 3 is a structural diagram of an application test range determining system in an embodiment
  • FIG. 4 is a schematic structural diagram of a server in an embodiment.
  • first may be referred to as a second client
  • second client may be referred to as a first client, without departing from the scope of the present application.
  • Both the first client and the second client are clients, but they are not the same client.
  • FIG. 1 a schematic diagram of an application environment for determining an application test scope, a system, a server, and a storage medium is provided.
  • the application environment includes a server 102 and a first test terminal 104.
  • the server 102 and the first test terminal 104 can communicate through a network.
  • the first test terminal 104 can be a smartphone, a tablet, or the like.
  • Server 102 can determine the test scope of the current version of the application. Specifically, the server 102 obtains a first mapping file corresponding to the current version of the application to be tested, and the server 102 acquires a second mapping file corresponding to the previous version of the application to be tested.
  • the server 102 compares the first mapping file with the second mapping file to obtain a changed function point and/or a changed storage path and a corresponding test case, and utilizes the changed function point and/or the changed storage path identification.
  • the first mapping file is used to obtain the test case corresponding to the function point to be tested, and the test case is recorded as the test range corresponding to the current version.
  • the first test terminal 104 transmits a query request of the current version test range to the server 102 through the first application.
  • the server 102 obtains the test cases corresponding to the plurality of test function points of the current version according to the query request, and returns the plurality of test cases to the first test terminal 104.
  • the first test terminal 104 receives the test case and performs a regression test on the current version of the application using the test case.
  • an application test scope determining method is provided.
  • the method is applied to the server as an example, and specifically includes:
  • Step 202 Acquire a first mapping file corresponding to a current version of the application to be tested.
  • the first mapping file includes a function point, a storage path, and a corresponding test case of the current version.
  • Step 204 Acquire a second mapping file corresponding to a previous version of the application to be tested.
  • the second mapping file includes a function point, a storage path, and a corresponding test case of the previous version.
  • Step 206 Compare the first mapping file with the second mapping file to obtain a changed function point and/or a changed storage path.
  • Step 208 identifying the function point to be tested by using the changed function point and/or the changed storage path.
  • Step 210 Acquire a test case corresponding to the function point to be tested by using the first mapping file, and record the test case as a test range corresponding to the current version.
  • An application can be a computer program that can implement one or more functions. Developers update the version of the application as it adds new features, removes unnecessary features, and improves the functionality of the application. In the process of updating the application version, the developer gets the current version of the application by modifying the code of the previous version of the application.
  • the corresponding test scope can be determined by the server, thereby facilitating the tester to test the current version of the application according to the test scope, thereby effectively improving the test efficiency of the regression test.
  • the application includes multiple function points, each of which has a corresponding one or more code files.
  • the code file can be stored in the server according to the corresponding storage path.
  • the application's function points are tested with multiple test cases. Different function points are tested with different test cases.
  • the tester generates a mapping file according to the function point of the application, the storage path corresponding to the code file, and the test case corresponding to the function point. Different versions of the application can have different mapping files.
  • the server obtains a first mapping file corresponding to the current version of the application, where the first mapping file includes a function point of the current version, a storage path corresponding to the code file, and a test case corresponding to the function point.
  • the first mapping file further includes a mapping relationship between a function point of the current version, a storage path corresponding to the code file, and a test case corresponding to the function point.
  • the server may also obtain a second mapping file corresponding to the previous version of the application, where the second mapping file includes a function point of the previous version, a storage path corresponding to the code file, and a test case corresponding to the function point.
  • the second mapping file further includes a mapping relationship between a function point of the previous version, a storage path corresponding to the code file, and a test case corresponding to the function point.
  • the current version of the application can include new function points.
  • the new function points have new functions, storage paths corresponding to the code files, and test cases corresponding to the function points.
  • the new function point, the storage path corresponding to the code file, and the test case corresponding to the newly added function point can be recorded in the first mapping file.
  • the new function point in the first mapping file may be referred to as a function point that changes compared with the function point of the second mapping file, and may also be simply referred to as a function point that changes.
  • the storage path corresponding to the newly added function point may be referred to as a storage path that changes compared with the storage path of the second mapping file, and may also be simply referred to as a storage path that changes.
  • the current version of the application can also fix one or more feature points in the previous version.
  • the function points that are fixed in the current version can also be referred to as function points that have changed.
  • the storage path corresponding to the code file of the repaired function point may also change.
  • the storage path corresponding to the code file of the repaired function point in the first mapping file may also change.
  • the repaired storage path in the first mapping file may be referred to as a storage path that changes compared to the storage path of the second mapping file, and may also be simply referred to as a changed storage path.
  • the server compares the function point and the storage path in the first mapping file with the corresponding function point and the storage path in the second mapping file, respectively, and acquires the changed function point and/or the changed storage path, and utilizes the changed function.
  • the point and/or the changed storage path identifies the function point to be tested.
  • the server can obtain the corresponding code file by using the changed function point and/or the changed storage path.
  • the code file includes the current version of the code file and the previous version of the code file, the server can compare the current version of the code file with the previous version of the code file, if different, record the function point corresponding to the current version of the code file as The function point to be tested.
  • the server can obtain the test case corresponding to the function point to be tested through the first mapping file, and the test case can have a priority.
  • the server obtains the priority of the test case, records the test case with the highest priority as the priority test case, and records the priority test case as the test range corresponding to the function point to be tested.
  • the first mapping file corresponding to the current version of the application and the second mapping file corresponding to the previous version are obtained.
  • the first mapping file is compared to the second mapping file, thereby obtaining a changed function point and/or a changed storage path.
  • the function point to be tested can be accurately identified by using the changed function point and/or the changed storage path.
  • the corresponding test cases are obtained through the function points to be tested, and these test cases are recorded as the test range corresponding to the current version. Therefore, the test range can be accurately determined in the regression test of the application, thereby effectively improving the test efficiency.
  • the step of identifying the function point to be tested by using the changed function point and/or the changed storage path comprises: acquiring the corresponding code file by using the changed function point and/or the changed storage path;
  • the code file includes the current version of the code file and the previous version of the code file; compare the current version of the code file with the previous version of the code file, if different, record the function point corresponding to the current version of the code file as the test function points.
  • the function points that have changed include the function points that have changed in the current version corresponding to the newly added function points in the first mapping file, the function points that have been fixed in the current version, and the function points that are fixed in the current version correspond to the previous version.
  • the function points before the repair includes the storage path corresponding to the newly added function point in the first mapping file, the repaired storage path in the first mapping file, and the repaired storage path in the first mapping file corresponding to the second mapping file before the repair. Storage path.
  • the step of acquiring the corresponding code file by using the changed function point and/or the changed storage path includes: if the function point does not change, the corresponding storage path changes, according to the changed storage.
  • the path acquires the corresponding code file; if the function point changes, the corresponding storage path does not change, and the corresponding code file is obtained according to the storage path corresponding to the changed function point; if the function point changes, and the corresponding storage path occurs Change, and obtain the corresponding code file according to the storage path corresponding to the changed function point.
  • the server compares the code file that may change in the current version with the corresponding code file of the previous version, and identifies the function point to be tested by using the changed code file. Specifically, the server uses the message digest to compare the code files that may change in the current version with the corresponding code files in the previous version. The server calculates a first MD5 value of the code file that may change in the current version, and calculates a second MD5 value of the corresponding code file in the previous version. The server compares the first MD5 value with the second MD5 value.
  • the server If the first MD5 value and the second MD5 value are different, indicating that the code file that may change in the current version is different from the corresponding code file in the previous version, the server The function points corresponding to the code files that may change in the current version are recorded as the function points to be tested. The server can accurately obtain the required function point to be tested by comparing the first MD5 value of the code file that may change in the current version with the second MD5 value of the corresponding code file in the previous version.
  • the embodiment can accurately identify the changed code file, and is beneficial to obtain the function point to be tested by using the changed code file, thereby improving the accuracy of the test range.
  • the test case includes a priority, a test type, and a test phase.
  • the step of determining the test scope by using the test case includes: obtaining a plurality of priority test cases according to the priority corresponding to the test case; and if the number of priority test cases exceeds a threshold , the test scope is determined according to the test period and/or test type of the priority test case.
  • the application includes multiple application versions. If the application under test is the first version, the server uses all test cases to test the corresponding function points. If the application to be tested is not the first version, the server compares the first mapping file corresponding to the current version application with the second mapping file corresponding to the previous version application, and obtains the function to be tested in the function point of the application to be tested. The point includes obtaining a test case corresponding to the function point to be tested, and then testing the corresponding function point to be tested by using the test case.
  • the function point to be tested corresponds to multiple test cases, and the server further determines the test range of the function point to be tested according to the test case of the function point to be tested.
  • the server uses the higher priority test case as the priority test case, and the priority test case has a higher functional impact index on the function point. If the number of priority test cases exceeds the threshold, indicating that the test cases corresponding to the test points have the same high priority, the server further filters the test cases according to the test stages and test types corresponding to the priority test cases, and the final test cases are applied. The scope of the test.
  • the priority of the test case corresponding to the function point to be tested is obtained, and the priority test case is obtained by using the priority of the test case, thereby obtaining a test case having a large influence on the function of the function point.
  • the server uses the test phase and test type of the priority test case to further obtain test cases that meet the current test requirements to determine a more accurate test range.
  • a query request of a current version test range sent by the first test terminal by the first application is received; a test case corresponding to the plurality of test function points of the current version is obtained according to the query request; and multiple test cases are used.
  • the left and right value numbers are performed, and the numbered test cases are returned to the first test terminal for display.
  • the tester can use the first test terminal to perform regression testing on the application.
  • the first test terminal may send a query request of the current version test range to the server through the first application, and the server obtains the test case corresponding to the plurality of test function points of the current version according to the query request, and returns the first test.
  • the web page of the terminal is displayed.
  • the server can use the left and right value coding algorithm to respectively perform the left and right value numbering of each test case corresponding to each function point to be tested, thereby generating a test case tree.
  • the server uses the test case of the function point to be tested as a node, and uses the left and right value coding algorithm to incrementally sort the left value of the node, thereby calculating the right value corresponding to each node.
  • the server can use the left and right value encoding algorithm to number all the test cases corresponding to the function points to be tested, and generate a test case tree.
  • the first test terminal can display the test case tree at the front end according to the node level of the test case tree by using the dynamic tree plugin. This effectively simplifies the test case tree structure and improves the test case loading speed.
  • receiving a login request sent by the first test terminal by using the second application returning a corresponding upload page to the first test terminal according to the login request; so that the first test terminal displays the upload page; the first test terminal further
  • the first application program tests the application to be tested according to the test scope, generates a test result file, and the test result file includes a first identifier; receives description information corresponding to the test result file uploaded by the second test terminal, and generates a two-dimensional code by using the description information.
  • the second identifier is carried in the two-dimensional code; the uploading page carrying the two-dimensional code is returned to the second testing terminal, so that the first testing terminal scans the two-dimensional code, and identifies the second identifier in the two-dimensional code, and the second The identifier is associated with the first identifier of the test result file; the associated test result file uploaded by the second test terminal is received; the corresponding storage path is obtained according to the second identifier, and the received test result file is stored according to the storage path.
  • the first test terminal may be a mobile terminal, including a tablet computer and a smart phone that can run an application for testing. Since the mobile terminal inputs the description information through the touch screen, if the operation is performed by one hand, the input efficiency is low. In order to improve the input efficiency, the tester can input the description information using the second test terminal.
  • the second test terminal can be the same as the first test terminal.
  • the second test terminal sends the description information to the server, the server receives the description information, and generates a two-dimensional code by using the description information, where the second identifier is carried in the two-dimensional code.
  • the server generates an upload page, and the upload page includes a two-dimensional code, and returns the upload page carrying the two-dimensional code to the second test terminal.
  • the first test terminal scans the two-dimensional code in the upload page of the second test terminal, identifies the second identifier in the two-dimensional code, associates the first identifier with the second identifier, and the second test terminal acquires the first test terminal by using the association relationship.
  • the test result file uploads the test result file to the server, and the server stores the test result file according to the storage path corresponding to the second identifier. This makes the uploading of test result files and description information more convenient, and effectively improves the test efficiency.
  • an application test scope determining system comprising: a server 302 and a first test terminal 304, wherein:
  • the first test terminal 304 is configured to send a query request of a current version test range
  • the server 302 is configured to obtain a first mapping file corresponding to the current version according to the query request; the first mapping file includes a function point, a storage path, and a corresponding test case of the current version; and acquires a second mapping file corresponding to the previous version of the application;
  • the second mapping file includes a function point, a storage path, and a corresponding test case of the previous version; comparing the first mapping file with the second mapping file to obtain a changed function point and/or a changed storage path;
  • the changed function point and/or the changed storage path identifies the function point to be tested; the first mapping file is used to obtain the test case corresponding to the function point to be tested, and the test case is recorded as the test range corresponding to the current version;
  • the first test terminal 304 is further configured to receive a test range corresponding to the current version returned by the server 302.
  • the server 302 is further configured to acquire a corresponding code file by using a changed function point and/or a changed storage path; the code file includes a current version of the code file and a previous version of the code file; The code file is compared with the code file of the previous version. If it is different, the function point corresponding to the current version of the code file is recorded as the function point to be tested.
  • the server 302 is further configured to: if the function point does not change, the corresponding storage path changes, and obtain a corresponding code file according to the changed storage path; if the function point changes, the corresponding storage path does not change. The corresponding code file is obtained according to the storage path corresponding to the changed function point; if the function point changes and the corresponding storage path changes, the corresponding code file is obtained according to the storage path corresponding to the changed function point.
  • the server 302 is further configured to receive a query request of a current version test range sent by the first test terminal 304 by using the first application, and obtain a test case corresponding to the plurality of test function points of the current version according to the query request.
  • the left and right value numbers are numbered for the plurality of test cases, and the numbered test cases are returned to the first test terminal 304 for display.
  • the application test scope determination system further includes a second test terminal 306.
  • the server 302 is further configured to receive a login request sent by the first test terminal 304 by using the second application.
  • the server 302 is further configured to return a corresponding upload page to the first test terminal 304 according to the login request, so that the first test terminal 304 displays the upload.
  • the first test terminal 304 is further configured to test the application to be tested according to the test scope by the first application, and generate a test result file, where the test result file includes the first identifier; the server 302 is further configured to receive the second test terminal 306 to upload The description information corresponding to the test result file is generated by using the description information, and the second identifier is carried in the two-dimensional code; the server 302 is further configured to return the upload page carrying the two-dimensional code to the second test terminal 306, so that The first test terminal 304 scans the two-dimensional code, identifies the second identifier in the two-dimensional code, associates the second identifier with the first identifier of the test result file, and the server 302 receives the associated test result file uploaded by the second test terminal. The server 302 is further configured to acquire a corresponding storage path according to the second identifier, and receive the test result file. Store according to the storage path.
  • a server is provided, as shown in FIG. 4, which includes a processor, memory, and network interface connected by a system bus.
  • the processor of the server is used to provide computing and control capabilities.
  • the memory of the server includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium of the server stores an operating system and computer readable instructions that are executed by the processor to implement an application test range determination method.
  • the internal memory of the server provides an environment for the operation of operating systems and computer readable instructions in a non-volatile storage medium.
  • the network interface of the server is used for communicating with an external terminal through a network connection, for example, receiving a test range query request of a current version of an application sent by the first test terminal, and a test result file sent by the second test terminal.
  • the processor can perform the following steps when executing computer readable instructions:
  • the mapping file includes a function point, a storage path, and a corresponding test case of the previous version; comparing the first mapping file with the second mapping file to obtain a changed function point and/or a changed storage path;
  • the function point and/or the changed storage path identify the function point to be tested; the first mapping file is used to obtain the test case corresponding to the function point to be tested, and the test case is recorded as the test range corresponding to the current version.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied.
  • the specific server may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements.
  • the processor also performs the following steps when executing the computer readable instructions:
  • the code file includes the current version of the code file and the previous version of the code file; and the current version of the code file and the previous version of the code file are performed If the comparison is different, the function point corresponding to the current version of the code file is recorded as the function point to be tested.
  • the processor also performs the following steps when executing the computer readable instructions:
  • the corresponding storage path changes, and the corresponding code file is obtained according to the changed storage path; if the function point changes, the corresponding storage path does not change, and the storage corresponding to the changed function point is stored.
  • the path obtains the corresponding code file; if the function point changes and the corresponding storage path changes, the corresponding code file is obtained according to the storage path corresponding to the changed function point.
  • the processor also performs the following steps when executing the computer readable instructions:
  • the processor also performs the following steps when executing the computer readable instructions:
  • the first test terminal is further configured by the first application according to the first application terminal
  • the test scope tests the application to be tested, generates a test result file, and the test result file includes a first identifier; receives description information corresponding to the test result file uploaded by the second test terminal, generates a two-dimensional code by using the description information, and carries the two-dimensional code
  • the second identifier is returned to the second test terminal, so that the first test terminal scans the two-dimensional code, identifies the second identifier in the two-dimensional code, and displays the second identifier and the test result file.
  • the first identifier is associated; the associated test result file uploaded by the second test terminal is received; the corresponding storage path is obtained according to the second identifier, and the received test result file is stored according to the storage path.
  • one or more computer readable non-volatile storage media having computer readable instructions, when executed by one or more processors, causing one or more processors Perform the following steps:
  • the mapping file includes a function point, a storage path, and a corresponding test case of the previous version; comparing the first mapping file with the second mapping file to obtain a changed function point and/or a changed storage path;
  • the function point and/or the changed storage path identify the function point to be tested; the first mapping file is used to obtain the test case corresponding to the function point to be tested, and the test case is recorded as the test range corresponding to the current version.
  • the computer readable instructions when executed by the processor, also perform the following steps:
  • the code file includes the current version of the code file and the previous version of the code file; and the current version of the code file and the previous version of the code file are performed If the comparison is different, the function point corresponding to the current version of the code file is recorded as the function point to be tested.
  • the computer readable instructions when executed by the processor, also perform the following steps:
  • the corresponding storage path changes, and the corresponding code file is obtained according to the changed storage path; if the function point changes, the corresponding storage path does not change, and the storage corresponding to the changed function point is stored.
  • the path obtains the corresponding code file; if the function point changes and the corresponding storage path changes, the corresponding code file is obtained according to the storage path corresponding to the changed function point.
  • the computer readable instructions when executed by the processor, also perform the following steps:
  • the computer readable instructions when executed by the processor, also perform the following steps:
  • the first test terminal is further configured by the first application according to the first application terminal
  • the test scope tests the application to be tested, generates a test result file, and the test result file includes a first identifier; receives description information corresponding to the test result file uploaded by the second test terminal, generates a two-dimensional code by using the description information, and carries the two-dimensional code
  • the second identifier is returned to the second test terminal, so that the first test terminal scans the two-dimensional code, identifies the second identifier in the two-dimensional code, and displays the second identifier and the test result file.
  • the first identifier is associated; the associated test result file uploaded by the second test terminal is received; the corresponding storage path is obtained according to the second identifier, and the received test result file is stored according to the storage path.
  • the readable storage medium which when executed, may include the flow of an embodiment of the methods as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.

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)
  • Debugging And Monitoring (AREA)

Abstract

一种应用程序测试范围确定方法、系统、服务器和存储介质。所述方法包括:获取待测应用程序当前版本对应的第一映射文件;第一映射文件包括当前版本的功能点、存储路径和对应的测试用例(202);获取待测应用程序上一版本对应的第二映射文件;第二映射文件包括上一版本的功能点、存储路径和对应的测试用例(204);将第一映射文件与第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径(206);利用发生变化的功能点和/或所述发生变化的存储路径识别待测功能点(208);利用第一映射文件获取待测功能点对应的测试用例,将测试用例记录为当前版本对应的测试范围(210)。通过所述方法能够确定精准的应用程序测试范围。

Description

应用程序测试范围确定方法、系统、服务器和存储介质
本申请申明享有2017年7月26日递交的申请号为201710618076.4、名称为“应用程序测试范围确定方法、系统、服务器和存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种应用程序测试范围确定方法、系统、服务器和存储介质。
背景技术
随着移动互联网的发展,应用程序(Application,简称APP)版本迭代速度也越来越快。在应用程序的回归测试中,为了提高测试速度,可以考虑缩小测试范围,只对修改的功能或新增的功能进行测试。在传统的方式中,主要有以下两种方式来确定测试范围:1、可以根据APP的功能需求与测试人员的个人经验来确定一个较粗的测试范围;2、也可以由研发人员根据其个人经验提供代码修改范围,以此来确定测试范围。
在上述方式1中,由于APP的功能需求只能确定新增功能对应的测试范围,并不能确定被修改的功能所对应的测试范围,很容易造成测试范围过大或过小。在上述方式2中,由于众多开发人员的个人经验存在不同的差异,很难给出一个代码修改所对应的准确测试范围,经常会给出过小或过大的测试范围。如果测试范围过小,容易造成漏测,如果测试范围过大,容易导致不必要的测试。
发明内容
基于此,有必要针对上述技术问题,提供一种能够确定精准的测试范围 的应用程序测试范围确定方法、系统、服务器和存储介质。
一种应用程序测试范围确定方法,所述方法包括:
获取待测应用程序当前版本对应的第一映射文件;所述第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取待测应用程序上一版本对应的第二映射文件;所述第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述第一映射文件与所述第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;利用所述第一映射文件获取所述待测功能点对应的测试用例,将所述测试用例记录为当前版本对应的测试范围。
一种应用程序测试范围确定系统,所述系统包括:第一测试终端,用于发送当前版本测试范围的查询请求;服务器,用于根据所述查询请求获取当前版本对应的第一映射文件;所述第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取应用程序上一版本对应的第二映射文件;所述第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述第一映射文件与所述第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;利用所述第一映射文件获取所述待测功能点对应的测试用例,将所述测试用例记录为当前版本对应的测试范围;所述第一测试终端还用于接收服务器返回的当前版本对应的测试范围。
一种服务器,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时实现以下步骤:获取待测应用程序当前版本对应的第一映射文件;所述第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取待测应用程序上一版本对应的第二映射文件;所述第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述第一映射文件与所述第二映射文件进行比较,得到发生变化的功能点和/ 或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;利用所述第一映射文件获取所述待测功能点对应的测试用例,将所述测试用例记录为当前版本对应的测试范围。
一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:获取待测应用程序当前版本对应的第一映射文件;所述第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取待测应用程序上一版本对应的第二映射文件;所述第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述第一映射文件与所述第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;利用所述第一映射文件获取所述待测功能点对应的测试用例,将所述测试用例记录为当前版本对应的测试范围。
上述应用程序测试范围确定方法、系统、服务器和存储介质,通过获取应用程序当前版本对应的第一映射文件,以及上一版本对应的第二映射文件,在应用程序的回归测试中能够精准的确定测试范围,提高测试效率。
附图说明
图1为一个实施例中应用程序测试范围确定方法的应用环境示意图;
图2为一个实施例中应用程序测试范围确定方法的流程图;
图3为一个实施例中应用程序测试范围确定系统的结构图;
图4为一个实施例中服务器的结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例 仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。
在一个实施例中,如图1所示,提供了一种应用程序测试范围确定方法、系统、服务器和存储介质的应用环境示意图。该应用环境包括服务器102和第一测试终端104。其中,服务器102与第一测试终端104可以通过网络进行通信。第一测试终端104可以为智能手机、平板电脑等。服务器102可以确定应用程序当前版本的测试范围。具体地,服务器102获取待测应用程序当前版本对应的第一映射文件,服务器102获取待测应用程序上一版本对应的第二映射文件。服务器102将第一映射文件与第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径和对应的测试用例,利用发生变化的功能点和/或发生变化的存储路径识别待测功能点,利用第一映射文件获取待测功能点对应的测试用例,将测试用例记录为当前版本对应的测试范围。
第一测试终端104通过第一应用程序向服务器102发送当前版本测试范围的查询请求。服务器102根据查询请求获取当前版本的多个待测功能点所对应的测试用例,将多个测试用例返回至第一测试终端104。第一测试终端104接收测试用例,利用测试用例对当前版本的应用程序进行回归测试。
在一个实施例中,如图2所示,提供了一种应用程序测试范围确定方法,以该方法应用于服务器为例进行说明,具体包括:
步骤202,获取待测应用程序当前版本对应的第一映射文件;第一映射文件包括当前版本的功能点、存储路径和对应的测试用例。
步骤204,获取待测应用程序上一版本对应的第二映射文件;第二映射 文件包括上一版本的功能点、存储路径和对应的测试用例。
步骤206,将第一映射文件与第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径。
步骤208,利用发生变化的功能点和/或发生变化的存储路径识别待测功能点。
步骤210,利用第一映射文件获取待测功能点对应的测试用例,将测试用例记录为当前版本对应的测试范围。
应用程序可以是能够实现一种或多种功能的计算机程序。当应用程序增加新的功能、删除不必要的功能以及改进应用程序的功能时,开发人员更新应用程序的版本。在更新应用程序版本的过程中,开发人员通过修改上一版本应用程序的代码得到当前版本应用程序。
在对当前版本的应用程序进行测试之前,可以通过服务器确定相应的测试范围,由此可以方便测试人员根据该测试范围对当前版本的应用程序进行测试,从而能够有效提高回归测试的测试效率。
应用程序包括多个功能点,每个功能点都具有对应的一个或多个代码文件。通过执行代码文件可以实现相应的功能点,例如,登录、查询以及修改设置等。代码文件可以按照对应的存储路径存储在服务器中。应用程序的功能点通过多个测试用例进行测试。不同的功能点采用不同的测试用例进行测试。
测试人员根据应用程序的功能点、代码文件对应的存储路径以及功能点对应的测试用例生成映射文件。不同版本的应用程序可以具有不同的映射文件。
服务器获取应用程序当前版本对应的第一映射文件,第一映射文件包括当前版本的功能点、代码文件对应的存储路径以及功能点对应的测试用例。第一映射文件还包括当前版本的功能点、代码文件对应的存储路径以及功能点对应的测试用例之间的映射关系。
服务器还可以获取应用程序上一版本对应的第二映射文件,第二映射文件包括上一版本的功能点、代码文件对应的存储路径和功能点对应的测试用例。第二映射文件还包括上一版本的功能点、代码文件对应的存储路径、以及功能点对应的测试用例之间的映射关系。
应用程序当前版本中可以包括新增功能点,新增功能点具有新的功能、代码文件对应的存储路径以及功能点对应的测试用例。新增功能点、代码文件对应的存储路径以及新增功能点对应的测试用例,可以对应的记录在第一映射文件中。
对于第一映射文件中的新增功能点,可以称为与第二映射文件的功能点相比发生了变化的功能点,也可以简称为发生变化的功能点。对于新增功能点对应的存储路径,可以称为与第二映射文件的存储路径相比发生了变化的存储路径,也可以简称为发生变化的存储路径。
应用程序当前版本还可以对上一版本中的一个或多个功能点进行修复。当前版本中修复后的功能点也可以称为发生变化的功能点。修复后的功能点的代码文件所对应的存储路径也可能会发生变化。同样地,第一映射文件中修复后的功能点的代码文件对应的存储路径也可能发生变化。对于第一映射文件中修复后的存储路径,可以称为与第二映射文件的存储路径相比发生变化的存储路径,也可以简称为发生变化的存储路径。
服务器将第一映射文件中的功能点和存储路径分别与第二映射文件中对应的功能点和存储路径进行比较,获取发生变化的功能点和/或发生变化的存储路径,利用发生变化的功能点和/或发生变化的存储路径识别待测功能点。
服务器可以利用发生变化的功能点和/或发生变化的存储路径获取对应的代码文件。代码文件包括当前版本的代码文件和上一版本的代码文件,服务器可以将当前版本的代码文件和上一版本的代码文件进行比较,若不同,则将当前版本的代码文件对应的功能点记录为待测功能点。
服务器可以通过第一映射文件获取待测功能点对应的测试用例,测试用例可以具有优先级。服务器获取测试用例的优先级,将优先级最高的测试用例记录为优先测试用例,将优先测试用例记录为待测功能点对应的测试范围。
本实施例中,通过获取应用程序当前版本对应的第一映射文件,以及上一版本对应的第二映射文件。将第一映射文件与第二映射文件进行比较,由此得到发生变化的功能点和/或发生变化的存储路径。进而利用发生变化的功能点和/或发生变化的存储路径可以准确识别出待测功能点。通过待测功能点获取对应的测试用例,将这些测试用例记录为当前版本对应的测试范围。由此在应用程序的回归测试中能够精准的确定测试范围,从而能够有效提高测试效率。
在一个实施例中,利用发生变化的功能点和/或发生变化的存储路径识别待测功能点的步骤,包括:利用发生变化的功能点和/或发生变化的存储路径获取对应的代码文件;代码文件包括当前版本的代码文件和上一版本的代码文件;将当前版本的代码文件和上一版本的代码文件进行比较,若不同,则将当前版本的代码文件对应的功能点记录为待测功能点。
发生变化的功能点包括第一映射文件中的新增功能点对应的当前版本中发生变化的功能点,当前版本中修复后的功能点,以及当前版本中修复后的功能点对应上一版本中的修复前的功能点。发生变化的存储路径包括第一映射文件中新增功能点对应的存储路径,第一映射文件中修复后的存储路径,以及第一映射文件中修复后的存储路径对应第二映射文件中修复前的存储路径。
在其中一个实施例中,利用发生变化的功能点和/或发生变化的存储路径获取对应的代码文件的步骤,包括:若功能点未发生变化,对应的存储路径发生变化,根据发生变化的存储路获取对应的代码文件;若功能点发生变化,对应的存储路径未发生变化,根据发生变化的功能点所对应的存储路径获取 对应的代码文件;若功能点发生变化,且对应的存储路径发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件。
服务器将当前版本中可能发生变化的代码文件和对应的上一版本的代码文件进行比较,利用发生变化的代码文件识别待测功能点。具体地,服务器利用消息摘要对当前版本中可能发生变化的代码文件和上一版本中对应的代码文件进行比较。服务器计算当前版本中可能发生变化的代码文件的第一MD5值,计算上一版本中对应的代码文件的第二MD5值。服务器将第一MD5值与第二MD5值进行比较,如果第一MD5值和第二MD5值不同,说明当前版本中可能发生变化的代码文件和上一版本中对应的代码文件不同,则将该当前版本中可能发生变化的代码文件所对应的功能点记录为待测功能点。服务器通过对比当前版本中可能发生变化的代码文件的第一MD5值和上一版本中对应的代码文件的第二MD5值,进而能够准确得到所需的待测功能点。
本实施例能准确的识别发生变化的代码文件,有利于利用发生变化的代码文件获取待测功能点,提高测试范围的准确性。
在一个实施例中,测试用例包括优先级、测试类型以及测试阶段,利用测试用例确定测试范围的步骤包括:根据测试用例对应的优先级获取多个优先测试用例;若优先测试用例数量是否超过阈值,则根据优先测试用例对应测试阶段和/或测试类型确定测试范围。
应用程序包括多个应用程序版本。如果待测应用程序为第一版本,则服务器利用所有测试用例对对应的功能点进行测试。如果待测应用程序不是第一版本,则服务器将当前版本应用程序对应的第一映射文件和上一版本应用程序对应的第二映射文件进行比较,获取待测应用程序功能点中的待测功能点,包括获取待测功能点对应的测试用例,进而利用测试用例对对应的待测功能点进行测试。
待测功能点对应多个测试用例,服务器根据待测功能点的测试用例进一 步确定待测功能点的测试范围。服务器将优先级较高的测试用例作为优先测试用例,优先测试用例对功能点的功能影响指数较高。如果优先测试用例数量超过阈值,说明待测功能点对应的多个测试用例的优先级一样高,则服务器根据优先测试用例对应的测试阶段和测试类型进一步筛选测试用例,最终得到的测试用例即应用程序的测试范围。
本实施例中,通过获取待测功能点对应的测试用例的优先级,利用测试用例的优先级获取优先测试用例,从而获取了对功能点的功能影响较大的测试用例。服务器利用优先测试用例的测试阶段和测试类型进一步获取符合当前测试需求的测试用例,从而确定更精确的测试范围。
在一个实施例中,接收第一测试终端通过第一应用程序发送的当前版本测试范围的查询请求;根据查询请求获取当前版本的多个待测功能点所对应的测试用例;对多个测试用例进行左右值编号,将编号后的测试用例返回至第一测试终端进行展示。
测试人员可以利用第一测试终端对应用程序进行回归测试。在进行测试之前,第一测试终端可以通过第一应用程序向服务器发送当前版本测试范围的查询请求,服务器根据该查询请求获取当前版本的多个待测功能点对应的测试用例,返回第一测试终端的Web页面进行展示。
为了有效节省测试用例的加载时间,服务器可以利用左右值编码算法分别对每个待测功能点对应的多个测试用例进行左右值编号,进而生成测试用例树。具体地,服务器将待测功能点的测试用例作为节点,利用左右值编码算法对节点的左值进行递增排序,进而计算每个节点对应的右值。同样地,服务器可以利用左右值编码算法对所有待测功能点对应的测试用例进行编号,生成测试用例树。
服务器将测试用例树返回至第一测试终端后,第一测试终端可以利用动态树插件按照测试用例树的节点层级在前端展示测试用例树。由此有效简化了测试用例树结构,提高了测试用例加载速度。
在一个实施例中,接收第一测试终端通过第二应用程序发送的登录请求;根据登录请求向第一测试终端返回对应的上传页面;以使得第一测试终端显示上传页面;第一测试终端还通过第一应用程序根据测试范围对待测应用程序进行测试,生成测试结果文件,测试结果文件包括第一标识;接收第二测试终端上传的测试结果文件对应的描述信息,利用描述信息生成二维码,二维码中携带了第二标识;将携带二维码的上传页面返回至第二测试终端,以使得第一测试终端扫描二维码,识别二维码中的第二标识,将第二标识与测试结果文件的第一标识进行关联;接收第二测试终端上传的关联后的测试结果文件;根据第二标识获取对应的存储路径,将接收的测试结果文件按照存储路径进行存储。
在本实施例中,第一测试终端可以是移动终端,包括可以运行应用程序进行测试的平板电脑和智能手机等。由于移动终端通过触摸屏输入描述信息,若单手操作,输入效率会较低。为了提高输入效率,测试人员可以采用第二测试终端输入描述信息。第二测试终端可以同第一测试终端。第二测试终端将描述信息发送至服务器,服务器接收描述信息,并利用描述信息生成二维码,二维码中携带了第二标识。服务器生成上传页面,上传页面中包括二维码,将携带二维码的上传页面返回至第二测试终端。
第一测试终端扫描第二测试终端上传页面中的二维码,识别二维码中的第二标识,将第一标识与第二标识关联,第二测试终端通过关联关系获取第一测试终端中的测试结果文件,将测试结果文件上传至服务器,服务器根据第二标识对应的存储路径存储测试结果文件。由此使得测试结果文件和描述信息的上传更加便捷,有效提高了测试效率。
在一个实施例中,如图3所示,提供了一种应用程序测试范围确定系统,包括:服务器302和第一测试终端304,其中:
第一测试终端304,用于发送当前版本测试范围的查询请求;
服务器302,用于根据查询请求获取当前版本对应的第一映射文件;第 一映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取应用程序上一版本对应的第二映射文件;第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;将第一映射文件与第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用发生变化的功能点和/或发生变化的存储路径识别待测功能点;利用第一映射文件获取待测功能点对应的测试用例,将测试用例记录为当前版本对应的测试范围;
第一测试终端304还用于接收服务器302返回的当前版本对应的测试范围。
在一个实施例中,服务器302还用于利用发生变化的功能点和/或发生变化的存储路径获取对应的代码文件;代码文件包括当前版本的代码文件和上一版本的代码文件;将当前版本的代码文件和上一版本的代码文件进行比较,若不同,则将当前版本的代码文件对应的功能点记录为待测功能点。
在一个实施例中,服务器302还用于若功能点未发生变化,对应的存储路径发生变化,根据发生变化的存储路获取对应的代码文件;若功能点发生变化,对应的存储路径未发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件;若功能点发生变化,且对应的存储路径发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件。
在一个实施例中,服务器302还用于接收第一测试终端304通过第一应用程序发送的当前版本测试范围的查询请求;根据查询请求获取当前版本的多个待测功能点所对应的测试用例;对多个测试用例进行左右值编号,将编号后的测试用例返回至第一测试终端304进行展示。
在一个实施例中,应用程序测试范围确定系统还包括第二测试终端306。服务器302还用于接收第一测试终端304通过第二应用程序发送的登录请求;服务器302还用于根据登录请求向第一测试终端304返回对应的上传页面;以使得第一测试终端304显示上传页面;第一测试终端304还用于通过第一应用程序根据测试范围对待测应用程序进行测试,生成测试结果文件, 测试结果文件包括第一标识;服务器302还用于接收第二测试终端306上传的测试结果文件对应的描述信息,利用描述信息生成二维码,二维码中携带了第二标识;服务器302还用于将携带二维码的上传页面返回至第二测试终端306,以使得第一测试终端304扫描二维码,识别二维码中的第二标识,将第二标识与测试结果文件的第一标识进行关联;服务器302接收第二测试终端上传的关联后的测试结果文件;服务器302还用于根据第二标识获取对应的存储路径,将接收的测试结果文件按照存储路径进行存储。
在一个实施例中,提供了一种服务器,如图4所示,该服务器包括通过系统总线连接的处理器、存储器和网络接口。其中,该服务器的处理器用于提供计算和控制能力。该服务器的存储器包括非易失性存储介质、内存储器。该服务器的非易失性存储介质存储有操作系统和和计算机可读指令,该计算机可读指令被处理器执行时以实现一种应用程序测试范围确定方法。该服务器的内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该服务器的网络接口用于与外部的终端通过网络连接通信,比如,接收第一测试终端发送的应用程序当前版本的测试范围查询请求以及第二测试终端发送的测试结果文件等。处理器执行计算机可读指令时可以执行以下步骤:
获取待测应用程序当前版本对应的第一映射文件;第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取待测应用程序上一版本对应的第二映射文件;第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;将第一映射文件与第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用发生变化的功能点和/或发生变化的存储路径识别待测功能点;利用第一映射文件获取待测功能点对应的测试用例,将测试用例记录为当前版本对应的测试范围。
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的服务器的限 定,具体的服务器可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,处理器执行计算机可读指令时还执行以下步骤:
利用发生变化的功能点和/或发生变化的存储路径获取对应的代码文件;代码文件包括当前版本的代码文件和上一版本的代码文件;将当前版本的代码文件和上一版本的代码文件进行比较,若不同,则将当前版本的代码文件对应的功能点记录为待测功能点。
在一个实施例中,处理器执行计算机可读指令时还执行以下步骤:
若功能点未发生变化,对应的存储路径发生变化,根据发生变化的存储路获取对应的代码文件;若功能点发生变化,对应的存储路径未发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件;若功能点发生变化,且对应的存储路径发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件。
在一个实施例中,处理器执行计算机可读指令时还执行以下步骤:
接收第一测试终端通过第一应用程序发送的当前版本测试范围的查询请求;根据查询请求获取当前版本的多个待测功能点所对应的测试用例;对多个测试用例进行左右值编号,将编号后的测试用例返回至第一测试终端进行展示。
在一个实施例中,处理器执行计算机可读指令时还执行以下步骤:
接收第一测试终端通过第二应用程序发送的登录请求;根据登录请求向第一测试终端返回对应的上传页面;以使得第一测试终端显示上传页面;第一测试终端还通过第一应用程序根据测试范围对待测应用程序进行测试,生成测试结果文件,测试结果文件包括第一标识;接收第二测试终端上传的测试结果文件对应的描述信息,利用描述信息生成二维码,二维码中携带了第二标识;将携带二维码的上传页面返回至第二测试终端,以使得第一测试终端扫描二维码,识别二维码中的第二标识,将第二标识与测试结果文件的第 一标识进行关联;接收第二测试终端上传的关联后的测试结果文件;根据第二标识获取对应的存储路径,将接收的测试结果文件按照存储路径进行存储。
在一个实施例中,提供了一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
获取待测应用程序当前版本对应的第一映射文件;第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取待测应用程序上一版本对应的第二映射文件;第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;将第一映射文件与第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用发生变化的功能点和/或发生变化的存储路径识别待测功能点;利用第一映射文件获取待测功能点对应的测试用例,将测试用例记录为当前版本对应的测试范围。
在一个实施例中,计算机可读指令被处理器执行时还执行以下步骤:
利用发生变化的功能点和/或发生变化的存储路径获取对应的代码文件;代码文件包括当前版本的代码文件和上一版本的代码文件;将当前版本的代码文件和上一版本的代码文件进行比较,若不同,则将当前版本的代码文件对应的功能点记录为待测功能点。
在一个实施例中,计算机可读指令被处理器执行时还执行以下步骤:
若功能点未发生变化,对应的存储路径发生变化,根据发生变化的存储路获取对应的代码文件;若功能点发生变化,对应的存储路径未发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件;若功能点发生变化,且对应的存储路径发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件。
在一个实施例中,计算机可读指令被处理器执行时还执行以下步骤:
接收第一测试终端发送的当前版本测试范围的查询请求;根据查询请求 获取当前版本的多个待测功能点所对应的测试用例;对多个测试用例进行左右值编号,将编号后的测试用例返回至第一测试终端进行展示。
在一个实施例中,计算机可读指令被处理器执行时还执行以下步骤:
接收第一测试终端通过第二应用程序发送的登录请求;根据登录请求向第一测试终端返回对应的上传页面;以使得第一测试终端显示上传页面;第一测试终端还通过第一应用程序根据测试范围对待测应用程序进行测试,生成测试结果文件,测试结果文件包括第一标识;接收第二测试终端上传的测试结果文件对应的描述信息,利用描述信息生成二维码,二维码中携带了第二标识;将携带二维码的上传页面返回至第二测试终端,以使得第一测试终端扫描二维码,识别二维码中的第二标识,将第二标识与测试结果文件的第一标识进行关联;接收第二测试终端上传的关联后的测试结果文件;根据第二标识获取对应的存储路径,将接收的测试结果文件按照存储路径进行存储。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (18)

  1. 一种应用程序测试范围确定方法,包括:
    获取待测应用程序当前版本对应的第一映射文件;所述第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;
    获取待测应用程序上一版本对应的第二映射文件;所述第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;
    将所述第一映射文件与所述第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;
    利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;
    利用所述第一映射文件获取所述待测功能点对应的测试用例,将所述测试用例记录为当前版本对应的测试范围。
  2. 根据权利要求1所述的方法,其特征在于,所述利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点的步骤,包括:
    利用所述发生变化的功能点和/或所述发生变化的存储路径获取对应的代码文件;所述代码文件包括当前版本的代码文件和上一版本的代码文件;将所述当前版本的代码文件和所述上一版本的代码文件进行比较,若不同,则将所述当前版本的代码文件对应的功能点记录为待测功能点。
  3. 根据权利要求2所述的方法,其特征在于,所述利用所述发生变化的功能点和/或所述发生变化的存储路径获取对应的代码文件的步骤,包括:
    若功能点未发生变化,对应的存储路径发生变化,根据发生变化的存储路获取对应的代码文件;若功能点发生变化,对应的存储路径未发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件;若功能点发生变化,且对应的存储路径发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:接收第一测试终端通过第一应用程序发送的当前版本测试范围的查询请求;根据所述查询请求获取当前版本的多个待测功能点所对应的测试用例;对多个测试用例进行左右值编号,将编号后的测试用例返回至所述第一测试终端进行展示。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收第一测试终端通过第二应用程序发送的登录请求;根据所述登录请求向第一测试终端返回对应的上传页面;以使得第一测试终端显示所述上传页面;所述第一测试终端还通过第一应用程序根据所述测试范围对待测应用程序进行测试,生成测试结果文件,所述测试结果文件包括第一标识;
    接收第二测试终端上传的测试结果文件对应的描述信息,利用所述描述信息生成二维码,所述二维码中携带了第二标识;将携带所述二维码的上传页面返回至第二测试终端,以使得第一测试终端扫描所述二维码,识别二维码中的第二标识,将所述第二标识与测试结果文件的第一标识进行关联;
    接收所述第二测试终端上传的关联后的测试结果文件;根据第二标识获取对应的存储路径,将接收的测试结果文件按照所述存储路径进行存储。
  6. 一种应用程序测试范围确定系统,其特征在于,所述系统包括:
    第一测试终端,用于发送当前版本测试范围的查询请求;
    服务器,用于根据所述查询请求获取当前版本对应的第一映射文件;所述第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;获取应用程序上一版本对应的第二映射文件;所述第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;将所述第一映射文件与所述第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;利用所述第一映射文件获取所述待测功能点对应的测试用例,将所述测试用例记录为当前版本对应的测试范围;
    所述第一测试终端还用于接收服务器返回的当前版本对应的测试范围。
  7. 根据权利要求6所述的系统,其特征在于,所述服务器还用于利用所述发生变化的功能点和/或所述发生变化的存储路径获取对应的代码文件;所述代码文件包括当前版本的代码文件和上一版本的代码文件;将所述当前版本的代码文件和所述上一版本的代码文件进行比较,若不同,则将所述当前版本的代码文件对应的功能点记录为待测功能点。
  8. 根据权利要求7所述的系统,其特征在于,所述服务器还用于若功能点未发生变化,对应的存储路径发生变化,根据发生变化的存储路获取对应的代码文件;若功能点发生变化,对应的存储路径未发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件;若功能点发生变化,且对应的存储路径发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件。
  9. 一种服务器,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时实现以下步骤:
    获取待测应用程序当前版本对应的第一映射文件;所述第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;
    获取待测应用程序上一版本对应的第二映射文件;所述第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;
    将所述第一映射文件与所述第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;
    利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;
    利用所述第一映射文件获取所述待测功能点对应的测试用例,将所述测试用例记录为当前版本对应的测试范围。
  10. 根据权利要求9所述的服务器,其特征在于,所述利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点的步骤,包括:
    利用所述发生变化的功能点和/或所述发生变化的存储路径获取对应的代码文件;所述代码文件包括当前版本的代码文件和上一版本的代码文件;将所述当前版本的代码文件和所述上一版本的代码文件进行比较,若不同,则将所述当前版本的代码文件对应的功能点记录为待测功能点。
  11. 根据权利要求10所述的服务器,其特征在于,所述利用所述发生变化的功能点和/或所述发生变化的存储路径获取对应的代码文件的步骤,包括:若功能点未发生变化,对应的存储路径发生变化,根据发生变化的存储路获取对应的代码文件;若功能点发生变化,对应的存储路径未发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件;若功能点发生变化,且对应的存储路径发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件。
  12. 根据权利要求9所述的服务器,其特征在于,所述指令被所述处理器执行时还实现以下步骤:接收第一测试终端通过第一应用程序发送的当前版本测试范围的查询请求;根据所述查询请求获取当前版本的多个待测功能点所对应的测试用例;对多个测试用例进行左右值编号,将编号后的测试用例返回至所述第一测试终端进行展示。
  13. 根据权利要求9所述的服务器,其特征在于,所述指令被所述处理器执行时还实现以下步骤:
    接收第一测试终端通过第二应用程序发送的登录请求;根据所述登录请求向第一测试终端返回对应的上传页面;以使得第一测试终端显示所述上传页面;所述第一测试终端还通过第一应用程序根据所述测试范围对待测应用程序进行测试,生成测试结果文件,所述测试结果文件包括第一标识;
    接收第二测试终端上传的测试结果文件对应的描述信息,利用所述描述信息生成二维码,所述二维码中携带了第二标识;将携带所述二维码的上传页面返回至第二测试终端,以使得第一测试终端扫描所述二维码,识别二维码中的第二标识,将所述第二标识与测试结果文件的第一标识进行关联;
    接收所述第二测试终端上传的关联后的测试结果文件;根据第二标识获取对应的存储路径,将接收的测试结果文件按照所述存储路径进行存储。
  14. 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
    获取待测应用程序当前版本对应的第一映射文件;所述第一映射文件包括当前版本的功能点、存储路径和对应的测试用例;
    获取待测应用程序上一版本对应的第二映射文件;所述第二映射文件包括上一版本的功能点、存储路径和对应的测试用例;
    将所述第一映射文件与所述第二映射文件进行比较,得到发生变化的功能点和/或发生变化的存储路径;
    利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点;
    利用所述第一映射文件获取所述待测功能点对应的测试用例,将所述测试用例记录为当前版本对应的测试范围。
  15. 根据权利要求14所述的存储介质,其特征在于,所述利用所述发生变化的功能点和/或所述发生变化的存储路径识别待测功能点的步骤,包括:
    利用所述发生变化的功能点和/或所述发生变化的存储路径获取对应的代码文件;所述代码文件包括当前版本的代码文件和上一版本的代码文件;
    将所述当前版本的代码文件和所述上一版本的代码文件进行比较,若不同,则将所述当前版本的代码文件对应的功能点记录为待测功能点。
  16. 根据权利要求15所述的存储介质,其特征在于,所述利用所述发生变化的功能点和/或所述发生变化的存储路径获取对应的代码文件的步骤,包括:
    若功能点未发生变化,对应的存储路径发生变化,根据发生变化的存储 路获取对应的代码文件;若功能点发生变化,对应的存储路径未发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件;若功能点发生变化,且对应的存储路径发生变化,根据发生变化的功能点所对应的存储路径获取对应的代码文件。
  17. 根据权利要求14所述的存储介质,其特征在于,一个或多个处理器还执行以下步骤:接收第一测试终端通过第一应用程序发送的当前版本测试范围的查询请求;根据所述查询请求获取当前版本的多个待测功能点所对应的测试用例;对多个测试用例进行左右值编号,将编号后的测试用例返回至所述第一测试终端进行展示。
  18. 根据权利要求14所述的存储介质,其特征在于,一个或多个处理器还执行以下步骤:
    接收第一测试终端通过第二应用程序发送的登录请求;根据所述登录请求向第一测试终端返回对应的上传页面;以使得第一测试终端显示所述上传页面;所述第一测试终端还通过第一应用程序根据所述测试范围对待测应用程序进行测试,生成测试结果文件,所述测试结果文件包括第一标识;
    接收第二测试终端上传的测试结果文件对应的描述信息,利用所述描述信息生成二维码,所述二维码中携带了第二标识;将携带所述二维码的上传页面返回至第二测试终端,以使得第一测试终端扫描所述二维码,识别二维码中的第二标识,将所述第二标识与测试结果文件的第一标识进行关联;
    接收所述第二测试终端上传的关联后的测试结果文件;根据第二标识获取对应的存储路径,将接收的测试结果文件按照所述存储路径进行存储。
PCT/CN2018/078321 2017-07-26 2018-03-07 应用程序测试范围确定方法、系统、服务器和存储介质 Ceased WO2019019647A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710618076.4 2017-07-26
CN201710618076.4A CN107729227B (zh) 2017-07-26 2017-07-26 应用程序测试范围确定方法、系统、服务器和存储介质

Publications (1)

Publication Number Publication Date
WO2019019647A1 true WO2019019647A1 (zh) 2019-01-31

Family

ID=61201724

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/078321 Ceased WO2019019647A1 (zh) 2017-07-26 2018-03-07 应用程序测试范围确定方法、系统、服务器和存储介质

Country Status (2)

Country Link
CN (1) CN107729227B (zh)
WO (1) WO2019019647A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448862A (zh) * 2021-07-12 2021-09-28 上海哔哩哔哩科技有限公司 软件版本测试方法、装置及计算机设备
CN117056189A (zh) * 2022-05-05 2023-11-14 北京小米移动软件有限公司 一种代码覆盖率的测试方法、装置及存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729227B (zh) * 2017-07-26 2020-03-06 深圳壹账通智能科技有限公司 应用程序测试范围确定方法、系统、服务器和存储介质
CN108804134A (zh) * 2018-06-20 2018-11-13 上海哔哩哔哩科技有限公司 基于产品特征的软件版本管理方法、装置、系统及介质
CN109271201A (zh) * 2018-09-27 2019-01-25 华东师范大学 一种智能功能点识别的软件计价系统
CN109542779A (zh) * 2018-11-12 2019-03-29 泰康保险集团股份有限公司 测试方法、装置和存储介质
CN110162467B (zh) * 2019-04-23 2023-12-19 平安科技(深圳)有限公司 软件测试方法、装置、计算机设备和可读存储介质
CN110245081A (zh) * 2019-05-31 2019-09-17 厦门美柚信息科技有限公司 生成最小测试范围的方法及装置
CN110392095A (zh) * 2019-06-19 2019-10-29 深圳壹账通智能科技有限公司 安装包文件的上传方法、装置、服务器和存储介质
CN111209206B (zh) * 2020-01-13 2024-05-24 卡斯柯信号(北京)有限公司 一种软件产品的自动测试方法及系统
CN111881051B (zh) * 2020-08-03 2024-07-02 Oppo广东移动通信有限公司 测试用例的生成方法、装置、终端及存储介质
CN114201384A (zh) * 2021-11-18 2022-03-18 北京三快在线科技有限公司 测试方法、装置、电子设备及存储介质
US12189788B2 (en) * 2023-06-12 2025-01-07 Endor Labs Inc Identifying and addressing potential vulnerabilities in third-party code

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831057A (zh) * 2012-08-13 2012-12-19 于秀山 一种用功能图分析软件功能变更及其影响的方法
CN103186456A (zh) * 2011-12-29 2013-07-03 北京新媒传信科技有限公司 一种系统测试的方法和装置
CN103198010A (zh) * 2012-01-06 2013-07-10 腾讯科技(深圳)有限公司 软件测试方法、装置及系统
CN107729227A (zh) * 2017-07-26 2018-02-23 上海壹账通金融科技有限公司 应用程序测试范围确定方法、系统、服务器和存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100576172C (zh) * 2008-05-27 2009-12-30 华耀环宇科技(北京)有限公司 一种通过分析代码变化确定功能点变化的方法
CN101719095A (zh) * 2009-12-30 2010-06-02 北京世纪高通科技有限公司 一种回归测试的管理方法及装置
CN103309801B (zh) * 2012-03-15 2016-01-13 百度在线网络技术(北京)有限公司 一种确定回归测试范围的方法和装置
US9021449B2 (en) * 2012-08-16 2015-04-28 Fujitsu Limited Software regression testing using symbolic execution
CN103678097A (zh) * 2012-09-05 2014-03-26 百度在线网络技术(北京)有限公司 一种选择回归测试用例的方法和装置
CN103699488B (zh) * 2013-12-30 2017-01-04 优视科技有限公司 基于调用关系依赖图的回归测试方法及系统
CN103955429B (zh) * 2014-05-16 2016-08-31 北京金山网络科技有限公司 确定回归测试范围的方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186456A (zh) * 2011-12-29 2013-07-03 北京新媒传信科技有限公司 一种系统测试的方法和装置
CN103198010A (zh) * 2012-01-06 2013-07-10 腾讯科技(深圳)有限公司 软件测试方法、装置及系统
CN102831057A (zh) * 2012-08-13 2012-12-19 于秀山 一种用功能图分析软件功能变更及其影响的方法
CN107729227A (zh) * 2017-07-26 2018-02-23 上海壹账通金融科技有限公司 应用程序测试范围确定方法、系统、服务器和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448862A (zh) * 2021-07-12 2021-09-28 上海哔哩哔哩科技有限公司 软件版本测试方法、装置及计算机设备
CN117056189A (zh) * 2022-05-05 2023-11-14 北京小米移动软件有限公司 一种代码覆盖率的测试方法、装置及存储介质

Also Published As

Publication number Publication date
CN107729227A (zh) 2018-02-23
CN107729227B (zh) 2020-03-06

Similar Documents

Publication Publication Date Title
WO2019019647A1 (zh) 应用程序测试范围确定方法、系统、服务器和存储介质
US10387292B2 (en) Determining application test results using screenshot metadata
CN107122368B (zh) 一种数据校验方法、装置及电子设备
US9405662B2 (en) Process for displaying test coverage data during code reviews
WO2020000706A1 (zh) 基于数据库比对的接口测试方法、系统、设备和存储介质
US10216727B2 (en) Visually differentiating strings for testing
US8311794B2 (en) Testing executable logic
CN114020813B (zh) 基于哈希算法的数据比对方法、装置、设备及存储介质
CN105190548A (zh) 软件的自动风险分析
CN112363937B (zh) 差异覆盖率测试方法、装置、计算机设备和存储介质
CN110377704A (zh) 数据一致性的检测方法、装置和计算机设备
CN113656318A (zh) 软件版本测试方法、装置及计算机设备
US11663113B2 (en) Real time fault localization using combinatorial test design techniques and test case priority selection
CN107798047A (zh) 重复工单检测方法、装置、服务器和介质
CN106557419B (zh) 程序的测试方法及装置
CN108228443B (zh) 一种web应用的测试方法及装置
EP2778962A1 (en) Silo-aware databases
CN114756363A (zh) 一种资源配置检测方法及装置
CN104166541B (zh) 用于更新被测控件库的方法和装置
CN116483735B (zh) 一种代码变更的影响分析方法、装置、存储介质及设备
CN114428739B (zh) 文件合并方法、装置、设备、存储介质及产品
CN116594883A (zh) 代码测试方法、装置、计算机设备和存储介质
CN114090414B (zh) 数据处理系统及方法、数据测试系统、数据系统
CN115422071A (zh) 测试数据生成方法、装置、设备、存储介质和程序产品
CN107015909A (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: 18839235

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18839235

Country of ref document: EP

Kind code of ref document: A1

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 28.05.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18839235

Country of ref document: EP

Kind code of ref document: A1