WO2018177202A1 - 测试结果生成方法、装置、计算机设备和存储介质 - Google Patents

测试结果生成方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2018177202A1
WO2018177202A1 PCT/CN2018/080151 CN2018080151W WO2018177202A1 WO 2018177202 A1 WO2018177202 A1 WO 2018177202A1 CN 2018080151 W CN2018080151 W CN 2018080151W WO 2018177202 A1 WO2018177202 A1 WO 2018177202A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
code
identifier
monitoring information
change
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/080151
Other languages
English (en)
French (fr)
Inventor
毛皓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2018177202A1 publication Critical patent/WO2018177202A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis

Definitions

  • the present application relates to a test result generating method, apparatus, computer device and storage medium.
  • test result generating method apparatus, computer device, and storage medium are provided.
  • a test result generation method includes:
  • test monitoring information and code change information according to the extracted software identifier, and the test monitoring information is obtained by monitoring the tested software code corresponding to the software identifier;
  • the test result of the change code is generated according to the found test monitoring information.
  • a test result generating device includes:
  • An instruction acquisition module configured to acquire a test result generation instruction
  • An identifier extraction module configured to extract a software identifier in the test result generation instruction
  • the information obtaining module is configured to obtain test monitoring information and code change information according to the extracted software identifier, and the test monitoring information is obtained by monitoring the tested software code corresponding to the software identifier;
  • An information finding module configured to search for test monitoring information of the change code in the test monitoring information according to the code change information
  • a result generating module configured to generate a test result of the change code according to the found test monitoring information.
  • a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executed by the one or more processors such that the one or more The processors perform the following steps:
  • test monitoring information and code change information according to the extracted software identifier, and the test monitoring information is obtained by monitoring the tested software code corresponding to the software identifier;
  • the test result of the change code is generated according to the found test monitoring information.
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
  • test monitoring information and code change information according to the extracted software identifier, and the test monitoring information is obtained by monitoring the tested software code corresponding to the software identifier;
  • the test result of the change code is generated according to the found test monitoring information.
  • FIG. 1 is an application environment diagram of a test result generation system in accordance with one or more embodiments.
  • FIG. 2 is a flow diagram of a test result generation method in accordance with one or more embodiments.
  • FIG. 3 is a flow diagram showing the steps of finding test monitoring information corresponding to a change code segment identifier in accordance with one or more embodiments.
  • FIG. 4 is a flow diagram of the steps of finding a test case based on a test case modification instruction in accordance with one or more embodiments.
  • FIG. 5 is a block diagram of a test result generating apparatus in accordance with one or more embodiments.
  • FIG. 6 is a block diagram of an information acquisition module in accordance with one or more embodiments.
  • FIG. 7 is a block diagram of an information lookup module in accordance with one or more embodiments.
  • FIG. 8 is a block diagram of a result generation module in accordance with one or more embodiments.
  • Figure 9 is a block diagram of a test result generating device in another embodiment.
  • Figure 10 is a block diagram of a computer device in accordance with one or more embodiments.
  • FIG. 1 is a test result generation system in an embodiment.
  • the test result generation system includes a terminal 110, a test server 120, and a monitoring server 130.
  • the test server 120 is connected to the terminal 110 and the monitoring server 130 through a network.
  • the terminal 110, the test server 120, and the monitoring server 130 may specifically be plural.
  • the terminal 110 may specifically be at least one of a notebook computer, a tablet computer, a smart phone, and a personal data assistant.
  • a method for generating test results is provided. This embodiment is specifically applied to the test server 120 in the test result generation system of FIG. 1 to illustrate the test server 120.
  • the generator that runs the test results is run, and the test result generator is used to implement the test result generation method.
  • the method specifically includes the following steps:
  • the test server 120 when testing the tested software code corresponding to the software identifier, extracts the software identifier corresponding to the software code, and generates a test result generation instruction according to the software identifier.
  • the test result generation instruction is a test result for generating a change code in the software code, and the change code is a code changed in the software code.
  • the test server 120 generates a test result generation instruction according to the software identifier corresponding to the software code when the software code corresponding to the software identifier starts or ends the test.
  • the test result generation instruction includes a software identifier corresponding to the software code.
  • the test server 120 parses the test result generation instruction, and extracts the software identifier in the test result generation instruction.
  • the test monitoring information is specifically obtained by monitoring the test condition of the software code in the process of testing the software code.
  • the test monitoring information may specifically include location information of code that has been executed by the test process and location information of the code that is not executed.
  • the test server 120 parses the test result generation instruction, and extracts the software identifier in the test result generation instruction. Find the test monitoring information corresponding to the software identifier in the storage test monitoring information.
  • the test server 120 looks up the code change information corresponding to the software identifier in the code database.
  • the code database stores software code corresponding to the software identifier and code change information corresponding to the software identifier, and the code change information may specifically include a code change location in the software code, and may include at least code change content, code change time, and software identifier.
  • the software identification may specifically be at least one of a software name and a version number.
  • S206 specifically includes the following: generating an acquisition instruction of the test monitoring information according to the software identifier; sending the acquisition instruction to the monitoring server; and receiving the test monitoring information that is found by the monitoring server according to the software identifier in the obtaining instruction; The software identification looks for code change information in the code database.
  • the monitoring server 130 detects the test event triggered in the test server 120, the software identifier of the software code corresponding to the test event is obtained.
  • the monitoring server 130 searches for the test monitoring information corresponding to the software code in the stored test monitoring information, and if so, deletes the test monitoring information corresponding to the software code, and monitors the test condition of the software code corresponding to the software identifier. If the test monitoring information is re-acquired, the test monitoring information is stored corresponding to the software code; if not, the test condition of the software code corresponding to the software identifier is directly monitored to obtain test monitoring information.
  • the test service service 120 generates an acquisition request for acquiring test monitoring information according to the software identifier in the test result generation instruction, and sends the acquisition request to the monitoring server 130.
  • the monitoring server 130 extracts the software identifier in the acquisition request, searches the stored test monitoring information for the test monitoring information corresponding to the software identifier, and returns the found test monitoring information to the test server 120.
  • the code change information is stored in the code database of the test server 120, and the test server 120 searches for the code change information corresponding to the software code in the code database.
  • the test server 120 extracts the location information of the change code from the code change information, and searches for the test monitoring information that matches the location information of the change code in the test monitoring information.
  • the location information of the change code may specifically be a line number or a line number range of the change code in the software code, and the line number range includes a start line number and an end line number of the change code.
  • the test server 120 extracts, from the found test monitoring information, location information of the change code of the test abnormality in the software code, and the location information in the software code according to the change code of the test abnormality and
  • the software identifier corresponds to the test result of storing the generated change code.
  • S210 specifically includes the following: counting the total number of lines of code and the number of code execution lines identified by each change code segment according to the found test monitoring information; calculating each change according to the total number of lines of code and the number of lines executed by the code The code segment identifies the corresponding test coverage.
  • the found test monitoring information stores the line number of the unexecuted code corresponding to each change code segment identifier and the line number where the executed code is located. Count the number of lines executed by the code identified by each change code segment and the number of lines that the code does not execute. Add the number of lines that are not executed by the code and the number of lines that have been executed by the code to get the total number of lines of code. Divide the number of lines that are not executed by the code. The total number of rows is tested for coverage, and the obtained test coverage is stored corresponding to each code segment identifier to obtain the test coverage of each code segment. Test coverage is used to indicate the proportion of executed code in the software code and can represent the completeness of the code test.
  • the test result generation instruction is obtained, and the test result generation instruction is used to generate a test result of the change code in the software corresponding to the software identifier, extract the software identifier in the result generation instruction, and obtain the test monitoring information and the code change corresponding to the software identifier.
  • the information is searched for the test monitoring information of the change code in the test monitoring information according to the code change information, and the test result of the change code is generated according to the found test monitoring information. In this way, there is no need to manually find the specific test situation of the change code, which saves the search time, and improves the monitoring efficiency of the change code by generating the test result of the change code.
  • S208 specifically includes the step of searching for test monitoring information corresponding to the change code segment identifier, and the step specifically includes the following content:
  • the code change information stores a change code segment identifier
  • the change code segment identifier is an identifier of the code segment to which the change code belongs, and the change code segment identifier may specifically be a function name.
  • the test server 120 extracts the change code segment identifier from the code change information.
  • the test server 120 stores a correspondence table between the location range information and the code segment identifier, and after extracting the change code segment identifier in the code change information, searches for a code matching the change code segment identifier in the correspondence relationship table.
  • the segment identifier extracts the location range information corresponding to the matched code segment identifier.
  • the location range information may specifically be a start line number and an end line number of the code corresponding to the code segment identifier in the software code.
  • the test server 120 searches for location information belonging to the location range information in the test monitoring information according to the location range information, and after finding the location information, extracts the test monitoring information that the found location information matches from the test monitoring information.
  • the change code segment identifier is extracted from the code change information, the location range information corresponding to the code segment identifier is determined, and the test monitoring information of the code in the changed code segment is accurately extracted in the test monitoring information according to the location range information to ensure the change code.
  • the segment test monitors the accuracy of the information.
  • the method further includes the step of searching for a test case according to the test case modification instruction, and the step specifically includes the following content:
  • test result is stored corresponding to the software identifier corresponding to the change code.
  • the terminal 110 sends a test result acquisition request for acquiring the test result to the test server 120 or the monitoring server 130, and the test result acquisition request is obtained. Carry the software logo.
  • S406 Extract the software identifier in the test result acquisition request, search the test result according to the extracted identifier, and return the found test result to the terminal.
  • the test server 120 stores a correspondence table between the code segment identifier and the test case identifier, and after the test server 120 finds the test monitoring information of the change code, extracts the code segment identifier in the test monitoring information, and the corresponding relationship is The code segment identifier matching the extracted code segment identifier is found in the table, and the test case identifier corresponding to the matching code segment identifier is searched from the correspondence relationship table, and the test case identifier is added to the test monitoring information of the change code to generate a test result. .
  • the test server 120 or the monitoring server 130 After receiving the test result acquisition request, the test server 120 or the monitoring server 130 extracts the software identifier in the test result acquisition request, and searches for the test result corresponding to the software identifier in the stored test result, and the test result is the test result of the change code. The found test result is sent to the terminal 110.
  • the terminal 110 parses the test result, and extracts a test case identifier corresponding to the change code segment identifier in the test result.
  • the test case identifier corresponding to the test case to be debugged is selected in the extracted test case identifier, and the test case modification command is generated according to the selected test case identifier, and the generated test case modification command is sent to the test server 120.
  • the test server 120 extracts the test case identifier in the test case modification instruction, searches for the matching test case in the stored test case according to the test case identifier, and returns the found test case to the test case.
  • the terminal 110 is displayed in the edit page of the terminal 110.
  • the terminal 110 can modify the test case in the edit page, and send the modified test page to the test server 120 for storage after the modification is completed.
  • the test server 120 periodically acquires test cases in the edit page of the terminal 110, and stores the modified test cases.
  • the terminal can search for the test result of the change code, and search for the test case according to the test case identifier corresponding to the test case related to the code change in the test result, and modify the found test case according to the test result, thereby improving the change code. Test efficiency.
  • FIGS. 2-4 are sequentially displayed as indicated by 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 the steps may be performed in other orders. Moreover, at least some of the steps in FIGS. 2-4 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, these sub-steps or stages The order of execution 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.
  • a test result generating apparatus 500 includes: an instruction acquiring module 502, an identifier extracting module 504, an information acquiring module 506, an information finding module 508, and a result generating. Module 510.
  • the instruction acquisition module 502 is configured to acquire a test result generation instruction.
  • the identifier extraction module 504 is configured to extract a software identifier in the test result generation instruction.
  • the information obtaining module 506 is configured to obtain test monitoring information and code change information according to the extracted software identifier, and the test monitoring information is obtained by monitoring the tested software code corresponding to the software identifier.
  • the information searching module 508 is configured to search for test monitoring information of the change code in the test monitoring information according to the code change information.
  • the result generating module 510 is configured to generate a test result of the change code according to the found test monitoring information.
  • the test result generation instruction is obtained, and the test result generation instruction is used to generate a test result of the change code in the software corresponding to the software identifier, extract the software identifier in the result generation instruction, and obtain the test monitoring information and the code change corresponding to the software identifier.
  • the information is searched for the test monitoring information of the change code in the test monitoring information according to the code change information, and the test result of the change code is generated according to the found test monitoring information. In this way, it is not necessary to manually find the specific test situation of the change code, save the search time, and improve the monitoring efficiency of the change code by generating the test result of the change code.
  • the information obtaining module 506 specifically includes: an acquisition request generating module 506a, an acquisition request sending module 506b, a monitoring information receiving module 506c, and a change information searching module 506d.
  • the obtaining request generating module 506a is configured to generate an acquisition request of the test monitoring information according to the software identifier
  • the obtaining request sending module 506b is configured to send the obtaining request to the monitoring server;
  • the monitoring information receiving module 506c is configured to receive test monitoring information that is found by the monitoring server according to the software identifier in the obtaining instruction.
  • the change information finding module 506d is configured to search for code change information in the code database according to the software identifier.
  • the monitoring server monitors the test condition of the software code to obtain test monitoring information of the software code, and stores the test monitoring information in the monitoring server. Finding test monitoring information from the monitoring server eliminates the need to re-execute the software code, saving the computing resources used to re-execute the software code and improving resource utilization.
  • the information search module 508 specifically includes a code identification extraction module 508a, a location range determination module 508b, and a monitoring information extraction module 508c.
  • the code identification extraction module 508a is configured to extract the change code segment identifier in the code change information.
  • the location range determining module 508b is configured to determine location range information corresponding to the changed code segment identifier.
  • the monitoring information extraction module 508c is configured to extract matching test monitoring information in the test monitoring information according to the location range information.
  • the change code segment identifier is extracted from the code change information, the location range information corresponding to the code segment identifier is determined, and the test monitoring information of the code in the changed code segment is accurately extracted in the test monitoring information according to the location range information, so as to ensure that the search is found.
  • the change code segment corresponds to the accuracy of the test monitoring information.
  • the result generation module 510 specifically includes a line number statistics module 510a and a coverage rate calculation module 510b.
  • the row number statistics module 510a is configured to count the total number of lines of code and the number of code execution lines identified by each change code segment according to the found test monitoring information.
  • the coverage calculation module 510b is configured to calculate a test coverage corresponding to each change code segment identifier according to the total number of coded lines and the number of code execution lines.
  • the total number of code lines and the number of code execution lines identified by each code segment are counted, and the test coverage corresponding to each code segment identifier is calculated according to the total number of code lines and the number of code execution lines.
  • the test completion rate of each change code segment is monitored by calculating the test coverage, and the monitoring efficiency in the test process in the change code segment is improved.
  • a test result generating apparatus 500 is provided.
  • the apparatus further includes: a test result storage module 512, an acquisition request receiving module 514, a test result sending module 516, and a modified instruction acquiring module. 518 and test case lookup module 520.
  • the test result storage module 512 is configured to store the test result corresponding to the software identifier.
  • the obtaining request receiving module 514 is configured to receive a test result obtaining request sent by the terminal.
  • the test result finding module 516 is configured to extract the software identifier in the test result obtaining request, search the test result according to the extracted identifier, and return the found test result to the terminal.
  • the modify instruction acquisition module 518 is configured to obtain a test case modification instruction generated by the terminal according to the returned test result.
  • the test case finding module 520 is configured to extract a test case identifier corresponding to the changed code segment in the test case modification instruction, search for the test case according to the extracted test case identifier, and return the found test case to the terminal.
  • the terminal can search for the test result of the change code, and search for the test case according to the test case identifier corresponding to the test case related to the code change in the test result, and modify the found test case according to the test result, thereby improving the change code. Test efficiency.
  • test result generating device For the specific definition of the test result generating device, reference may be made to the above definition of the test result generating method, and details are not described herein again.
  • the various modules in the above test result generating device 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.
  • 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, computer readable instructions, and a database.
  • the internal memory provides an environment for operation of an operating system and computer readable instructions in a non-volatile storage medium.
  • the database of the computer device is used to store test monitoring information, code change information, software code, and the like.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection.
  • the computer readable instructions are executed by a processor to implement a test result generation method.
  • FIG. 10 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 device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executed by one or more processors such that one or more processors implement any of the present application
  • the steps of the test result generation method provided in the embodiment are not limited to:
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause one or more processors to be implemented in any one embodiment of the present application The steps of the test result generation method provided.
  • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种测试结果生成方法,包括:获取测试结果生成指令;提取所述测试结果生成指令中软件标识对应的测试监测信息和代码变更信息;根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及根据查找到的测试监测信息生成所述变更代码的测试结果。

Description

测试结果生成方法、装置、计算机设备和存储介质
本申请要求于2017年03月27日提交中国专利局,申请号为201710189049X,申请名称为“测试结果生成方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种测试结果生成方法、装置、计算机设备和存储介质。
背景技术
随着计算机技术的发展,具有各种功能的软件被开发,在软件开发过程中,往往需要对软件进行测试,在软件测试通过后才能投入应用。在软件开发过程中,需要不断的对软件的代码进行变更以对软件进行升级,在每次软件升级后,都需要对变更后的软件代码进行测试。
发明人意识到,每次对变更后的软件代码进行测试时,不能够了解变更代码的具体测试情况。在测试出现异常时,需要人工查找变更代码的具体测试情况。人工查找会耗费较多的时间,这样使得在测试过程中对变更代码的监测较为困难,导致对变更代码的监测效率低下。
发明内容
根据本申请公开的各种实施例,提供一种测试结果生成方法、装置、计算机设备和存储介质。
一种测试结果生成方法包括:
获取测试结果生成指令;
提取所述测试结果生成指令中的软件标识;
根据提取到的软件标识获取测试监测信息和代码变更信息,测试监测信息为对所述软件标识对应的被测试的软件代码进行监测得到;
根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及
根据查找到的测试监测信息生成所述变更代码的测试结果。
一种测试结果生成装置包括:
指令获取模块,用于获取测试结果生成指令;
标识提取模块,用于提取所述测试结果生成指令中的软件标识;
信息获取模块,用于根据提取到的软件标识获取测试监测信息和代码变更信息,测试监测信息为对所述软件标识对应的被测试的软件代码进行监测得到;
信息查找模块,用于根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及
结果生成模块,用于根据查找到的测试监测信息生成所述变更代码的测试结果。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取测试结果生成指令;
提取所述测试结果生成指令中的软件标识;
根据提取到的软件标识获取测试监测信息和代码变更信息,测试监测信息为对所述软件标识对应的被测试的软件代码进行监测得到;
根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及
根据查找到的测试监测信息生成所述变更代码的测试结果。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取测试结果生成指令;
提取所述测试结果生成指令中的软件标识;
根据提取到的软件标识获取测试监测信息和代码变更信息,测试监测信息为对所述软件标识对应的被测试的软件代码进行监测得到;
根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及
根据查找到的测试监测信息生成所述变更代码的测试结果。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中测试结果生成系统的应用环境图。
图2为根据一个或多个实施例中测试结果生成方法的流程示意图。
图3为根据一个或多个实施例中查找变更代码段标识对应的测试监测信息的步骤的流程示意图。
图4为根据一个或多个实施例中根据测试用例修改指令查找测试用例的步骤的流程示意图。
图5为根据一个或多个实施例中测试结果生成装置的框图。
图6为根据一个或多个实施例中信息获取模块的框图。
图7为根据一个或多个实施例中信息查找模块的框图。
图8为根据一个或多个实施例中结果生成模块的框图。
图9为另一个实施例中测试结果生成装置的框图。
图10为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中测试结果生成系统,测试结果生成系统中包括终端110、测试服务器120和监测服务器130,测试服务器120通过网络与终端110和监测服务器130相连接。终端110、测试服务器120和监测服务器130具体可以是多个。终端110具体可以是笔记本电脑、平板电脑、智能手机和个人数据助理中的至少一种。
如图2所示,在其中一个实施例中,提供一种测试结果的生成方法,本实施例以该方法具体应用在图1测试结果生成系统中的测试服务器120上来举例说明,测试服务器120上运行有测试结果的生成程序,测试结果的生成程序用于实施测试结果的生成方法。该方法具体包括以下步骤:
S202,获取测试结果生成指令。
具体地,测试服务器120在对软件标识对应的被测试的软件代码进行测试时,提取软件代码对应的软件标识,根据软件标识生成测试结果生成指令。测试结果生成指令为用于生成软件代码中变更代码的测试结果,变更代码为软件代码中经过更改的代码。
在其中一个实施例中,测试服务器120在对软件标识对应的软件代码开始或结束测试时,根据软件代码对应的软件标识生成测试结果生成指令。
S204,提取测试结果生成指令中的软件标识。
具体地,测试结果生成指令中包括软件代码对应的软件标识。测试服务器120在获取到测试结果生成指令后,对测试结果生成指令进行解析,提取测试结果生成指令中的软件标识。
S206,根据提取到的软件标识获取测试监测信息和代码变更信息,测试监测信息为对软件标识对应的被测试的软件代码进行监测得到。
测试监测信息具体为在对软件代码进行测试的过程中,对软件代码的测 试情况进行监测得到的信息。测试监测信息具体可以包括测试过程已执行的代码的位置信息和未执行的代码的位置信息。
具体地,测试服务器120在获取到测试结果生成指令后,对测试结果生成指令进行解析,提取测试结果生成指令中的软件标识。在存储测试监测信息中查找与软件标识对应的测试监测信息。
进一步地,测试服务器120在代码数据库中查找与软件标识对应的代码变更信息。代码数据库中存储着软件标识对应的软件代码和软件标识对应的代码变更信息,代码变更信息具体可以包括软件代码中的代码更改位置,还可以包括代码变更内容、代码变更时间和软件标识中的至少一种。软件标识具体可以是软件名称和版本号中的至少一种。
在其中一个实施例中,S206具体包括以下内容:根据软件标识生成测试监测信息的获取指令;将获取指令发送至监测服务器;接收监测服务器根据获取指令中的软件标识查找到的测试监测信息;根据软件标识在代码数据库中查找代码变更信息。
具体地,监测服务器130检测到测试服务器120中触发的测试事件时,获测试事件对应的软件代码的软件标识。监测服务器130在存储的测试监测信息中查找是否存在与该软件代码对应的测试监测信息,若存在,删除与该软件代码对应的测试监测信息,对该软件标识对应的软件代码的测试情况进行监测重新获得测试监测信息,将获得到测试监测信息与该软件代码对应存储;若不存在,直接对该软件标识对应的软件代码的测试情况进行监测获得测试监测信息。
测试服务服务120根据测试结果生成指令中的软件标识生成用于获取测试监测信息的获取请求,将获取请求发送至监测服务器130。监测服务器130在接收到获取请求后,提取获取请求中的软件标识,在存储的测试监测信息中查找与软件标识对应的测试监测信息,将查找到的测试监测信息返回至测试服务器120。测试服务器120的代码数据库中存储着代码变更信息,测试服务器120在代码数据库中查找与软件代码对应的代码变更信息。
S208,根据代码变更信息在测试监测信息中查找变更代码的测试监测信息。
具体地,测试服务器120在提取到代码变更信息后,从代码变更信息中提取变更代码的位置信息,在测试监测信息中查找与变更代码的位置信息匹配的测试监测信息。变更代码的位置信息具体可以是变更代码在软件代码中的行号或行号范围,行号范围包括变更代码的开始行号和结束行号。
S210,根据查找到的测试监测信息生成变更代码的测试结果。
具体地,在查找到的测试监测信息,测试服务器120从查找到的测试监测信息中提取测试异常的变更代码在软件代码中的位置信息,根据测试异常的变更代码所在软件代码中的位置信息与软件标识对应存储生成变更代码的测试结果。
在其中一个实施例中,S210具体包括以下内容:根据查找到的测试监测信息统计各变更代码段标识的代码总行数和代码执行行数;根据统计的代码总行数和代码执行行数计算各变更代码段标识对应的测试覆盖率。
具体地,查找到的测试监测信息中存储着各变更代码段标识对应的未执行代码所在的行号和已执行代码所在的行号。统计各变更代码段标识的代码执行的行数和代码未执行的行数,将代码未执行的行数和代码已执行的行数相加得到代码总行数,用未执行的行数除以代码总行数得到测试覆盖率,将得到的测试覆盖率与各变更代码段标识对应存储得到各变更代码段的测试覆盖率。测试覆盖率用于表示已执行代码占软件代码的比例,可以表示代码测试的完全程度。
本实施例中,获取测试结果生成指令,测试结果生成指令用于生成软件标识对应的软件中变更代码的测试结果,提取结果生成指令中的软件标识,获取软件标识对应的测试监测信息和代码变更信息,根据代码变更信息在测试监测信息中查找变更代码的测试监测信息,根据查找到的测试监测信息生成变更代码的测试结果。这样,无需人工查找变更代码的具体测试情况,节省了查找时间,通过生成变更代码的测试结果提高了对变更代码的监测效率。
如图3所示,在其中一个实施例中,S208具体包括查找变更代码段标识对应的测试监测信息的步骤,该步骤具体包括以下内容:
S302,提取代码变更信息中的变更代码段标识。
具体地,代码变更信息中存储着变更代码段标识,变更代码段标识为变更代码所属代码段的标识,变更代码段标识具体可以是函数名称。测试服务器120从代码变更信息中提取变更代码段标识。
S304,确定变更代码段标识对应的位置范围信息。
具体地,测试服务器120中存储着位置范围信息与代码段标识的对应关系表,在提取到代码变更信息中的变更代码段标识后,在对应关系表中查找与该变更代码段标识匹配的代码段标识,提取匹配的代码段标识对应的位置范围信息。位置范围信息具体可以是代码段标识对应的代码在软件代码中的开始行号和结束行号。
S306,根据位置范围信息在测试监测信息中提取匹配的测试监测信息。
具体地,测试服务器120根据位置范围信息在测试监测信息中查找属于位置范围信息的位置信息,在查找到位置信息后,从测试监测信息中提取查找到的位置信息匹配的测试监测信息。
本实施例中,从代码变更信息中提取变更代码段标识,确定代码段标识对应的位置范围信息,根据位置范围信息在测试监测信息中准确提取变更代码段中代码的测试监测信息,确保变更代码段测试监测信息的准确性。
如图4所示,在其中一个实施例中,S210之后具体还包括根据测试用例修改指令查找测试用例的步骤,该步骤具体包括以下内容:
S402,将测试结果与软件标识对应存储。
具体地,测试服务器120或监测服务器130在生成变更代码的测试结果后,将测试结果与变更代码对应的软件标识对应存储。
S404,接收终端发送的测试结果获取请求。
具体地,在测试服务器120或监测服务器130对软件代码中变更代码的测试结果存储后,终端110向测试服务器120或监测服务器130发送用于获 取测试结果的测试结果获取请求,测试结果获取请求中携带有软件标识。
S406,提取测试结果获取请求中的软件标识,根据提取到的标识查找测试结果,将查找到的测试结果返回至终端。
具体地,在测试服务器120中存储着代码段标识与测试用例标识的对应关系表,在测试服务器120查找到变更代码的测试监测信息后,提取测试监测信息中变更代码段标识,在该对应关系表中查找与提取到变更代码段标识匹配的代码段标识,并从对应关系表中查找匹配的代码段标识对应的测试用例标识,将测试用例标识添加到变更代码的测试监测信息中生成测试结果。测试服务器120或监测服务器130在接收到测试结果获取请求后,提取测试结果获取请求中的软件标识,在存储的测试结果中查找与软件标识对应的测试结果,测试结果为变更代码的测试结果,将查找到的测试结果发送至终端110。
S408,获取终端根据返回的测试结果生成的测试用例修改指令。
具体地,终端110接收到测试结果后,对测试结果进行解析,提取测试结果中的变更代码段标识对应的测试用例标识。在提取到测试用例标识中选取需要调试的测试用例对应的测试用例标识,根据选取到的测试用例标识生成测试用例修改指令,将生成的测试用例修改指令发送至测试服务器120。
S410,提取测试用例修改指令中变更代码段对应的测试用例标识,根据提取到的测试用例标识查找测试用例,将查找到的测试用例返回至终端。
具体地,测试服务器120在接收到测试用例修改指令后,提取测试用例修改指令中的测试用例标识,根据测试用例标识在存储的测试用例中查找匹配的测试用例,将查找到的测试用例返回至终端110,并显示在终端110的编辑页面中。终端110在编辑页面中可以对测试用例进行修改,在修改完成后将修改后的测试页面发送至测试服务器120进行存储。测试服务器120定期获取终端110的编辑页面中的测试用例,对修改后的测试用例进行存储。
本实施例中,终端可以查找变更代码的测试结果,根据测试结果中变更代码相关的测试用例所对应的测试用例标识查找测试用例,根据测试结果对 查找到的测试用例进行修改,从而提高变更代码的测试效率。
应该理解的是,虽然图2-4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-4中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
如图5所示,在其中一个实施例中,提供一种测试结果生成装置500,该装置包括具体包括:指令获取模块502、标识提取模块504、信息获取模块506、信息查找模块508和结果生成模块510。
指令获取模块502,用于获取测试结果生成指令。
标识提取模块504,用于提取测试结果生成指令中的软件标识。
信息获取模块506,用于根据提取到的软件标识获取测试监测信息和代码变更信息,测试监测信息为对软件标识对应的被测试的软件代码进行监测得到。
信息查找模块508,用于根据代码变更信息在测试监测信息中查找变更代码的测试监测信息。
结果生成模块510,用于根据查找到的测试监测信息生成变更代码的测试结果。
本实施例中,获取测试结果生成指令,测试结果生成指令用于生成软件标识对应的软件中变更代码的测试结果,提取结果生成指令中的软件标识,获取软件标识对应的测试监测信息和代码变更信息,根据代码变更信息在测试监测信息中查找变更代码的测试监测信息,根据查找到的测试监测信息生成变更代码的测试结果。这样,无需人工查找变更代码的具体测试情况,节 省了查找时间,通过生成变更代码的测试结果提高了对变更代码的监测效率。
如图6所示,在其中一个实施例中,信息获取模块506具体包括:获取请求生成模块506a、获取请求发送模块506b、监测信息接收模块506c和变更信息查找模块506d。
获取请求生成模块506a,用于根据软件标识生成测试监测信息的获取请求;
获取请求发送模块506b,用于将获取请求发送至监测服务器;
监测信息接收模块506c,用于接收监测服务器根据获取指令中的软件标识查找到的测试监测信息。
变更信息查找模块506d,用于根据软件标识在代码数据库中查找代码变更信息。
本实施例中,监测服务器对软件代码的测试情况进行监测获取软件代码的测试监测信息,并将测试监控信息存储在监测服务器。从监测服务器中查找测试监控信息,无需重新执行软件代码,节省了重新执行软件代码所耗费的运算资源,提高了资源利用率。
如图7所示,在其中一个实施例中,信息查找模块508具体包括:代码标识提取模块508a、位置范围确定模块508b和监测信息提取模块508c。
代码标识提取模块508a,用于提取代码变更信息中的变更代码段标识。
位置范围确定模块508b,用于确定变更代码段标识对应的位置范围信息。
监测信息提取模块508c,用于根据位置范围信息在测试监测信息中提取匹配的测试监测信息。
本实施例中,从代码变更信息中提取变更代码段标识,确定代码段标识对应的位置范围信息,根据位置范围信息在测试监测信息中准确提取变更代码段中代码的测试监测信息,确保查找到的变更代码段对应的测试监测信息的准确性。
如图8所示,在其中一个实施例中,结果生成模块510具体包括:行数统计模块510a和覆盖率计算模块510b。
行数统计模块510a,用于根据查找到的测试监测信息统计各变更代码段标识的代码总行数和代码执行行数。
覆盖率计算模块510b,用于根据统计的代码总行数和代码执行行数计算各变更代码段标识对应的测试覆盖率。
本实施例中,根据查找到的测试监测信息统计各变更代码段标识的代码总行数和代码执行行数,根据统计的代码总行数和代码执行行数计算各变更代码段标识对应的测试覆盖率,通过计算测试覆盖率监测各变更代码段的测试完成情况,提高变更代码段中测试过程中的监测效率。
如图9所示,在其中一个实施例中,提供一种测试结果生成装置500,该装置具体还包括:测试结果存储模块512、获取请求接收模块514、测试结果发送模块516、修改指令获取模块518和测试用例查找模块520。
测试结果存储模块512,用于将测试结果与软件标识对应存储。
获取请求接收模块514,用于接收终端发送的测试结果获取请求。
测试结果查找模块516,用于提取测试结果获取请求中的软件标识,根据提取到的标识查找测试结果,将查找到的测试结果返回至终端。
修改指令获取模块518,用于获取终端根据返回的测试结果生成的测试用例修改指令。
测试用例查找模块520,用于提取测试用例修改指令中变更代码段对应的测试用例标识,根据提取到的测试用例标识查找测试用例,将查找到的测试用例返回至终端。
本实施例中,终端可以查找变更代码的测试结果,根据测试结果中变更代码相关的测试用例所对应的测试用例标识查找测试用例,根据测试结果对查找到的测试用例进行修改,从而提高变更代码的测试效率。
关于测试结果生成装置的具体限定可以参见上文中对于测试结果生成方法的限定,在此不再赘述。上述测试结果生成装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储 器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储测试监测信息、代码变更信息和软件代码等。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种测试结果生成方法。
本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的测试结果生成方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的测试结果生成方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实 施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种测试结果生成方法,包括:
    获取测试结果生成指令;
    提取所述测试结果生成指令中的软件标识;
    根据提取到的软件标识获取测试监测信息和代码变更信息,所述测试监测信息为对所述软件标识对应的被测试的软件代码进行监测得到;
    根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及
    根据查找到的测试监测信息生成所述变更代码的测试结果。
  2. 根据权利要求1所述的方法,其特征在于,所述根据提取到的软件标识获取测试监测信息和代码变更信息,包括:
    根据所述软件标识生成测试监测信息的获取请求;
    将所述获取请求发送至监测服务器;
    接收所述监测服务器根据所述获取指令中的软件标识查找到的测试监测信息;及
    根据所述软件标识在代码数据库中查找代码变更信息。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息,包括:
    提取所述代码变更信息中的变更代码段标识;
    确定所述变更代码段标识对应的位置范围信息;及
    根据所述位置范围信息在所述测试监测信息中提取匹配的测试监测信息。
  4. 根据权利要求1所述的方法,其特征在于,所述根据查找到的测试监测信息生成变更代码的测试结果,包括:
    根据查找到的测试监测信息统计各变更代码段标识的代码总行数和代码执行行数;及
    根据统计的代码总行数和代码执行行数计算各变更代码段标识对应的测 试覆盖率。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述根据查找到的测试监测信息生成变更代码的测试结果之后,所述方法还包括:
    将所述测试结果与所述软件标识对应存储;
    接收终端发送的测试结果获取请求;
    提取所述测试结果获取请求中的软件标识,根据提取到的标识查找测试结果,将查找到的测试结果返回至所述终端;
    获取所述终端根据返回的测试结果生成的测试用例修改指令;及
    提取所述测试用例修改指令中变更代码段对应的测试用例标识,根据提取到的测试用例标识查找测试用例,将查找到的测试用例返回至所述终端。
  6. 一种测试结果生成装置,包括:
    指令获取模块,用于获取测试结果生成指令;
    标识提取模块,用于提取所述测试结果生成指令中的软件标识;
    信息获取模块,用于根据提取到的软件标识获取测试监测信息和代码变更信息,测试监测信息为对所述软件标识对应的被测试的软件代码进行监测得到;
    信息查找模块,用于根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及
    结果生成模块,用于根据查找到的测试监测信息生成所述变更代码的测试结果。
  7. 根据权利要求6所述的装置,其特征在于,所述信息获取模块包括:
    获取请求生成模块,用于根据所述软件标识生成测试监测信息的获取请求;
    获取请求发送模块,用于将所述获取请求发送至监测服务器;
    监测信息接收模块,用于接收所述监测服务器根据所述获取指令中的软件标识查找到的测试监测信息;及
    变更信息查找模块,用于根据所述软件标识在代码数据库中查找代码变更信息。
  8. 根据权利要求6所述的装置,其特征在于,所述信息查找模块包括:
    代码标识提取模块,用于提取所述代码变更信息中的变更代码段标识;
    位置范围确定模块,用于确定所述变更代码段标识对应的位置范围信息;及
    监测信息提取模块,用于根据所述位置范围信息在所述测试监测信息中提取匹配的测试监测信息。
  9. 根据权利要求6所述的装置,其特征在于,所述结果生成模块包括:
    行数统计模块,用于根据查找到的测试监测信息统计各变更代码段标识的代码总行数和代码执行行数;及
    覆盖率计算模块,用于根据统计的代码总行数和代码执行行数计算各变更代码段标识对应的测试覆盖率。
  10. 根据权利要求6-9任一项所述的装置,其特征在于,所述装置还包括:
    测试结果存储模块,用于将所述测试结果与所述软件标识对应存储;
    获取请求接收模块,用于接收终端发送的测试结果获取请求;
    测试结果查找模块,用于提取所述测试结果获取请求中的软件标识,根据提取到的标识查找测试结果,将查找到的测试结果返回至所述终端;
    修改指令获取模块,用于获取所述终端根据返回的测试结果生成的测试用例修改指令;及
    测试用例查找模块,用于提取所述测试用例修改指令中变更代码段对应的测试用例标识,根据提取到的测试用例标识查找测试用例,将查找到的测试用例返回至所述终端。
  11. 一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取测试结果生成指令;
    提取所述测试结果生成指令中的软件标识;
    根据提取到的软件标识获取测试监测信息和代码变更信息,所述测试监测信息为对所述软件标识对应的被测试的软件代码进行监测得到;
    根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及
    根据查找到的测试监测信息生成所述变更代码的测试结果。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述根据提取到的软件标识获取测试监测信息和代码变更信息,包括:
    根据所述软件标识生成测试监测信息的获取请求;
    将所述获取请求发送至监测服务器;
    接收所述监测服务器根据所述获取指令中的软件标识查找到的测试监测信息;及
    根据所述软件标识在代码数据库中查找代码变更信息。
  13. 根据权利要求11所述的计算机设备,其特征在于,所述根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息,包括:
    提取所述代码变更信息中的变更代码段标识;
    确定所述变更代码段标识对应的位置范围信息;及
    根据所述位置范围信息在所述测试监测信息中提取匹配的测试监测信息。
  14. 根据权利要求11所述的计算机设备,其特征在于,所述根据查找到的测试监测信息生成变更代码的测试结果,包括:
    根据查找到的测试监测信息统计各变更代码段标识的代码总行数和代码执行行数;及
    根据统计的代码总行数和代码执行行数计算各变更代码段标识对应的测试覆盖率。
  15. 根据权利要求11-14所述的计算机设备,其特征在于,所述计算机 可读指令被所述处理器执行时,使得所述处理器在执行所述根据查找到的测试监测信息生成变更代码的测试结果之后,还执行以下步骤:
    将所述测试结果与所述软件标识对应存储;
    接收终端发送的测试结果获取请求;
    提取所述测试结果获取请求中的软件标识,根据提取到的标识查找测试结果,将查找到的测试结果返回至所述终端;
    获取所述终端根据返回的测试结果生成的测试用例修改指令;及
    提取所述测试用例修改指令中变更代码段对应的测试用例标识,根据提取到的测试用例标识查找测试用例,将查找到的测试用例返回至所述终端。
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取测试结果生成指令;
    提取所述测试结果生成指令中的软件标识;
    根据提取到的软件标识获取测试监测信息和代码变更信息,所述测试监测信息为对所述软件标识对应的被测试的软件代码进行监测得到;
    根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息;及
    根据查找到的测试监测信息生成所述变更代码的测试结果。
  17. 根据权利要求16所述的存储介质,其特征在于,所述根据提取到的软件标识获取测试监测信息和代码变更信息,包括:
    根据所述软件标识生成测试监测信息的获取请求;
    将所述获取请求发送至监测服务器;
    接收所述监测服务器根据所述获取指令中的软件标识查找到的测试监测信息;及
    根据所述软件标识在代码数据库中查找代码变更信息。
  18. 根据权利要求16所述的存储介质,其特征在于,所述根据所述代码变更信息在所述测试监测信息中查找变更代码的测试监测信息,包括:
    提取所述代码变更信息中的变更代码段标识;
    确定所述变更代码段标识对应的位置范围信息;及
    根据所述位置范围信息在所述测试监测信息中提取匹配的测试监测信息。
  19. 根据权利要求16所述的存储介质,其特征在于,所述根据查找到的测试监测信息生成变更代码的测试结果,包括:
    根据查找到的测试监测信息统计各变更代码段标识的代码总行数和代码执行行数;及
    根据统计的代码总行数和代码执行行数计算各变更代码段标识对应的测试覆盖率。
  20. 根据权利要求16-19所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器在执行所述根据查找到的测试监测信息生成变更代码的测试结果之后,还执行以下步骤:
    将所述测试结果与所述软件标识对应存储;
    接收终端发送的测试结果获取请求;
    提取所述测试结果获取请求中的软件标识,根据提取到的标识查找测试结果,将查找到的测试结果返回至所述终端;
    获取所述终端根据返回的测试结果生成的测试用例修改指令;及
    提取所述测试用例修改指令中变更代码段对应的测试用例标识,根据提取到的测试用例标识查找测试用例,将查找到的测试用例返回至所述终端。
PCT/CN2018/080151 2017-03-27 2018-03-23 测试结果生成方法、装置、计算机设备和存储介质 Ceased WO2018177202A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710189049.X 2017-03-27
CN201710189049.XA CN108255700B (zh) 2017-03-27 2017-03-27 测试结果生成方法和装置

Publications (1)

Publication Number Publication Date
WO2018177202A1 true WO2018177202A1 (zh) 2018-10-04

Family

ID=62721358

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/080151 Ceased WO2018177202A1 (zh) 2017-03-27 2018-03-23 测试结果生成方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN108255700B (zh)
WO (1) WO2018177202A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240919B (zh) * 2018-08-20 2022-03-22 郑州云海信息技术有限公司 一种测试数据量统计系统及方法
CN109684214B (zh) * 2018-12-21 2022-02-25 北京金山安全软件有限公司 一种ui测试方法和装置
CN110309055A (zh) * 2019-05-23 2019-10-08 深圳壹账通智能科技有限公司 基于Java虚拟机的黑盒测试方法、装置、终端及存储介质
CN111858375B (zh) * 2020-07-28 2023-09-05 中国工商银行股份有限公司 软件测试方法、装置、电子设备和介质
CN116383081A (zh) * 2023-04-19 2023-07-04 青岛海尔科技有限公司 一种软件测试方法、系统、存储介质及电子装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880547A (zh) * 2012-09-05 2013-01-16 无锡江南计算技术研究所 一种软件单元与部件与相结合的源代码变更影响分析与测试方法
CN103176895A (zh) * 2011-12-22 2013-06-26 阿里巴巴集团控股有限公司 一种回归测试方法和系统
CN105183658A (zh) * 2015-10-12 2015-12-23 用友网络科技股份有限公司 测试软件代码的方法及装置
CN106326116A (zh) * 2016-08-17 2017-01-11 北京奇虎科技有限公司 产品测试的方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222043B (zh) * 2011-07-08 2015-06-17 华为软件技术有限公司 一种测试方法和测试装置
CN106095670A (zh) * 2016-06-02 2016-11-09 网易(杭州)网络有限公司 测试报告的生成方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176895A (zh) * 2011-12-22 2013-06-26 阿里巴巴集团控股有限公司 一种回归测试方法和系统
CN102880547A (zh) * 2012-09-05 2013-01-16 无锡江南计算技术研究所 一种软件单元与部件与相结合的源代码变更影响分析与测试方法
CN105183658A (zh) * 2015-10-12 2015-12-23 用友网络科技股份有限公司 测试软件代码的方法及装置
CN106326116A (zh) * 2016-08-17 2017-01-11 北京奇虎科技有限公司 产品测试的方法和装置

Also Published As

Publication number Publication date
CN108255700A (zh) 2018-07-06
CN108255700B (zh) 2020-03-06

Similar Documents

Publication Publication Date Title
WO2018177202A1 (zh) 测试结果生成方法、装置、计算机设备和存储介质
CN109670049B (zh) 图谱路径查询方法、装置、计算机设备和存储介质
CN108984388B (zh) 一种生成自动化测试用例的方法及终端设备
CN110109656B (zh) 接口模拟方法、装置、计算机设备和存储介质
CN110069297B (zh) 基于Spring MVC的异常处理方法、装置、计算机设备和存储介质
CN108874661B (zh) 测试映射关系库生成方法、装置、计算机设备和存储介质
WO2019085079A1 (zh) 接口测试方法、装置、计算机设备和存储介质
WO2020186786A1 (zh) 文件处理方法、装置、计算机设备和存储介质
CN111124702B (zh) 性能数据采集方法、装置和计算机可读存储介质
CN111176996A (zh) 测试用例生成方法、装置、计算机设备及存储介质
WO2020232883A1 (zh) 脚本缺陷扫描方法、装置、计算机设备和存储介质
CA3148489C (en) Method of and device for assessing data query time consumption, computer equipment and storage medium
CN110147319A (zh) 数据库测试方法、装置及计算机设备
CN110795171B (zh) 业务数据处理方法、装置、计算机设备及存储介质
CN109361628B (zh) 报文组装方法、装置、计算机设备和存储介质
CN113986734B (zh) 代码覆盖报告生成方法、装置、设备及介质
CN109597618B (zh) 程序开发方法、装置、计算机设备及存储介质
CN112199443B (zh) 数据同步方法、装置、计算机设备和存储介质
CN108255735B (zh) 关联环境测试方法、电子装置及计算机可读存储介质
CN110134397A (zh) 代码片段翻译方法、装置、计算机设备和存储介质
WO2019148712A1 (zh) 钓鱼网站检测方法、装置、计算机设备和存储介质
CN109213775B (zh) 搜索方法、装置、计算机设备和存储介质
CN110059002B (zh) 测试数据的生成方法、测试设备、存储介质及装置
CN109284125B (zh) 大数据平台中的依赖包配置方法、装置、设备及介质
WO2019062132A1 (zh) 业务规则管理方法、装置、存储介质和计算机设备

Legal Events

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

Ref document number: 18777011

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 18777011

Country of ref document: EP

Kind code of ref document: A1