WO2019095580A1 - Test method and apparatus, computer device, and readable storage medium - Google Patents

Test method and apparatus, computer device, and readable storage medium Download PDF

Info

Publication number
WO2019095580A1
WO2019095580A1 PCT/CN2018/077273 CN2018077273W WO2019095580A1 WO 2019095580 A1 WO2019095580 A1 WO 2019095580A1 CN 2018077273 W CN2018077273 W CN 2018077273W WO 2019095580 A1 WO2019095580 A1 WO 2019095580A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
manual
test case
automated
task
Prior art date
Application number
PCT/CN2018/077273
Other languages
French (fr)
Chinese (zh)
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 WO2019095580A1 publication Critical patent/WO2019095580A1/en

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/3676Test management for coverage analysis
    • 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

Definitions

  • the present application relates to the field of computer technology, and in particular, to a test method, apparatus, computer device, and readable storage medium.
  • the test is to test various performance indicators of the system by testing various normal, peak and abnormal load conditions.
  • the tests for the system and the like are manually tested, that is, the test cases need to be manually input into the system to be tested one by one, and then the test results are judged according to the output of the system to be tested, and the test of multiple test cases is counted. The number of successes to get the test success rate, the process needs to be tested one by one, resulting in lower test efficiency.
  • test method In accordance with various embodiments disclosed herein, a test method, apparatus, computer apparatus, and readable storage medium are provided.
  • a test method comprising:
  • An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
  • test device comprising:
  • test task acquisition module for obtaining a test task constructed
  • An automated test case selection module for selecting automated test cases corresponding to the constructed test tasks
  • An execution module for executing the automated test case according to the built test task
  • a manual test case selection module configured to select a manual test case corresponding to the constructed test task when the automated test cases are all executed
  • an output module configured to select an unexecuted manual test case from the manual test case according to the selected automated test case, and output the unexecuted manual test case for manual test.
  • a computer device comprising a memory, a processor, on which is stored computer readable instructions, and the processor, when executing the computer readable instructions, implements the following steps:
  • An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
  • 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:
  • An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
  • 1 is an application environment diagram of a test method in an embodiment
  • FIG. 2 is a flow chart of a test method in an embodiment
  • FIG. 3 is a flow chart of step S206 in the embodiment shown in Figure 2;
  • Figure 5 is an interface diagram of all test tasks in an embodiment
  • FIG. 7 is a schematic structural view of a test device in an embodiment
  • FIG. 8 is a schematic structural diagram of a computer device in an embodiment.
  • FIG. 1 is an application environment diagram of a test method in an embodiment, including a computer device, a database, and a plurality of execution nodes, wherein the computer device is configured to receive the constructed test task, and test the test case according to the test task. Sended to several execution nodes, the execution node performs test tasks, the computer device collects the test results of the execution nodes, and stores the test results in the database, and the test results of the manual test are stored in the manual test result storage system, such as DPM system, TESTLINK The system, the WIZARD system, or the JENKINS system, etc., can obtain the test results stored in the manual test result storage system, and store the test results in a database for the user to query or generate reports.
  • the manual test result storage system such as DPM system, TESTLINK The system, the WIZARD system, or the JENKINS system, etc.
  • a test method is provided. This embodiment is exemplified by applying the method to the computer device in FIG. 1 above.
  • a test readable instruction is run on the computer device, and the test method is implemented by the test readable instruction.
  • the method specifically includes the following steps:
  • the user can build a test task on the computer device, and an operation interface of the automated test can be provided on the computer device, and the task list, the node list, and the statistical report related to the automated test can be displayed on the operation interface, when the user opens the task list.
  • You can add new test tasks to the task list, or delete the built test tasks, or modify the built test tasks, such as modifying the execution nodes of the built test tasks.
  • the node list is a server that can perform test tasks, and the like.
  • a statistical report is a report that shows the test results of a test task and test parameters, which can be displayed in a tabular or other graphical manner.
  • the test case corresponding to the test task is obtained, for example, the automatic test case may be selected according to the version information of the test version of the built test task, and then according to the test type. For example, interface type or interface type, select the corresponding type of automated test case from the corresponding version of the automated test case.
  • the step may be performed by using a timed task. For example, after obtaining the built test task, setting a timed task, and then selecting an automated test case according to the start time of the timed task, thereby performing an automated test. This is because when there are many test tasks, there may be higher-priority test tasks.
  • the currently built test tasks cannot be performed in time, but can be preset according to the possible duration of the higher-priority test tasks.
  • the timed task can ensure that the current test task can be executed in time after the higher priority test task is completed, without manual or machine real-time monitoring whether the higher priority test task has been completed, which can save human resources, and Computer equipment does not require a large amount of resources to monitor higher-priority test tasks in real time, reducing waste of resources.
  • the automated test case is executed to complete the built test task.
  • the automated test of the test task is completed.
  • each test involves not only the automated test but also the manual test, so the computer device obtains
  • the manual test case can also be stored in a manual test result storage system, such as a DPM system, a TESTLINK system, a WIZARD system, or a JENKINS system, etc., and the computer device can access these systems. Get all the manual test cases.
  • S210 Select an unexecuted manual test case from the manual test case according to the selected automated test case, and output an unexecuted manual test case for manual test.
  • the automated test case set is a subset of the manual test case set. All automated test cases are manual test cases. When the automated test case has been executed, the automated test case is no longer needed to be executed again. The manual test case is not executed, so the computer device outputs the unexecuted manual test case, and the manual test case is manually executed by the user.
  • the above test method first selects an automated test case corresponding to the constructed test task, then executes the automated test case, and then selects a manual test case corresponding to the constructed test task, and according to the automated test case that has been executed, from the manual Selecting unexecuted manual test cases from the test cases can greatly reduce the number of manual tests, thereby improving the test efficiency. Because the quality of the test scripts is highly dependent on the quality of the test scripts and the test scripts are of poor quality, the test results will not be Reliable, the manual solution is also introduced in the technical solution, that is, the test process is not completely dependent on the automatic test, and the reliability of the test result is guaranteed.
  • FIG. 3 is a flowchart of step S206 in the embodiment shown in FIG. 2, which may include: performing steps of performing an automated test case according to the constructed test task:
  • S302 Select an online idle node from the execution node according to the constructed test task.
  • FIG. 4 is an interface diagram of a new test task in an embodiment
  • FIG. 5 is an interface diagram of all test tasks in an embodiment.
  • FIG. 4 when a test task is added, The execution node is selected, and the selection of the execution node first needs to match the constructed test task, and secondly, the execution node is to be online.
  • the execution node is matched with the built test task, and the execution node is required to install a test system or a test framework corresponding to the test task.
  • a table may be set, where the table includes a node identifier of the execution node and Execute the test system or test framework installed in the node.
  • the node identifier of the execution node may be the MAC address of the execution node, etc., which can uniquely identify the attributes of the execution node.
  • the test system or test framework installed by the execution node may use keywords. Or label the way to identify, in order to facilitate the query.
  • a plurality of test tasks are given, which have been executed, and the status of the execution node, such as online or offline, can still be displayed in the execution node column, so that the user can perform the test task again.
  • the maximum connection number can be selected to be greater than or equal to 2, and the current connection number is less than the maximum.
  • the number of execution nodes of the connection so as to ensure that a limited number of execution nodes perform a large number of test tasks, thereby improving the utilization rate of the execution nodes.
  • the execution node needs to be selected. If the C node is not online, the node can only be selected from the A node and the B node; if the A node is online and idle, the A node is directly selected as the execution node. If the A node is online but not in the idle state, it needs to be selected from other nodes. In this case, the maximum number of connections of the B node is 3, which is greater than the number of test tasks that it is currently connected to. Therefore, the C node is selected as the execution node of the current test task. If the number of execution nodes of the currently selected test task is greater than or equal to 2, it is output to the interface in a list manner, and the user selects one of the nodes as the execution node of the current test task.
  • S306 Send the automated test case to the selected execution node and execute the automated test case.
  • the automated test case is sent to the selected execution node, and the execution node invokes the corresponding script to execute the automated test case for automated testing.
  • the current state of the execution node and the maximum number of connections of the execution node are fully considered, and the resources of the execution node can be fully utilized to improve the efficiency of the test.
  • the testing method may further include obtaining a first quantity of the automated test case whose execution result is successful; obtaining a second quantity of the manual test case whose execution result is successful from the manual test result storage system; A number, a second quantity, and a number of manual use cases corresponding to the constructed test task are calculated to obtain a test success rate of the constructed test task; when the test success rate is lower than a preset value, the result of the test failure is output.
  • FIG. 6 is a schematic diagram of a test report in an embodiment, including a system name, a task type, a build time, a duration, a manual use case, and an automatic execution. Number, automatic coverage, success number, and number of failures, etc., where the system name is the system name of the system corresponding to the test task being built, and the task type includes interface test and interface test, etc.
  • the build time is the time and duration of the test task establishment.
  • the time used to execute the automated test case the number of manual use cases is the total number of test cases
  • the number of automated executions is the number of automated test cases
  • the automated test coverage is the ratio of the number of automated test cases to the number of manual test cases.
  • the success number is the first number of successful executions in the automated test case and the second number of successes in the manual test case.
  • the number of failures is the number of manual cases minus the first quantity and the second quantity. Then is the ratio of the sum of the first quantity and the second quantity to the number of manual use cases.
  • the test When the success rate is lower than the preset value, the test is considered to be failed, so the result of the test failure may be output to prompt the user, for example, the user may send a short message, a WeChat or send an email, make a call, etc., or directly output to the interface, The user is prompted.
  • the first quantity is the result of the automated test, which can be obtained directly from the execution node.
  • the second quantity may exist in different manual test result storage systems, and therefore needs to be obtained from different manual test result storage systems, and is configured in this embodiment. Different interfaces are connected to different manual test result storage systems, and different templates are configured to adapt to different manual test result storage systems, so that test results can be obtained directly from different manual test result storage systems, from statistical manual test cases.
  • the result of the execution is the second number of successes to facilitate subsequent calculation of the test success rate.
  • the first quantity of the automated test case whose execution result is successful is obtained; and the second quantity of the manual test case whose execution result is successful is obtained from the manual test result storage system, according to the first quantity, the second quantity, and The number of manual use cases corresponding to the test task is calculated to obtain the test success rate of the constructed test task, and the operation is simple and reliable.
  • the testing method may further include: when the test success rate is not lower than the preset value, acquiring a historical test task associated with the constructed test task; when the test success rate is lower than the historical test task When the test success rate is successful, the result of the test failure is indicated.
  • the computer device can also obtain the automatic test success rate of the historical version, and calculate the automatic test success rate of the current version.
  • the current version of the automated test success rate is less than the historical version of the automated test success rate, the current automation is prompted.
  • the test success rate should be higher and higher. If the test success rate is lower than the historical test success rate, the task version upgrade fails and the test fails.
  • the same test version of the same version before and after, the success rate of the latter test should also be higher than the success rate of the previous test, if it is low, the result of the test failure.
  • test success rate of the historical version is combined to determine whether the test of the current version is successful, the relationship between the versions is strengthened, and the accuracy of the test is improved.
  • the testing method may further include: counting the number of all types of test cases in the automated test case; calculating each number according to the number of all types of test cases in the automated test case and the number of manual test cases The coverage of a type of test case; when there is a coverage type of a test case whose coverage is lower than the coverage threshold, it prompts to increase a certain type of test case.
  • FIG. 6 is a statistical diagram of test results in an embodiment, which may include a version build graph, a version success rate graph, a use case coverage graph, and a use case type map.
  • the abscissa of the version build graph is the version number of the build version
  • the ordinate is the build success rate
  • different fold lines can identify different items
  • the computer device automatically counts the success rate of each version of each item and displays it, without manual intervention.
  • the version success rate chart can use a pie chart in which the total number of automated test cases is the denominator, the number of successful automated test runs, the number of automated test cases that failed to execute, and the number of unexecuted automated test cases are numerators.
  • the number of manual use cases in the use case coverage chart is the denominator.
  • the number of test rates for each type is numerator, such as the number of interface test cases and the number of interface test cases.
  • the coverage is lower than that.
  • the coverage threshold is used, it prompts to increase a certain type of test case, which can ensure the sufficiency of the test case and improve the accuracy of the test.
  • the use case type map can be a pie chart.
  • the number of all types of test cases in the automated test case is counted; the coverage of each type of test case is calculated according to the number of all types of test cases in the automated test case and the number of manual test cases;
  • the coverage of a certain type of test case is lower than the coverage threshold, it prompts to increase a certain type of test case, which can ensure the sufficiency of the test case and improve the accuracy of the test.
  • FIGS. 2 and 3 are schematic flowcharts of a method according to an embodiment of the present application. It should be understood that although the various steps in the flowcharts of FIGS. 2 and 3 are sequentially displayed in accordance with the indication of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and may be performed in other sequences. Moreover, at least some of the steps in FIGS.
  • 2 and 3 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, and the execution order thereof is also It is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
  • FIG. 7 is a schematic structural diagram of a testing device in an embodiment, where the testing device includes:
  • the test task acquisition module 100 is configured to acquire the constructed test task.
  • the automated test case selection module 200 is configured to select an automated test case corresponding to the constructed test task.
  • the execution module 300 is configured to execute an automated test case according to the built test task.
  • the manual test case selection module 400 is configured to select a manual test case corresponding to the constructed test task when the automated test cases are all executed.
  • the output module 500 is configured to select an unexecuted manual test case from the manual test case according to the selected automated test case, and output an unexecuted manual test case for manual testing.
  • the execution module 300 can include:
  • the first node selection unit is configured to select an online idle node from the execution node according to the constructed test task.
  • the second node selection unit is configured to: when there is no online idle node in the execution node, select, from the execution node, a node whose maximum connection number is greater than or equal to two and the current connection number is less than the maximum connection number.
  • An execution unit that sends automated test cases to selected nodes and executes automated test cases.
  • the testing device may further include:
  • the first test result obtaining unit is configured to obtain the first quantity of the automated test case whose execution result is successful.
  • the second test result obtaining unit is configured to obtain, from the manual test result storage system, a second quantity of the manual test case whose execution result is successful.
  • the calculating unit is configured to calculate a test success rate of the constructed test task according to the first quantity, the second quantity, and the number of manual use cases corresponding to the constructed test task.
  • the first output unit is configured to output a result of the test failure when the test success rate is lower than a preset value.
  • the testing device may further include:
  • the historical test task acquisition module is configured to acquire a historical test task associated with the constructed test task when the test success rate is not lower than a preset value.
  • the output module 500 can also be used to indicate the result of the test failure when the test success rate is lower than the test success rate of the historical test task.
  • the testing device may further include:
  • a statistical module that counts the number of all types of test cases in an automated test case.
  • Coverage calculation module for calculating the coverage of each type of test case based on the number of all types of test cases in the automated test case and the number of manual test cases.
  • the output module 500 can also be used to prompt to add a certain type of test case when there is a certain type of test case whose coverage is lower than the coverage threshold.
  • test device For the specific definition of the test device, reference may be made to the above definition of the test method, and details are not described herein again.
  • Each of the above test devices may be implemented in whole or in part by software, hardware, and combinations thereof.
  • Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • the above test apparatus can be implemented in the form of a computer readable instruction that can be executed on a computer device as shown in FIG.
  • a computer device which may be a server, and its internal structure diagram may be as shown in FIG.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for operation of an operating system and computer programs in a non-volatile storage medium.
  • the database of the computer device is used to store test results.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection.
  • the computer program is executed by the processor to implement a test method.
  • FIG. 8 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 of the computer device to which the solution of the present application is applied.
  • the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • a computer apparatus comprising a memory, a processor, on which the computer readable instructions are stored, and when the processor executes the computer readable instructions, the following steps are performed: acquiring the constructed test task; An automated test case corresponding to the test task being built; an automated test case is executed according to the built test task; when the automated test case is executed, the manual test case corresponding to the constructed test task is selected; The automated test case selects unexecuted manual test cases from manual test cases and outputs unexecuted manual test cases for manual testing.
  • a computer readable storage medium having stored thereon computer readable instructions, such as the nonvolatile storage medium shown in FIG. 8, wherein the readable instructions are executed by a processor Implement the following steps: obtain the built test task; select the automated test case corresponding to the built test task; execute the automated test case according to the built test task; when the automated test case is completed, select and build The manual test case corresponding to the test task; the unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual test.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • Synchlink DRAM SLDRAM
  • Memory Bus Radbus
  • RDRAM Direct RAM
  • DRAM Direct Memory Bus Dynamic RAM
  • RDRAM Memory Bus Dynamic RAM

Abstract

A test method and apparatus, a computer device, and a readable storage medium. The method comprises: acquiring constructed test tasks; selecting automated test cases that correspond to the constructed test tasks; executing the automated test cases according to the constructed test tasks; when the execution of all the automated test cases is completed, selecting manual test cases corresponding to the constructed test tasks; and selecting an unexecuted manual test case from the manual test cases according to the selected automated test cases, and outputting the unexecuted manual test case for manual testing.

Description

测试方法、装置、计算机设备及可读存储介质Test method, device, computer device and readable storage medium
本申请要求于2017年11月16日提交中国专利局,申请号为2017111365099,申请名称为“测试方法、装置、计算机设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "Test Methods, Apparatus, Computer Equipment, and Readable Storage Media" by the Chinese Patent Office, filed on November 16, 2017, with the application number of 2017111365099, the entire contents of which are incorporated by reference. Combined in this application.
技术领域Technical field
本申请涉及计算机技术领域,特别是涉及一种测试方法、装置、计算机设备及可读存储介质。The present application relates to the field of computer technology, and in particular, to a test method, apparatus, computer device, and readable storage medium.
背景技术Background technique
测试是通过测试工具模拟多种正常、峰值以及异常负载条件来对系统的各项性能指标进行测试。传统上对于系统等的测试均是人工进行测试,即需要人工将测试用例一个一个地输入待测系统中,然后根据待测系统输出的结果来判断测试是否成功,并统计多个测试用例的测试成功的数量,以得到测试成功率,该过程需要人工来一一进行测试,导致测试效率较低。The test is to test various performance indicators of the system by testing various normal, peak and abnormal load conditions. Traditionally, the tests for the system and the like are manually tested, that is, the test cases need to be manually input into the system to be tested one by one, and then the test results are judged according to the output of the system to be tested, and the test of multiple test cases is counted. The number of successes to get the test success rate, the process needs to be tested one by one, resulting in lower test efficiency.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种测试方法、装置、计算机设备及可读存储介质。In accordance with various embodiments disclosed herein, a test method, apparatus, computer apparatus, and readable storage medium are provided.
一种测试方法,所述方法包括:A test method, the method comprising:
获取所构建的测试任务;Get the test task built;
选取与所构建的测试任务对应的自动化测试用例;Select an automated test case that corresponds to the test task being built;
根据所构建的测试任务中执行所述自动化测试用例;Performing the automated test case in accordance with the built test task;
当所述自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;及When the automated test cases are all completed, the manual test cases corresponding to the constructed test tasks are selected; and
根据所选择的自动化测试用例的从所述手工测试用例中选取未执行的手工测试用例,并输出所述未执行的手工测试用例以进行手工测试。An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
一种测试装置,所述装置包括:A test device, the device comprising:
测试任务获取模块,用于获取所构建的测试任务;a test task acquisition module for obtaining a test task constructed;
自动化测试用例选取模块,用于选取与所构建的测试任务对应的自动化测试用例;An automated test case selection module for selecting automated test cases corresponding to the constructed test tasks;
执行模块,用于根据所构建的测试任务中执行所述自动化测试用例;An execution module for executing the automated test case according to the built test task;
手工测试用例选取模块,用于当所述自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;及a manual test case selection module, configured to select a manual test case corresponding to the constructed test task when the automated test cases are all executed; and
输出模块,用于根据所选择的自动化测试用例的从所述手工测试用例中选取未执行的手工测试用例,并输出所述未执行的手工测试用例以进行手工测试。And an output module, configured to select an unexecuted manual test case from the manual test case according to the selected automated test case, and output the unexecuted manual test case for manual test.
一种计算机设备,包括存储器、处理器,所述存储器上存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现以下步骤:A computer device comprising a memory, a processor, on which is stored computer readable instructions, and the processor, when executing the computer readable instructions, implements the following steps:
获取所构建的测试任务;Get the test task built;
选取与所构建的测试任务对应的自动化测试用例;Select an automated test case that corresponds to the test task being built;
根据所构建的测试任务中执行所述自动化测试用例;Performing the automated test case in accordance with the built test task;
当所述自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;及When the automated test cases are all completed, the manual test cases corresponding to the constructed test tasks are selected; and
根据所选择的自动化测试用例的从所述手工测试用例中选取未执行的手工测试用例,并输出所述未执行的手工测试用例以进行手工测试。An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤: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:
获取所构建的测试任务;Get the test task built;
选取与所构建的测试任务对应的自动化测试用例;Select an automated test case that corresponds to the test task being built;
根据所构建的测试任务中执行所述自动化测试用例;Performing the automated test case in accordance with the built test task;
当所述自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;及When the automated test cases are all completed, the manual test cases corresponding to the constructed test tasks are selected; and
根据所选择的自动化测试用例的从所述手工测试用例中选取未执行的手工测试用例,并输出所述未执行的手工测试用例以进行手工测试。An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features and advantages of the present invention will be apparent from the description, drawings and claims.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some embodiments of the present application, Those skilled in the art can also obtain other drawings based on these drawings without any creative work.
图1为一实施例中测试方法的应用环境图;1 is an application environment diagram of a test method in an embodiment;
图2为一实施例中的测试方法的流程图;2 is a flow chart of a test method in an embodiment;
图3为图2所示实施例中的步骤S206的流程图;Figure 3 is a flow chart of step S206 in the embodiment shown in Figure 2;
图4为一实施例中新增测试任务的界面图;4 is an interface diagram of a new test task in an embodiment;
图5为一实施例中所有测试任务的界面图;Figure 5 is an interface diagram of all test tasks in an embodiment;
图6为一实施例中测试结果统计图;6 is a statistical diagram of test results in an embodiment;
图7为一实施例中测试装置的结构示意图;7 is a schematic structural view of a test device in an embodiment;
图8为一实施例中的计算机设备的结构示意图。FIG. 8 is a schematic structural diagram of a computer device in an embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用于解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
在详细说明根据本申请的实施例前,应该注意到的是,所述的实施例主要在于与测试方法、装置、计算机设备及可读存储介质相关的步骤和系统组件的组合。因此,所述系统组件和方法步骤已经在附图中通过常规符号在适当的位置表示出来了,并且只示出了与理解本申请的实施例有关的细节,以免因对于得益于本申请的本领域普通技术人员而言显而易见的那些细节模糊了本申请的公开内容。Before the embodiments in accordance with the present application are described in detail, it should be noted that the described embodiments are primarily a combination of steps and system components associated with test methods, apparatus, computer devices, and readable storage media. Accordingly, the system components and method steps have been shown in the drawings by the conventional symbols in the appropriate positions, and only the details related to the understanding of the embodiments of the present application are shown to avoid the benefit of the present application. Those details apparent to those of ordinary skill in the art obscure the disclosure of the present application.
在本文中,诸如左和右,上和下,前和后,第一和第二之类的关系术语仅仅用来区分一个实体或动作与另一个实体或动作,而不一定要求或暗示这种实体或动作之间的任何实际的这种关系或顺序。术语“包括”、“包含”或任何其他变体旨在涵盖非排他性的包含,由此使得包括一系列要素的过程、方法、物品或者设备不仅包含这些要素,而且还包含没有明确列出的其他要素,或者为这种过程、方法、物品或者设备所固有的要素。In this context, relational terms such as left and right, up and down, before and after, first and second are only used to distinguish one entity or action from another entity or action, without necessarily requiring or implying such Any actual relationship or order between entities or actions. The terms "comprising," "comprising," or "include" or "includes" or "includes" or "includes" or "includes" or "includes" An element, or an element inherent to such a process, method, item, or device.
请参阅图1,图1为一实施例中测试方法的应用环境图,其中包括计算机设备、数据库以及数个执行节点,其中计算机设备用于接收所构建的测试任务,并根据测试任务将测试用例发送到数个执行节点,由执行节点执行测试任务,计算机设备收集执行节点的测试结果,并将测试结果存储在数据库,另外手工测试的测试结果存储在手工测试结果存储系统,例如DPM系统、TESTLINK系统、WIZARD系统或JENKINS系统等,计算机设备可以获取到手工测试结果存储系统中存储的测试结果,并将测试结果存储到数据库,以便于用户查询或生成报表等。Please refer to FIG. 1. FIG. 1 is an application environment diagram of a test method in an embodiment, including a computer device, a database, and a plurality of execution nodes, wherein the computer device is configured to receive the constructed test task, and test the test case according to the test task. Sended to several execution nodes, the execution node performs test tasks, the computer device collects the test results of the execution nodes, and stores the test results in the database, and the test results of the manual test are stored in the manual test result storage system, such as DPM system, TESTLINK The system, the WIZARD system, or the JENKINS system, etc., can obtain the test results stored in the manual test result storage system, and store the test results in a database for the user to query or generate reports.
请参阅图2,在其中一个实施例中,提供一种测试方法,本实施例以该方法应用到上述图1中的计算机设备来举例说明。该计算机设备上运行有测试可读指令,通过该测试可读指令来实施测试方法。该方法具体包括如下步骤:Referring to FIG. 2, in one embodiment, a test method is provided. This embodiment is exemplified by applying the method to the computer device in FIG. 1 above. A test readable instruction is run on the computer device, and the test method is implemented by the test readable instruction. The method specifically includes the following steps:
S202:获取所构建的测试任务。S202: Acquire a test task constructed.
具体地,用户可以在计算机设备上构建测试任务,计算机设备上可以提供自动化测试的操作界面,在该操作界面上可以显示与自动化测试相关的任 务列表、节点列表和统计报表,当用户打开任务列表时,可以在任务列表中增加新的测试任务,或删除已构建的测试任务,或修改已构建的测试任务,例如修改已构建的测试任务的执行节点等。其中节点列表是可以执行测试任务的服务器等。统计报表是用于展示测试任务的测试结果以及测试参数的报表,其可以采用表格方式或其他图像化的方式进行展示。Specifically, the user can build a test task on the computer device, and an operation interface of the automated test can be provided on the computer device, and the task list, the node list, and the statistical report related to the automated test can be displayed on the operation interface, when the user opens the task list. You can add new test tasks to the task list, or delete the built test tasks, or modify the built test tasks, such as modifying the execution nodes of the built test tasks. The node list is a server that can perform test tasks, and the like. A statistical report is a report that shows the test results of a test task and test parameters, which can be displayed in a tabular or other graphical manner.
S204:选取与所构建的测试任务对应的自动化测试用例。S204: Select an automated test case corresponding to the constructed test task.
具体地,当获取到所构建的测试任务时,则获取到与所述测试任务对应的测试用例,例如可以根据所构建的测试任务的测试版本的版本信息选择自动化测试用例,然后再根据测试类型,例如界面类型还是接口类型,从相应版本的自动化测试用例中选择出相应类型的自动化测试用例。可选地,本步骤可以采用定时任务的方式进行,例如可以在获取到所构建的测试任务后,设置定时任务,然后根据定时任务的起始时间再去选取自动化测试用例,从而进行自动化测试,这是因为当测试任务较多时,可能存在优先级较高的测试任务,为此当前所构建的测试任务即不能及时进行,但是可以根据优先级较高的测试任务的可能持续的时间,预设定时任务,从而可以保证在优先级较高的测试任务完成后,可以及时地执行当前测试任务,而不需要人工或机器实时监控优先级较高的测试任务是否已经完成,可以节约人力资源,且计算机设备不需要耗费大量的资源去实时监控优先级较高的测试任务,减少资源的浪费。Specifically, when the built test task is obtained, the test case corresponding to the test task is obtained, for example, the automatic test case may be selected according to the version information of the test version of the built test task, and then according to the test type. For example, interface type or interface type, select the corresponding type of automated test case from the corresponding version of the automated test case. Optionally, the step may be performed by using a timed task. For example, after obtaining the built test task, setting a timed task, and then selecting an automated test case according to the start time of the timed task, thereby performing an automated test. This is because when there are many test tasks, there may be higher-priority test tasks. For this reason, the currently built test tasks cannot be performed in time, but can be preset according to the possible duration of the higher-priority test tasks. The timed task can ensure that the current test task can be executed in time after the higher priority test task is completed, without manual or machine real-time monitoring whether the higher priority test task has been completed, which can save human resources, and Computer equipment does not require a large amount of resources to monitor higher-priority test tasks in real time, reducing waste of resources.
S206:根据所构建的测试任务中执行自动化测试用例。S206: Perform an automated test use case according to the built test task.
具体地,当获取到自动化测试用例后,则执行该自动化测试用例以完成所构建的测试任务。Specifically, when an automated test case is obtained, the automated test case is executed to complete the built test task.
S208:当自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例。S208: When the automated test cases are all completed, the manual test cases corresponding to the constructed test tasks are selected.
具体地,当自动化测试用例均执行完成时,则完成了本次测试任务的自动化测试,由于为了保证测试的正确性,每次测试不仅要涉及自动化测试,还要引入手工测试,因此计算机设备获取到与所构建的测试任务对应的手工测试用例,该手工测试用例也可以存储在手工测试结果存储系统,例如DPM系统、TESTLINK系统、WIZARD系统或JENKINS系统等,计算机设备可以访问这几个系统以获得所有的手工测试用例。Specifically, when the automated test cases are all completed, the automated test of the test task is completed. In order to ensure the correctness of the test, each test involves not only the automated test but also the manual test, so the computer device obtains To the manual test case corresponding to the test task being built, the manual test case can also be stored in a manual test result storage system, such as a DPM system, a TESTLINK system, a WIZARD system, or a JENKINS system, etc., and the computer device can access these systems. Get all the manual test cases.
S210:根据所选择的自动化测试用例的从手工测试用例中选取未执行的手工测试用例,并输出未执行的手工测试用例以进行手工测试。S210: Select an unexecuted manual test case from the manual test case according to the selected automated test case, and output an unexecuted manual test case for manual test.
具体地,自动化测试用例集是手工测试用例集的子集,所有的自动化测试用例都是手工测试用例,当自动化测试用例已经执行完成时,则不再需要再次执行该自动化测试用例,仅需要执行未执行的手工测试用例,因此计算 机设备输出未执行的手工测试用例,由用户手动执行该些手工测试用例。Specifically, the automated test case set is a subset of the manual test case set. All automated test cases are manual test cases. When the automated test case has been executed, the automated test case is no longer needed to be executed again. The manual test case is not executed, so the computer device outputs the unexecuted manual test case, and the manual test case is manually executed by the user.
上述测试方法,首先选取与所构建的测试任务对应的自动化测试用例,然后执行该自动化测试用例,然后选取与所构建的测试任务对应的手工测试用例,并根据已经执行的自动化测试用例,从手工测试用例中选取未执行的手工测试用例,可以大大减少手工测试的数量,从而提高测试效率,且由于自动化测试对测试脚本的质量的依赖性较大,测试脚本质量差,则会导致测试结果不可靠,本技术方案中还引入了手工测试,即测试过程中并未完全依赖于自动化测试,保证了测试结果的可靠性。The above test method first selects an automated test case corresponding to the constructed test task, then executes the automated test case, and then selects a manual test case corresponding to the constructed test task, and according to the automated test case that has been executed, from the manual Selecting unexecuted manual test cases from the test cases can greatly reduce the number of manual tests, thereby improving the test efficiency. Because the quality of the test scripts is highly dependent on the quality of the test scripts and the test scripts are of poor quality, the test results will not be Reliable, the manual solution is also introduced in the technical solution, that is, the test process is not completely dependent on the automatic test, and the reliability of the test result is guaranteed.
在其中一个实施例中,参阅图3,图3为图2所示实施例中的步骤S206的流程图,该步骤S206,即根据所构建的测试任务中执行自动化测试用例的步骤可以包括:In one embodiment, referring to FIG. 3, FIG. 3 is a flowchart of step S206 in the embodiment shown in FIG. 2, which may include: performing steps of performing an automated test case according to the constructed test task:
S302:根据所构建的测试任务从执行节点中选取在线的空闲节点。S302: Select an online idle node from the execution node according to the constructed test task.
具体地,参阅图4和图5,图4为一实施例中新增测试任务的界面图,图5为一实施例中所有测试任务的界面图,在图4中,新增测试任务时可以选取执行节点,该执行节点的选取首先要与所构建的测试任务相匹配,其次该执行节点要在线。其中执行节点与所构建的测试任务相匹配要求执行节点要安装有与所述测试任务对应的测试系统或者测试框架等,可选地,可以设置一表格,其中表格中包括执行节点的节点标识以及执行节点中所安装的测试系统或测试框架等,执行节点的节点标识可以为执行节点的MAC地址等可以唯一标识该执行节点的属性,执行节点所安装的测试系统或测试框架等可以采用关键字或标签的方式进行标识,以便于查询。在图5中给出了多个测试任务,该些测试任务已经执行完成,且仍可以在执行节点列显示该执行节点的状态,例如在线或离线等,以便于用户可以再次执行一遍测试任务。Specifically, referring to FIG. 4 and FIG. 5, FIG. 4 is an interface diagram of a new test task in an embodiment, and FIG. 5 is an interface diagram of all test tasks in an embodiment. In FIG. 4, when a test task is added, The execution node is selected, and the selection of the execution node first needs to match the constructed test task, and secondly, the execution node is to be online. The execution node is matched with the built test task, and the execution node is required to install a test system or a test framework corresponding to the test task. Optionally, a table may be set, where the table includes a node identifier of the execution node and Execute the test system or test framework installed in the node. The node identifier of the execution node may be the MAC address of the execution node, etc., which can uniquely identify the attributes of the execution node. The test system or test framework installed by the execution node may use keywords. Or label the way to identify, in order to facilitate the query. In Fig. 5, a plurality of test tasks are given, which have been executed, and the status of the execution node, such as online or offline, can still be displayed in the execution node column, so that the user can perform the test task again.
S304:当执行节点中不存在在线的空闲节点时,则从执行节点中选取最大连接数大于等于二且当前连接数小于最大连接数的执行节点。S304: When there is no online idle node in the execution node, the execution node that selects the maximum number of connections is greater than or equal to two and the current number of connections is less than the maximum number of connections.
具体地,当执行节点中不存在在线的空闲节点时,由于需要执行当前测试,且每一执行节点可以同时进行多个测试任务,因此可以选取最大连接数大于等于2,且当前连接数小于最大连接数的执行节点,这样可以保证有限的执行节点执行的测试任务量较多,从而提高执行节点的利用率等。具体地,假设存在A、B、C三个节点;若A节点的最大连接数为1,B节点的最大连接数为3,且当前已连接2个测试任务,C节点的最大连接数为3。当计算机设备在执行测试任务时,需要选择执行节点,若C节点不在线,则只能从A节点和B节点中选择节点;假设A节点在线且空闲,则直接选择A节点作为执行节点,若A节点在线但未处于空闲状态,则需要从其他节点中选择,此时B节点的最大连接数为3,大于其当前已连接的测试任务数,因此选择C 节点作为当前测试任务的执行节点。若可选择的当前测试任务的执行节点数大于等于2,则以列表方式输出至界面,由用户选择其中一个节点作为当前测试任务的执行节点。Specifically, when there is no online idle node in the execution node, since the current test needs to be performed, and each execution node can perform multiple test tasks at the same time, the maximum connection number can be selected to be greater than or equal to 2, and the current connection number is less than the maximum. The number of execution nodes of the connection, so as to ensure that a limited number of execution nodes perform a large number of test tasks, thereby improving the utilization rate of the execution nodes. Specifically, it is assumed that there are three nodes A, B, and C; if the maximum number of connections of the A node is 1, the maximum number of connections of the B node is 3, and two test tasks are currently connected, and the maximum number of connections of the C node is 3. . When the computer device is performing the test task, the execution node needs to be selected. If the C node is not online, the node can only be selected from the A node and the B node; if the A node is online and idle, the A node is directly selected as the execution node. If the A node is online but not in the idle state, it needs to be selected from other nodes. In this case, the maximum number of connections of the B node is 3, which is greater than the number of test tasks that it is currently connected to. Therefore, the C node is selected as the execution node of the current test task. If the number of execution nodes of the currently selected test task is greater than or equal to 2, it is output to the interface in a list manner, and the user selects one of the nodes as the execution node of the current test task.
S306:将自动化测试用例发送至所选取的执行节点中,并执行自动化测试用例。S306: Send the automated test case to the selected execution node and execute the automated test case.
具体地,将自动化测试用例发送到所选取的执行节点中,执行节点调用相应的脚本执行自动化测试用例,以进行自动化测试。Specifically, the automated test case is sent to the selected execution node, and the execution node invokes the corresponding script to execute the automated test case for automated testing.
在上述实施例中,选取执行节点时,充分考虑到执行节点的当前状态以及执行节点的最大连接数,可以充分利用执行节点的资源,提高测试的效率。In the above embodiment, when the execution node is selected, the current state of the execution node and the maximum number of connections of the execution node are fully considered, and the resources of the execution node can be fully utilized to improve the efficiency of the test.
在其中一个实施例中,该测试方法还可以包括获取执行结果为成功的自动化测试用例的第一数量;从手工测试结果存储系统中获取执行结果为成功的手工测试用例的第二数量;根据第一数量、第二数量以及与所构建的测试任务对应的手工用例的数量计算得到所构建的测试任务的测试成功率;当测试成功率低于预设值时,则输出测试失败的结果。In one embodiment, the testing method may further include obtaining a first quantity of the automated test case whose execution result is successful; obtaining a second quantity of the manual test case whose execution result is successful from the manual test result storage system; A number, a second quantity, and a number of manual use cases corresponding to the constructed test task are calculated to obtain a test success rate of the constructed test task; when the test success rate is lower than a preset value, the result of the test failure is output.
具体地,该测试方法还需要统计测试成功率,如图6,图6为一实施例中的测试报表的示意图,其中包括系统名称、任务类型、构建时间、持续时间、手工用例数、自动化执行数、自动化覆盖率、成功数和失败数等,其中系统名称即所构建的测试任务对应的系统的系统名称,任务类型包括接口测试和界面测试等,构建时间为测试任务建立的时间,持续时间为执行自动化测试用例所使用的时间,手工用例数即总的测试用例的个数,自动化执行数即自动化测试用例的个数,自动化测试覆盖率即自动化测试用例数与手工测试用例数的比值,成功数即自动化测试用例中执行结果为成功的第一数量与手工测试用例中执行结果为成功的第二数量的和,失败数则是手工用例数减去第一数量和第二数量,成功率则是第一数量和第二数量的和与手工用例数的比值。其中当成功率低于预设值时,则认为测试失败,因此可以输出测试失败的结果以提示用户,例如可以给用户发送短信、微信或者发送邮件、打电话等,也可以直接输出至界面,以提示用户。Specifically, the test method also needs to calculate the test success rate, as shown in FIG. 6. FIG. 6 is a schematic diagram of a test report in an embodiment, including a system name, a task type, a build time, a duration, a manual use case, and an automatic execution. Number, automatic coverage, success number, and number of failures, etc., where the system name is the system name of the system corresponding to the test task being built, and the task type includes interface test and interface test, etc. The build time is the time and duration of the test task establishment. The time used to execute the automated test case, the number of manual use cases is the total number of test cases, the number of automated executions is the number of automated test cases, and the automated test coverage is the ratio of the number of automated test cases to the number of manual test cases. The success number is the first number of successful executions in the automated test case and the second number of successes in the manual test case. The number of failures is the number of manual cases minus the first quantity and the second quantity. Then is the ratio of the sum of the first quantity and the second quantity to the number of manual use cases. When the success rate is lower than the preset value, the test is considered to be failed, so the result of the test failure may be output to prompt the user, for example, the user may send a short message, a WeChat or send an email, make a call, etc., or directly output to the interface, The user is prompted.
其中第一数量是自动化测试的结果可以直接从执行节点获取,第二数量可能存在不同的手工测试结果存储系统中,因此需要从不同的手工测试结果存储系统中获取,在该实施例中通过配置不同的接口对接不同的手工测试结果存储系统,并配置不同的模板以适配不同的手工测试结果存储系统,从而可以直接从不同的手工测试结果存储系统中获取到测试结果,从统计手工测试用例的执行结果为成功的第二数量以便于后续计算测试成功率。The first quantity is the result of the automated test, which can be obtained directly from the execution node. The second quantity may exist in different manual test result storage systems, and therefore needs to be obtained from different manual test result storage systems, and is configured in this embodiment. Different interfaces are connected to different manual test result storage systems, and different templates are configured to adapt to different manual test result storage systems, so that test results can be obtained directly from different manual test result storage systems, from statistical manual test cases. The result of the execution is the second number of successes to facilitate subsequent calculation of the test success rate.
上述实施例中,获取执行结果为成功的自动化测试用例的第一数量;从手工测试结果存储系统中获取执行结果为成功的手工测试用例的第二数量, 根据第一数量、第二数量以及与所构建的测试任务对应的手工用例的数量计算得到所构建的测试任务的测试成功率,操作简单可靠。In the above embodiment, the first quantity of the automated test case whose execution result is successful is obtained; and the second quantity of the manual test case whose execution result is successful is obtained from the manual test result storage system, according to the first quantity, the second quantity, and The number of manual use cases corresponding to the test task is calculated to obtain the test success rate of the constructed test task, and the operation is simple and reliable.
在其中一个实施例中,该测试方法还可以包括:当测试成功率不低于预设值时,则获取与所构建的测试任务相关联的历史测试任务;当测试成功率低于历史测试任务的测试成功率时,则提示测试失败的结果。In one embodiment, the testing method may further include: when the test success rate is not lower than the preset value, acquiring a historical test task associated with the constructed test task; when the test success rate is lower than the historical test task When the test success rate is successful, the result of the test failure is indicated.
具体地,计算机设备还可以获取历史版本的自动化测试成功率,并计算当前版本的自动化测试成功率,当当前版本的自动化测试成功率小于历史版本的自动化测试成功率的时候,则提示本次自动化测试存在问题,由于版本每次都是在升级的过程中,所以测试成功率应该越来越高,如果测试成功率低于历史测试成功率,则任务版本升级失败,测试失败。同样的同一版本的前后几次测试,后一次测试的成功率也应当高与前边测试的成功率,如果低时,则输出测试失败的结果。Specifically, the computer device can also obtain the automatic test success rate of the historical version, and calculate the automatic test success rate of the current version. When the current version of the automated test success rate is less than the historical version of the automated test success rate, the current automation is prompted. There is a problem with the test. Since the version is in the process of upgrading each time, the test success rate should be higher and higher. If the test success rate is lower than the historical test success rate, the task version upgrade fails and the test fails. The same test version of the same version before and after, the success rate of the latter test should also be higher than the success rate of the previous test, if it is low, the result of the test failure.
上述实施例中,结合历史版本的测试成功率来判断当前版本的测试是否成功,加强了版本之间的联系,提高了测试的准确性。In the above embodiment, the test success rate of the historical version is combined to determine whether the test of the current version is successful, the relationship between the versions is strengthened, and the accuracy of the test is improved.
在其中一个实施例中,该测试方法还可以包括:统计自动化测试用例中所有类型的测试用例的个数;根据自动化测试用例中所有类型的测试用例的个数以及手工测试用例的个数计算各个类型的测试用例的覆盖率;当存在某一类型的测试用例的覆盖率低于覆盖率阈值时,则提示增加某一类型的测试用例。In one embodiment, the testing method may further include: counting the number of all types of test cases in the automated test case; calculating each number according to the number of all types of test cases in the automated test case and the number of manual test cases The coverage of a type of test case; when there is a coverage type of a test case whose coverage is lower than the coverage threshold, it prompts to increase a certain type of test case.
具体地,参阅图6,图6为一实施例中测试结果统计图,其中可以包括版本构建曲线图、版本成功率统计图、用例覆盖率统计图以及用例类型分布图。其中版本构建曲线图的横坐标为构建版本的版本号,纵坐标为构建成功率,不同的折线可以标识不同的项目,计算机设备自动统计各个项目的各个版本的成功率并显示,不需要人工去统计数据,大大提高了效率。版本成功率统计图可以使用饼形图,其中总的自动化测试用例数为分母,执行成功的自动化测试用率数、执行失败的自动化测试用例数和未执行的自动化测试用例数为分子。用例覆盖率统计图中手工用例数为分母,各个类型的测试用率的个数为分子,例如接口测试用例个数和界面测试用例个数,当存在某一类型的测试用例的覆盖率低于覆盖率阈值时,则提示增加某一类型的测试用例,这样可以保证测试用例的充足性,从而提高测试的准确性。用例类型分布图可以为饼图。Specifically, referring to FIG. 6, FIG. 6 is a statistical diagram of test results in an embodiment, which may include a version build graph, a version success rate graph, a use case coverage graph, and a use case type map. The abscissa of the version build graph is the version number of the build version, the ordinate is the build success rate, different fold lines can identify different items, and the computer device automatically counts the success rate of each version of each item and displays it, without manual intervention. Statistical data has greatly improved efficiency. The version success rate chart can use a pie chart in which the total number of automated test cases is the denominator, the number of successful automated test runs, the number of automated test cases that failed to execute, and the number of unexecuted automated test cases are numerators. The number of manual use cases in the use case coverage chart is the denominator. The number of test rates for each type is numerator, such as the number of interface test cases and the number of interface test cases. When there is a certain type of test case, the coverage is lower than that. When the coverage threshold is used, it prompts to increase a certain type of test case, which can ensure the sufficiency of the test case and improve the accuracy of the test. The use case type map can be a pie chart.
上述实施例中,统计自动化测试用例中所有类型的测试用例的个数;根据自动化测试用例中所有类型的测试用例的个数以及手工测试用例的个数计算各个类型的测试用例的覆盖率;当存在某一类型的测试用例的覆盖率低于覆盖率阈值时,则提示增加某一类型的测试用例,这样可以保证测试用例的 充足性,从而提高测试的准确性。In the above embodiment, the number of all types of test cases in the automated test case is counted; the coverage of each type of test case is calculated according to the number of all types of test cases in the automated test case and the number of manual test cases; When the coverage of a certain type of test case is lower than the coverage threshold, it prompts to increase a certain type of test case, which can ensure the sufficiency of the test case and improve the accuracy of the test.
图2和图3为本申请一个实施例的方法的流程示意图。应该理解的是,虽然图2和图3的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图2和图3中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。2 and 3 are schematic flowcharts of a method according to an embodiment of the present application. It should be understood that although the various steps in the flowcharts of FIGS. 2 and 3 are sequentially displayed in accordance with the indication of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and may be performed in other sequences. Moreover, at least some of the steps in FIGS. 2 and 3 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, and the execution order thereof is also It is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
参阅图7,图7为一实施例中测试装置的结构示意图,该测试装置包括:Referring to FIG. 7, FIG. 7 is a schematic structural diagram of a testing device in an embodiment, where the testing device includes:
测试任务获取模块100,用于获取所构建的测试任务。The test task acquisition module 100 is configured to acquire the constructed test task.
自动化测试用例选取模块200,用于选取与所构建的测试任务对应的自动化测试用例。The automated test case selection module 200 is configured to select an automated test case corresponding to the constructed test task.
执行模块300,用于根据所构建的测试任务中执行自动化测试用例。The execution module 300 is configured to execute an automated test case according to the built test task.
手工测试用例选取模块400,用于当自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例。The manual test case selection module 400 is configured to select a manual test case corresponding to the constructed test task when the automated test cases are all executed.
输出模块500,用于根据所选择的自动化测试用例的从手工测试用例中选取未执行的手工测试用例,并输出未执行的手工测试用例以进行手工测试。The output module 500 is configured to select an unexecuted manual test case from the manual test case according to the selected automated test case, and output an unexecuted manual test case for manual testing.
在其中一个实施例中,执行模块300可以包括:In one embodiment, the execution module 300 can include:
第一节点选取单元,用于根据所构建的测试任务从执行节点中选取在线的空闲节点。The first node selection unit is configured to select an online idle node from the execution node according to the constructed test task.
第二节点选取单元,用于当执行节点中不存在在线的空闲节点时,则从执行节点中选取最大连接数大于等于二且当前连接数小于最大连接数的节点。The second node selection unit is configured to: when there is no online idle node in the execution node, select, from the execution node, a node whose maximum connection number is greater than or equal to two and the current connection number is less than the maximum connection number.
执行单元,用于将自动化测试用例发送至所选取的节点中,并执行自动化测试用例。An execution unit that sends automated test cases to selected nodes and executes automated test cases.
在其中一个实施例中,该测试装置还可以包括:In one embodiment, the testing device may further include:
第一测试结果获取单元,用于获取执行结果为成功的自动化测试用例的第一数量。The first test result obtaining unit is configured to obtain the first quantity of the automated test case whose execution result is successful.
第二测试结果获取单元,用于从手工测试结果存储系统中获取执行结果为成功的手工测试用例的第二数量。The second test result obtaining unit is configured to obtain, from the manual test result storage system, a second quantity of the manual test case whose execution result is successful.
计算单元,用于根据第一数量、第二数量以及与所构建的测试任务对应的手工用例的数量计算得到所构建的测试任务的测试成功率。The calculating unit is configured to calculate a test success rate of the constructed test task according to the first quantity, the second quantity, and the number of manual use cases corresponding to the constructed test task.
第一输出单元,用于当测试成功率低于预设值时,则输出测试失败的结果。The first output unit is configured to output a result of the test failure when the test success rate is lower than a preset value.
在其中一个实施例中,该测试装置还可以包括:In one embodiment, the testing device may further include:
历史测试任务获取模块,用于当测试成功率不低于预设值时,则获取与所构建的测试任务相关联的历史测试任务。The historical test task acquisition module is configured to acquire a historical test task associated with the constructed test task when the test success rate is not lower than a preset value.
输出模块500还可以用于当测试成功率低于历史测试任务的测试成功率时,则提示测试失败的结果。The output module 500 can also be used to indicate the result of the test failure when the test success rate is lower than the test success rate of the historical test task.
在其中一个实施例中,该测试装置还可以包括:In one embodiment, the testing device may further include:
统计模块,用于统计自动化测试用例中所有类型的测试用例的数量。A statistical module that counts the number of all types of test cases in an automated test case.
覆盖率计算模块,用于根据自动化测试用例中所有类型的测试用例的数量以及手工测试用例的数量计算各个类型的测试用例的覆盖率。Coverage calculation module for calculating the coverage of each type of test case based on the number of all types of test cases in the automated test case and the number of manual test cases.
输出模块500还可以用于当存在某一类型的测试用例的覆盖率低于覆盖率阈值时,则提示增加某一类型的测试用例。The output module 500 can also be used to prompt to add a certain type of test case when there is a certain type of test case whose coverage is lower than the coverage threshold.
关于测试装置的具体限定可以参见上文中对于测试方法的限定,在此不再赘述。上述测试装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。上述测试装置可以实现为一种计算机可读指令的形式,计算机可读指令可在如图1所示的计算机设备上运行。For the specific definition of the test device, reference may be made to the above definition of the test method, and details are not described herein again. Each of the above test devices may be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like. The above test apparatus can be implemented in the form of a computer readable instruction that can be executed on a computer device as shown in FIG.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储测试结果。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种测试方法。In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG. The computer device includes a processor, memory, network interface, and database connected by a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for operation of an operating system and computer programs in a non-volatile storage medium. The database of the computer device is used to store test results. The network interface of the computer device is used to communicate with an external terminal via a network connection. The computer program is executed by the processor to implement a test method.
本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。It will be understood by those skilled in the art that the structure shown in FIG. 8 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 of the computer device to which the solution of the present application is applied. The specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器,所述存储器上存储有计算机可读指令,处理器执行计算机可读指令时实现以下步骤:获取所构建的测试任务;选取与所构建的测试任务对应的自动化测试用例;根据所构建的测试任务中执行自动化测试用例;当自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;根据所选择的 自动化测试用例的从手工测试用例中选取未执行的手工测试用例,并输出未执行的手工测试用例以进行手工测试。In one embodiment, a computer apparatus is provided, comprising a memory, a processor, on which the computer readable instructions are stored, and when the processor executes the computer readable instructions, the following steps are performed: acquiring the constructed test task; An automated test case corresponding to the test task being built; an automated test case is executed according to the built test task; when the automated test case is executed, the manual test case corresponding to the constructed test task is selected; The automated test case selects unexecuted manual test cases from manual test cases and outputs unexecuted manual test cases for manual testing.
请继续参阅图8,还提供一种计算机可读存储介质,其上存储有计算机可读指令,如图8中所示的非易失性存储介质,其中,该可读指令被处理器执行时实现以下步骤:获取所构建的测试任务;选取与所构建的测试任务对应的自动化测试用例;根据所构建的测试任务中执行自动化测试用例;当自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;根据所选择的自动化测试用例的从手工测试用例中选取未执行的手工测试用例,并输出未执行的手工测试用例以进行手工测试。With continued reference to FIG. 8, there is also provided a computer readable storage medium having stored thereon computer readable instructions, such as the nonvolatile storage medium shown in FIG. 8, wherein the readable instructions are executed by a processor Implement the following steps: obtain the built test task; select the automated test case corresponding to the built test task; execute the automated test case according to the built test task; when the automated test case is completed, select and build The manual test case corresponding to the test task; the unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual test.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(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)等。A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by computer readable instructions, which can be stored in a non-transitory computer. In the storage medium, the computer readable instructions, when executed, may include the flow of an embodiment of the methods described above. Any reference to a memory, storage, database or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain. Synchlink DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.

Claims (20)

  1. 一种测试方法,所述方法包括:A test method, the method comprising:
    获取所构建的测试任务;Get the test task built;
    选取与所构建的测试任务对应的自动化测试用例;Select an automated test case that corresponds to the test task being built;
    根据所构建的测试任务中执行所述自动化测试用例;Performing the automated test case in accordance with the built test task;
    当所述自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;及When the automated test cases are all completed, the manual test cases corresponding to the constructed test tasks are selected; and
    根据所选择的自动化测试用例的从所述手工测试用例中选取未执行的手工测试用例,并输出所述未执行的手工测试用例以进行手工测试。An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所构建的测试任务中执行所述自动化测试用例的步骤,包括:The method of claim 1 wherein said step of executing said automated test case in accordance with said constructed test task comprises:
    根据所构建的测试任务从执行节点中选取在线的空闲节点;Selecting an online idle node from the execution node according to the constructed test task;
    当所述执行节点中不存在在线的空闲节点时,则从所述执行节点中选取最大连接数大于等于二且当前连接数小于所述最大连接数的执行节点;及When there is no online idle node in the execution node, selecting an execution node that has a maximum number of connections greater than or equal to two and a current connection number is less than the maximum number of connections; and
    将所述自动化测试用例发送至所选取的执行节点中,并执行所述自动化测试用例。The automated test case is sent to the selected execution node and the automated test case is executed.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    获取执行结果为成功的自动化测试用例的第一数量;Get the first number of automated test cases with successful execution results;
    从手工测试结果存储系统中获取执行结果为成功的手工测试用例的第二数量;Obtaining a second number of successful manual test cases from the manual test result storage system;
    根据所述第一数量、所述第二数量以及与所构建的测试任务对应的所述手工用例的数量计算得到所构建的测试任务的测试成功率;及Calculating a test success rate of the constructed test task according to the first quantity, the second quantity, and the number of the manual use cases corresponding to the constructed test task; and
    当所述测试成功率低于预设值时,则输出测试失败的结果。When the test success rate is lower than the preset value, the result of the test failure is output.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, wherein the method further comprises:
    当所述测试成功率不低于所述预设值时,则获取与所构建的测试任务相关联的历史测试任务;及When the test success rate is not lower than the preset value, acquiring a historical test task associated with the constructed test task; and
    当所述测试成功率低于所述历史测试任务的测试成功率时,则提示测试失败的结果。When the test success rate is lower than the test success rate of the historical test task, the result of the test failure is prompted.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    统计所述自动化测试用例中所有类型的测试用例的数量;Counting the number of all types of test cases in the automated test case;
    根据所述自动化测试用例中所有类型的测试用例的数量以及所述手工测试用例的数量计算各个类型的测试用例的覆盖率;及Calculating the coverage of each type of test case according to the number of all types of test cases in the automated test case and the number of the manual test cases; and
    当存在某一类型的测试用例的覆盖率低于覆盖率阈值时,则提示增加所述某一类型的测试用例。When there is a coverage type of a test case whose coverage is lower than the coverage threshold, it is prompted to increase the test case of the certain type.
  6. 一种测试装置,其特征在于,所述装置包括:A testing device, characterized in that the device comprises:
    测试任务获取模块,用于获取所构建的测试任务;a test task acquisition module for obtaining a test task constructed;
    自动化测试用例选取模块,用于选取与所构建的测试任务对应的自动化测试用例;An automated test case selection module for selecting automated test cases corresponding to the constructed test tasks;
    执行模块,用于根据所构建的测试任务中执行所述自动化测试用例;An execution module for executing the automated test case according to the built test task;
    手工测试用例选取模块,用于当所述自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;及a manual test case selection module, configured to select a manual test case corresponding to the constructed test task when the automated test cases are all executed; and
    输出模块,用于根据所选择的自动化测试用例的从所述手工测试用例中选取未执行的手工测试用例,并输出所述未执行的手工测试用例以进行手工测试。And an output module, configured to select an unexecuted manual test case from the manual test case according to the selected automated test case, and output the unexecuted manual test case for manual test.
  7. 根据权利要求6所述的装置,其特征在于,所述执行模块包括:The apparatus according to claim 6, wherein the execution module comprises:
    第一节点选取单元,用于根据所构建的测试任务从执行节点中选取在线的空闲节点;a first node selection unit, configured to select an online idle node from the execution node according to the constructed test task;
    第二节点选取单元,用于当所述执行节点中不存在在线的空闲节点时,则从所述执行节点中选取最大连接数大于等于二且当前连接数小于所述最大连接数的节点;及a second node selection unit, configured to: when there is no online idle node in the execution node, select, from the execution node, a node whose maximum connection number is greater than or equal to two and the current connection number is less than the maximum connection number; and
    执行单元,用于将所述自动化测试用例发送至所选取的节点中,并执行所述自动化测试用例。An execution unit for transmitting the automated test case to the selected node and executing the automated test case.
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:The device according to claim 6, wherein the device further comprises:
    第一测试结果获取单元,用于获取执行结果为成功的自动化测试用例的第一数量;a first test result obtaining unit, configured to obtain a first quantity of the automated test case in which the execution result is successful;
    第二测试结果获取单元,用于从手工测试结果存储系统中获取执行结果为成功的手工测试用例的第二数量;a second test result obtaining unit, configured to obtain, from the manual test result storage system, a second quantity of the manual test case whose execution result is successful;
    计算单元,用于根据所述第一数量、所述第二数量以及与所构建的测试任务对应的所述手工用例的数量计算得到所构建的测试任务的测试成功率;及a calculating unit, configured to calculate, according to the first quantity, the second quantity, and the number of the manual use cases corresponding to the constructed test task, a test success rate of the constructed test task; and
    输出单元,用于当所述测试成功率低于预设值时,则输出测试失败的结果。And an output unit, configured to output a result of the test failure when the test success rate is lower than a preset value.
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The device according to claim 8, wherein the device further comprises:
    历史测试任务获取模块,用于当所述测试成功率不低于所述预设值时,则获取与所构建的测试任务相关联的历史测试任务;及a history test task obtaining module, configured to acquire a historical test task associated with the constructed test task when the test success rate is not lower than the preset value; and
    所述输出模块还用于当所述测试成功率低于所述历史测试任务的测试成功率时,则提示测试失败的结果。The output module is further configured to prompt the result of the test failure when the test success rate is lower than the test success rate of the historical test task.
  10. 根据权利要求6所述的装置,其特征在于,所述装置还包括:The device according to claim 6, wherein the device further comprises:
    统计模块,用于统计所述自动化测试用例中所有类型的测试用例的数量;a statistics module for counting the number of all types of test cases in the automated test case;
    覆盖率计算模块,用于根据所述自动化测试用例中所有类型的测试用例 的数量以及所述手工测试用例的数量计算各个类型的测试用例的覆盖率;及a coverage calculation module, configured to calculate coverage of each type of test case according to the number of all types of test cases in the automated test case and the number of the manual test cases; and
    所述输出模块还用于当存在某一类型的测试用例的覆盖率低于覆盖率阈值时,则提示增加所述某一类型的测试用例。The output module is further configured to prompt to increase the test case of the certain type when there is a coverage of a certain type of test case below a coverage threshold.
  11. 一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现以下步骤:A computer device comprising a memory, a processor, and computer readable instructions stored on the memory and executable on the processor, wherein the processor, when executing the computer readable instructions, implements the following steps:
    获取所构建的测试任务;Get the test task built;
    选取与所构建的测试任务对应的自动化测试用例;Select an automated test case that corresponds to the test task being built;
    根据所构建的测试任务中执行所述自动化测试用例;Performing the automated test case in accordance with the built test task;
    当所述自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;及When the automated test cases are all completed, the manual test cases corresponding to the constructed test tasks are selected; and
    根据所选择的自动化测试用例的从所述手工测试用例中选取未执行的手工测试用例,并输出所述未执行的手工测试用例以进行手工测试。An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
  12. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述根据所构建的测试任务中执行所述自动化测试用例的步骤,包括:The computer device according to claim 11, wherein the step of executing the automated test case according to the constructed test task implemented by the processor when the computer readable instructions are executed comprises:
    根据所构建的测试任务从执行节点中选取在线的空闲节点;Selecting an online idle node from the execution node according to the constructed test task;
    当所述执行节点中不存在在线的空闲节点时,则从所述执行节点中选取最大连接数大于等于二且当前连接数小于所述最大连接数的执行节点;及When there is no online idle node in the execution node, selecting an execution node that has a maximum number of connections greater than or equal to two and a current connection number is less than the maximum number of connections; and
    将所述自动化测试用例发送至所选取的执行节点中,并执行所述自动化测试用例。The automated test case is sent to the selected execution node and the automated test case is executed.
  13. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还实现以下步骤:The computer apparatus according to claim 11, wherein said processor further implements the following steps when said computer readable instructions are executed:
    获取执行结果为成功的自动化测试用例的第一数量;Get the first number of automated test cases with successful execution results;
    从手工测试结果存储系统中获取执行结果为成功的手工测试用例的第二数量;及Obtaining a second number of successful manual test cases from the manual test result storage system; and
    根据所述第一数量、所述第二数量以及与所构建的测试任务对应的所述手工用例的数量计算得到所构建的测试任务的测试成功率;Calculating a test success rate of the constructed test task according to the first quantity, the second quantity, and the number of the manual use cases corresponding to the constructed test task;
    当所述测试成功率低于预设值时,则输出测试失败的结果。When the test success rate is lower than the preset value, the result of the test failure is output.
  14. 根据权利要求13所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还实现以下步骤:The computer apparatus according to claim 13, wherein said processor further implements the following steps when said computer readable instructions are executed:
    当所述测试成功率不低于所述预设值时,则获取与所构建的测试任务相关联的历史测试任务;及When the test success rate is not lower than the preset value, acquiring a historical test task associated with the constructed test task; and
    当所述测试成功率低于所述历史测试任务的测试成功率时,则提示测试失败的结果。When the test success rate is lower than the test success rate of the historical test task, the result of the test failure is prompted.
  15. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还实现以下步骤:The computer apparatus according to claim 11, wherein said processor further implements the following steps when said computer readable instructions are executed:
    统计所述自动化测试用例中所有类型的测试用例的数量;Counting the number of all types of test cases in the automated test case;
    根据所述自动化测试用例中所有类型的测试用例的数量以及所述手工测试用例的数量计算各个类型的测试用例的覆盖率;及Calculating the coverage of each type of test case according to the number of all types of test cases in the automated test case and the number of the manual test cases; and
    当存在某一类型的测试用例的覆盖率低于覆盖率阈值时,则提示增加所述某一类型的测试用例。When there is a coverage type of a test case whose coverage is lower than the coverage threshold, it is prompted to increase the test case of the certain type.
  16. 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more computer readable non-volatile storage media storing computer readable instructions, wherein when the computer readable instructions are executed by one or more processors, cause one or more processors to perform the following step:
    获取所构建的测试任务;Get the test task built;
    选取与所构建的测试任务对应的自动化测试用例;Select an automated test case that corresponds to the test task being built;
    根据所构建的测试任务中执行所述自动化测试用例;Performing the automated test case in accordance with the built test task;
    当所述自动化测试用例均执行完成时,则选取与所构建的测试任务对应的手工测试用例;及When the automated test cases are all completed, the manual test cases corresponding to the constructed test tasks are selected; and
    根据所选择的自动化测试用例的从所述手工测试用例中选取未执行的手工测试用例,并输出所述未执行的手工测试用例以进行手工测试。An unexecuted manual test case is selected from the manual test case according to the selected automated test case, and the unexecuted manual test case is output for manual testing.
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行的所述根据所构建的测试任务中执行所述自动化测试用例的步骤,包括:A storage medium according to claim 16 wherein said computer readable instructions are executed by one or more processors such that said one or more processors execute said executions in accordance with said constructed test tasks The steps of an automated test case include:
    根据所构建的测试任务从执行节点中选取在线的空闲节点;Selecting an online idle node from the execution node according to the constructed test task;
    当所述执行节点中不存在在线的空闲节点时,则从所述执行节点中选取最大连接数大于等于二且当前连接数小于所述最大连接数的执行节点;及When there is no online idle node in the execution node, selecting an execution node that has a maximum number of connections greater than or equal to two and a current connection number is less than the maximum number of connections; and
    将所述自动化测试用例发送至所选取的执行节点中,并执行所述自动化测试用例。The automated test case is sent to the selected execution node and the automated test case is executed.
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,还使得一个或多个处理器执行以下步骤:The storage medium of claim 16 wherein when said computer readable instructions are executed by one or more processors, the one or more processors further cause the following steps:
    获取执行结果为成功的自动化测试用例的第一数量;Get the first number of automated test cases with successful execution results;
    从手工测试结果存储系统中获取执行结果为成功的手工测试用例的第二数量;Obtaining a second number of successful manual test cases from the manual test result storage system;
    根据所述第一数量、所述第二数量以及与所构建的测试任务对应的所述手工用例的数量计算得到所构建的测试任务的测试成功率;及Calculating a test success rate of the constructed test task according to the first quantity, the second quantity, and the number of the manual use cases corresponding to the constructed test task; and
    当所述测试成功率低于预设值时,则输出测试失败的结果。When the test success rate is lower than the preset value, the result of the test failure is output.
  19. 根据权利要求18所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,还使得一个或多个处理器执行以下步骤:The storage medium of claim 18, wherein when the computer readable instructions are executed by one or more processors, the one or more processors further cause the following steps:
    当所述测试成功率不低于所述预设值时,则获取与所构建的测试任务相关联的历史测试任务;及When the test success rate is not lower than the preset value, acquiring a historical test task associated with the constructed test task; and
    当所述测试成功率低于所述历史测试任务的测试成功率时,则提示测试失败的结果。When the test success rate is lower than the test success rate of the historical test task, the result of the test failure is prompted.
  20. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,还使得一个或多个处理器执行以下步骤:The storage medium of claim 16 wherein when said computer readable instructions are executed by one or more processors, the one or more processors further cause the following steps:
    统计所述自动化测试用例中所有类型的测试用例的数量;Counting the number of all types of test cases in the automated test case;
    根据所述自动化测试用例中所有类型的测试用例的数量以及所述手工测试用例的数量计算各个类型的测试用例的覆盖率;及Calculating the coverage of each type of test case according to the number of all types of test cases in the automated test case and the number of the manual test cases; and
    当存在某一类型的测试用例的覆盖率低于覆盖率阈值时,则提示增加所述某一类型的测试用例。When there is a coverage type of a test case whose coverage is lower than the coverage threshold, it is prompted to increase the test case of the certain type.
PCT/CN2018/077273 2017-11-16 2018-02-26 Test method and apparatus, computer device, and readable storage medium WO2019095580A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711136509.9 2017-11-16
CN201711136509.9A CN107861876A (en) 2017-11-16 2017-11-16 Method of testing, device, computer equipment and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
WO2019095580A1 true WO2019095580A1 (en) 2019-05-23

Family

ID=61701857

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/077273 WO2019095580A1 (en) 2017-11-16 2018-02-26 Test method and apparatus, computer device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN107861876A (en)
WO (1) WO2019095580A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442508B (en) * 2018-05-03 2023-05-23 阿里巴巴集团控股有限公司 Test task processing method, device, equipment and medium
CN108845951A (en) * 2018-08-14 2018-11-20 郑州云海信息技术有限公司 A kind of calculation method and system of automatic test coverage rate
CN109165165A (en) * 2018-09-04 2019-01-08 中国平安人寿保险股份有限公司 Interface test method, device, computer equipment and storage medium
CN109491898B (en) * 2018-10-30 2021-11-12 武汉思普崚技术有限公司 Test efficiency improving method and equipment based on automatic test and case management
CN109828905B (en) * 2018-12-15 2023-08-22 中国平安人寿保险股份有限公司 Automatic test method, device, computer device and storage medium
CN109885391A (en) * 2018-12-28 2019-06-14 北京城市网邻信息技术有限公司 A kind of resource packaging method, device, electronic equipment and medium
CN109726134B (en) * 2019-01-16 2023-02-07 中国平安财产保险股份有限公司 Interface test method and system
CN110674044B (en) * 2019-09-24 2023-09-01 携程旅游网络技术(上海)有限公司 Coverage rate acquisition method, system, equipment and medium for function automation test
CN110928798A (en) * 2019-11-30 2020-03-27 苏州浪潮智能科技有限公司 Code testing method, device and equipment
CN113110993A (en) * 2021-04-12 2021-07-13 深圳市吉祥腾达科技有限公司 Method for integrating and butting testlink system by automatic test platform
CN113643128B (en) * 2021-08-31 2024-02-27 中国银行股份有限公司 Automatic testing method and device for bank products

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080222454A1 (en) * 2007-03-08 2008-09-11 Tim Kelso Program test system
CN101706751A (en) * 2009-11-23 2010-05-12 中兴通讯股份有限公司 Method and system for calculating coverage rate of service functions of software
CN102662833A (en) * 2012-03-21 2012-09-12 天津书生软件技术有限公司 Method for managing test cases
CN104572449A (en) * 2014-12-23 2015-04-29 中国移动通信集团广东有限公司 Automatic test method based on case library
CN106445764A (en) * 2016-09-29 2017-02-22 福州大学 Method for realizing automatic testing of stability of android facility

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080222454A1 (en) * 2007-03-08 2008-09-11 Tim Kelso Program test system
CN101706751A (en) * 2009-11-23 2010-05-12 中兴通讯股份有限公司 Method and system for calculating coverage rate of service functions of software
CN102662833A (en) * 2012-03-21 2012-09-12 天津书生软件技术有限公司 Method for managing test cases
CN104572449A (en) * 2014-12-23 2015-04-29 中国移动通信集团广东有限公司 Automatic test method based on case library
CN106445764A (en) * 2016-09-29 2017-02-22 福州大学 Method for realizing automatic testing of stability of android facility

Also Published As

Publication number Publication date
CN107861876A (en) 2018-03-30

Similar Documents

Publication Publication Date Title
WO2019095580A1 (en) Test method and apparatus, computer device, and readable storage medium
CN110069572B (en) HIVE task scheduling method, device, equipment and storage medium based on big data platform
WO2019161619A1 (en) Automatic interface test method and apparatus, and device and computer-readable storage medium
CN108804215B (en) Task processing method and device and electronic equipment
CN110502366B (en) Case execution method, device, equipment and computer readable storage medium
CN111258591B (en) Program deployment task execution method, device, computer equipment and storage medium
CN112631919A (en) Comparison test method and device, computer equipment and storage medium
WO2019075845A1 (en) Construction method and device for link call relationship, computer device and storage medium
US11169910B2 (en) Probabilistic software testing via dynamic graphs
CN110750443A (en) Webpage testing method and device, computer equipment and storage medium
CN112650676A (en) Software testing method, device, equipment and storage medium
CN115422048A (en) Link stability testing method and device, computer equipment and storage medium
CN113268409B (en) Method, apparatus, device and medium for tracking logical nodes during automated testing
CN109388420A (en) Application upgrade test method, device, computer equipment and storage medium
US20090083747A1 (en) Method for managing application programs by utilizing redundancy and load balance
CN115604086A (en) Monitoring alarm fault self-healing method, device, equipment, medium and program product
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN111679924B (en) Reliability simulation method and device for componentized software system and electronic equipment
CN110347409B (en) Automatic control method, client and server
CN113360389A (en) Performance test method, device, equipment and storage medium
CN112069027A (en) Interface data processing method and device, electronic equipment and storage medium
CN112486838A (en) Interface testing method and device, computer equipment and storage medium
CN110334905B (en) Project fault display method, device, computer equipment and storage medium
CN115562991A (en) Automatic test method, automatic test device, electronic apparatus, and storage medium
CN115827050A (en) Data calling method and device, electronic equipment and storage medium

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: 18877399

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

122 Ep: pct application non-entry in european phase

Ref document number: 18877399

Country of ref document: EP

Kind code of ref document: A1