[go: up one dir, main page]

CN106815141A - A kind of method for testing software and device - Google Patents

A kind of method for testing software and device Download PDF

Info

Publication number
CN106815141A
CN106815141A CN201510873151.2A CN201510873151A CN106815141A CN 106815141 A CN106815141 A CN 106815141A CN 201510873151 A CN201510873151 A CN 201510873151A CN 106815141 A CN106815141 A CN 106815141A
Authority
CN
China
Prior art keywords
software
test
software test
target
testing
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.)
Pending
Application number
CN201510873151.2A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510873151.2A priority Critical patent/CN106815141A/en
Publication of CN106815141A publication Critical patent/CN106815141A/en
Pending legal-status Critical Current

Links

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

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

本发明实施例提供了一种软件测试方法和装置,应用在web端,各个待测软件所部署的机房均设置有软件测试系统,所述方法包括:接收在web页面中输入的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;通过http报文将所述软件测试参数发送至对应的web服务器,以根据所述软件测试参数生成软件测试脚本并发送至所述目标机房的目标软件测试系统进行测试。本发明实施例的方案,只需接收在终端web页面输入的软件测试参数,无需在终端下载软件客户端、执行繁琐的脚本配置操作以及软件测试操作,减少了终端空间的占用,相对于传统方法,保证了终端的运行速度,充分利用了终端资源和计算资源。

The embodiment of the present invention provides a software testing method and device, which is applied on the web side, and each computer room where the software to be tested is deployed is equipped with a software testing system. The method includes: receiving the software testing parameters input in the web page, The software test parameters include the target computer room where the software to be tested is deployed; the software test parameters are sent to the corresponding web server through the http message, so that the software test script is generated according to the software test parameters and sent to the target computer room The target software testing system for testing. The solution of the embodiment of the present invention only needs to receive the software test parameters input on the terminal web page, and does not need to download the software client on the terminal, perform cumbersome script configuration operations and software test operations, which reduces the occupation of terminal space. Compared with the traditional method , which ensures the running speed of the terminal and makes full use of terminal resources and computing resources.

Description

一种软件测试方法和装置A software testing method and device

技术领域technical field

本发明涉及计算机技术领域,特别是涉及一种软件测试方法和一种软件测试装置。The invention relates to the technical field of computers, in particular to a software testing method and a software testing device.

背景技术Background technique

软件测试是在规定的条件下对程序进行操作,以发现程序错误,衡量软件质量,并对其是否能满足设计要求进行评估的过程。Software testing is the process of operating the program under specified conditions to find program errors, measure software quality, and evaluate whether it can meet the design requirements.

目前,预测试待测软件,需要从相关网站下载客户端并安装。大多数互联网公司,设有专职的软件测试人员对软件研发人员开发的软件进行压力测试,分析测试结果,进一步判断软件性能。具体地,软件测试人员下载软件客户端后,需要为待测软件搭建测试环境,使用软件客户端录制脚本,并执行录制的脚本对软件进行测试。At present, to pre-test the software to be tested, it is necessary to download and install the client from the relevant website. Most Internet companies have full-time software testers to conduct stress tests on the software developed by software developers, analyze the test results, and further judge the software performance. Specifically, after downloading the software client, the software tester needs to build a test environment for the software to be tested, use the software client to record scripts, and execute the recorded scripts to test the software.

但是,在设备端下载软件客户端、执行繁琐的脚本配置操作以及软件测试操作,占用了较多的设备空间,以致降低了设备的运行速度,对设备资源和计算资源造成了浪费。However, downloading the software client on the device side, performing cumbersome script configuration operations and software testing operations occupy a lot of device space, so that the running speed of the device is reduced, and device resources and computing resources are wasted.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的软件测试方法和相应的软件测试装置。In view of the above problems, the present invention is proposed to provide a software testing method and a corresponding software testing device that overcome the above problems or at least partially solve the above problems.

依据本发明的一个方面,提供了一种软件测试方法,应用在web端,各个待测软件所部署的机房均设置有软件测试系统,所述方法包括:According to one aspect of the present invention, a kind of software testing method is provided, is applied on the web end, and the computer room where each software to be tested is deployed is provided with a software testing system, and the method includes:

接收在web页面中输入的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;Receive the software test parameters input in the web page, the software test parameters include the target computer room where the software to be tested is deployed;

通过http报文将所述软件测试参数发送至对应的web服务器,以根据所述软件测试参数生成软件测试脚本并发送至所述目标机房的目标软件测试系统进行测试。Send the software test parameters to the corresponding web server through http messages, so as to generate a software test script according to the software test parameters and send it to the target software test system in the target computer room for testing.

可选地,所述接收在web页面中输入的软件测试参数包括:Optionally, the receiving the software testing parameters input in the web page includes:

接收在所述web页面中输入的软件测试基础脚本以及对应配置的测试场景参数。The basic software test script and the corresponding configured test scenario parameters input in the web page are received.

可选地,在所述通过http报文将所述软件测试参数发送至对应的web服务器之前,所述方法还包括:Optionally, before sending the software test parameters to the corresponding web server through the http message, the method further includes:

根据在所述web页面中触发创建软件测试任务的指示,创建软件测试任务,并在接收到启动任务的指示后,将所述软件测试任务发送至对应的web服务器。According to the instruction of triggering the creation of the software testing task in the web page, the software testing task is created, and after receiving the instruction of starting the task, the software testing task is sent to the corresponding web server.

可选地,所述方法还包括:Optionally, the method also includes:

接收在所述web页面中查看软件测试结果、所述待测软件部署的至少一个软件服务器的性能测试结果或不同软件的对比结果的指示,从所述web服务器获取相应数据并展示。Receiving an instruction to view software test results, performance test results of at least one software server deployed by the software to be tested, or comparison results of different software in the web page, obtaining corresponding data from the web server and displaying them.

根据本发明的另一个方面,提供了一种软件测试方法,应用在web服务器,各个待测软件所部署的机房均设置有软件测试系统,所述方法包括:According to another aspect of the present invention, a kind of software testing method is provided, is applied in web server, and the computer room that each software to be tested is deployed is all provided with software testing system, and described method comprises:

接收通过网页输入并通过http报文发送的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;Receiving software test parameters input through the webpage and sent by the http message, the software test parameters including the target computer room where the software to be tested is deployed;

根据所述软件测试参数生成软件测试脚本;Generate a software test script according to the software test parameters;

将所述软件测试脚本发送至所述目标机房的目标软件测试系统,由所述目标软件测试系统根据所述软件测试脚本对所述待测软件进行测试。The software test script is sent to a target software test system in the target computer room, and the target software test system tests the software to be tested according to the software test script.

可选地,所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统包括:Optionally, the target software testing system sending the software test script to the target computer room includes:

按照所述软件测试参数中包括的目标机房,确定与所述目标机房对应的目标软件测试系统;According to the target computer room included in the software test parameters, determine the target software testing system corresponding to the target computer room;

将所述软件测试脚本发送至所述目标软件测试系统。sending the software testing script to the target software testing system.

可选地,所述接收通过网页输入并通过http报文发送的软件测试参数包括:Optionally, the receiving software test parameters input through the webpage and sent through the http message include:

接收所述web端创建的软件测试任务,添加至预置的任务队列,并添加待执行标识,所述软件测试任务携带所述软件测试参数。Receive the software test task created by the web terminal, add it to the preset task queue, and add a to-be-executed identifier, and the software test task carries the software test parameters.

可选地,在所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统之前,所述方法还包括:Optionally, before sending the software test script to the target software test system in the target computer room, the method further includes:

针对携带待执行标识的软件测试任务,定期检测并确定所述目标软件测试系统满足所述软件测试参数所指示的测试性能。For the software testing task carrying the identifier to be executed, periodically detect and determine that the target software testing system satisfies the testing performance indicated by the software testing parameters.

可选地,各软件测试系统分别订阅有专用频道,所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统包括:Optionally, each software testing system subscribes to a dedicated channel, and the target software testing system sending the software testing script to the target computer room includes:

将所述软件测试脚本发送至所述目标软件测试系统订阅的专用频道,并进一步发送至所述目标软件测试系统。The software test script is sent to a dedicated channel subscribed by the target software test system, and further sent to the target software test system.

可选地,所述方法还包括:Optionally, the method also includes:

接收所述目标软件测试系统反馈的测试结果,并根据所述网页查看软件测试结果的请求反馈至所述网页进行展示。The test results fed back by the target software testing system are received, and fed back to the web page for display according to the web page request for viewing software test results.

根据本发明的另一个方面,提供了一种软件测试装置,部署在web端,各个待测软件所部署的机房均设置有软件测试系统,所述装置包括:According to another aspect of the present invention, a software testing device is provided, which is deployed on the web side, and each computer room where the software to be tested is deployed is equipped with a software testing system, and the device includes:

第一软件测试参数接收模块,用于接收在web页面中输入的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;The first software test parameter receiving module is used to receive the software test parameter input in the web page, and the software test parameter includes the target computer room where the software to be tested is deployed;

第一软件测试参数发送模块,用于通过http报文将所述软件测试参数发送至对应的web服务器,以根据所述软件测试参数生成软件测试脚本并发送至所述目标机房的目标软件测试系统进行测试。The first software test parameter sending module is used to send the software test parameter to the corresponding web server through the http message, so as to generate a software test script according to the software test parameter and send it to the target software test system in the target computer room carry out testing.

可选地,所述第一软件测试参数接收模块,具体用于接收在所述web页面中输入的软件测试基础脚本以及对应配置的测试场景参数。Optionally, the first software test parameter receiving module is specifically configured to receive the basic software test script input in the web page and the corresponding configured test scenario parameters.

可选地,所述装置还包括:Optionally, the device also includes:

软件测试任务创建模块,用于在所述通过http报文将所述软件测试参数发送至对应的web服务器之前,根据在所述web页面中触发创建软件测试任务的指示,创建软件测试任务,并在接收到启动任务的指示后,将所述软件测试任务发送至对应的web服务器。A software test task creation module, used to create a software test task according to an instruction triggering creation of a software test task in the web page before sending the software test parameters to the corresponding web server through the http message, and After receiving the instruction to start the task, the software testing task is sent to the corresponding web server.

可选地,所述装置还包括:Optionally, the device also includes:

指示接收模块,用于接收在所述web页面中查看软件测试结果、所述待测软件部署的至少一个软件服务器的性能测试结果或不同软件的对比结果的指示,从所述web服务器获取相应数据并展示。An instruction receiving module, configured to receive instructions for viewing software test results in the web page, performance test results of at least one software server deployed by the software to be tested, or comparison results of different software, and obtain corresponding data from the web server and show.

根据本发明的另一个方面,提供了一种软件测试装置,部署在web服务器,各个待测软件所部署的机房均设置有软件测试系统,所述装置包括:According to another aspect of the present invention, a kind of software testing device is provided, deployed on the web server, each computer room where the software to be tested is deployed is provided with a software testing system, and the device includes:

第二软件测试参数接收模块,用于接收通过网页输入并通过http报文发送的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;The second software test parameter receiving module is used to receive the software test parameter input through the webpage and sent by the http message, and the software test parameter includes the target computer room where the software to be tested is deployed;

软件测试脚本生成模块,用于根据所述软件测试参数生成软件测试脚本;A software test script generation module is used to generate a software test script according to the software test parameters;

软件测试脚本发送模块,用于将所述软件测试脚本发送至所述目标机房的目标软件测试系统,由所述目标软件测试系统根据所述软件测试脚本对所述待测软件进行测试。A software test script sending module, configured to send the software test script to a target software test system in the target computer room, and the target software test system tests the software to be tested according to the software test script.

可选地,所述软件测试脚本发送模块包括:Optionally, the sending module of the software test script includes:

目标软件测试系统确定子模块,用于按照所述软件测试参数中包括的目标机房,确定与所述目标机房对应的目标软件测试系统;A target software testing system determining submodule, configured to determine a target software testing system corresponding to the target computer room according to the target computer room included in the software testing parameters;

软件测试脚本传输子模块,用于将所述软件测试脚本发送至所述目标软件测试系统。The software test script transmission submodule is used to send the software test script to the target software test system.

可选地,所述第二软件测试参数接收模块包括:Optionally, the second software test parameter receiving module includes:

接收所述web端创建的软件测试任务,添加至预置的任务队列,并添加待执行标识,所述软件测试任务携带所述软件测试参数。Receive the software test task created by the web terminal, add it to the preset task queue, and add a to-be-executed identifier, and the software test task carries the software test parameters.

可选地,所述装置还包括:Optionally, the device also includes:

测试性能检测模块,用于在所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统之前,针对携带待执行标识的软件测试任务,定期检测并确定所述目标软件测试系统满足所述软件测试参数所指示的测试性能。A test performance detection module, configured to periodically detect and determine that the target software test system satisfies the requirements of the software test task carrying the identifier to be executed before the software test script is sent to the target software test system in the target computer room. The test performance indicated by the software test parameters.

可选地,各软件测试系统分别订阅有专用频道;Optionally, each software testing system subscribes to a dedicated channel;

所述软件测试脚本发送模块,具体用于将所述软件测试脚本发送至所述目标软件测试系统订阅的专用频道,并进一步发送至所述目标软件测试系统。The software test script sending module is specifically configured to send the software test script to a dedicated channel subscribed by the target software test system, and further send it to the target software test system.

可选地,所述装置还包括:Optionally, the device also includes:

测试结果接收模块,用于接收所述目标软件测试系统反馈的测试结果,并根据所述网页查看软件测试结果的请求反馈至所述网页进行展示。The test result receiving module is configured to receive the test result fed back by the target software testing system, and feed back the test result to the web page for display according to the request for viewing the software test result on the web page.

通过本发明实施例,接收用户在终端web页面输入的软件测试参数,通过http报文将所述软件测试参数发送至对应的web服务器,web服务器依据接收的软件测试参数生成软件测试脚本,进一步依据软件测试参数包括的待测软件所部署的目标机房,从而将生成的软件测试脚本发送至所述目标机房的目标软件测试系统进行测试。本发明实施例的方案,只需接收在终端web页面输入的软件测试参数,无需在终端下载软件客户端、执行繁琐的脚本配置操作以及软件测试操作,减少了终端空间的占用,相对于传统方法,保证了终端的运行速度,充分利用了终端资源和计算资源。Through the embodiment of the present invention, the software test parameters input by the user on the terminal web page are received, and the software test parameters are sent to the corresponding web server through the http message, and the web server generates the software test script according to the received software test parameters, further according to the The software testing parameters include the target computer room where the software to be tested is deployed, so that the generated software test script is sent to the target software testing system in the target computer room for testing. The solution of the embodiment of the present invention only needs to receive the software test parameters input on the terminal web page, and does not need to download the software client on the terminal, perform cumbersome script configuration operations and software test operations, which reduces the occupation of terminal space. Compared with the traditional method , which ensures the running speed of the terminal and makes full use of terminal resources and computing resources.

另外,各个待测软件所部署的机房均设置有软件测试系统,采用待测软件所部署的机房的软件测试系统,可以缩减数据传输距离,减少对网络带宽的占用,进一步缩短软件测试时间,提高软件测试效率。In addition, each computer room where the software to be tested is deployed is equipped with a software testing system. Using the software testing system in the computer room where the software to be tested is deployed can reduce the data transmission distance, reduce the occupation of network bandwidth, further shorten the software testing time, and improve Software testing efficiency.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:

图1示出了根据本发明实施例1的一种软件测试方法的步骤流程图;Fig. 1 shows a flow chart of the steps of a software testing method according to Embodiment 1 of the present invention;

图2示出了根据本发明实施例2的一种软件测试方法的步骤流程图;Fig. 2 shows a flow chart of the steps of a software testing method according to Embodiment 2 of the present invention;

图3示出了根据本发明实施例3的一种软件测试方法的步骤流程图;Fig. 3 shows a flowchart of steps of a software testing method according to Embodiment 3 of the present invention;

图4示出了根据本发明一个示例的一种软件测试方法的流程框图;Fig. 4 shows a flow chart of a software testing method according to an example of the present invention;

图5-13示出了本发明示例的web端多个web页面示意图;Fig. 5-13 shows the schematic diagram of multiple web pages on the web side of the example of the present invention;

图14示出了根据本发明实施例1的一种软件测试装置的结构框图;Fig. 14 shows a structural block diagram of a software testing device according to Embodiment 1 of the present invention;

图15示出了根据本发明实施例2的一种软件测试装置的结构框图;Fig. 15 shows a structural block diagram of a software testing device according to Embodiment 2 of the present invention;

图16示出了根据本发明实施例3的一种软件测试系统的结构框图。Fig. 16 shows a structural block diagram of a software testing system according to Embodiment 3 of the present invention.

具体实施方式detailed description

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

参照图1,示出了根据本发明实施例1的一种软件测试方法的步骤流程图,本实施例应用在web端,具体可以包括如下步骤:Referring to Fig. 1, it shows a flow chart of the steps of a software testing method according to Embodiment 1 of the present invention. This embodiment is applied on the web side, and may specifically include the following steps:

步骤101,接收在web页面中输入的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房。Step 101, receiving the software testing parameters input in the web page, the software testing parameters include the target computer room where the software to be tested is deployed.

软件测试通常采用压力测试的方法,压力测试(Stress Test),也称为强度测试、负载测试,通过模拟实际应用的软硬件环境及用户使用过程的系统负荷,长时间或超大负荷地运行测试软件,以此来测试被测系统的性能、可靠性和稳定性等。软件测试参数可以为软件测试过程中需要配置的测试参数,用于录制脚本。Software testing usually adopts the method of stress testing, stress testing (Stress Test), also known as strength testing, load testing, by simulating the actual software and hardware environment and the system load of the user's use process, the test software is run for a long time or with a large load , in order to test the performance, reliability and stability of the system under test. The software testing parameters may be testing parameters that need to be configured during the software testing process, and are used for recording scripts.

本发明实施例中,接收在终端web页面输入的软件测试参数,具体的,可以在web页面展示各种软件测试参数供用户选择,并支持用户增加所需的软件测试参数。本发明实施例所述的软件测试参数可以根据实际测试需求设置,例如基础测试脚本和与测试场景相关的参数,软件测试参数用于进一步生成测试时所依据的测试脚本。In the embodiment of the present invention, the software test parameters input on the terminal web page are received. Specifically, various software test parameters can be displayed on the web page for the user to select, and the user is supported to add the required software test parameters. The software test parameters described in the embodiments of the present invention can be set according to actual test requirements, such as basic test scripts and parameters related to test scenarios, and the software test parameters are used to further generate test scripts for testing.

各个待测软件所部署的机房均设置有软件测试系统,采用待测软件所部署的机房的软件测试系统,可以获得较快的处理速度。为此,本发明实施例中,所述软件测试参数可以包括待测软件所部署的目标机房,以据此采用目标机房中部署的软件测试系统对软件进行测试,可以缩减数据传输距离,减少对网络带宽的占用,进一步缩短软件测试时间,提高软件测试效率。Each computer room where the software to be tested is deployed is equipped with a software testing system, and a faster processing speed can be obtained by using the software testing system in the computer room where the software to be tested is deployed. For this reason, in the embodiment of the present invention, the software test parameters can include the target computer room where the software to be tested is deployed, so that the software can be tested by using the software testing system deployed in the target computer room, which can reduce the data transmission distance and reduce the time required for testing the software. The occupation of network bandwidth further shortens the software testing time and improves the efficiency of software testing.

具体地,待测软件所部署的机房可以为目标机房。例如,若待测软件所部署的机房为第一机房,则可以依据就近原则,在web页面展示的多个机房中选择第一机房的机房编号,从而可以使用第一机房内的第一软件测试系统对所述软件进行测试。Specifically, the computer room where the software to be tested is deployed may be the target computer room. For example, if the computer room where the software to be tested is deployed is the first computer room, you can select the computer room number of the first computer room among the multiple computer rooms displayed on the web page according to the principle of proximity, so that you can use the first software in the first computer room to test The system tests the software.

步骤102,通过http报文将所述软件测试参数发送至对应的web服务器,以根据所述软件测试参数生成软件测试脚本并发送至所述目标机房的目标软件测试系统进行测试。Step 102, sending the software test parameters to the corresponding web server through http messages, so as to generate a software test script according to the software test parameters and send it to the target software test system in the target computer room for testing.

web页面和web服务器之间通过http报文进行通信,接收在所述web页面中触发创建软件测试脚本的指示后,通过http报文将所述软件测试参数发送至对应的web服务器。web服务器根据接收的软件测试参数生成软件测试脚本,通过读取软件测试参数中记录的目标机房,将生成的软件测试脚本发送至所述目标机房的目标软件测试系统进行测试。The web page and the web server communicate through http messages, and after receiving an instruction to trigger the creation of a software test script in the web page, send the software test parameters to the corresponding web server through the http message. The web server generates a software test script according to the received software test parameters, and sends the generated software test script to a target software test system in the target computer room for testing by reading the target computer room recorded in the software test parameters.

用户可以在所述web页面完成对软件测试参数的配置后,可以通过点击web页面上的脚本相关按钮,将配置的软件测试参数发送至对应的web服务器。After the user completes the configuration of the software test parameters on the web page, he can click the script-related button on the web page to send the configured software test parameters to the corresponding web server.

在具体实现中,可以采用JMeter压力测试工具对软件进行压力测试。JMeter是Apache组织(Apache Software Foundation,简称为ASF)开发的基于Java的压力测试工具,用于对软件进行压力测试。JMeter可以对服务器、网络、软件或其它测试对象模拟来自不同压力类别下的巨大负载,测试它们的强度性能。In a specific implementation, the JMeter stress testing tool can be used to perform a stress test on the software. JMeter is a Java-based stress testing tool developed by the Apache Organization (Apache Software Foundation, referred to as ASF) for stress testing software. JMeter can simulate huge loads from different stress categories on servers, networks, software or other test objects to test their strength performance.

例如,可以在终端web页面展示JMeter的软件测试参数,在选择或增加软件测试参数后,可以根据在所述web页面中触发创建软件测试脚本的指示,通过http报文将所述配置的JMeter常用的软件测试参数发送至对应的web服务器,web服务器可以根据接收的JMeter常用的软件测试参数生成JMeter软件测试脚本,并依据所述软件测试参数包括的待测软件所部署的目标机房,生成的JMeter软件测试脚本发送至所述目标机房的目标软件测试系统进行测试。For example, the software test parameters of JMeter can be displayed on the terminal web page. After selecting or increasing the software test parameters, the JMeter of the configured The software test parameters are sent to the corresponding web server, and the web server can generate JMeter software test scripts according to the commonly used software test parameters of JMeter received, and according to the target computer room where the software to be tested included in the software test parameters, the generated JMeter The software test script is sent to the target software test system in the target computer room for testing.

本发明实施例中,优选地,可以接收在所述web页面中输入的软件测试基础脚本以及对应配置的测试场景参数。所述软件测试基础脚本为常用的或历史使用的测试脚本,可以在web页面展示的多个软件测试脚本中选择所需的软件测试脚本,也可以创建所需的软件测试脚本。具体地,创建软件测试基础脚本时,可以在web页面上输入基础脚本名称、基础脚本描述、脚本参数文件和其它相关的信息,点击相关按钮,完成软件测试基础脚本的创建。所述测试场景参数为针对软件测试基础脚本配置的测试场景相关参数,例如场景名称、场景描述、压缩模式、单机并发用户数和测试机数目。进一步,可以针对软件测试基础脚本和对应配置的测试场景,创建对应的软件测试任务并发送至对应的web服务器,web服务器可以依据接收的软件测试任务携带的软件测试基础脚本和所述测试场景参数,生成测试所述待测软件所需的软件测试脚本。In the embodiment of the present invention, preferably, the basic software test script input in the web page and the corresponding configured test scenario parameters can be received. The software test basic script is a commonly used or historically used test script, and the required software test script can be selected from the multiple software test scripts displayed on the web page, or the required software test script can be created. Specifically, when creating the basic script for software testing, you can enter the name of the basic script, description of the basic script, script parameter file and other relevant information on the web page, and click the relevant button to complete the creation of the basic script for software testing. The test scene parameters are test scene related parameters configured for the software test basic script, such as scene name, scene description, compression mode, number of concurrent users of a single machine, and number of test machines. Further, a corresponding software testing task can be created and sent to a corresponding web server for the software testing basic script and a correspondingly configured testing scenario, and the web server can carry the software testing basic script and the testing scenario parameters according to the received software testing task , generating a software test script required for testing the software to be tested.

在测试所述待测软件的同时,还可以对待测软件所部署的至少一个软件服务器进行测试,相应的,还可以接收在所述web页面中输入的指示所需软件测试系统的测试性能的性能测试参数。所述性能测试参数可以包括目标机房、基础脚本执行时间、基础脚本循环次数、web服务器和DB(DateBase,数据库)服务器等参数。While testing the software to be tested, at least one software server deployed by the software to be tested can also be tested, and correspondingly, the performance indicating the test performance of the required software testing system input in the web page can also be received Test parameters. The performance test parameters may include target computer room, basic script execution time, basic script cycle times, web server and DB (DateBase, database) server and other parameters.

本发明实施例中,优选地,在所述通过http报文将所述软件测试参数发送至对应的web服务器之前,所述方法还可以包括:根据在所述web页面中触发创建软件测试任务的指示,创建软件测试任务,并在接收到启动任务的指示后,将所述软件测试任务发送至对应的web服务器。其中,所述软件测试任务可以为携带软件测试基础脚本和测试场景参数的任务。In the embodiment of the present invention, preferably, before sending the software test parameters to the corresponding web server through the http message, the method may further include: according to the trigger creation of the software test task in the web page Instructing to create a software testing task, and sending the software testing task to a corresponding web server after receiving the instruction to start the task. Wherein, the software testing task may be a task carrying basic software testing scripts and test scenario parameters.

具体地,接收在所述web页面中输入的软件测试基础脚本以及对应配置的测试场景参数后,可以通过触发web页面上的任务相关按钮,创建软件测试任务。由web服务器将创建的软件测试任务记录在软件测试任务列表中,当接收到启动所述软件测试任务的指示后,从软件测试任务列表中提取所述软件测试任务,并将所述软件测试任务发送至对应的web服务器。Specifically, after receiving the basic software test script and the corresponding configured test scenario parameters input in the web page, a software test task can be created by triggering a task-related button on the web page. The software testing task created by the web server is recorded in the software testing task list, and after receiving the instruction to start the software testing task, the software testing task is extracted from the software testing task list, and the software testing task is sent to the corresponding web server.

可以根据接收的在web页面上的触发操作,将所选的软件测试脚本发送至对应的web服务器;也可以根据预置时间间隔,将软件测试任务表中的软件测试任务定时发送至对应的web服务器。The selected software test script can be sent to the corresponding web server according to the received trigger operation on the web page; the software test task in the software test task list can also be regularly sent to the corresponding web server according to the preset time interval. server.

本发明实施例中,优选地,还可以包括:接收在所述web页面中查看软件测试结果、所述待测软件部署的至少一个软件服务器的性能测试结果或不同软件的对比结果的指示,从所述web服务器获取相应数据并展示。In the embodiment of the present invention, preferably, it may also include: receiving an instruction to view the software test results, the performance test results of at least one software server deployed by the software to be tested, or the comparison results of different software in the web page, from The web server acquires corresponding data and displays it.

所述目标机房的目标软件测试系统可以对所述待测软件进行测试,得到软件测试结果,软件测试结果可以包括多种信息,例如待测软件的QPS(Query Per Second,每秒查询率)、响应时间和吞吐量。还可以测试所述待测软件部署的至少一个软件服务器的性能,得到至少一个软件服务器的性能测试结果,软件服务器的性能测试结果可以包括多种信息,例如软件服务器的CPU使用率、内存占用率和硬盘占用率。还可以比对不同软件,得到不同软件的对比结果,对比结果可以包括多种信息,例如响应时间的对比结果和吞吐量的对比结果。具体地,可以对具有相同或相似性能的不同软件进行对比,依据对比结果获悉不同软件的性能优劣。可以将得到的测试结果和对比结果存储至软件测试系统的预置数据库。The target software testing system in the target computer room can test the software to be tested to obtain software test results, and the software test results can include multiple information, such as QPS (Query Per Second, query rate per second) of the software to be tested, Response time and throughput. The performance of at least one software server deployed by the software to be tested can also be tested to obtain the performance test result of at least one software server. The performance test result of the software server can include multiple information, such as the CPU utilization rate and memory usage rate of the software server. and hard disk usage. It is also possible to compare different software to obtain a comparison result of different software, and the comparison result may include a variety of information, such as a comparison result of response time and a comparison result of throughput. Specifically, different software with the same or similar performance can be compared, and the performance of different software can be learned according to the comparison results. The obtained test results and comparison results can be stored in the preset database of the software test system.

接收在所述web页面中查看软件测试结果、所述待测软件部署的至少一个软件服务器的性能测试结果或不同软件服务器的对比结果的指示时,可以向web服务器请求获取对应数据,web服务器接收请求后向软件测试系统发送相关请求,软件测试系统从预置的数据库中调取所需的测试结果或对比结果,并反馈至web服务器,web服务器进一步将测试结果或对比结果反馈至web端,以供在web页面展示和查看。When receiving an instruction to check the software test results in the web page, the performance test results of at least one software server deployed by the software to be tested, or the comparison results of different software servers, the web server may request corresponding data, and the web server receives After the request, send relevant requests to the software testing system, the software testing system retrieves the required test results or comparison results from the preset database, and feeds back to the web server, and the web server further feeds back the test results or comparison results to the web terminal, for display and viewing on web pages.

依据本发明实施例,通过本发明实施例,接收用户在终端web页面输入的软件测试参数,通过http报文将所述软件测试参数发送至对应的web服务器,web服务器依据接收的软件测试参数生成软件测试脚本,进一步依据软件测试参数包括的待测软件所部署的目标机房,从而将生成的软件测试脚本发送至所述目标机房的目标软件测试系统进行测试。本发明实施例的方案,只需接收在终端web页面输入的软件测试参数,无需在终端下载软件客户端,以及无需在终端执行繁琐的脚本配置及软件测试操作,减少了终端的占用空间,相对于传统方法,保证了终端的运行速度,充分利用了终端资源和计算资源。According to the embodiment of the present invention, through the embodiment of the present invention, the software test parameter input by the user on the terminal web page is received, and the software test parameter is sent to the corresponding web server through the http message, and the web server generates the test parameter according to the received software test parameter. The software test script further sends the generated software test script to a target software testing system in the target computer room for testing according to the target computer room where the software to be tested included in the software test parameters is deployed. The solution of the embodiment of the present invention only needs to receive the software test parameters input on the terminal web page, and does not need to download the software client on the terminal, and does not need to perform cumbersome script configuration and software test operations on the terminal, which reduces the occupied space of the terminal and is relatively Compared with the traditional method, the running speed of the terminal is guaranteed, and the terminal resources and computing resources are fully utilized.

另外,各个待测软件所部署的机房均设置有软件测试系统,采用待测软件所部署的机房的软件测试系统,可以缩减数据传输距离,减少对网络带宽的占用,进一步缩短软件测试时间,提高软件测试效率。In addition, each computer room where the software to be tested is deployed is equipped with a software testing system. Using the software testing system in the computer room where the software to be tested is deployed can reduce the data transmission distance, reduce the occupation of network bandwidth, further shorten the software testing time, and improve Software testing efficiency.

参照图2,示出了根据本发明实施例2的一种软件测试方法的步骤流程图,本实施例应用在web服务器,具体可以包括如下步骤:Referring to Fig. 2, it shows a flow chart of the steps of a software testing method according to Embodiment 2 of the present invention. This embodiment is applied to a web server, and may specifically include the following steps:

步骤201,接收通过web页面输入并通过http报文发送的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房。Step 201, receiving the software test parameters input through the web page and sent through the http message, the software test parameters include the target computer room where the software to be tested is deployed.

本发明实施例中,可以接收通过终端web页面输入或选择的软件测试参数,所述软件测试参数可以通过http报文发送。本发明实施例接收的软件测试参数可以为根据实际测试需求在web端设置的参数,例如基础测试脚本、与测试场景相关的参数,如场景名称、场景描述,压缩模式,单机并发用户数和测试机数目等参数,软件测试参数用于进一步生成测试时所依据的测试脚本。In the embodiment of the present invention, the software test parameters input or selected through the terminal web page can be received, and the software test parameters can be sent through http messages. The software test parameters received in the embodiment of the present invention can be parameters set on the web side according to actual test requirements, such as basic test scripts, parameters related to test scenarios, such as scene name, scene description, compression mode, number of concurrent users of a single machine and test The number of machines and other parameters, the software test parameters are used to further generate test scripts based on the test.

各个软件所部署的机房可以设置有软件测试系统,因为所述软件测试参数可以包括待测软件所部署的目标机房,所以可以采用待测软件所部署的目标机房的软件测试系统对待测软件进行测试,可以缩减数据传输距离,减少对网络带宽的占用,进一步缩短软件测试时间,提高软件测试效率。The computer room where each software is deployed can be provided with a software testing system, because the software testing parameters can include the target computer room where the software to be tested is deployed, so the software testing system of the target computer room where the software to be tested can be deployed can be used to test the software to be tested , can reduce the distance of data transmission, reduce the occupation of network bandwidth, further shorten the time of software testing, and improve the efficiency of software testing.

另外,由于只需接收在终端web页面输入的软件测试参数,无需在终端下载软件客户端,也无需在终端执行繁琐的脚本配置及软件测试操作,减少了终端的占用空间,相对于传统方法,保证了终端的运行速度,充分利用了终端资源和计算资源。In addition, since it only needs to receive the software test parameters input on the terminal web page, there is no need to download the software client on the terminal, and there is no need to perform cumbersome script configuration and software test operations on the terminal, which reduces the occupied space of the terminal. Compared with the traditional method, The operation speed of the terminal is guaranteed, and the terminal resources and computing resources are fully utilized.

步骤202,根据所述软件测试参数生成软件测试脚本。Step 202, generating a software test script according to the software test parameters.

测试脚本通常指一个特定测试的一系列指令,可以依据配置的测试参数生成。本发明实施例中,接收终端发送的软件测试参数后,可以提取所述软件测试参数中包含的用于软件测试的测试参数,并依据测试参数生成软件测试脚本。A test script usually refers to a series of instructions for a specific test, which can be generated according to the configured test parameters. In the embodiment of the present invention, after receiving the software test parameters sent by the terminal, the test parameters used for the software test included in the software test parameters may be extracted, and a software test script may be generated according to the test parameters.

步骤203,将所述软件测试脚本发送至所述目标机房的目标软件测试系统,由所述目标软件测试系统根据所述软件测试脚本对所述待测软件进行测试。Step 203, sending the software test script to a target software test system in the target computer room, and the target software test system tests the software to be tested according to the software test script.

本发明实施例中,从软件测试参数中识别待测试软件所部署的目标机房,可以依据识别的目标机房,将所述软件测试脚本发送至所述目标机房的目标软件测试系统。所述目标软件测试系统接收到所述软件测试脚本以后,执行所述软件测试脚本,对所述待测软件进行测试。In the embodiment of the present invention, the target computer room where the software to be tested is deployed is identified from the software test parameters, and the software test script can be sent to the target software testing system in the target computer room according to the identified target computer room. After receiving the software test script, the target software test system executes the software test script to test the software to be tested.

本发明实施例中,优选的,所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统可以包括:按照所述软件测试参数中包括的目标机房,确定与所述目标机房对应的目标软件测试系统;将所述软件测试脚本发送至所述目标软件测试系统。In the embodiment of the present invention, preferably, the sending the software test script to the target software testing system of the target computer room may include: according to the target computer room included in the software test parameters, determine the a target software testing system; sending the software testing script to the target software testing system.

基于各个机房内均设置有软件测试系统,所以可以按照所述软件测试参数中包括的目标机房,确定所述目标机房对应的目标软件测试系统,之后将所述软件测试脚本发送至所述目标软件测试系统。目标软件测试系统可以执行接收的软件测试脚本,对所述待测软件进行测试。Based on the fact that each computer room is equipped with a software testing system, the target software testing system corresponding to the target computer room can be determined according to the target computer room included in the software testing parameters, and then the software test script is sent to the target software test system. The target software testing system can execute the received software testing script to test the software to be tested.

本发明实施例中,优选的,所述接收通过web页面输入并通过http报文发送的软件测试参数可以包括:接收所述web端创建的软件测试任务,添加至预置的任务队列,并添加待执行标识,所述软件测试任务携带所述软件测试参数。In the embodiment of the present invention, preferably, the receiving the software test parameters input through the web page and sent through the http message may include: receiving the software test task created by the web end, adding it to the preset task queue, and adding To be executed, the software test task carries the software test parameters.

可以在接收所述web页面创建的软件测试任务后,将接收的携带所述软件测试参数的软件测试任务添加至预置的任务队列。由于任务队列中不同的标识可以指示不同的任务执行状态,例如待执行标识可以指示任务处于未执行状态,执行标识可以指示任务处于正在执行状态,执行结束标识可以指示任务处于执行结束状态,所以针对任务队列中新添加的软件测试任务,可以对其配置待执行标识,用于指示所述软件测试任务处于未执行状态。其中,用于指示任务执行状态的标识可以为文字、与执行状态关联的数字或字符,本发明在此不做限制。After receiving the software testing task created by the web page, the received software testing task carrying the software testing parameters can be added to a preset task queue. Since different identifiers in the task queue can indicate different task execution states, for example, the to-be-executed identifier can indicate that the task is in the unexecuted state, the execution identifier can indicate that the task is in the executing state, and the execution end identifier can indicate that the task is in the execution end state, so for A newly added software testing task in the task queue may be configured with a to-be-executed flag, which is used to indicate that the software testing task is in an unexecuted state. Wherein, the identifier used to indicate the execution state of the task may be text, numbers or characters associated with the execution state, which is not limited in the present invention.

任务队列中用于指示任务执行状态的标识可以随着任务执行状态的变化而改变,具体地,在提取所述软件测试任务、依据软件测试任务生成软件测试脚本并发送至目标软件测试系统后,待执行标识可以更改为执行结束标识。The identifier used to indicate the execution state of the task in the task queue may change as the execution state of the task changes. Specifically, after extracting the software test task, generating a software test script according to the software test task and sending it to the target software test system, The flag to be executed can be changed to the flag of execution end.

本发明实施例中,优选的,在所述根据所述软件测试参数生成软件测试脚本之前,所述方法还可以包括:针对所述任务队列中携带待执行标识的软件测试任务,定期检测并确定所述目标软件测试系统满足所述软件测试任务携带的所述软件测试参数所指示的测试性能。In the embodiment of the present invention, preferably, before generating the software test script according to the software test parameters, the method may further include: regularly detecting and determining The target software testing system satisfies the testing performance indicated by the software testing parameters carried by the software testing task.

所述软件测试任务可以携带所述软件测试参数,所述软件测试参数可以指示所需的目标软件测试系统的测试性能。具体地,可以从任务列表中识别待执行标识,针对携带待执行标识的软件测试任务,定期检测所述目标软件测试系统是否满足所述软件测试任务携带的软件测试参数所指示的测试性能,若确定满足测试性能条件,则进行下一步,根据所述软件测试参数生成软件测试脚本;若确定不满足测试性能条件,则继续定期检测直至满足测试性能条件,才进行下一步软件测试脚本的生成。The software testing task may carry the software testing parameters, and the software testing parameters may indicate the required testing performance of the target software testing system. Specifically, the to-be-executed identifier can be identified from the task list, and for the software testing task carrying the to-be-executed identifier, it is periodically detected whether the target software testing system satisfies the test performance indicated by the software testing parameters carried by the software testing task, if Determine to meet the test performance conditions, then proceed to the next step, generate software test scripts according to the software test parameters; if it is determined not to meet the test performance conditions, then continue to periodically detect until the test performance conditions are met, and then proceed to the generation of the next step software test scripts.

例如,若所述软件测试参数指示所需的目标软件测试系统的测试设备数目,即压力服务器的数目,并且设定待测软件所需的压力服务器数目为2,则针对携带待执行标识的软件测试任务,定期检测所述目标软件测试系统是否存在2台以上空余压力服务器,当存在2台以上空余压力服务器时,进行下一步,根据所述软件测试参数生成软件测试脚本;当不存在空余压力服务器或存在的空余压力服务器数目为1时,继续定期检测直至满足压力服务器数目条件,才进行下一步软件测试脚本的生成。For example, if the software testing parameters indicate the number of test equipment required for the target software testing system, i.e. the number of stress servers, and the number of stress servers required by the software to be tested is set to 2, then for the software carrying the identification to be executed The test task is to regularly detect whether there are more than 2 free pressure servers in the target software testing system, and when there are more than 2 free pressure servers, proceed to the next step and generate a software test script according to the software test parameters; when there is no free pressure server When the number of the server or the existing spare pressure server is 1, continue the regular detection until the condition of the number of the pressure server is met, and then proceed to the generation of the next software test script.

本发明实施例中,优选的,所述根据所述软件测试参数生成软件测试脚本可以包括:从所述任务列表中提取所述软件测试任务,依据所述软件测试任务携带的所述软件测试参数,生成所述软件测试脚本。In the embodiment of the present invention, preferably, the generating the software test script according to the software test parameters may include: extracting the software test task from the task list, according to the software test parameters carried by the software test task , generating the software test script.

确定所述目标软件测试系统满足所述软件测试任务携带的所述软件测试参数所指示的测试性能后,可以从所述任务列表中提取所述软件测试任务,依据所述软件测试任务携带的所述软件测试参数,例如可以依据软件测试基础脚本和测试场景参数,如单机并发数等参数,生成所述软件测试脚本。After determining that the target software testing system satisfies the test performance indicated by the software testing parameters carried by the software testing task, the software testing task may be extracted from the task list, and the The software test parameters, for example, can generate the software test script according to the software test basic script and test scene parameters, such as parameters such as the number of concurrent single machines.

本发明实施例中,优选的,各软件测试系统分别订阅有专用频道,所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统可以包括:将所述软件测试脚本发送至所述目标软件测试系统订阅的专用频道,并进一步发送至所述目标软件测试系统。In the embodiment of the present invention, preferably, each software testing system subscribes to a dedicated channel, and the sending the software testing script to the target software testing system in the target computer room may include: sending the software testing script to the The dedicated channel subscribed by the target software testing system, and further sent to the target software testing system.

频道又称信道,是信号在通信系统中传输的通道。各个机房的软件测试系统可以订阅不同的频道,即每个软件测试系统可以具有专用频道,可以通过不同的专用频道与不同的软件测试系统单独传输数据信号。以Redis为例,Redis是完全开源免费的高性能的key-value数据库,遵守BSD协议,Redis客户端可以订阅任意数量的频道。A channel, also known as a channel, is a channel through which signals are transmitted in a communication system. The software testing systems in each computer room can subscribe to different channels, that is, each software testing system can have a dedicated channel, and can transmit data signals separately with different software testing systems through different dedicated channels. Take Redis as an example. Redis is a completely open source and free high-performance key-value database. It complies with the BSD protocol. Redis clients can subscribe to any number of channels.

在具体实现中,确定所述目标软件测试系统满足所述软件测试参数所指示的测试性能后,可以依据所述软件测试任务携带的软件测试参数生成软件测试脚本,之后将所述软件测试脚本发送至所述目标软件测试系统订阅的专用频道,并且通过该专用频道发送至所述目标软件测试系统。In a specific implementation, after determining that the target software testing system satisfies the test performance indicated by the software testing parameters, a software testing script can be generated according to the software testing parameters carried by the software testing task, and then the software testing script can be sent to to the dedicated channel subscribed by the target software testing system, and sent to the target software testing system through the dedicated channel.

本发明实施例中,优选的,所述方法还可以包括:接收所述目标软件测试系统反馈的测试结果,并根据所述web页面查看软件测试结果的请求反馈至所述web页面进行展示。In the embodiment of the present invention, preferably, the method may further include: receiving test results fed back by the target software testing system, and feeding back to the web page for presentation according to the request for viewing software test results on the web page.

接收到所述目标软件测试系统反馈的测试结果后,可以将测试结果进行存储,当接收到所述web网页查看软件测试结果的请求后,提取存储的测试结果,并发送至终端web页面以供展示和查看。After receiving the test result fed back by the target software testing system, the test result can be stored, and after receiving the request of the web page to view the software test result, the stored test result is extracted and sent to the terminal web page for Showcase and view.

在具体实现中,所述测试结果可以包括软件测试结果、针对其它软件服务器的性能测试结果和不同软件的对比结果。其中,所述软件测试结果可以包括每秒查询率、响应时间和成功率等信息;所述性能测试结果可以包括软件服务器的CPU使用率、内存占用率和硬盘占用率等信息;所述不同软件的对比结果可以包括具有相同或相似性能的不同软件的性能对比结果,或者同一款软件不同版本的性能对比结果,如不同软件的响应时间的对比结果、不同软件的成功率的对比结果。In a specific implementation, the test results may include software test results, performance test results for other software servers, and comparison results of different software. Wherein, the software test results may include information such as query rate per second, response time, and success rate; the performance test results may include information such as the CPU usage rate, memory occupancy rate, and hard disk occupancy rate of the software server; the different software The comparison results may include the performance comparison results of different software with the same or similar performance, or the performance comparison results of different versions of the same software, such as the comparison results of the response time of different software, the comparison results of the success rate of different software.

参照图3,示出了根据本发明实施例3的一种软件测试方法的步骤流程图,本实施例应用在软件测试系统,具体可以包括如下步骤:Referring to FIG. 3 , it shows a flow chart of steps of a software testing method according to Embodiment 3 of the present invention. This embodiment is applied to a software testing system, and may specifically include the following steps:

步骤301,接收web服务器发送的软件测试脚本,所述软件测试脚本根据web网页通过http报文发送至所述web服务器的软件测试参数生成,所述软件测试参数包括待测软件所部署的目标机房,所述软件测试脚本根据所述目标机房发送至目标软件测试系统。Step 301, receiving the software test script sent by the web server, the software test script is generated according to the software test parameters sent to the web server by the http message from the web page, and the software test parameters include the target computer room where the software to be tested is deployed , the software test script is sent to the target software test system according to the target computer room.

本发明实施例中,web服务器可以依据接收到的web网页输入并通过http报文发送的软件测试参数,生成软件测试脚本并发送至所述目标软件测试系统。In the embodiment of the present invention, the web server can generate a software test script according to the received software test parameters input from the web page and sent through the http message, and send it to the target software test system.

各个待测软件所部署的机房均设置有软件测试系统,采用待测软件所部署的机房的软件测试系统,可以获得较快的处理速度。为此,本发明实施例中,所述软件测试参数可以包括待测软件所部署的目标机房,以据此采用目标机房中部署的软件测试系统对软件进行测试,可以缩减数据传输距离,减少对网络带宽的占用,进一步缩短软件测试时间,提高软件测试效率。具体地,所述目标机房可以为待测软件所部署的机房。Each computer room where the software to be tested is deployed is equipped with a software testing system, and a faster processing speed can be obtained by using the software testing system in the computer room where the software to be tested is deployed. For this reason, in the embodiment of the present invention, the software test parameters can include the target computer room where the software to be tested is deployed, so that the software can be tested by using the software testing system deployed in the target computer room, which can reduce the data transmission distance and reduce the time required for testing the software. The occupation of network bandwidth further shortens the software testing time and improves the efficiency of software testing. Specifically, the target computer room may be a computer room where the software to be tested is deployed.

例如,web服务器可以依据接收到的web网页输入并通过http报文发送的JMeter常用的软件测试参数,生成JMeter软件测试脚本,并通过识别所述软件测试参数中包含的机房1,将生成的JMeter软件测试脚发送至机房1的软件测试系统1。软件测试系统1接收web服务器发送的JMeter软件测试脚本后,可以执行该JMeter软件测试脚本,测试所述待测软件。For example, the web server can generate the JMeter software test script according to the JMeter commonly used software test parameters that are input by the received web page and sent by the http message, and by identifying the computer room 1 contained in the software test parameters, the generated JMeter The software test foot is sent to the software test system 1 in the computer room 1. After the software testing system 1 receives the JMeter software test script sent by the web server, it can execute the JMeter software test script to test the software to be tested.

步骤302,根据所述软件测试脚本对待测软件进行测试。Step 302, test the software to be tested according to the software test script.

本发明实施例中,在接收到web服务器发送的软件测试脚本后,执行所述软件测试脚本,测试所述待测软件,获得测试结果,例如软件性能测试结果、所述待测软件部署的至少一个软件服务器的性能测试结果或不同软件的性能测试结果。In the embodiment of the present invention, after receiving the software test script sent by the web server, execute the software test script, test the software to be tested, and obtain test results, such as software performance test results, at least The performance test results of a software server or the performance test results of different software.

本发明实施例中,优选的,各软件测试系统分别订阅有第一专用频道,所述接收web网页对应的web服务器发送的软件测试脚本可以包括:监控所述web服务器发送至所述第一专用频道的软件测试脚本;将所述软件测试脚本发送至所述软件测试系统的压力服务器进行测试。In the embodiment of the present invention, preferably, each software testing system subscribes to a first dedicated channel respectively, and the receiving the software testing script sent by the web server corresponding to the web page may include: monitoring the web server sending the script to the first dedicated channel. The software test script of the channel; the software test script is sent to the stress server of the software test system for testing.

频道又称信道,是信号在通信系统中传输的通道。各个机房的软件测试系统可以订阅不同的频道,即每个软件测试系统可以具有专用频道,可以通过不同的专用频道与不同的软件测试系统单独传输数据信号。A channel, also known as a channel, is a channel through which signals are transmitted in a communication system. The software testing systems in each computer room can subscribe to different channels, that is, each software testing system can have a dedicated channel, and can transmit data signals separately with different software testing systems through different dedicated channels.

压力测试系统用于测试被测系统的性能、可靠性和稳定性等性能,具体可以包括控制服务器和压力服务器机,分别可以有一台或多台。压力服务器是模拟实际应用的软硬件环境及用户使用过程的系统负荷,长时间或超大负荷地运行测试软件,以此来测试被测系统的性能、可靠性和稳定性等性能的设备。控制服务器用于监控待测软件所部署的软件服务器的性能和运行状态。The stress test system is used to test the performance, reliability and stability of the system under test, and may specifically include one or more control servers and stress servers. The stress server is a device that simulates the software and hardware environment of the actual application and the system load of the user's use process, and runs the test software for a long time or with a large load to test the performance, reliability and stability of the system under test. The control server is used to monitor the performance and running status of the software server where the software to be tested is deployed.

在具体实现中,所述目标机房的目标软件测试系统可以订阅第一专用频道,监控所述web服务器发送至所述第一专用频道的软件测试脚本,并将生成的软件测试脚本发送至所述软件测试系统的压力服务器进行测试,压力服务器执行所述软件测试脚本,对所述待测软件进行测试,得到软件测试结果。具体地,压力服务器可以测试所述待测软件的QPS、响应时间和吞吐量等信息中的部分信息或全部信息。控制服务器可以获取压力服务器生成的软件测试结果,可以将得到的软件测试结果存储至所述软件测试系统的预置数据库,例如mango数据库,以供调取和查看。In a specific implementation, the target software testing system in the target computer room can subscribe to the first dedicated channel, monitor the software test script sent by the web server to the first dedicated channel, and send the generated software test script to the The stress server of the software testing system performs the test, and the stress server executes the software test script, tests the software to be tested, and obtains a software test result. Specifically, the stress server may test some or all of the information such as QPS, response time, and throughput of the software to be tested. The control server can obtain the software test results generated by the stress server, and can store the obtained software test results in a preset database of the software test system, such as a mango database, for retrieval and viewing.

在所述web网页请求查看软件测试结果时,可以利用所述第一专用频道将软件测试结果传输至对应的web服务器。When the web page requests to view software test results, the first dedicated channel may be used to transmit the software test results to a corresponding web server.

本发明实施例中,优选地,各软件测试系统分别订阅有第二专用频道,所述方法还可以包括:监控所述web服务器发送至所述第二专用频道的软件测试脚本;对所述待测软件部署的至少一个软件服务器进行状态监控。In the embodiment of the present invention, preferably, each software testing system subscribes to a second dedicated channel, and the method may further include: monitoring the software testing script sent by the web server to the second dedicated channel; Monitor the status of at least one software server deployed by the test software.

在具体实现中,各软件测试系统还可以订阅第二专用频道,可以利用压力服务器对所述待测软件所部署的设备内至少一个软件服务器进行状态监控,获得监控结果。具体地,控制服务器可以监控软件服务器的CPU使用率、内存占用率和硬盘占用率等。待所述待测软件测试结束后,控制服务器可以将得到的监控结果存储至所述软件测试系统的预置数据库,例如mango数据库,以供调取和查看。其中,压力服务器获得的软件测试结果和控制服务器获得的监控结果可以存储于同一预置数据库,也可以存储于不同的预置数据库,不发明在此不做限制。In a specific implementation, each software testing system can also subscribe to the second dedicated channel, and can use the stress server to monitor the status of at least one software server in the device where the software to be tested is deployed, and obtain monitoring results. Specifically, the control server may monitor the CPU usage, memory usage, and hard disk usage of the software server. After the testing of the software to be tested is completed, the control server can store the obtained monitoring results in a preset database of the software testing system, such as a mango database, for retrieval and viewing. Wherein, the software test results obtained by the stress server and the monitoring results obtained by the control server can be stored in the same preset database, or can be stored in different preset databases, and there is no limitation here.

之后,在所述web网页请求查看监控结果时,可以利用所述第二专用频道将监控结果传输至对应的web服务器。Afterwards, when the web page requests to view the monitoring result, the second dedicated channel may be used to transmit the monitoring result to the corresponding web server.

本发明实施例中,优选地,所述对所述待测软件部署的至少一个软件服务器进行状态监控可以包括:通过访问所述软件服务器,和/或,通过调用管理服务器的目标接口,获取所述软件服务器的至少一个运行状态参数。In the embodiment of the present invention, preferably, the state monitoring of at least one software server deployed by the software to be tested may include: accessing the software server, and/or, obtaining all at least one running state parameter of the software server.

软件服务器的运行状态参数可以包括软件服务器的CPU使用率、内存占用率和硬盘占用率等参数。The operating state parameters of the software server may include parameters such as CPU usage, memory usage, and hard disk usage of the software server.

进一步优选的,待所述待测软件测试结束后,待测软件所部署的设备的软件服务器可以记录其自身的运行状态参数,同时控制服务器或其他服务器可以监控内部各个软件服务器的运行状态,记录各个软件服务器的运行状态参数。因此,可以通过访问所述软件服务器和调用管理服务器的目标接口中至少一种方式,获取所述软件服务器的至少一个运行状态参数。具体实现中,可以采用任意适用的方式监控软件服务器的运行状态参数,本发明在此不做限制。Further preferably, after the test of the software to be tested is finished, the software server of the equipment deployed by the software to be tested can record its own running state parameters, and the control server or other servers can monitor the running state of each internal software server and record The running state parameters of each software server. Therefore, at least one running state parameter of the software server can be obtained by at least one of accessing the software server and calling a target interface of the management server. In a specific implementation, any suitable method may be used to monitor the running state parameters of the software server, which is not limited in the present invention.

本发明实施例中,优选地,所述方法还可以包括:获取所述压力服务器生成的测试日志;解析所述测试日志获得对所述待测软件的测试结果,并在所述web网页请求查看测试结果时反馈至对应的web服务器。In the embodiment of the present invention, preferably, the method may further include: obtaining the test log generated by the stress server; parsing the test log to obtain the test result of the software under test, and requesting to view the test result on the web page The test results are fed back to the corresponding web server.

当目标软件测试系统的压力服务器完成对所述待测软件的测试后,可以将测试结果写入日志,以日志形式存储获得的测试结果。因为测试日志除包含所需的测试结果外,还包含较多的冗余数据,所以需要对所述测试日志进行解析,提取所需的测试数据,以获得较为精确的测试结果,之后可以将解析的测试结果存储至目标软件测试系统的预置数据库。After the stress server of the target software testing system finishes testing the software to be tested, the test result can be written into a log, and the obtained test result is stored in the form of a log. Because the test log contains more redundant data in addition to the required test results, it is necessary to analyze the test log and extract the required test data to obtain more accurate test results, and then the parsed The test results are stored in the preset database of the target software testing system.

当web服务器接收到所述web网页请求查看软件测试结果时,可以接收web服务器发送的调用软件测试结果的请求,可以从预置数据库中调用解析的软件测试结果,并发送至对应的web服务器,进一步,web服务器会将接收的软件测试结果反馈至终端,以供web页面展示。When the web server receives the web page request to check the software test result, it can receive the request of calling the software test result sent by the web server, and can call the analyzed software test result from the preset database, and send it to the corresponding web server, Further, the web server will feed back the received software test results to the terminal for display on the web page.

本发明实施例中,优选地,所述方法还可以包括:对比不同软件的测试结果,并在所述web网页请求查看对比结果时反馈至对应的web服务器。In the embodiment of the present invention, preferably, the method may further include: comparing test results of different software, and feeding back to a corresponding web server when the web page requests to view the comparison results.

所述软件测试系统的控制服务器还可以对得到的多个软件的软件测试结果进行对比,分析不同软件存在的性能差别,并将得到的对比结果存储至软件操作系统预置的数据库。具体地,可以对具有相同或相似性能的不同软件的软件性能进行对比,或者对同一款软件不同版本的软件性能进行对比等,从而可以得到不同软件的响应时间的对比结果、不同软件的成功率的对比结果和其它对比结果。The control server of the software testing system can also compare the obtained software testing results of multiple software, analyze the performance difference of different software, and store the obtained comparison results in the database preset in the software operating system. Specifically, the software performance of different software with the same or similar performance can be compared, or the software performance of different versions of the same software can be compared, so that the comparison results of the response time of different software and the success rate of different software can be obtained. and other comparisons.

web服务器接收到所述web页面中查看不同软件的对比结果的指示后,可以向所述目标软件测试系统发送调取对比结果的指示,所述目标软件测试系统接收到所述指示后,可以从预置数据库中调取所需的对比结果并反馈至对应的web服务器,并由所述web服务器进一步反馈至所述web页面,以供展示和查看。After the web server receives the instruction to view the comparison results of different software in the web page, it can send an instruction to call the comparison result to the target software testing system, and the target software testing system can receive the instruction from the The required comparison results are retrieved from the preset database and fed back to the corresponding web server, and further fed back to the web page by the web server for display and viewing.

依据本发明实施例,接收用户在终端web页面输入的软件测试参数,通过http报文将所述软件测试参数发送至对应的web服务器,web服务器依据接收的软件测试参数生成软件测试脚本,进一步依据软件测试参数包括的待测软件所部署的目标机房,从而将生成的软件测试脚本发送至所述目标机房的目标软件测试系统进行测试。本发明实施例的方案,只需接收在终端web页面输入的软件测试参数,无需在终端下载软件客户端,以及无需在终端执行繁琐的脚本配置及软件测试操作,减少了终端的占用空间,相对于传统方法,保证了终端的运行速度,充分利用了终端资源和计算资源。According to the embodiment of the present invention, the software test parameters input by the user on the terminal web page are received, and the software test parameters are sent to the corresponding web server through the http message, and the web server generates the software test script according to the received software test parameters, and further according to the The software testing parameters include the target computer room where the software to be tested is deployed, so that the generated software test script is sent to the target software testing system in the target computer room for testing. The solution of the embodiment of the present invention only needs to receive the software test parameters input on the terminal web page, and does not need to download the software client on the terminal, and does not need to perform cumbersome script configuration and software test operations on the terminal, which reduces the occupied space of the terminal and is relatively Compared with the traditional method, the running speed of the terminal is guaranteed, and the terminal resources and computing resources are fully utilized.

另外,各个待测软件所部署的机房均设置有软件测试系统,采用待测软件所部署的机房的软件测试系统,可以缩减数据传输距离,减少对网络带宽的占用,进一步缩短软件测试时间,提高软件测试效率。In addition, each computer room where the software to be tested is deployed is equipped with a software testing system. Using the software testing system in the computer room where the software to be tested is deployed can reduce the data transmission distance, reduce the occupation of network bandwidth, further shorten the software testing time, and improve Software testing efficiency.

为使本领域技术人员更好的理解本发明,以下通过一个示例对本发明的一种软件测试方法的机制进行说明。In order to enable those skilled in the art to better understand the present invention, the mechanism of a software testing method of the present invention will be described below through an example.

参照图4,示出了本发明一个示例的一种软件测试方法的流程框图,由图4可知,包含三个机房,各个机房均设有控制服务器和压力服务器,所述方法可以包括以下步骤:With reference to Fig. 4, show the flowchart of a kind of software testing method of an example of the present invention, as can be seen from Fig. 4, comprise three machine rooms, each machine room is all provided with control server and pressure server, described method can comprise the following steps:

首先,接收用户在所述终端web页面输入的软件测试参数,所述软件测试参数包括待测软件所部署的机房C、软件测试基础脚本和场景测试参数,通过接收与创建任务相关的指示,依据软件测试参数创建软件测试任务,并在接收到启动任务的指示后,将所述软件测试任务发送至对应的web服务器。First, the software test parameters input by the user on the terminal web page are received, and the software test parameters include the computer room C where the software to be tested is deployed, the software test basic script and the scene test parameters, by receiving instructions related to creating tasks, according to The software testing parameters create a software testing task, and after receiving an instruction to start the task, send the software testing task to a corresponding web server.

其次,web服务器将接收的软件测试任务添加至预设的任务队列并存储至预置数据库。在任务队列中,对新增加的软件测试任务添加待执行标识,针对任务队列中携带待执行标识的软件测试任务,定期检测并确定机房C的软件测试系统C是否存在空余的3台压力服务器,若存在,则从任务队列中提取所述软件测试任务并生成软件测试脚本,将所述软件测试脚本发送至机房C的软件测试系统C。Secondly, the web server adds the received software testing task to a preset task queue and stores it in a preset database. In the task queue, add the to-be-executed flag to the newly added software test task, and regularly detect and determine whether there are three vacant pressure servers in the software test system C of the computer room C for the software test task carrying the to-be-executed flag in the task queue, If it exists, the software test task is extracted from the task queue to generate a software test script, and the software test script is sent to the software test system C in the computer room C.

再次,软件测试系统C的控制服务器可以将获得的软件测试结果存储至预置的mango数据库;软件测试系统C的监控服务器可以监控的至少一个软件服务器的运行状态,并将获得的监控结果存储至预置的mango数据库。其中,软件服务器可以记录自身的运行状态参数。需要说明的是,在具体实现中,控制服务器和监控服务器可以位于同一台服务器或同一服务器集群,本发明在此不做限制。Again, the control server of software testing system C can store the software testing result obtained to the preset mango database; the monitoring server of software testing system C can monitor the operating status of at least one software server, and store the monitoring result obtained in Pre-built mango database. Wherein, the software server can record its own running state parameters. It should be noted that, in a specific implementation, the control server and the monitoring server may be located on the same server or the same server cluster, which is not limited in the present invention.

最后,web服务器接收到终端web页面发送的查看指示后,向机房C的软件测试系统C发送相关的查看指示,软件测试系统C从预置的mango数据库中调取所需的测试结果,同时通过访问所述软件服务器,获取所述软件服务器的至少一个运行状态参数,将获得的测试结果和运行状态参数反馈至对应的web服务器,进一步由web服务器反馈至web页面以供展示和查看。Finally, after the web server receives the viewing instruction sent by the terminal web page, it sends the relevant viewing instruction to the software testing system C in the computer room C, and the software testing system C retrieves the required test results from the preset mango database, and passes the Accessing the software server, obtaining at least one operating state parameter of the software server, feeding back the obtained test results and operating state parameters to the corresponding web server, and further feeding back to the web page by the web server for display and viewing.

为使本领域技术人员更好的理解本发明在web端web页面中创建软件测试任务的过程,以下通过图5-图13,对上述过程进行说明。In order for those skilled in the art to better understand the process of creating a software testing task in the web page of the web end of the present invention, the above process will be described below with reference to FIGS. 5-13 .

参照图5,示出了本发明示例的web端第一web页面示意图,由图5可知,所述第一web页面左侧展示了概况、测试脚本(即为本发明实施例中的软件测试基础脚本)、测试场景、测试任务和测试结果五个划分标识,通过点击左侧任意划分标识可以展示相应页面,可以查看概况或输入软件测试参数或查看测试结果。所述第一web页面右侧展示了概况划分标识对应的页面内容,具体地,展示了所述web端已生成的软件测试基本脚本数目7、测试场景数目8、生成的软件测试任务数目9以及反馈的软件测试结果数目10。用户可以通过点击页面右侧的相关按钮,新增脚本、场景或任务,或者查看测试结果。另外,在所述第一web页面下方还显示软件测试任务生成提示信息,通知用户有新的软件测试任务生成,用户可以通过触发相关操作查看或忽略生成的任务,例如,可以通过点击“查看”按钮,查看“任_务2015-11-1823:05:06”创建的任务。Referring to Fig. 5, the schematic diagram of the first web page of the web end of the example of the present invention is shown, as can be seen from Fig. 5, the left side of the first web page shows an overview, a test script (that is, a software test basis in the embodiment of the present invention Script), test scenario, test task and test result. By clicking any division mark on the left side, the corresponding page can be displayed, and you can view the overview, enter software test parameters or view test results. The right side of the first web page shows the page content corresponding to the profile division identification, specifically, shows the number of software test basic scripts generated by the web end 7, the number of test scenarios 8, the number of software test tasks generated 9 and The number of feedback software test results10. Users can click the relevant buttons on the right side of the page to add scripts, scenarios or tasks, or view test results. In addition, a software test task generation prompt message is displayed at the bottom of the first web page, notifying the user that a new software test task is generated, and the user can view or ignore the generated task by triggering related operations, for example, by clicking "View" button to view the tasks created by "task_task 2015-11-18 23:05:06".

参照图6,示出了本发明示例的web端第二web页面示意图,由图6可知,所述第二web页面展示了测试脚本划分标识对应的页面内同。具体地,展示了四个已建立的测试脚本,进一步展示了各个测试脚本的脚本名称、脚本描述、脚本创建时间和最后修改时间,同时还配置了“查看”、“编辑”和“删除”按钮,用于查看、编辑或删除相应的测试脚本。Referring to FIG. 6 , it shows a schematic diagram of a second web page at the web end of an example of the present invention. It can be seen from FIG. 6 that the second web page shows the content of the page corresponding to the test script division identifier. Specifically, four established test scripts are displayed, and the script name, script description, script creation time and last modification time of each test script are further displayed, and the "view", "edit" and "delete" buttons are also configured to view, edit, or delete the corresponding test script.

可以在所述第二web页面上方的输入框内输入预查找的脚本名称后,点击查询按钮,查找所需的脚本。可以通过点击添加按钮,展示一用于新建脚本的脚本参数配置页面,在所述脚本参数配置页面上输入相关参数后,点击保存按钮,生成测试脚本。参照图7,示出了本发明示例的web端第三web页面示意图,由图7可知,所述第三web页面示意图展示了脚本参数配置页面。脚本参数配置页面展示了脚本名、脚本描述、参数文件和事务等多个待输入或待选择的信息标识,用户可以在脚本名、脚本描述和事务的关联输入框内输入相关参数、从参数文件的关联栏中选择配置脚本所需的参数文件以及其它配置操作。测试脚本参数配置结束后,可以点击保存按钮,生成测试脚本。After entering the name of the pre-searched script in the input box above the second web page, click the query button to find the required script. A script parameter configuration page for creating a new script can be displayed by clicking the Add button, and after inputting relevant parameters on the script parameter configuration page, click the Save button to generate a test script. Referring to FIG. 7 , it shows a schematic diagram of a third web page at the web end of an example of the present invention. As can be seen from FIG. 7 , the schematic diagram of the third web page shows a script parameter configuration page. The script parameter configuration page displays multiple information identifiers to be input or selected, such as script name, script description, parameter file and transaction. Select the parameter file and other configuration operations required by the configuration script in the associated column of the configuration script. After the test script parameters are configured, you can click the Save button to generate a test script.

参照图8,示出了本发明示例的web端第四web页面示意图,由图8可知,所述第四web页面展示了测试场景划分标识对应的页面内同。具体地,展示了四个已建立的测试场景,进一步展示了各个测试场景的场景名称、压力服务器数目、并发用户数、脚本名称、场景描述和最后修改时间,同时还配置了“查看”按钮、“编辑”按钮和“删除”按钮,用于查看、编辑或删除相应的测试场景。Referring to FIG. 8 , it shows a schematic diagram of a fourth web page at the web end of the example of the present invention. It can be seen from FIG. 8 that the fourth web page shows the content of the page corresponding to the test scene division identifier. Specifically, four established test scenarios are displayed, and the scenario name, number of stress servers, number of concurrent users, script name, scenario description, and last modification time of each test scenario are further displayed, and the "View" button, The "Edit" button and the "Delete" button are used to view, edit or delete the corresponding test scenarios.

可以在所述第四web页面上方的输入框内输入预查找的脚本名称后,点击查询按钮,查找所需的脚本对应的测试场景。可以通过点击添加按钮,展示一用于新建测试场景的场景参数配置页面,在所述场景参数配置页面上输入相关参数后,点击保存按钮,生成测试脚本。参照图9,示出了本发明示例的web端第五web页面示意图,由图9可知,所述第五web页面示意图展示了场景参数配置页面,场景参数配置页面展示了场景名称、场景描述、脚本名称、施压模式、单机并发用户数和施压机数多个待输入或待选择的信息标识,可以在场景名称、场景描述单机并发用户书标识对应的输入框内输入相关的参数;可以选择施压模式标识对应的常压模式或梯度施压,例如选择常压模式;可以从脚本名称标识对应的下拉菜单中选择所需的测试脚本,例如“panda_eoom_无登陆”;可以在施压机数对应的下拉菜单中选择所需的施压机数目,例如1。测试场景参数配置结束后,可以点击保存按钮,生成测试场景。After entering the pre-searched script name in the input box above the fourth web page, click the query button to find the test scenario corresponding to the required script. A scene parameter configuration page for creating a new test scene can be displayed by clicking the Add button, and after inputting relevant parameters on the scene parameter configuration page, click the Save button to generate a test script. Referring to FIG. 9, it shows a schematic diagram of the fifth web page at the web end of the example of the present invention. As can be seen from FIG. 9, the schematic diagram of the fifth web page shows a scene parameter configuration page, and the scene parameter configuration page shows a scene name, a scene description, Script name, pressure application mode, number of concurrent users on a single machine, and number of pressure machines to be input or selected. You can enter relevant parameters in the input boxes corresponding to the scene name and scene description single machine concurrent user book mark; you can Select the normal pressure mode or gradient pressure corresponding to the pressure mode identification, for example, select the normal pressure mode; you can select the required test script from the drop-down menu corresponding to the script name identification, such as "panda_eoom_no login"; you can press Select the desired number of pressing machines from the drop-down menu corresponding to the machine number, for example, 1. After the test scene parameters are configured, you can click the save button to generate the test scene.

参照图10,示出了本发明示例的web端第六web页面示意图,由图10可知,所述第六web页面展示了测试任务划分标识对应的页面内同。具体地,展示了四个已建立的测试任务,进一步展示了各个测试任务的任务名称、任务描述、场景名称和状态,同时还配置了“查看”按钮、“编辑”按钮和“删除”按钮,用于查看、编辑或删除相应的测试任务。Referring to FIG. 10 , it shows a schematic diagram of a sixth web page at the web end of the example of the present invention. It can be seen from FIG. 10 that the sixth web page shows the content of the page corresponding to the test task division identifier. Specifically, four established test tasks are displayed, and the task name, task description, scene name and status of each test task are further displayed, and the "View" button, "Edit" button and "Delete" button are also configured. Used to view, edit or delete corresponding test tasks.

可以在所述第六web页面上方的输入框内输入预查找的脚本名称后,点击查询按钮,查找所需的脚本对应的测试任务。可以通过点击添加按钮,展示一用于新建测试任务的任务参数配置页面,在所述任务参数配置页面上输入相关参数后,点击保存按钮,生成测试任务。参照图11,示出了本发明示例的web端第七web页面示意图,由图11可知,所述第七web页面示意图展示了任务参数配置页面。任务参数配置页面展示了任务名称、任务描述、开始时间、持续时间、循环次数、施压机房、绑定场景、web服务器和DB服务器多个待输入或待选择的信息标识,可以在任务名称、任务描述、持续时间、循环次数、web服务器和DB服务器标识对应的输入框内输入相关的参数;可以选择开始时间标识对应的立即运行或调度器,例如选择立即运行;可以在施压机房标识对应的下拉菜单中选择所需的施压机房名称或编号或其它标识,例如选择ZWT;可以在绑定场景标识对应的下拉菜单中选择所需的测试场景。测试任务参数配置结束后,可以点击提交按钮,生成测试任务。After entering the pre-searched script name in the input box above the sixth web page, click the query button to search for the test task corresponding to the required script. A task parameter configuration page for creating a new test task can be displayed by clicking the Add button, and after inputting relevant parameters on the task parameter configuration page, click the Save button to generate a test task. Referring to FIG. 11 , it shows a schematic diagram of a seventh web page at the web end of an example of the present invention. As can be seen from FIG. 11 , the schematic diagram of the seventh web page shows a task parameter configuration page. The task parameter configuration page displays the task name, task description, start time, duration, number of cycles, pressure room, binding scene, web server and DB server, and multiple information identifiers to be entered or selected. You can enter the task name, Enter relevant parameters in the input boxes corresponding to task description, duration, number of cycles, web server and DB server ID; you can choose to run immediately or scheduler corresponding to the start time ID, for example, choose to run immediately; you can correspond to the ID of the pressure machine room Select the required pressure room name or number or other identification in the drop-down menu of the button, for example, select ZWT; you can select the required test scenario in the drop-down menu corresponding to the binding scene ID. After the test task parameters are configured, you can click the submit button to generate the test task.

参照图12,示出了本发明示例的web端第八web页面示意图,由图12可知,所述第八web页面展示了测试结果划分标识对应的页面内同。具体地,展示了四个反馈的测试结果,进一步展示了各个测试结果的任务名称、OPS、RT、成功率、起止时间、持续时间和运行状态,同时还配置了“查看详情”按钮和“删除”按钮,用于查看或删除相应的测试结果。Referring to FIG. 12 , it shows a schematic diagram of an eighth web page at the web end of an example of the present invention. It can be seen from FIG. 12 that the eighth web page shows the content of the page corresponding to the test result division identifier. Specifically, four feedback test results are displayed, and the task name, OPS, RT, success rate, start and end time, duration and running status of each test result are further displayed, and the "View Details" button and "Delete ” button to view or delete the corresponding test results.

针对某一测试结果,点击“查看详情”按钮,在所述第八web页面上方弹出一显示测试结果的结果展示页面。具体地,可以在页面上方显示任务名称,在展示的任务名称下方显示概要、详情和监控三个划分标识。参照图13,示出了本发明示例的web端第九web页面示意图,由图13可知,所述第九web页面展示了概要划分标识对应的页面内同。具体地,分别展示了并发用户数目、TPS、失败率和响应时间对应的数据,展示了结果概述、业务指标和监控指标。用户可以通过读取概要信息初步获悉测试结果;可以通过读取详情划分标识对应的页面内容进一步获悉待测软件的软件测试结果,例如页面显示的内容可以包括任务名称、QPS、运行状态、起始时间、场景名称、响应时间、食物选择、持续时间、脚本名称和成功率,以及OPS、吞吐量与响应时间的关系图;可以通过读取监控划分标识对应的页面内容进一步获悉待测软件所部署的软件服务器的监控结果,例如页面显示的内容可以包括选择的软件服务器,以及CPU使用率与响应时间的关系图等数据图。For a certain test result, click the "view details" button, and a result display page showing the test result will pop up above the eighth web page. Specifically, the task name may be displayed on the top of the page, and three division marks of summary, detail and monitoring may be displayed below the displayed task name. Referring to FIG. 13 , it shows a schematic diagram of the ninth web page of the web terminal in the example of the present invention. It can be seen from FIG. 13 that the ninth web page shows the content of the page corresponding to the summary division identifier. Specifically, the data corresponding to the number of concurrent users, TPS, failure rate, and response time are displayed, and an overview of results, business indicators, and monitoring indicators are displayed. Users can get a preliminary understanding of the test results by reading the summary information; they can further learn the software test results of the software to be tested by reading the page content corresponding to the detailed division identifier. For example, the content displayed on the page can include task name, QPS, running status, start Time, scene name, response time, food selection, duration, script name and success rate, as well as the relationship diagram of OPS, throughput and response time; you can learn more about the deployment of the software under test by reading the content of the page corresponding to the monitoring division logo The monitoring results of the software server, for example, the content displayed on the page may include the selected software server, and data graphs such as the relationship between CPU usage and response time.

综上所述,用户可以通过读取web端的部分web页面查看针对提交的测试任务的测试结果;可以依据选择或创建测试脚本—依据测试脚本和相关参数创建测试场景—依据测试场景和相关参数创建测试任务的操作顺序,完成测试任务的创建。To sum up, users can view the test results for the submitted test tasks by reading some web pages on the web side; they can select or create test scripts - create test scenarios based on test scripts and related parameters - create test scenarios based on test scenarios and related parameters The operation sequence of the test task completes the creation of the test task.

参照图14,示出了根据本发明实施例1的一种软件测试装置的结构框图,由图14可知,所述软件测试装置可以部署在web端,各个待测软件所部署的机房可以设置有软件测试系统,所述装置可以包括:Referring to FIG. 14, it shows a structural block diagram of a software testing device according to Embodiment 1 of the present invention. It can be seen from FIG. A software testing system, the device may include:

第一软件测试参数接收模块401,用于接收在web页面中输入的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;The first software test parameter receiving module 401 is used to receive the software test parameter input in the web page, and the software test parameter includes the target computer room where the software to be tested is deployed;

第一软件测试参数发送模块402,用于通过http报文将所述软件测试参数发送至对应的web服务器,以根据所述软件测试参数生成软件测试脚本并发送至所述目标机房的目标软件测试系统进行测试。The first software test parameter sending module 402 is configured to send the software test parameter to the corresponding web server through an http message, so as to generate a software test script according to the software test parameter and send it to the target software test in the target computer room The system is tested.

本发明实施例中,优选地,所述第一软件测试参数接收模块401,具体用于接收在所述web页面中输入的软件测试基础脚本以及对应配置的测试场景参数。In the embodiment of the present invention, preferably, the first software test parameter receiving module 401 is specifically configured to receive the basic software test script input in the web page and the corresponding configured test scenario parameters.

本发明实施例中,优选地,所述装置还包括:In the embodiment of the present invention, preferably, the device further includes:

软件测试任务创建模块,用于在所述通过http报文将所述软件测试参数发送至对应的web服务器之前,根据在所述web页面中触发创建软件测试任务的指示,创建软件测试任务,并在接收到启动任务的指示后,将所述软件测试任务发送至对应的web服务器。A software test task creation module, used to create a software test task according to an instruction triggering creation of a software test task in the web page before sending the software test parameters to the corresponding web server through the http message, and After receiving the instruction to start the task, the software testing task is sent to the corresponding web server.

本发明实施例中,优选地,所述装置还包括:In the embodiment of the present invention, preferably, the device further includes:

指示接收模块,用于接收在所述web页面中查看软件测试结果、所述待测软件部署的至少一个软件服务器的性能测试结果或不同软件的对比结果的指示,从所述web服务器获取相应数据并展示。An instruction receiving module, configured to receive instructions for viewing software test results in the web page, performance test results of at least one software server deployed by the software to be tested, or comparison results of different software, and obtain corresponding data from the web server and show.

参照图15,示出了根据本发明实施例2的一种软件测试装置的结构框图,由图15可知,所述软件测试装置可以部署在web服务器,各个待测软件所部署的机房可以设置有软件测试系统,所述装置可以包括:Referring to FIG. 15, it shows a structural block diagram of a software testing device according to Embodiment 2 of the present invention. It can be seen from FIG. 15 that the software testing device can be deployed on a web server, and the computer room where each software to be tested is deployed can be provided with A software testing system, the device may include:

第二软件测试参数接收模块501,用于接收通过网页输入并通过http报文发送的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;The second software test parameter receiving module 501 is used to receive the software test parameter input through the webpage and sent by the http message, and the software test parameter includes the target computer room where the software to be tested is deployed;

软件测试脚本生成模块502,用于根据所述软件测试参数生成软件测试脚本;A software test script generating module 502, configured to generate a software test script according to the software test parameters;

软件测试脚本发送模块503,用于将所述软件测试脚本发送至所述目标机房的目标软件测试系统,由所述目标软件测试系统根据所述软件测试脚本对所述待测软件进行测试。The software test script sending module 503 is configured to send the software test script to a target software test system in the target computer room, and the target software test system tests the software to be tested according to the software test script.

本发明实施例中,优选地,所述软件测试脚本发送模块503包括:In the embodiment of the present invention, preferably, the software test script sending module 503 includes:

目标软件测试系统确定子模块,用于按照所述软件测试参数中包括的目标机房,确定与所述目标机房对应的目标软件测试系统;A target software testing system determining submodule, configured to determine a target software testing system corresponding to the target computer room according to the target computer room included in the software testing parameters;

软件测试脚本传输子模块,用于将所述软件测试脚本发送至所述目标软件测试系统。The software test script transmission submodule is used to send the software test script to the target software test system.

本发明实施例中,优选地,所述第二软件测试参数接收模块501包括:In the embodiment of the present invention, preferably, the second software test parameter receiving module 501 includes:

接收所述web端创建的软件测试任务,添加至预置的任务队列,并添加待执行标识,所述软件测试任务携带所述软件测试参数。Receive the software test task created by the web terminal, add it to the preset task queue, and add a to-be-executed identifier, and the software test task carries the software test parameters.

本发明实施例中,优选地,所述装置还包括:In the embodiment of the present invention, preferably, the device further includes:

测试性能检测模块,用于在所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统之前,针对携带待执行标识的软件测试任务,定期检测并确定所述目标软件测试系统满足所述软件测试参数所指示的测试性能。A test performance detection module, configured to periodically detect and determine that the target software test system satisfies the requirements of the software test task carrying the identifier to be executed before the software test script is sent to the target software test system in the target computer room. The test performance indicated by the software test parameters.

本发明实施例中,优选地,各软件测试系统分别订阅有专用频道,所述软件测试脚本发送模块503,具体用于将所述软件测试脚本发送至所述目标软件测试系统订阅的专用频道,并进一步发送至所述目标软件测试系统。In the embodiment of the present invention, preferably, each software testing system subscribes to a dedicated channel, and the software testing script sending module 503 is specifically configured to send the software testing script to the dedicated channel subscribed by the target software testing system, and further sent to the target software testing system.

本发明实施例中,优选地,所述装置还包括:In the embodiment of the present invention, preferably, the device further includes:

测试结果接收模块,用于接收所述目标软件测试系统反馈的测试结果,并根据所述网页查看软件测试结果的请求反馈至所述网页进行展示。The test result receiving module is configured to receive the test result fed back by the target software testing system, and feed back the test result to the web page for display according to the request for viewing the software test result on the web page.

参照图16,示出了根据本发明实施例3的一种软件测试系统的结构框图,由图16可知,所述软件测试系统可以部署在软件测试系统,各个待测软件所部署的机房均设置有软件测试系统,所述系统可以包括控制服务器和压力服务器;Referring to FIG. 16, it shows a structural block diagram of a software testing system according to Embodiment 3 of the present invention. It can be seen from FIG. 16 that the software testing system can be deployed in the software testing system, and the computer rooms where each software to be tested is deployed There is a software testing system, which may include a control server and a stress server;

所述控制服务器601包括:The control server 601 includes:

软件测试脚本接收模块6011,用于接收web服务器发送的软件测试脚本,所述软件测试脚本根据web页面通过http报文发送至所述web服务器的软件测试参数生成,所述软件测试参数包括待测软件所部署的目标机房,所述软件测试脚本根据所述目标机房发送至所述软件测试系统;The software test script receiving module 6011 is used to receive the software test script sent by the web server, the software test script is generated according to the software test parameters sent to the web server by the http message from the web page, and the software test parameters include the The target computer room where the software is deployed, and the software test script is sent to the software testing system according to the target computer room;

所述压力服务器602,用于根据所述软件测试脚本对所述待测软件进行测试。The stress server 602 is configured to test the software to be tested according to the software test script.

本发明实施例中,优选地,各软件测试系统分别订阅有第一专用频道,所述软件测试脚本接收模块6011包括:In the embodiment of the present invention, preferably, each software testing system subscribes to a first dedicated channel respectively, and the software testing script receiving module 6011 includes:

软件测试脚本监控子模块,用于监控所述web服务器发送至所述第一专用频道的软件测试脚本;A software test script monitoring submodule, configured to monitor the software test script sent to the first dedicated channel by the web server;

软件测试脚本传送子模块,用于将所述软件测试脚本发送至所述软件测试系统的压力服务器进行测试。The software test script transmission sub-module is used to send the software test script to the stress server of the software test system for testing.

本发明实施例中,优选地,各软件测试系统分别订阅有第二专用频道,所述系统还包括监控服务器,所述监控服务器包括:In the embodiment of the present invention, preferably, each software testing system subscribes to a second dedicated channel, and the system also includes a monitoring server, and the monitoring server includes:

软件测试脚本控制模块,用于监控所述web服务器发送至所述第二专用频道的软件测试脚本;A software test script control module, configured to monitor the software test script sent to the second dedicated channel by the web server;

软件服务器监控模块,用于对所述待测软件部署的至少一个软件服务器进行状态监控。A software server monitoring module, configured to monitor the status of at least one software server deployed by the software to be tested.

本发明实施例中,优选地,所述软件服务器监控模块,具体用于通过访问所述软件服务器,和/或,通过调用管理服务器的目标接口,获取所述软件服务器的至少一个运行状态参数。In the embodiment of the present invention, preferably, the software server monitoring module is specifically configured to obtain at least one operating state parameter of the software server by accessing the software server and/or by calling a target interface of the management server.

本发明实施例中,优选地,所述控制服务器602还包括:In the embodiment of the present invention, preferably, the control server 602 further includes:

测试日志获取模块,用于获取所述压力服务器生成的测试日志;A test log obtaining module, configured to obtain the test log generated by the stress server;

测试日志解析模块,用于解析所述测试日志获得对所述待测软件的测试结果,并在所述web网页请求查看测试结果时反馈至对应的web服务器。The test log analysis module is used to analyze the test log to obtain the test result of the software under test, and feed back to the corresponding web server when the web page requests to view the test result.

本发明实施例中,优选地,所述控制服务器602还包括:In the embodiment of the present invention, preferably, the control server 602 further includes:

测试结果对比模块,用于对比不同软件的测试结果,并在所述web网页请求查看对比结果时反馈至对应的web服务器。The test result comparison module is used to compare the test results of different software, and feeds back to the corresponding web server when the web page requests to view the comparison results.

对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的软件测试方法对应的设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the device corresponding to the software testing method according to the embodiment of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

本发明公开了A1、一种软件测试方法,其中,应用在web端,各个待测软件所部署的机房均设置有软件测试系统,所述方法包括:The present invention discloses A1. A software testing method, wherein, when applied on the web side, each computer room where the software to be tested is deployed is equipped with a software testing system, and the method includes:

接收在web页面中输入的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;Receive the software test parameters input in the web page, the software test parameters include the target computer room where the software to be tested is deployed;

通过http报文将所述软件测试参数发送至对应的web服务器,以根据所述软件测试参数生成软件测试脚本并发送至所述目标机房的目标软件测试系统进行测试。Send the software test parameters to the corresponding web server through http messages, so as to generate a software test script according to the software test parameters and send it to the target software test system in the target computer room for testing.

A2、根据A1所述的方法,其中,所述接收在web页面中输入的软件测试参数包括:A2, according to the method described in A1, wherein, the software test parameter that described receiving input in web page comprises:

接收在所述web页面中输入的软件测试基础脚本以及对应配置的测试场景参数。The basic software test script and the corresponding configured test scenario parameters input in the web page are received.

A3、根据A1所述的方法,其中,在所述通过http报文将所述软件测试参数发送至对应的web服务器之前,所述方法还包括:A3. The method according to A1, wherein, before the software test parameters are sent to the corresponding web server by the http message, the method also includes:

根据在所述web页面中触发创建软件测试任务的指示,创建软件测试任务,并在接收到启动任务的指示后,将所述软件测试任务发送至对应的web服务器。According to the instruction of triggering the creation of the software testing task in the web page, the software testing task is created, and after receiving the instruction of starting the task, the software testing task is sent to the corresponding web server.

A4、根据A1所述的方法,其中,所述方法还包括:A4. The method according to A1, wherein the method also includes:

接收在所述web页面中查看软件测试结果、所述待测软件部署的至少一个软件服务器的性能测试结果或不同软件的对比结果的指示,从所述web服务器获取相应数据并展示。Receiving an instruction to view software test results, performance test results of at least one software server deployed by the software to be tested, or comparison results of different software in the web page, obtaining corresponding data from the web server and displaying them.

本发明还公开了B5、一种软件测试方法,其中,应用在web服务器,各个待测软件所部署的机房均设置有软件测试系统,所述方法包括:The present invention also discloses B5, a software testing method, wherein, applied to a web server, each computer room where the software to be tested is deployed is provided with a software testing system, and the method includes:

接收通过网页输入并通过http报文发送的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;Receiving software test parameters input through the webpage and sent by the http message, the software test parameters including the target computer room where the software to be tested is deployed;

根据所述软件测试参数生成软件测试脚本;Generate a software test script according to the software test parameters;

将所述软件测试脚本发送至所述目标机房的目标软件测试系统,由所述目标软件测试系统根据所述软件测试脚本对所述待测软件进行测试。The software test script is sent to a target software test system in the target computer room, and the target software test system tests the software to be tested according to the software test script.

B6、根据B5所述的方法,其中,所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统包括:B6, according to the method described in B5, wherein, the target software testing system that described described software test script is sent to described target computer room comprises:

按照所述软件测试参数中包括的目标机房,确定与所述目标机房对应的目标软件测试系统;According to the target computer room included in the software test parameters, determine the target software testing system corresponding to the target computer room;

将所述软件测试脚本发送至所述目标软件测试系统。sending the software testing script to the target software testing system.

B7、根据B5所述的方法,其中:B7. The method according to B5, wherein:

所述接收通过网页输入并通过http报文发送的软件测试参数包括:The software test parameter that described receiving is input by webpage and sends by http message comprises:

接收所述web端创建的软件测试任务,添加至预置的任务队列,并添加待执行标识,所述软件测试任务携带所述软件测试参数。Receive the software test task created by the web terminal, add it to the preset task queue, and add a to-be-executed identifier, and the software test task carries the software test parameters.

B8、根据B5所述的方法,其中,在所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统之前,所述方法还包括:B8. The method according to B5, wherein, before the software test script is sent to the target software test system in the target computer room, the method also includes:

针对携带待执行标识的软件测试任务,定期检测并确定所述目标软件测试系统满足所述软件测试参数所指示的测试性能。For the software testing task carrying the identifier to be executed, periodically detect and determine that the target software testing system satisfies the testing performance indicated by the software testing parameters.

B9、根据B5所述的方法,其中,各软件测试系统分别订阅有专用频道,所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统包括:B9, according to the method described in B5, wherein, each software testing system subscribes to a dedicated channel respectively, and the described target software testing system sending the software testing script to the target computer room includes:

将所述软件测试脚本发送至所述目标软件测试系统订阅的专用频道,并进一步发送至所述目标软件测试系统。The software test script is sent to a dedicated channel subscribed by the target software test system, and further sent to the target software test system.

B10、根据B5所述的方法,其中,所述方法还包括:B10, according to the method described in B5, wherein, described method also comprises:

接收所述目标软件测试系统反馈的测试结果,并根据所述网页查看软件测试结果的请求反馈至所述网页进行展示。The test results fed back by the target software testing system are received, and fed back to the web page for display according to the web page request for viewing software test results.

本发明还公开了C11、一种软件测试装置,其中,部署在web端,各个待测软件所部署的机房均设置有软件测试系统,所述装置包括:The present invention also discloses C11, a software testing device, wherein, it is deployed on the web side, and each computer room where the software to be tested is deployed is equipped with a software testing system, and the device includes:

第一软件测试参数接收模块,用于接收在web页面中输入的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;The first software test parameter receiving module is used to receive the software test parameter input in the web page, and the software test parameter includes the target computer room where the software to be tested is deployed;

第一软件测试参数发送模块,用于通过http报文将所述软件测试参数发送至对应的web服务器,以根据所述软件测试参数生成软件测试脚本并发送至所述目标机房的目标软件测试系统进行测试。The first software test parameter sending module is used to send the software test parameter to the corresponding web server through the http message, so as to generate a software test script according to the software test parameter and send it to the target software test system in the target computer room carry out testing.

C12、根据C11所述的装置,其中:C12. The device according to C11, wherein:

所述第一软件测试参数接收模块,具体用于接收在所述web页面中输入的软件测试基础脚本以及对应配置的测试场景参数。The first software test parameter receiving module is specifically configured to receive the basic software test script input in the web page and the corresponding configured test scenario parameters.

C13、根据C11所述的装置,其中,所述装置还包括:C13. The device according to C11, wherein the device also includes:

软件测试任务创建模块,用于在所述通过http报文将所述软件测试参数发送至对应的web服务器之前,根据在所述web页面中触发创建软件测试任务的指示,创建软件测试任务,并在接收到启动任务的指示后,将所述软件测试任务发送至对应的web服务器。A software test task creation module, used to create a software test task according to an instruction triggering creation of a software test task in the web page before sending the software test parameters to the corresponding web server through the http message, and After receiving the instruction to start the task, the software testing task is sent to the corresponding web server.

C14、根据C11所述的装置,其中,所述装置还包括:C14. The device according to C11, wherein the device also includes:

指示接收模块,用于接收在所述web页面中查看软件测试结果、所述待测软件部署的至少一个软件服务器的性能测试结果或不同软件的对比结果的指示,从所述web服务器获取相应数据并展示。An instruction receiving module, configured to receive instructions for viewing software test results in the web page, performance test results of at least one software server deployed by the software to be tested, or comparison results of different software, and obtain corresponding data from the web server and show.

本发明还公开了D15、一种软件测试装置,其中,部署在web服务器,各个待测软件所部署的机房均设置有软件测试系统,所述装置包括:The present invention also discloses D15, a software testing device, wherein, it is deployed on a web server, and each computer room where the software to be tested is deployed is equipped with a software testing system, and the device includes:

第二软件测试参数接收模块,用于接收通过网页输入并通过http报文发送的软件测试参数,所述软件测试参数包括待测软件所部署的目标机房;The second software test parameter receiving module is used to receive the software test parameter input through the webpage and sent by the http message, and the software test parameter includes the target computer room where the software to be tested is deployed;

软件测试脚本生成模块,用于根据所述软件测试参数生成软件测试脚本;A software test script generation module is used to generate a software test script according to the software test parameters;

软件测试脚本发送模块,用于将所述软件测试脚本发送至所述目标机房的目标软件测试系统,由所述目标软件测试系统根据所述软件测试脚本对所述待测软件进行测试。A software test script sending module, configured to send the software test script to a target software test system in the target computer room, and the target software test system tests the software to be tested according to the software test script.

D16、根据D15所述的装置,其中,所述软件测试脚本发送模块包括:D16. The device according to D15, wherein the software test script sending module includes:

目标软件测试系统确定子模块,用于按照所述软件测试参数中包括的目标机房,确定与所述目标机房对应的目标软件测试系统;A target software testing system determining submodule, configured to determine a target software testing system corresponding to the target computer room according to the target computer room included in the software testing parameters;

软件测试脚本传输子模块,用于将所述软件测试脚本发送至所述目标软件测试系统。The software test script transmission submodule is used to send the software test script to the target software test system.

D17、根据D15所述的装置,其中,所述第二软件测试参数接收模块包括:D17. The device according to D15, wherein the second software test parameter receiving module includes:

接收所述web端创建的软件测试任务,添加至预置的任务队列,并添加待执行标识,所述软件测试任务携带所述软件测试参数。Receive the software test task created by the web terminal, add it to the preset task queue, and add a to-be-executed identifier, and the software test task carries the software test parameters.

D18、根据D15所述的装置,其中,所述装置还包括:D18. The device according to D15, wherein the device further comprises:

测试性能检测模块,用于在所述将所述软件测试脚本发送至所述目标机房的目标软件测试系统之前,针对携带待执行标识的软件测试任务,定期检测并确定所述目标软件测试系统满足所述软件测试参数所指示的测试性能。A test performance detection module, configured to periodically detect and determine that the target software test system satisfies the requirements of the software test task carrying the identifier to be executed before the software test script is sent to the target software test system in the target computer room. The test performance indicated by the software test parameters.

D19、根据D15所述的装置,其中,各软件测试系统分别订阅有专用频道;D19. The device according to D15, wherein each software testing system subscribes to a dedicated channel;

所述软件测试脚本发送模块,具体用于将所述软件测试脚本发送至所述目标软件测试系统订阅的专用频道,并进一步发送至所述目标软件测试系统。The software test script sending module is specifically configured to send the software test script to a dedicated channel subscribed by the target software test system, and further send it to the target software test system.

D20、根据D15所述的装置,其中,所述装置还包括:D20. The device according to D15, wherein the device further comprises:

测试结果接收模块,用于接收所述目标软件测试系统反馈的测试结果,并根据所述网页查看软件测试结果的请求反馈至所述网页进行展示。The test result receiving module is configured to receive the test result fed back by the target software testing system, and feed back the test result to the web page for display according to the request for viewing the software test result on the web page.

Claims (10)

1. a kind of method for testing software, wherein, apply in web terminal, what each software under testing was disposed Computer room is provided with software testing system, and methods described includes:
The software test parameter being input into web page is received, the software test parameter includes to be measured soft The target computer room that part is disposed;
The software test parameter is sent to corresponding web server by http messages, with according to institute State software test parameter generation software test script and send to the target software of the target computer room and test System is tested.
2. method according to claim 1, wherein, what the reception was input into web page Software test parameter includes:
Receive the test of the software test basis script and correspondence configuration being input into the web page Scenario parameters.
3. method according to claim 1, wherein, it is described will be described soft by http messages Part test parameter is sent to before corresponding web server, and methods described also includes:
According to the instruction that establishment software test task is triggered in the web page, create software test and appoint Business, and after the instruction for receiving startup task, the software test task is sent to corresponding web Server.
4. method according to claim 1, wherein, methods described also includes:
Software test result, at least the one of software under testing deployment are checked in reception in the web page The instruction of the performance test results of individual software server or the comparing result of different software, from web clothes Business device obtains corresponding data and shows.
5. a kind of method for testing software, wherein, apply in web server, each portion of software under testing institute The computer room of administration is provided with software testing system, and methods described includes:
The software test parameter that reception is input into by webpage and is sent by http messages, the software test Parameter includes the target computer room that software under testing is disposed;
Software test script is generated according to the software test parameter;
The software test script is sent to the target software test system of the target computer room, by described Target software test system is tested the software under testing according to the software test script.
6. method according to claim 5, wherein, it is described to send the software test script Target software test system to the target computer room includes:
According to the target computer room that the software test parameter includes, it is determined that corresponding with the target computer room Target software test system;
The software test script is sent to the target software test system.
7. method according to claim 5, wherein:
The software test parameter for being input into by webpage and being sent by http messages that receives is included:
The software test task that the web terminal is created is received, added to preset task queue, and is added Pending mark, the software test task carries the software test parameter.
8. method according to claim 5, wherein, described by software test script hair Before delivering to the target software test system of the target computer room, methods described also includes:
For the software test task for carrying pending mark, periodic detection simultaneously determines that the target software is surveyed Test system meets the test performance indicated by the software test parameter.
9. a kind of software testing device, wherein, web terminal is deployed in, what each software under testing was disposed Computer room is provided with software testing system, and described device includes:
First software test parameter receiver module, for receiving the software test being input into web page ginseng Number, the software test parameter includes the target computer room that software under testing is disposed;
First software test parameter sending module, for being sent out the software test parameter by http messages Corresponding web server is delivered to, software test script and is sent with being generated according to the software test parameter Target software test system to the target computer room is tested.
10. a kind of software testing device, wherein, web server is deployed in, each software under testing institute The computer room of deployment is provided with software testing system, and described device includes:
Second software test parameter receiver module, is input into and by http messages for receiving by webpage The software test parameter of transmission, the software test parameter includes the target machine that software under testing is disposed Room;
Software test script generation module, for generating software test pin according to the software test parameter This;
Software test script sending module, for the software test script to be sent to the target machine The target software test system in room, by the target software test system according to the software test script The software under testing is tested.
CN201510873151.2A 2015-12-02 2015-12-02 A kind of method for testing software and device Pending CN106815141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510873151.2A CN106815141A (en) 2015-12-02 2015-12-02 A kind of method for testing software and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510873151.2A CN106815141A (en) 2015-12-02 2015-12-02 A kind of method for testing software and device

Publications (1)

Publication Number Publication Date
CN106815141A true CN106815141A (en) 2017-06-09

Family

ID=59105686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510873151.2A Pending CN106815141A (en) 2015-12-02 2015-12-02 A kind of method for testing software and device

Country Status (1)

Country Link
CN (1) CN106815141A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678965A (en) * 2017-09-30 2018-02-09 千寻位置网络有限公司 It is automatically integrating method of testing and system, service terminal, memory
CN108459850A (en) * 2017-11-21 2018-08-28 广州视源电子科技股份有限公司 method, device and system for generating test script
CN109002398A (en) * 2018-07-26 2018-12-14 郑州云海信息技术有限公司 A kind of Auto-matching formula server software test terminal
CN109144865A (en) * 2018-08-14 2019-01-04 深圳壹账通智能科技有限公司 Method, apparatus, computer equipment and the storage medium of head end test
CN109284115A (en) * 2017-07-20 2019-01-29 北京国双科技有限公司 A kind of method and device generating tracker script
CN109408379A (en) * 2018-09-30 2019-03-01 福建星瑞格软件有限公司 One kind is based on promotion jmeter interface automatic test data matching method
CN109426611A (en) * 2017-08-31 2019-03-05 贵州白山云科技股份有限公司 A kind of method for testing software and device
CN109815105A (en) * 2017-11-20 2019-05-28 北京京东尚科信息技术有限公司 Applied program testing method and device based on Btrace
CN110032514A (en) * 2019-04-11 2019-07-19 华夏天信(北京)智能低碳技术研究院有限公司 A kind of mine motor can configure Red-Sensing monitoring software test method in remotely monitoring
CN110134574A (en) * 2019-04-19 2019-08-16 平安普惠企业管理有限公司 A kind of software performance testing method, system, medium and electronic equipment
CN110196806A (en) * 2019-04-12 2019-09-03 石化盈科信息技术有限责任公司 A kind of dynamic adaptation method of testing service device
CN110865935A (en) * 2019-10-24 2020-03-06 广州永融科技股份有限公司 Automated testing auxiliary software system
CN110874304A (en) * 2018-09-03 2020-03-10 广州神马移动信息科技有限公司 Pressure testing method, device, equipment and computer readable storage medium
CN110895510A (en) * 2019-11-19 2020-03-20 通号城市轨道交通技术有限公司 Software testing method and device, electronic equipment and storage medium
CN111447113A (en) * 2020-03-25 2020-07-24 中国建设银行股份有限公司 System monitoring method and device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284115A (en) * 2017-07-20 2019-01-29 北京国双科技有限公司 A kind of method and device generating tracker script
CN109426611A (en) * 2017-08-31 2019-03-05 贵州白山云科技股份有限公司 A kind of method for testing software and device
CN107678965A (en) * 2017-09-30 2018-02-09 千寻位置网络有限公司 It is automatically integrating method of testing and system, service terminal, memory
CN109815105A (en) * 2017-11-20 2019-05-28 北京京东尚科信息技术有限公司 Applied program testing method and device based on Btrace
CN108459850A (en) * 2017-11-21 2018-08-28 广州视源电子科技股份有限公司 method, device and system for generating test script
CN108459850B (en) * 2017-11-21 2021-07-09 广州视源电子科技股份有限公司 Method, device and system for generating test script
CN109002398A (en) * 2018-07-26 2018-12-14 郑州云海信息技术有限公司 A kind of Auto-matching formula server software test terminal
CN109144865A (en) * 2018-08-14 2019-01-04 深圳壹账通智能科技有限公司 Method, apparatus, computer equipment and the storage medium of head end test
CN110874304A (en) * 2018-09-03 2020-03-10 广州神马移动信息科技有限公司 Pressure testing method, device, equipment and computer readable storage medium
CN109408379A (en) * 2018-09-30 2019-03-01 福建星瑞格软件有限公司 One kind is based on promotion jmeter interface automatic test data matching method
CN110032514A (en) * 2019-04-11 2019-07-19 华夏天信(北京)智能低碳技术研究院有限公司 A kind of mine motor can configure Red-Sensing monitoring software test method in remotely monitoring
CN110196806A (en) * 2019-04-12 2019-09-03 石化盈科信息技术有限责任公司 A kind of dynamic adaptation method of testing service device
CN110134574A (en) * 2019-04-19 2019-08-16 平安普惠企业管理有限公司 A kind of software performance testing method, system, medium and electronic equipment
CN110865935A (en) * 2019-10-24 2020-03-06 广州永融科技股份有限公司 Automated testing auxiliary software system
CN110895510A (en) * 2019-11-19 2020-03-20 通号城市轨道交通技术有限公司 Software testing method and device, electronic equipment and storage medium
CN111447113A (en) * 2020-03-25 2020-07-24 中国建设银行股份有限公司 System monitoring method and device

Similar Documents

Publication Publication Date Title
CN106815141A (en) A kind of method for testing software and device
CN106815142A (en) A kind of method for testing software and system
US10198348B2 (en) Method to configure monitoring thresholds using output of load or resource loadings
US9003423B1 (en) Dynamic browser compatibility checker
US8732722B2 (en) Method and system for testing interactions between web clients and networked servers
CN107145440B (en) Application program testing method and device and computer equipment
US9075914B2 (en) Analytics driven development
WO2019196274A1 (en) Web page testing method and apparatus, electronic device, and medium
US20130136253A1 (en) System and method for tracking web interactions with real time analytics
US10362086B2 (en) Method and system for automating submission of issue reports
US20140129620A1 (en) Indicating coverage of web application testing
CN107276842B (en) Interface test method and device and electronic equipment
WO2016039783A1 (en) Auditing of web-based video
US8046638B2 (en) Testing of distributed systems
CN107784068A (en) Acquisition methods, device, storage medium, processor and the service end of data variation
CN111400189A (en) Code coverage monitoring method, device, electronic device and storage medium
KR20150025106A (en) Verification apparatus, terminal device, system, method and computer-readable medium for monitoring of application verification result
CN110543429B (en) Test case debugging method, device and storage medium
EP2959402B1 (en) Architecture for remote access to content state
US20250363038A1 (en) Detecting funtional anomalies associated with software services in a distributed computing environment
CN111459484A (en) The back-end data simulation method when the front-end and back-end of the web page are separated and developed
US8874971B1 (en) Detecting and reporting problems in a distributed resource computing system
KR101319243B1 (en) A method for providing web-page and a computer-readable recording medium recording program for implementing the method
US8166158B2 (en) Validating service components through data mining
CN113535590B (en) Program testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170609