WO2017177783A1 - Test system and method invoking third-party test tool - Google Patents

Test system and method invoking third-party test tool Download PDF

Info

Publication number
WO2017177783A1
WO2017177783A1 PCT/CN2017/076694 CN2017076694W WO2017177783A1 WO 2017177783 A1 WO2017177783 A1 WO 2017177783A1 CN 2017076694 W CN2017076694 W CN 2017076694W WO 2017177783 A1 WO2017177783 A1 WO 2017177783A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
module
task information
database
task
Prior art date
Application number
PCT/CN2017/076694
Other languages
French (fr)
Chinese (zh)
Inventor
卫伟
姬丽娜
张家明
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017177783A1 publication Critical patent/WO2017177783A1/en

Links

Images

Classifications

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

Definitions

  • the present disclosure relates to the field of cloud testing technologies, and in particular, to a testing system and method for invoking third party testing tools.
  • various testing tools emerge in an endless stream.
  • various types of third-party testing tools are usually used for testing, such as functional testing tools, security testing tools, and performance testing tools. Or use a different third-party testing tool for a certain type of testing, such as using PageSpeed, Yslow for website performance testing.
  • these tools have different operating modes and different usage methods.
  • testers need to test a software, they often need to master the installation and deployment methods of various test tools and the use of software test tools, which increases the time for completion of test tasks. And complexity, while several testers installed and deployed test tools on their respective devices, which also led to waste of device resources.
  • the main purpose of the present disclosure is to provide a test system and method for invoking a third-party test tool, which aims to provide a convenient and efficient test system.
  • the present disclosure provides a test system that invokes a third-party test tool, including:
  • the task information obtaining module is configured to obtain test task information submitted by the user, and save the test task information in a preset database;
  • a task management module configured to acquire the test task information saved by the database, and send the test task information to a client agent module;
  • the client proxy module is configured to: after receiving the test task information, send, according to the information of the third-party testing tool included in the test task information, the test parameter included in the test task information to the corresponding calling module;
  • the calling module is configured to, after receiving the test parameter, invoke the third-party testing tool to perform a test task based on the test parameter.
  • the task management module comprises:
  • An obtaining unit configured to access the database, and obtain the test task information included in the database
  • a query unit configured to query a test execution state corresponding to the test task information after obtaining the test task information
  • the query allocation unit is configured to: when the test execution state is a to-be-executed state, query a client proxy module whose state is idle in the system process, and send the test task information to the client proxy module.
  • the calling module is further configured to obtain a test report that is feedback after the third-party testing tool performs the testing task, and process the test report into a preset text format and save the processed test report as a processed test report.
  • Customer The end agent module feeds back the notification message that the test task is completed.
  • the client proxy module is further configured to acquire and save the processed test report to the calling module when the notification message is received.
  • the task management module is further configured to access the client proxy module, and when the notification message is obtained, mark the test execution status corresponding to the test task information in the database as a completed state, and The processed test report is downloaded and saved in the database.
  • the task information obtaining module is further configured to access the database, and obtain the processed test from the database when the test execution state corresponding to the test task information in the database is obtained as being completed.
  • the report is displayed on the user display interface.
  • the present disclosure further provides a test method for invoking a third-party testing tool, including the steps of:
  • the task information obtaining module acquires the test task information submitted by the user, and saves the test task information in a preset database;
  • the task management module acquires the test task information saved by the database, and sends the test task information to the client agent module;
  • the client proxy module After receiving the test task information, the client proxy module sends the test parameter included in the test task information to the corresponding calling module according to the information of the third-party testing tool included in the test task information;
  • the calling module After receiving the test parameter, the calling module invokes the third-party testing tool to perform a test task based on the test parameter.
  • the task management module acquires the test task information saved by the database, and the sending the test task information to the client agent module includes:
  • test task information After obtaining the test task information, querying a test execution state corresponding to the test task information;
  • test execution state is a to-be-executed state
  • client proxy module in the system process state is idle, and the test task information is sent to the client proxy module.
  • calling the third-party testing tool to perform the testing task based on the testing parameter includes:
  • the calling module acquires a test report fed back by the third-party testing tool after performing the testing task, and processes the test report into a preset text format and saves the processed test report as a processed test report, and provides feedback to the client agent module.
  • the client proxy module receives the notification message, displaying the processed test report on the user display interface in conjunction with the task management module and the task information acquisition module.
  • displaying the processed test report on the user display interface in combination with the task management module and the task information acquiring module includes:
  • the task management module accesses the client proxy module, and when the notification message is obtained, marking the test execution status corresponding to the test task information in the database as a completed state, and downloading the processed test report and Saved in the database.
  • the task information obtaining module accesses the database, and when the test execution state corresponding to the test task information in the database is obtained, the processed test report is obtained from the database, and is displayed in the database. User display interface.
  • the test system and method for invoking a third-party testing tool proposed by the present disclosure acquires test task information submitted by a user through a task information acquiring module, and saves the test task information in a preset database; the task management module acquires the database saved
  • the test task information is sent to the client agent module; after receiving the test task information, the client agent module according to the information of the third party test tool included in the test task information
  • the corresponding calling module sends the test parameter included in the test task information; after receiving the test parameter, the calling module invokes the third-party testing tool to perform a test task based on the test parameter.
  • the task information acquisition module acquires and saves the test task information, and the task management module sends the test task information to the client agent module, the client agent module calls the corresponding calling module, and the calling module calls the corresponding third-party testing tool to execute the test task.
  • the user does not need to install various tools, and does not need to know in detail how to use each tool. As long as the platform can be used to execute various third-party tools to perform tests, a convenient and efficient test method is realized.
  • FIG. 1 is a schematic structural diagram of a function module of a first embodiment of a test system for invoking a third-party test tool according to the present disclosure
  • FIG. 2 is a diagram showing an example of a system architecture of a test system that invokes a third-party test tool according to the present disclosure
  • FIG. 3 is a diagram showing an example of a method for implementing a third-party tool call by a test system that invokes a third-party test tool;
  • FIG. 4 is a schematic diagram of a refinement function module of the task management module 20 in the embodiment shown in FIG. 1;
  • FIG. 5 is a schematic flowchart of a first embodiment of a test method for invoking a third-party test tool according to the present disclosure
  • step S20 is a schematic flowchart of the refinement of step S20 in the embodiment shown in FIG. 5 of the present disclosure
  • FIG. 7 is a schematic flowchart of steps added after step S40 in the embodiment shown in FIG. 5;
  • FIG. 8 is a schematic diagram showing the refinement of step S60 in the embodiment shown in FIG. 7 of the present disclosure.
  • the present disclosure provides a test system that invokes a third-party test tool.
  • the system includes:
  • the task information obtaining module 10 is configured to acquire test task information submitted by the user, and save the test task information in a preset database;
  • the task management module 20 is configured to acquire the test task information saved by the database, and send the test task information to a client proxy module.
  • the client proxy module 30 is configured to send the test parameters included in the test task information to the corresponding calling module according to the information of the third-party testing tool included in the test task information after receiving the test task information;
  • the calling module 40 is configured to, after receiving the test parameter, invoke the third-party testing tool to perform a test task based on the test parameter.
  • the test system for invoking a third-party testing tool includes a task information obtaining module 10, a task management module 20, a client agent module 30, and a calling module 40, wherein the calling module 20 includes at least two, each calling module 20 can call different third-party testing tools to perform testing, wherein the task information obtaining module 10 and the task management module 20 are connected through a preset database, and the system architecture diagram of the testing system of the third-party testing tool is invoked as shown in FIG. 2, and the third party The test tool is already deployed and is called only when needed. After the user inputs the test task in the task information obtaining module 10, the execution of the test task can be completed by calling a third-party testing tool.
  • the task information acquiring module 10 is configured to acquire and save the test task information. After the task information obtaining module 10 obtains the test task information submitted by the user, the test task information is saved in a preset database.
  • the task information obtaining module 10 may be in the form of a website, a windows client program, or an apk program in the Android system.
  • the above test task information includes test parameters that need to be used when using a third-party test tool, such as including a third-party test tool name, indicating which third-party test tool is needed for testing, and may include a URL to be tested, indicating that the test is required. Which website can also include test strategies and so on.
  • information of various third-party testing tools that can be called such as the name of the third-party testing tool, and the test status after the test starts, can be displayed, so the user can select input as needed. .
  • the task management module 20 can query the test task information saved in the preset database, and the task information obtaining module 10 and the task management module 20 can be deployed on the same server. After the task management module 20 receives the test task information, the test task information can be assigned to the client agent module 30.
  • the client agent module 30 After the client agent module 30 receives the test task information, the corresponding call module 40 is invoked, and the test parameter included in the test task information is also transmitted to the calling module 40. Since there are multiple calling modules 40 in the system, the specific calling module can be determined according to the information of the third-party testing tools included in the testing task. For example, the calling module of the same name can be called by the name of the third-party tool test. .
  • an abstract base class such as initialization, parameters, and results of the third-party test tool is specified, and the client proxy module 30 can manage the call module 40 in the form of a plug-in, that is, the client proxy module 30. A plurality of calling modules 40 are called.
  • the calling module 40 invokes a corresponding third-party testing tool, so that the corresponding third-party testing tool executes the testing task according to the testing parameters included in the test task information, and is called according to the feature calling manner of the corresponding third-party testing tool.
  • Calling a module at program implementation can inherit initialization base classes such as initialization, parameters, and results, in the program.
  • GUI graphical user interface
  • the feature dynamic link library defines an abstract base class such as initialization, parameters, and results of the third-party test tool, and the client proxy module 20 refers to the feature dynamic link library, that is, the reference feature dynamics.
  • An abstract base class such as initialization, parameters, and results of a third-party test tool specified in the link library.
  • Each call module 40 for calling a third-party test tool inherits a class in the feature dynamic link library, and instantiates the feature in the dynamic link library. class. Therefore, the client proxy module 20 can dynamically load the calling module 40 so that the calling module executes the calling function after being loaded, and invokes a third-party testing tool to perform the testing.
  • FIG. 3 The above method for invoking a third-party testing tool through a program is shown in FIG. 3.
  • the main interaction parameters required by the two tools are the target URL to be scanned and the scanning policy.
  • the target information URL is input in the task information obtaining module 10, and the scanning strategies of the two tools are selected according to the prompts, and the test task information is submitted and saved to the database.
  • the task management module 20 scans the database to obtain the test task and transmits the test task information to the client proxy module 30.
  • the client proxy module 30 obtains the test tool names WebInspect and NSFocus included in the test task, and the test parameters corresponding to WebInspect and NSFoucus respectively.
  • the calling module 40 corresponding to WebInspect and NSFocus is called, and the WebInspect and NSFocus testing tools are called by the calling module 40 to perform specific testing tasks.
  • the task information acquiring module 10 obtains the test task information submitted by the user, and saves the test task information in a preset database; the task management module 20 acquires the test task information saved in the database, and the The test task information is sent to the client proxy module 30. After receiving the test task information, the client proxy module 30 sends the information to the corresponding calling module 40 according to the information of the third-party testing tool included in the test task information. The test parameter included in the test task information; after receiving the test parameter, the calling module 40 invokes the third-party test tool to execute a test task based on the test parameter. The task information obtaining module 10 acquires and saves the test task information, and the task management module 20 sends the test task information to the client agent module 30.
  • the client agent module 30 calls the corresponding calling module 40, and the calling module 40 calls the corresponding third party test.
  • the tool performs the test task, so that the user does not need to install various tools, and does not need to know the usage of each tool in detail. As long as the platform can call various third-party tools to perform the test, the convenient and efficient test method is realized.
  • FIG. 4 it is a schematic diagram of a refinement function module of the task management module 20 in the first embodiment of the test system for invoking a third-party test tool according to the present disclosure.
  • the task management module 20 includes:
  • An obtaining unit 21 configured to access the database, and obtain the test task information included in the database
  • the query unit 22 is configured to query a test execution state corresponding to the test task information after acquiring the test task;
  • the query allocation unit 23 is configured to query a client proxy module whose state is idle in the system process when the test execution state is a to-be-executed state, and send the test task information to the client proxy module.
  • the database is a database in which the task information acquiring module 10 saves the test task information, and the second obtaining module 21 accesses the database.
  • the test execution state corresponding to the test task information is queried, because the database There are a lot of test task information stored in the test task.
  • the test execution status of each test task information may be different. Therefore, when the test execution status corresponding to the test task information is in the pending execution state, it indicates that the test task information has been obtained but the test task information.
  • the representative test task is not executed.
  • the idle client proxy module 30 in the query system process allocates a test task to the client proxy module 30 according to the address of the client proxy module 30.
  • the task management module 20 queries the database to obtain test task information, queries the idle client agent module 30, and allocates test task information to the idle client agent 30 module, so that the test task represented by the test task information can be quickly detected. carried out.
  • the invoking module 40 is further configured to obtain a test report that is feedback after the third-party test tool executes the test task, and process the test report into a preset text format and save the report as a processed test report.
  • the client agent module feeds back a notification message that the test task is completed.
  • the calling module 40 obtains the test report after the third-party testing tool executes the test, and feeds back the notification of the completion of the testing task to the client-side proxy module 30 that invokes the calling module 40. Message.
  • the format of the test report is processed and saved as a processed test report, so that various third-party test tools can present the test report in the same format after performing the test. It can be understood that the test report in a unified format can be provided to the user, and the automatically generated original test report after the third party test tool performs the test task can also be provided.
  • the test report is a text file in Word format.
  • the text information in Word and format is obtained, and the text information is processed into a PDF format for saving.
  • the test report can also be sorted according to the hazard level of the test results, and the test report is classified and stored according to high risk, intermediate risk and low risk.
  • the calling module 40 receives the test report fed back by the corresponding third-party testing tool after performing the testing task, and processes the test report, so that the user can see the test result after the third-party testing tool is executed.
  • the format of the test results is uniform and easy to view and analyze.
  • the client proxy module 30 is further configured to: when the notification message is received, acquire and save the processed test report to the calling module.
  • the client proxy module 30 after receiving the notification message of the completion of the test task, the client proxy module 30 obtains the processed test report from the calling module 40, and saves the processed test report in the server where the client proxy module 30 is located.
  • the client agent module 30 receives the notification message, and obtains and saves the test report of the calling module 40, so that the task management module 20 can obtain the test task execution status and the test report from the client proxy module 30, thereby enabling the combination.
  • the task information obtaining module 10 enables the user to see the test report after the third party test tool is called to perform the test.
  • the task management module 20 is further configured to access the client proxy module, and when the notification message is obtained, mark the test execution status corresponding to the test task information in the database as a completed state, and The processed test report is downloaded and saved in the database.
  • the task management module 20 accesses the client proxy module.
  • the notification message of the completion of the test task is obtained, it indicates that the test task has been completed at this time, and the task management module 20 marks the test execution state corresponding to the test task information in the database as The status is completed and the processed test report downloaded from the client agent module 30 is saved in the database.
  • the time for accessing the client proxy module 30 can be set for the task management module 20, for example, setting the task management module to periodically obtain the execution status of the test task.
  • the client management module 30 is accessed by the task management module 20, and when the notification message of the completion of the test task is obtained, the test execution status corresponding to the test task information in the database is marked as completed, and the task information acquisition module is obtained. 10 can obtain the execution status of the test task from the database, and obtain the test report of the completed test task in time.
  • the task information obtaining module 10 is further configured to access the database, and obtain the processed test from the database when the test execution state corresponding to the test task information in the database is obtained as being completed.
  • the report is displayed on the user display interface.
  • the task information acquiring module 10 when the task information acquiring module 10 obtains the test execution state corresponding to the test task information in the database as the completed state, it indicates that the test task has been completed, and the test report has been generated. At this time, the processed test report is obtained from the database, and the processed test report is displayed on the user display interface, and the user can view and save the processed test report. You can also display the detailed information of the processed test report and the download link of the processed test report on the user display interface. The way to display the test report after the specific test can be selected as needed.
  • the task information acquisition module obtains the test report and displays it on the user display interface, so that the user can view, analyze, and manage the test report of the test task after the test task is completed.
  • the present disclosure also provides a test method for invoking a third-party test tool.
  • a test method for calling a third-party test tool includes :
  • Step S10 The task information obtaining module acquires test task information submitted by the user, and saves the test task information in a preset database.
  • Step S20 the task management module acquires the test task information saved by the database, and the test task is The information is sent to the client agent module;
  • Step S30 after receiving the test task information, the client proxy module sends the test parameter included in the test task information to the corresponding calling module according to the information of the third-party tool included in the test task information;
  • Step S40 After receiving the test parameter, the calling module invokes the third-party testing tool to perform a test task based on the test parameter.
  • the test method for invoking a third-party testing tool provided in the embodiment of the present disclosure implements a layer call of the task management module, the client proxy module, and the calling module after the user inputs the test task in the task information obtaining module, and finally calls the corresponding call.
  • the third-party testing tool completes the execution of the test task.
  • the task information acquiring module is configured to acquire and save the test task information. After the task information acquiring module obtains the test task information submitted by the user, the test task information is saved in a preset database.
  • the task information acquisition module may be a website form, a windows client program, or an apk program in the Android system.
  • the above test task information includes test parameters that need to be used when using a third-party test tool, such as including a third-party test tool name, indicating which third-party test tool is needed for testing, and may include a URL to be tested, indicating that the test is required. Which website can also include test strategies and so on.
  • information of various third-party test tools that can be called such as the name of the third-party test tool, and the test status after the test is started, can be displayed, so the user can select input as needed.
  • the task management module can query the test task information saved in the preset database, and the task information obtaining module and the task management module can be deployed on the same server. After the task management module receives the test task information, the test task information can be assigned to the client agent module.
  • the client agent module When the client agent module receives the test task information, the corresponding calling module is called, and the test parameter included in the test task information is also transmitted to the calling module. Since there are multiple calling modules in the system, the specific calling module can be determined according to the information of the third-party testing tools included in the testing task. For example, the calling module of the same name can be called by the name of the third-party tool test.
  • an abstract base class such as initialization, parameters, and results of the third-party test tool is specified, and the client proxy module can manage the calling module in the form of a plug-in, that is, the client proxy module invokes multiple calls. Module.
  • the calling module calls the corresponding third-party testing tool, so that the corresponding third-party testing tool executes the testing task according to the test parameters included in the test task information, and is called according to the feature calling manner of the corresponding third-party testing tool.
  • the calling module can inherit the abstract base class such as initialization, parameters, and results when the program is implemented.
  • the function is written in the program to define the calling method of each third-party testing tool. For example, you can use the test tool called by the command line to call the test tool using the process; the test tool that can only be interfaced, use the graphical user interface (GUI) to make calls, such as using selenium calls; test with message interface Tool, called through interface communication.
  • GUI graphical user interface
  • the feature dynamic link library may also be written.
  • the feature dynamic link library defines an abstract base class such as initialization, parameters, and results of the third-party test tool, and the client proxy module refers to the feature dynamic link library, that is, the reference feature dynamic link.
  • Abstract base classes for initialization, parameters, and results of third-party test tools specified in the library, each for tuning The class in the feature dynamic link library is inherited by the calling module of the third-party test tool, and the class in the feature dynamic link library is instantiated. Therefore, the client proxy module can dynamically load the calling module, so that the calling module executes the calling function after being loaded, and calls a third-party testing tool to execute the test.
  • FIG. 3 The above method for invoking a third-party testing tool through a program is shown in FIG. 3.
  • the main interaction parameters required by these two tools are the target URL to be scanned and the scanning policy. Enter the destination URL in the task information acquisition module, and select the scanning strategy of the two tools as prompted, submit the test task information and save it to the database. At this time, the task management module scans the database to obtain the test task and transmits the test task information to the client agent module.
  • the client agent module obtains the test tool names WebInspect and NSFocus included in the test task, and the test parameters corresponding to WebInspect and NSFoucus respectively, and then invokes The calling module corresponding to WebInspect and NSFocus uses the calling module to call WebInspect and NSFocus test tools to perform specific test tasks.
  • the task information acquisition module acquires the test task information submitted by the user, and saves the test task information in a preset database; the task management module acquires the test task information saved by the database, and the test task is The information is sent to the client proxy module.
  • the client proxy module After receiving the test task information, the client proxy module sends the test task information to the corresponding calling module according to the information of the third-party testing tool included in the test task information.
  • Test module after receiving the test parameter, the calling module invokes the third-party test tool to perform a test task based on the test parameter.
  • the task information acquisition module acquires and saves the test task information, and the task management module sends the test task information to the client agent module, the client agent module calls the corresponding calling module, and the calling module calls the corresponding third-party testing tool to execute the test task.
  • the user does not need to install various tools, and does not need to know in detail how to use each tool. As long as the platform can be used to execute various third-party tools to perform tests, a convenient and efficient test method is realized.
  • step S20 in the first embodiment of the test method for invoking a third-party test tool includes:
  • Step S21 accessing the database, and acquiring the test task information included in the database
  • Step S22 after obtaining the test task information, querying a test execution state corresponding to the test task information;
  • Step S23 When the test execution state is a to-be-executed state, query a client proxy module whose state is idle in the system process, and send the test task information to the client proxy module.
  • the database is a database in which the task information acquiring module saves the test task information, and the second obtaining module accesses the database.
  • the test execution state corresponding to the test task information is queried, because the database will A plurality of test task information is stored, and the test execution state corresponding to each test task information may be different. Therefore, when the test execution state corresponding to the test task information is a pending execution state, it indicates that the test task information has been acquired but the test task information represents The test task is not executed.
  • the idle client agent module in the system process is queried, and the test task is assigned to the client agent module according to the address of the client agent module.
  • the task management module queries the database to obtain test task information, queries the idle client agent module, and allocates test task information to the idle client agent module, so that the test task represented by the test task information can be executed as soon as possible.
  • FIG. 7 a schematic flowchart of an additional step after step S40 in the first embodiment of the test method for invoking a third-party test tool according to the present disclosure, after the step S40, the method further includes:
  • Step S50 the calling module acquires a test report that is feedback after the third-party test tool executes the test task, and processes the test report into a preset text format and saves the processed test report as a processed test report to the client.
  • the proxy module feeds back the notification message that the test task is completed;
  • Step S60 when the client proxy module receives the notification message, display the processed test report on the user display interface in combination with the task management module and the task information obtaining module.
  • the calling module obtains the test report after the third-party testing tool executes the test, and feeds back the notification message of the completion of the testing task to the client agent module that invokes the calling module.
  • the format of the test report is processed and saved as a processed test report, so that various third-party test tools can present the test report in the same format after performing the test. It can be understood that the test report in a unified format can be provided to the user, and the automatically generated original test report after the third party test tool performs the test task can also be provided.
  • the test report is a text file in Word format.
  • the text information in Word and format is obtained, and the text information is processed into a PDF format for saving.
  • the test report can also be sorted according to the hazard level of the test results, and the test report is classified and stored according to high risk, intermediate risk and low risk.
  • the test report after the task is completed is obtained by calling the module, and the test report is processed into the processed test report, and then the task management module and the task information obtaining module are combined to display the processed test report feedback on the user interface, so that the user passes the After the task information acquisition module inputs the test task, the task information acquisition module can obtain the test report.
  • step S60 it is a schematic flowchart of the refinement of step S60 in the embodiment in FIG. 7 , where the foregoing step S60 includes:
  • Step S610 when the client proxy module obtains the notification message, acquiring and saving the processed test report to the calling module;
  • Step S620 The task management module accesses the client proxy module, and when the notification message is obtained, marking the test execution status corresponding to the test task information in the database as a completed state, and the processed test is performed.
  • the report is downloaded and saved in the database.
  • Step S630 when the task information obtaining module acquires the corresponding test task information in the database.
  • the processed test report is obtained from the database and displayed on the user display interface.
  • the notification message is a message sent by the calling module to the client proxy module, and the notification message is used to notify the client proxy module that the test task has been executed.
  • the client agent module After receiving the notification message of the completion of the test task, the client agent module obtains the processed test report from the task management module, and saves the processed test report in the server where the client agent module is located.
  • the task management module accesses the client proxy module and obtains the notification message of the completion of the test task, it indicates that the test task has been completed at this time, and the task management module marks the test execution state corresponding to the test task information in the database as the completed state, and simultaneously The client agent module downloads the processed test report and saves it in the database.
  • the time for accessing the client proxy module can be set for the task management module, for example, setting the task management module to periodically obtain the execution status of the test task.
  • the task information obtaining module obtains the test execution state corresponding to the test task information in the database as the completed state, it indicates that the task information obtaining module obtains the test task submitted for testing has been completed, and the test report has been generated.
  • the processed test report is obtained from the database, and the processed test report is displayed on the user display interface, and the user can view and save the processed test report. You can also display the detailed information of the processed test report and the download link of the processed test report on the user display interface. The way to display the test report after the specific test can be selected as needed.
  • the client module acquires and saves the processed test report
  • the task management module accesses the client agent and obtains the notification message of the completion of the test task, and then the database
  • the test execution status corresponding to the test task information is marked as completed, so that the task information acquisition module can obtain the execution status of the test, and download the processed test report after the test task is executed in time to feedback to the user, so that the user invokes the third-party test.
  • the tool can get the test results in time after the test is executed.
  • the present disclosure relates to the field of cloud testing technology, and realizes that various third-party tools can be used to execute tests through the platform, thereby implementing a convenient and efficient testing method.

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

Abstract

Disclosed is a test system invoking a third-party test tool, comprising: a task information acquisition module, configured to acquire test task information submitted by a user and save same in a preconfigured database; a task management module, configured to acquire the test task information saved in the database and send same to a client agent module; the client agent module, configured to send, after receiving the test task information, test parameters carried in the test task information to a corresponding invoking module according to information about a third-party test tool carried in the test task information; and the invoking module, configured to invoke, after receiving the test parameters, the third-party test tool to implement the test task based on the test parameters. Also disclosed is a test method invoking a third-party test tool. According to the present invention, various third-party tools can be invoked via a platform to implement tests, thereby realizing a convenient and efficient test approach.

Description

调用第三方测试工具的测试系统及方法Test system and method for invoking third party testing tools 技术领域Technical field
本公开涉及云测试技术领域,尤其涉及调用第三方测试工具的测试系统及方法。The present disclosure relates to the field of cloud testing technologies, and in particular, to a testing system and method for invoking third party testing tools.
背景技术Background technique
随着测试技术的发展,各种测试工具层出不穷,在软件研发过程中,通常会使用各种类型的第三方测试工具进行测试,如功能测试类工具、安全类测试工具、性能类测试工具等,或者是使用不同的第三方测试工具进行某一类型的测试,如使用PageSpeed、Yslow进行网站性能测试。然而这些工具的运行模式多样,使用方法也不尽相同,当测试人员需要对一个软件进行测试时往往需要掌握多种测试工具的安装部署方式和软件测试工具使用方法,增加了测试任务完成的时间和复杂度,同时多名测试人员在各自设备上进行测试工具的安装部署,也导致了设备资源的浪费。With the development of testing technology, various testing tools emerge in an endless stream. During the software development process, various types of third-party testing tools are usually used for testing, such as functional testing tools, security testing tools, and performance testing tools. Or use a different third-party testing tool for a certain type of testing, such as using PageSpeed, Yslow for website performance testing. However, these tools have different operating modes and different usage methods. When testers need to test a software, they often need to master the installation and deployment methods of various test tools and the use of software test tools, which increases the time for completion of test tasks. And complexity, while several testers installed and deployed test tools on their respective devices, which also led to waste of device resources.
发明内容Summary of the invention
本公开的主要目的在于提供一种调用第三方测试工具的测试系统及方法,旨在实现提供一种便捷、高效的测试系统的目的。The main purpose of the present disclosure is to provide a test system and method for invoking a third-party test tool, which aims to provide a convenient and efficient test system.
为实现上述目的,本公开提供一种调用第三方测试工具的测试系统,包括:To achieve the above object, the present disclosure provides a test system that invokes a third-party test tool, including:
任务信息获取模块,设置为获取用户提交的测试任务信息,将所述测试任务信息保存在预置的数据库中;The task information obtaining module is configured to obtain test task information submitted by the user, and save the test task information in a preset database;
任务管理模块,设置为获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块;a task management module, configured to acquire the test task information saved by the database, and send the test task information to a client agent module;
所述客户端代理模块,设置为在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方测试工具的信息向对应的调用模块发送所述测试任务信息包含的测试参数;The client proxy module is configured to: after receiving the test task information, send, according to the information of the third-party testing tool included in the test task information, the test parameter included in the test task information to the corresponding calling module;
所述调用模块,设置为在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。The calling module is configured to, after receiving the test parameter, invoke the third-party testing tool to perform a test task based on the test parameter.
优选地,所述任务管理模块包括:Preferably, the task management module comprises:
获取单元,设置为访问所述数据库,获取所述数据库包含的所述测试任务信息;An obtaining unit, configured to access the database, and obtain the test task information included in the database;
查询单元,设置为在获取到所述测试任务信息后,查询所述测试任务信息对应的测试执行状态;a query unit, configured to query a test execution state corresponding to the test task information after obtaining the test task information;
查询分配单元,设置为当所述测试执行状态为待执行状态时,查询系统进程中状态为空闲的客户端代理模块,向所述客户端代理模块发送所述测试任务信息。The query allocation unit is configured to: when the test execution state is a to-be-executed state, query a client proxy module whose state is idle in the system process, and send the test task information to the client proxy module.
优选地,所述调用模块还设置为获取所述第三方测试工具执行完所述测试任务后反馈的测试报告,将所述测试报告处理为预置的文本格式保存为已处理测试报告,向所述客户 端代理模块反馈所述测试任务完成的通知消息。Preferably, the calling module is further configured to obtain a test report that is feedback after the third-party testing tool performs the testing task, and process the test report into a preset text format and save the processed test report as a processed test report. Customer The end agent module feeds back the notification message that the test task is completed.
优选地,所述客户端代理模块还设置为当接收到所述通知消息时,向所述调用模块获取并保存所述已处理测试报告。Preferably, the client proxy module is further configured to acquire and save the processed test report to the calling module when the notification message is received.
优选地,所述任务管理模块还设置为访问所述客户端代理模块,当获取到所述通知消息时,将所述数据库中所述测试任务信息对应的测试执行状态标记为已完成状态,将所述已处理测试报告下载并保存在所述数据库中。Preferably, the task management module is further configured to access the client proxy module, and when the notification message is obtained, mark the test execution status corresponding to the test task information in the database as a completed state, and The processed test report is downloaded and saved in the database.
优选地,所述任务信息获取模块还设置为访问所述数据库,当获取到所述数据库中所述测试任务信息对应的测试执行状态为已完成状态时,从所述数据库获取所述已处理测试报告,显示在用户显示界面。Preferably, the task information obtaining module is further configured to access the database, and obtain the processed test from the database when the test execution state corresponding to the test task information in the database is obtained as being completed. The report is displayed on the user display interface.
本公开进一步提供一种调用第三方测试工具的测试方法,包括步骤:The present disclosure further provides a test method for invoking a third-party testing tool, including the steps of:
任务信息获取模块获取用户提交的测试任务信息,将所述测试任务信息保存在预置的数据库中;The task information obtaining module acquires the test task information submitted by the user, and saves the test task information in a preset database;
任务管理模块获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块;The task management module acquires the test task information saved by the database, and sends the test task information to the client agent module;
所述客户端代理模块在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方测试工具的信息向对应的调用模块发送所述测试任务信息包含的测试参数;After receiving the test task information, the client proxy module sends the test parameter included in the test task information to the corresponding calling module according to the information of the third-party testing tool included in the test task information;
所述调用模块在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。After receiving the test parameter, the calling module invokes the third-party testing tool to perform a test task based on the test parameter.
优选地,所述任务管理模块获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块包括:Preferably, the task management module acquires the test task information saved by the database, and the sending the test task information to the client agent module includes:
访问所述数据库,获取所述数据库包含的所述测试任务信息;Accessing the database to obtain the test task information included in the database;
在获取到所述测试任务信息后,查询所述测试任务信息对应的测试执行状态;After obtaining the test task information, querying a test execution state corresponding to the test task information;
当所述测试执行状态为待执行状态时,查询系统进程中状态为空闲的客户端代理模块,向所述客户端代理模块发送所述测试任务信息。When the test execution state is a to-be-executed state, the client proxy module in the system process state is idle, and the test task information is sent to the client proxy module.
优选地,所述调用模块在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务之后包括:Preferably, after the calling module receives the test parameter, calling the third-party testing tool to perform the testing task based on the testing parameter includes:
所述调用模块获取所述第三方测试工具执行完所述测试任务后反馈的测试报告,将所述测试报告处理为预置的文本格式保存为已处理测试报告,向所述客户端代理模块反馈所述测试任务完成的通知消息;The calling module acquires a test report fed back by the third-party testing tool after performing the testing task, and processes the test report into a preset text format and saves the processed test report as a processed test report, and provides feedback to the client agent module. The notification message that the test task is completed;
当所述客户端代理模块接收到所述通知消息时,结合所述任务管理模块和所述任务信息获取模块将所述已处理测试报告显示在用户显示界面。And when the client proxy module receives the notification message, displaying the processed test report on the user display interface in conjunction with the task management module and the task information acquisition module.
优选地,所述当所述客户端代理模块接收到所述通知消息时,结合所述任务管理模块和所述任务信息获取模块将所述已处理测试报告显示在用户显示界面包括:Preferably, when the client agent module receives the notification message, displaying the processed test report on the user display interface in combination with the task management module and the task information acquiring module includes:
当所述客户端代理模块获取到所述通知消息时,向所述调用模块获取并保存所述已处 理测试报告;When the client proxy module obtains the notification message, acquiring and saving the existing location to the calling module Test report
任务管理模块访问所述客户端代理模块,当获取到所述通知消息时,将所述数据库中所述测试任务信息对应的测试执行状态标记为已完成状态,将所述已处理测试报告下载并保存在所述数据库中。The task management module accesses the client proxy module, and when the notification message is obtained, marking the test execution status corresponding to the test task information in the database as a completed state, and downloading the processed test report and Saved in the database.
所述任务信息获取模块访问所述数据库,当获取到所述数据库中所述测试任务信息对应的测试执行状态为已完成状态时,从所述数据库获取所述已处理测试报告,显示在所述用户显示界面。The task information obtaining module accesses the database, and when the test execution state corresponding to the test task information in the database is obtained, the processed test report is obtained from the database, and is displayed in the database. User display interface.
本公开提出的调用第三方测试工具的测试系统和方法通过任务信息获取模块获取用户提交的测试任务信息,将所述测试任务信息保存在预置的数据库中;任务管理模块获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块;所述客户端代理模块在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方测试工具的信息向对应的调用模块发送所述测试任务信息包含的测试参数;所述调用模块在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。通过任务信息获取模块获取并保存测试任务信息,任务管理模块发送测试任务信息给客户端代理模块,客户端代理模块调用对应的调用模块,调用模块再调用对应的第三方测试工具执行完成测试任务,使用户不需要安装各种工具,也不需要详细了解每一种工具的使用方法,只要通过平台就可以调用各种第三方工具执行测试,实现便捷、高效的测试方式。The test system and method for invoking a third-party testing tool proposed by the present disclosure acquires test task information submitted by a user through a task information acquiring module, and saves the test task information in a preset database; the task management module acquires the database saved The test task information is sent to the client agent module; after receiving the test task information, the client agent module according to the information of the third party test tool included in the test task information The corresponding calling module sends the test parameter included in the test task information; after receiving the test parameter, the calling module invokes the third-party testing tool to perform a test task based on the test parameter. The task information acquisition module acquires and saves the test task information, and the task management module sends the test task information to the client agent module, the client agent module calls the corresponding calling module, and the calling module calls the corresponding third-party testing tool to execute the test task. The user does not need to install various tools, and does not need to know in detail how to use each tool. As long as the platform can be used to execute various third-party tools to perform tests, a convenient and efficient test method is realized.
附图说明DRAWINGS
图1为本公开调用第三方测试工具的测试系统第一实施例的功能模块结构示意图;1 is a schematic structural diagram of a function module of a first embodiment of a test system for invoking a third-party test tool according to the present disclosure;
图2为本公开调用第三方测试工具的测试系统的系统架构示例图;2 is a diagram showing an example of a system architecture of a test system that invokes a third-party test tool according to the present disclosure;
图3为本公开调用第三方测试工具的测试系统通过程序实现第三方工具调用的方法示例图;FIG. 3 is a diagram showing an example of a method for implementing a third-party tool call by a test system that invokes a third-party test tool;
图4为本公开图1所示实施例中任务管理模块20的细化功能模块示意图;4 is a schematic diagram of a refinement function module of the task management module 20 in the embodiment shown in FIG. 1;
图5为本公开调用第三方测试工具的测试方法第一实施例的流程示意图;5 is a schematic flowchart of a first embodiment of a test method for invoking a third-party test tool according to the present disclosure;
图6为本公开图5所示实施例中步骤S20的细化流程示意图;6 is a schematic flowchart of the refinement of step S20 in the embodiment shown in FIG. 5 of the present disclosure;
图7为本公开图5所示实施例中步骤S40之后追加的步骤的流程示意图;FIG. 7 is a schematic flowchart of steps added after step S40 in the embodiment shown in FIG. 5;
图8为本公开图7所示实施例中步骤S60的细化流程示意图。FIG. 8 is a schematic diagram showing the refinement of step S60 in the embodiment shown in FIG. 7 of the present disclosure.
本公开目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present disclosure will be further described with reference to the accompanying drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本公开,并不用于限定本公开。It is understood that the specific embodiments described herein are merely illustrative of the disclosure and are not intended to limit the disclosure.
本公开提供一种调用第三方测试工具的测试系统,参照图1,在第一实施例中,该系 统包括:The present disclosure provides a test system that invokes a third-party test tool. Referring to FIG. 1, in the first embodiment, the system The system includes:
任务信息获取模块10,用于获取用户提交的测试任务信息,将所述测试任务信息保存在预置的数据库中;The task information obtaining module 10 is configured to acquire test task information submitted by the user, and save the test task information in a preset database;
任务管理模块20,用于获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块;The task management module 20 is configured to acquire the test task information saved by the database, and send the test task information to a client proxy module.
所述客户端代理模块30,用于在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方测试工具的信息向对应的调用模块发送所述测试任务信息包含的测试参数;The client proxy module 30 is configured to send the test parameters included in the test task information to the corresponding calling module according to the information of the third-party testing tool included in the test task information after receiving the test task information;
所述调用模块40,用于在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。The calling module 40 is configured to, after receiving the test parameter, invoke the third-party testing tool to perform a test task based on the test parameter.
本公开实施例中提供的调用第三方测试工具的测试系统包括任务信息获取模块10、任务管理模块20、客户端代理模块30、调用模块40,其中调用模块20包含至少两个,每个调用模块20能调用不同的第三方测试工具执行测试,其中任务信息获取模块10和任务管理模块20通过预置的数据库联系,调用第三方测试工具的测试系统的系统架构图如图2所示,第三方测试工具是已经部署好的,只在需要时被调用执行。当用户在任务信息获取模块10输入测试任务后,能够通过调用第三方测试工具完成测试任务的执行。The test system for invoking a third-party testing tool provided in the embodiment of the present disclosure includes a task information obtaining module 10, a task management module 20, a client agent module 30, and a calling module 40, wherein the calling module 20 includes at least two, each calling module 20 can call different third-party testing tools to perform testing, wherein the task information obtaining module 10 and the task management module 20 are connected through a preset database, and the system architecture diagram of the testing system of the third-party testing tool is invoked as shown in FIG. 2, and the third party The test tool is already deployed and is called only when needed. After the user inputs the test task in the task information obtaining module 10, the execution of the test task can be completed by calling a third-party testing tool.
本实施例中上述任务信息获取模块10用于获取并保存测试任务信息,当任务信息获取模块10获取到用户提交的测试任务信息后,将测试任务信息保存在预置的数据库中。任务信息获取模块10可以是网站形式,也可以是windows客户端程序,也可以是安卓系统中的apk程序。上述测试任务信息包含需要使用第三方测试工具时需要的测试参数,例如包括第三方测试工具名称,表明需要使用何种第三方测试工具来进行测试,还可以包括待测试网址,表明需要测试的是哪个网站,也可以包括测试策略等。在任务信息获取模块10中,可以显示能被调用的各种第三方测试工具的信息,例如第三方测试工具的名称,以及当测试开始以后的测试状态等信息,因此用户可以根据需要进行选择输入。In the embodiment, the task information acquiring module 10 is configured to acquire and save the test task information. After the task information obtaining module 10 obtains the test task information submitted by the user, the test task information is saved in a preset database. The task information obtaining module 10 may be in the form of a website, a windows client program, or an apk program in the Android system. The above test task information includes test parameters that need to be used when using a third-party test tool, such as including a third-party test tool name, indicating which third-party test tool is needed for testing, and may include a URL to be tested, indicating that the test is required. Which website can also include test strategies and so on. In the task information obtaining module 10, information of various third-party testing tools that can be called, such as the name of the third-party testing tool, and the test status after the test starts, can be displayed, so the user can select input as needed. .
上述任务管理模块20可以查询预置的数据库中保存的测试任务信息,任务信息获取模块10与任务管理模块20可以部署在同一台服务器上。当任务管理模块20接收到测试任务信息后,可以将测试任务信息分配给客户端代理模块30。The task management module 20 can query the test task information saved in the preset database, and the task information obtaining module 10 and the task management module 20 can be deployed on the same server. After the task management module 20 receives the test task information, the test task information can be assigned to the client agent module 30.
当客户端代理模块30收到测试任务信息后,调用对应的调用模块40,调用的同时也将测试任务信息包含的测试参数传递给调用模块40。由于系统中存在多个调用模块40,具体的调用哪一个调用模块,可以根据测试任务中包含的第三方测试工具的信息来决定,例如可以通过第三方工具测试的名称来调用相同名称的调用模块。在程序实现时,在客户端代理模块30中,规定第三方测试工具的初始化、参数、结果等抽象基类,客户端代理模块30可以以插件的形式管理调用模块40,即客户端代理模块30调用多个调用模块40。After the client agent module 30 receives the test task information, the corresponding call module 40 is invoked, and the test parameter included in the test task information is also transmitted to the calling module 40. Since there are multiple calling modules 40 in the system, the specific calling module can be determined according to the information of the third-party testing tools included in the testing task. For example, the calling module of the same name can be called by the name of the third-party tool test. . When the program is implemented, in the client proxy module 30, an abstract base class such as initialization, parameters, and results of the third-party test tool is specified, and the client proxy module 30 can manage the call module 40 in the form of a plug-in, that is, the client proxy module 30. A plurality of calling modules 40 are called.
上述调用模块40调用对应的第三方测试工具,使对应的第三方测试工具根据测试任务信息中包含的测试参数执行测试任务,并且根据对应的第三方测试工具的特征调用方式来进行调用。在程序实现时调用模块可以继承初始化、参数、结果等抽象基类,在程序中 编写函数定义每一种第三方测试工具的调用方法。例如,能够用命令行调用的测试工具,使用进程调用该测试工具;只能界面操作的测试工具,使用图形用户界面(Graphical User Interface,GUI)进行调用,如利用selenium调用;具备消息接口的测试工具,通过接口通信调用。The calling module 40 invokes a corresponding third-party testing tool, so that the corresponding third-party testing tool executes the testing task according to the testing parameters included in the test task information, and is called according to the feature calling manner of the corresponding third-party testing tool. Calling a module at program implementation can inherit initialization base classes such as initialization, parameters, and results, in the program. Write a function that defines how each third-party test tool is called. For example, you can use the test tool called by the command line to call the test tool using the process; the test tool that can only be interfaced, use the graphical user interface (GUI) to make calls, such as using selenium calls; test with message interface Tool, called through interface communication.
具体程序实现时,也可以编写特征动态链接库,特征动态链接库中规定第三方测试工具的初始化、参数、结果等抽象基类,客户端代理模块20引用特征动态链接库,也即引用特征动态链接库中规定的第三方测试工具的初始化、参数、结果等抽象基类,每一个用于调用第三方测试工具的调用模块40继承特征动态链接库中的类,实例化特征动态链接库中的类。因此客户端代理模块20可以动态加载调用模块40,使得调用模块在被加载后执行其中的调用函数,调用第三方测试工具执行测试。上述通过程序实现第三方测试工具的调用方法如图3所示。When the specific program is implemented, the feature dynamic link library may also be written. The feature dynamic link library defines an abstract base class such as initialization, parameters, and results of the third-party test tool, and the client proxy module 20 refers to the feature dynamic link library, that is, the reference feature dynamics. An abstract base class such as initialization, parameters, and results of a third-party test tool specified in the link library. Each call module 40 for calling a third-party test tool inherits a class in the feature dynamic link library, and instantiates the feature in the dynamic link library. class. Therefore, the client proxy module 20 can dynamically load the calling module 40 so that the calling module executes the calling function after being loaded, and invokes a third-party testing tool to perform the testing. The above method for invoking a third-party testing tool through a program is shown in FIG. 3.
例如,当用户需要使用WebInspect和NSFocus两种测试工具进行网站安全性扫描时。这两个工具需要的主要交互参数为要扫描的目标网址和扫描策略,在任务信息获取模块10中输入目标网址,并分别按提示选择两个工具的扫描策略,提交测试任务信息并保存到数据库。此时任务管理模块20扫描数据库获取测试任务后将测试任务信息传递给客户端代理模块30,客户端代理模块30获取测试任务包含的测试工具名称WebInspect和NSFocus,以及WebInspect和NSFoucus分别对应的测试参数,再调用WebInspect和NSFocus对应的调用模块40,通过该调用模块40调用WebInspect和NSFocus测试工具完成执行具体的测试任务。For example, when users need to use WebInspect and NSFocus test tools for website security scanning. The main interaction parameters required by the two tools are the target URL to be scanned and the scanning policy. The target information URL is input in the task information obtaining module 10, and the scanning strategies of the two tools are selected according to the prompts, and the test task information is submitted and saved to the database. . At this time, the task management module 20 scans the database to obtain the test task and transmits the test task information to the client proxy module 30. The client proxy module 30 obtains the test tool names WebInspect and NSFocus included in the test task, and the test parameters corresponding to WebInspect and NSFoucus respectively. Then, the calling module 40 corresponding to WebInspect and NSFocus is called, and the WebInspect and NSFocus testing tools are called by the calling module 40 to perform specific testing tasks.
本实施例通过任务信息获取模块10获取用户提交的测试任务信息,将所述测试任务信息保存在预置的数据库中;任务管理模块20获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块30;所述客户端代理模块30在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方测试工具的信息向对应的调用模块40发送所述测试任务信息包含的测试参数;所述调用模块40在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。通过任务信息获取模块10获取并保存测试任务信息,任务管理模块20发送测试任务信息给客户端代理模块30,客户端代理模块30调用对应的调用模块40,调用模块40再调用对应的第三方测试工具执行完成测试任务,使用户不需要安装各种工具,也不需要详细了解每一种工具的使用方法,只要通过平台就可以调用各种第三方工具执行测试,实现便捷、高效的测试方式。In this embodiment, the task information acquiring module 10 obtains the test task information submitted by the user, and saves the test task information in a preset database; the task management module 20 acquires the test task information saved in the database, and the The test task information is sent to the client proxy module 30. After receiving the test task information, the client proxy module 30 sends the information to the corresponding calling module 40 according to the information of the third-party testing tool included in the test task information. The test parameter included in the test task information; after receiving the test parameter, the calling module 40 invokes the third-party test tool to execute a test task based on the test parameter. The task information obtaining module 10 acquires and saves the test task information, and the task management module 20 sends the test task information to the client agent module 30. The client agent module 30 calls the corresponding calling module 40, and the calling module 40 calls the corresponding third party test. The tool performs the test task, so that the user does not need to install various tools, and does not need to know the usage of each tool in detail. As long as the platform can call various third-party tools to perform the test, the convenient and efficient test method is realized.
优选地,参照图4,为本公开调用第三方测试工具的测试系统第一实施例中任务管理模块20的细化功能模块示意图,上述任务管理模块20包括:Preferably, referring to FIG. 4, it is a schematic diagram of a refinement function module of the task management module 20 in the first embodiment of the test system for invoking a third-party test tool according to the present disclosure. The task management module 20 includes:
获取单元21,用于访问所述数据库,获取所述数据库包含的所述测试任务信息;An obtaining unit 21, configured to access the database, and obtain the test task information included in the database;
查询单元22,用于在获取到所述测试任务后,查询所述测试任务信息对应的测试执行状态; The query unit 22 is configured to query a test execution state corresponding to the test task information after acquiring the test task;
查询分配单元23,用于当所述测试执行状态为待执行状态时,查询系统进程中状态为空闲的客户端代理模块,向所述客户端代理模块发送所述测试任务信息。The query allocation unit 23 is configured to query a client proxy module whose state is idle in the system process when the test execution state is a to-be-executed state, and send the test task information to the client proxy module.
本实施例中上述数据库是任务信息获取模块10保存测试任务信息的数据库,第二获取模块21访问数据库,当获取到数据库中的测试任务信息后,查询测试任务信息对应的测试执行状态,由于数据库中会存放很多测试任务信息,每个测试任务信息对应的测试执行状态可能不同,因此当测试任务信息对应的测试执行状态为待执行状态时,表明该测试任务信息已经被获取但该测试任务信息所代表的测试任务并未被执行,此时查询系统进程中空闲的客户端代理模块30,根据客户端代理模块30的地址向客户端代理模块30分配测试任务。In the embodiment, the database is a database in which the task information acquiring module 10 saves the test task information, and the second obtaining module 21 accesses the database. After obtaining the test task information in the database, the test execution state corresponding to the test task information is queried, because the database There are a lot of test task information stored in the test task. The test execution status of each test task information may be different. Therefore, when the test execution status corresponding to the test task information is in the pending execution state, it indicates that the test task information has been obtained but the test task information. The representative test task is not executed. At this time, the idle client proxy module 30 in the query system process allocates a test task to the client proxy module 30 according to the address of the client proxy module 30.
本实施例通过任务管理模块20查询数据库获取测试任务信息,查询空闲的客户端代理模块30,向空闲的客户端代理30模块分配测试任务信息,使测试任务信息所代表的测试任务能够尽快的被执行。In this embodiment, the task management module 20 queries the database to obtain test task information, queries the idle client agent module 30, and allocates test task information to the idle client agent 30 module, so that the test task represented by the test task information can be quickly detected. carried out.
优选地,上述调用模块40还用于获取所述第三方测试工具执行完所述测试任务后反馈的测试报告,将所述测试报告处理为预置的文本格式保存为已处理测试报告,向所述客户端代理模块反馈所述测试任务完成的通知消息。Preferably, the invoking module 40 is further configured to obtain a test report that is feedback after the third-party test tool executes the test task, and process the test report into a preset text format and save the report as a processed test report. The client agent module feeds back a notification message that the test task is completed.
本实施例中当第三方测试工具执行完测试以后,调用模块40获取该第三方测试工具执行完测试以后的测试报告,并向调用该调用模块40的客户端代理模块30反馈测试任务完成的通知消息。In this embodiment, after the third-party testing tool performs the test, the calling module 40 obtains the test report after the third-party testing tool executes the test, and feeds back the notification of the completion of the testing task to the client-side proxy module 30 that invokes the calling module 40. Message.
当调用模块40获取到测试报告后,对测试报告的格式进行处理保存为已处理测试报告,使得各种第三方测试工具执行完测试以后都能以同一种格式呈现测试报告。可以理解的是,即可以向用户提供统一格式的测试报告,也可以提供第三方测试工具执行完测试任务后的自动生成的原始测试报告。After the calling module 40 obtains the test report, the format of the test report is processed and saved as a processed test report, so that various third-party test tools can present the test report in the same format after performing the test. It can be understood that the test report in a unified format can be provided to the user, and the automatically generated original test report after the third party test tool performs the test task can also be provided.
例如,当某第三方测试工具执行完测试后,测试报告为Word格式的文本文件,此时,获取Word、格式中的文本信息,将该文本信息处理为PDF格式保存。同时,也可以将测试报告按照测试结果的危险等级进行排序,测试报告按照高危、中危、低危进行分类处理并保存。For example, when a third-party testing tool performs a test, the test report is a text file in Word format. At this time, the text information in Word and format is obtained, and the text information is processed into a PDF format for saving. At the same time, the test report can also be sorted according to the hazard level of the test results, and the test report is classified and stored according to high risk, intermediate risk and low risk.
本实施例通过调用模块40接收对应的第三方测试工具执行完测试任务后反馈的测试报告,并对测试报告进行处理,使用户在调用第三方测试工具执行完测试后能看到测试结果,并且测试结果的格式统一便于查看分析。In this embodiment, the calling module 40 receives the test report fed back by the corresponding third-party testing tool after performing the testing task, and processes the test report, so that the user can see the test result after the third-party testing tool is executed. The format of the test results is uniform and easy to view and analyze.
优选地,上述客户端代理模块30还用于当接收到所述通知消息时,向所述调用模块获取并保存所述已处理测试报告。Preferably, the client proxy module 30 is further configured to: when the notification message is received, acquire and save the processed test report to the calling module.
本实施例中上述客户端代理模块30接收到测试任务完成的通知消息后,向该调用模块40获取已处理测试报告,将已处理测试报告保存在客户端代理模块30所在的服务器中。 In the embodiment, after receiving the notification message of the completion of the test task, the client proxy module 30 obtains the processed test report from the calling module 40, and saves the processed test report in the server where the client proxy module 30 is located.
本实施例通过客户端代理模块30接收通知消息,获取并保存调用模块40的测试报告,使任务管理模块20可以从客户端代理模块30中获取测试任务的执行情况和的测试报告,从而使得结合任务信息获取模块10能够使用户在调用第三方测试工具执行完测试后能看到测试报告。In this embodiment, the client agent module 30 receives the notification message, and obtains and saves the test report of the calling module 40, so that the task management module 20 can obtain the test task execution status and the test report from the client proxy module 30, thereby enabling the combination. The task information obtaining module 10 enables the user to see the test report after the third party test tool is called to perform the test.
优选地,上述任务管理模块20还用于访问所述客户端代理模块,当获取到所述通知消息时,将所述数据库中所述测试任务信息对应的测试执行状态标记为已完成状态,将所述已处理测试报告下载并保存在所述数据库中。Preferably, the task management module 20 is further configured to access the client proxy module, and when the notification message is obtained, mark the test execution status corresponding to the test task information in the database as a completed state, and The processed test report is downloaded and saved in the database.
本实施例中任务管理模块20访问客户端代理模块,当获取到测试任务完成的通知消息时,表明此时测试任务已经完成,任务管理模块20将数据库中测试任务信息对应的测试执行状态标记为已完成状态,同时从客户端代理模块30下载已处理测试报告保存在数据库中。可以为任务管理模块20设定访问客户端代理模块30的时间,例如,设置任务管理模块定时获取测试任务的执行情况。In this embodiment, the task management module 20 accesses the client proxy module. When the notification message of the completion of the test task is obtained, it indicates that the test task has been completed at this time, and the task management module 20 marks the test execution state corresponding to the test task information in the database as The status is completed and the processed test report downloaded from the client agent module 30 is saved in the database. The time for accessing the client proxy module 30 can be set for the task management module 20, for example, setting the task management module to periodically obtain the execution status of the test task.
本实施例通过任务管理模块20访问客户端代理模块30,当获取到测试任务完成的通知消息时,并将数据库中的测试任务信息对应的测试执行状态标记为已完成状态,使任务信息获取模块10能从数据库中获取到测试任务的执行状况,并及时获取已完成测试任务的测试报告。In this embodiment, the client management module 30 is accessed by the task management module 20, and when the notification message of the completion of the test task is obtained, the test execution status corresponding to the test task information in the database is marked as completed, and the task information acquisition module is obtained. 10 can obtain the execution status of the test task from the database, and obtain the test report of the completed test task in time.
优选地,上述任务信息获取模块10还用于访问所述数据库,当获取到所述数据库中所述测试任务信息对应的测试执行状态为已完成状态时,从所述数据库获取所述已处理测试报告,显示在用户显示界面。Preferably, the task information obtaining module 10 is further configured to access the database, and obtain the processed test from the database when the test execution state corresponding to the test task information in the database is obtained as being completed. The report is displayed on the user display interface.
本实施例中任务信息获取模块10获取到数据库中的测试任务信息对应的测试执行状态为已完成状态时,表明该测试任务已经完成,并且已经产生了测试报告。此时从数据库中获取已处理测试报告,同时将已处理测试报告显示在用户显示界面,用户可以对已处理测试报告进行查看、保存等操作。也可以在用户显示界面显示已处理测试报告的详细信息和已处理测试报告的下载链接,具体的测试后显示测试报告的方式可以根据需要进行选择。In the embodiment, when the task information acquiring module 10 obtains the test execution state corresponding to the test task information in the database as the completed state, it indicates that the test task has been completed, and the test report has been generated. At this time, the processed test report is obtained from the database, and the processed test report is displayed on the user display interface, and the user can view and save the processed test report. You can also display the detailed information of the processed test report and the download link of the processed test report on the user display interface. The way to display the test report after the specific test can be selected as needed.
本实施例通过任务信息获取模块获取测试报告并显示在用户显示界面,使得用户在测试任务完成后能够查看、分析、管理该测试任务的测试报告。In this embodiment, the task information acquisition module obtains the test report and displays it on the user display interface, so that the user can view, analyze, and manage the test report of the test task after the test task is completed.
本公开还提供一种调用第三方测试工具的测试方法,参照图5,提供了本公开调用第三方测试工具的测试方法第一实施例,该实施例中,调用第三方测试工具的测试方法包括:The present disclosure also provides a test method for invoking a third-party test tool. Referring to FIG. 5, a first embodiment of a test method for calling a third-party test tool according to the present disclosure is provided. In this embodiment, a test method for calling a third-party test tool includes :
步骤S10,任务信息获取模块获取用户提交的测试任务信息,将所述测试任务信息保存在预置的数据库中;Step S10: The task information obtaining module acquires test task information submitted by the user, and saves the test task information in a preset database.
步骤S20,任务管理模块获取所述数据库保存的所述测试任务信息,将所述测试任务 信息发送给客户端代理模块;Step S20, the task management module acquires the test task information saved by the database, and the test task is The information is sent to the client agent module;
步骤S30,所述客户端代理模块在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方工具的信息向对应的调用模块发送所述测试任务信息包含的测试参数;Step S30, after receiving the test task information, the client proxy module sends the test parameter included in the test task information to the corresponding calling module according to the information of the third-party tool included in the test task information;
步骤S40,所述调用模块在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。Step S40: After receiving the test parameter, the calling module invokes the third-party testing tool to perform a test task based on the test parameter.
本公开实施例中提供的调用第三方测试工具的测试方法,实现了当用户在任务信息获取模块输入测试任务后,通过任务管理模块、客户端代理模块和调用模块的层层调用,最终调用对应的第三方测试工具完成测试任务的执行。The test method for invoking a third-party testing tool provided in the embodiment of the present disclosure implements a layer call of the task management module, the client proxy module, and the calling module after the user inputs the test task in the task information obtaining module, and finally calls the corresponding call. The third-party testing tool completes the execution of the test task.
本实施例中上述任务信息获取模块用于获取并保存测试任务信息,当任务信息获取模块获取到用户提交的测试任务信息后,将测试任务信息保存在预置的数据库中。任务信息获取模块可以是网站形式,也可以是windows客户端程序,也可以是安卓系统中的apk程序。上述测试任务信息包含需要使用第三方测试工具时需要的测试参数,例如包括第三方测试工具名称,表明需要使用何种第三方测试工具来进行测试,还可以包括待测试网址,表明需要测试的是哪个网站,也可以包括测试策略等。在任务信息获取模块中,可以显示能被调用的各种第三方测试工具的信息,例如第三方测试工具的名称,以及当测试开始以后的测试状态等信息,因此用户可以根据需要进行选择输入。In the embodiment, the task information acquiring module is configured to acquire and save the test task information. After the task information acquiring module obtains the test task information submitted by the user, the test task information is saved in a preset database. The task information acquisition module may be a website form, a windows client program, or an apk program in the Android system. The above test task information includes test parameters that need to be used when using a third-party test tool, such as including a third-party test tool name, indicating which third-party test tool is needed for testing, and may include a URL to be tested, indicating that the test is required. Which website can also include test strategies and so on. In the task information acquisition module, information of various third-party test tools that can be called, such as the name of the third-party test tool, and the test status after the test is started, can be displayed, so the user can select input as needed.
上述任务管理模块可以查询预置的数据库中保存的测试任务信息,任务信息获取模块与任务管理模块可以部署在同一台服务器上。当任务管理模块接收到测试任务信息后,可以将测试任务信息分配给客户端代理模块。The task management module can query the test task information saved in the preset database, and the task information obtaining module and the task management module can be deployed on the same server. After the task management module receives the test task information, the test task information can be assigned to the client agent module.
当客户端代理模块收到测试任务信息后,调用对应的调用模块,调用的同时也将测试任务信息包含的测试参数传递给调用模块。由于系统中存在多个调用模块,具体的调用哪一个调用模块,可以根据测试任务中包含的第三方测试工具的信息来决定,例如可以通过第三方工具测试的名称来调用相同名称的调用模块。在程序实现时,在客户端代理模块中,规定第三方测试工具的初始化、参数、结果等抽象基类,客户端代理模块可以以插件的形式管理调用模块,即客户端代理模块调用多个调用模块。When the client agent module receives the test task information, the corresponding calling module is called, and the test parameter included in the test task information is also transmitted to the calling module. Since there are multiple calling modules in the system, the specific calling module can be determined according to the information of the third-party testing tools included in the testing task. For example, the calling module of the same name can be called by the name of the third-party tool test. In the program implementation, in the client proxy module, an abstract base class such as initialization, parameters, and results of the third-party test tool is specified, and the client proxy module can manage the calling module in the form of a plug-in, that is, the client proxy module invokes multiple calls. Module.
上述调用模块调用对应的第三方测试工具,使对应的第三方测试工具根据测试任务信息中包含的测试参数执行测试任务,并且根据对应的第三方测试工具的特征调用方式来进行调用。在程序实现时调用模块可以继承初始化、参数、结果等抽象基类,在程序中编写函数定义每一种第三方测试工具的调用方法。例如,能够用命令行调用的测试工具,使用进程调用该测试工具;只能界面操作的测试工具,使用图形用户界面(Graphical User Interface,GUI)进行调用,如利用selenium调用;具备消息接口的测试工具,通过接口通信调用。The calling module calls the corresponding third-party testing tool, so that the corresponding third-party testing tool executes the testing task according to the test parameters included in the test task information, and is called according to the feature calling manner of the corresponding third-party testing tool. The calling module can inherit the abstract base class such as initialization, parameters, and results when the program is implemented. The function is written in the program to define the calling method of each third-party testing tool. For example, you can use the test tool called by the command line to call the test tool using the process; the test tool that can only be interfaced, use the graphical user interface (GUI) to make calls, such as using selenium calls; test with message interface Tool, called through interface communication.
具体程序实现时,也可以编写特征动态链接库,特征动态链接库中规定第三方测试工具的初始化、参数、结果等抽象基类,客户端代理模块引用特征动态链接库,也即引用特征动态链接库中规定的第三方测试工具的初始化、参数、结果等抽象基类,每一个用于调 用第三方测试工具的调用模块继承特征动态链接库中的类,实例化特征动态链接库中的类。因此客户端代理模块可以动态加载调用模块,使得调用模块在被加载后执行其中的调用函数,调用第三方测试工具执行测试。上述通过程序实现第三方测试工具的调用方法如图3所示。When the specific program is implemented, the feature dynamic link library may also be written. The feature dynamic link library defines an abstract base class such as initialization, parameters, and results of the third-party test tool, and the client proxy module refers to the feature dynamic link library, that is, the reference feature dynamic link. Abstract base classes for initialization, parameters, and results of third-party test tools specified in the library, each for tuning The class in the feature dynamic link library is inherited by the calling module of the third-party test tool, and the class in the feature dynamic link library is instantiated. Therefore, the client proxy module can dynamically load the calling module, so that the calling module executes the calling function after being loaded, and calls a third-party testing tool to execute the test. The above method for invoking a third-party testing tool through a program is shown in FIG. 3.
例如,当用户需要使用WebInspect和NSFocus两种测试工具进行网站安全性扫描时。这两个工具需要的主要交互参数为要扫描的目标网址和扫描策略,在任务信息获取模块中输入目标网址,并分别按提示选择两个工具的扫描策略,提交测试任务信息并保存到数据库。此时任务管理模块扫描数据库获取测试任务后将测试任务信息传递给客户端代理模块,客户端代理模块获取测试任务包含的测试工具名称WebInspect和NSFocus,以及WebInspect和NSFoucus分别对应的测试参数,再调用WebInspect和NSFocus对应的调用模块,通过该调用模块调用WebInspect和NSFocus测试工具完成执行具体的测试任务。For example, when users need to use WebInspect and NSFocus test tools for website security scanning. The main interaction parameters required by these two tools are the target URL to be scanned and the scanning policy. Enter the destination URL in the task information acquisition module, and select the scanning strategy of the two tools as prompted, submit the test task information and save it to the database. At this time, the task management module scans the database to obtain the test task and transmits the test task information to the client agent module. The client agent module obtains the test tool names WebInspect and NSFocus included in the test task, and the test parameters corresponding to WebInspect and NSFoucus respectively, and then invokes The calling module corresponding to WebInspect and NSFocus uses the calling module to call WebInspect and NSFocus test tools to perform specific test tasks.
本实施例通过任务信息获取模块获取用户提交的测试任务信息,将所述测试任务信息保存在预置的数据库中;任务管理模块获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块;所述客户端代理模块在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方测试工具的信息向对应的调用模块发送所述测试任务信息包含的测试参数;所述调用模块在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。通过任务信息获取模块获取并保存测试任务信息,任务管理模块发送测试任务信息给客户端代理模块,客户端代理模块调用对应的调用模块,调用模块再调用对应的第三方测试工具执行完成测试任务,使用户不需要安装各种工具,也不需要详细了解每一种工具的使用方法,只要通过平台就可以调用各种第三方工具执行测试,实现便捷、高效的测试方式。In this embodiment, the task information acquisition module acquires the test task information submitted by the user, and saves the test task information in a preset database; the task management module acquires the test task information saved by the database, and the test task is The information is sent to the client proxy module. After receiving the test task information, the client proxy module sends the test task information to the corresponding calling module according to the information of the third-party testing tool included in the test task information. Test module; after receiving the test parameter, the calling module invokes the third-party test tool to perform a test task based on the test parameter. The task information acquisition module acquires and saves the test task information, and the task management module sends the test task information to the client agent module, the client agent module calls the corresponding calling module, and the calling module calls the corresponding third-party testing tool to execute the test task. The user does not need to install various tools, and does not need to know in detail how to use each tool. As long as the platform can be used to execute various third-party tools to perform tests, a convenient and efficient test method is realized.
优选地,参照图6,为本公开调用第三方测试工具的测试方法第一实施例中步骤S20的细化流程示意图,上述步骤S20的细化步骤包括:Preferably, referring to FIG. 6, a refinement flow diagram of step S20 in the first embodiment of the test method for invoking a third-party test tool according to the present disclosure, the refinement step of the foregoing step S20 includes:
步骤S21,访问所述数据库,获取所述数据库包含的所述测试任务信息;Step S21, accessing the database, and acquiring the test task information included in the database;
步骤S22,在获取到所述测试任务信息后,查询所述测试任务信息对应的测试执行状态;Step S22, after obtaining the test task information, querying a test execution state corresponding to the test task information;
步骤S23,当所述测试执行状态为待执行状态时,查询系统进程中状态为空闲的客户端代理模块,向所述客户端代理模块发送所述测试任务信息。Step S23: When the test execution state is a to-be-executed state, query a client proxy module whose state is idle in the system process, and send the test task information to the client proxy module.
本实施例中上述数据库是任务信息获取模块保存测试任务信息的数据库,第二获取模块访问数据库,当获取到数据库中的测试任务信息后,查询测试任务信息对应的测试执行状态,由于数据库中会存放很多测试任务信息,每个测试任务信息对应的测试执行状态可能不同,因此当测试任务信息对应的测试执行状态为待执行状态时,表明该测试任务信息已经被获取但该测试任务信息所代表的测试任务并未被执行,此时查询系统进程中空闲的客户端代理模块,根据客户端代理模块的地址向客户端代理模块分配测试任务。 In the embodiment, the database is a database in which the task information acquiring module saves the test task information, and the second obtaining module accesses the database. After obtaining the test task information in the database, the test execution state corresponding to the test task information is queried, because the database will A plurality of test task information is stored, and the test execution state corresponding to each test task information may be different. Therefore, when the test execution state corresponding to the test task information is a pending execution state, it indicates that the test task information has been acquired but the test task information represents The test task is not executed. At this time, the idle client agent module in the system process is queried, and the test task is assigned to the client agent module according to the address of the client agent module.
本实施例通过任务管理模块查询数据库获取测试任务信息,查询空闲的客户端代理模块,向空闲的客户端代理模块分配测试任务信息,使测试任务信息所代表的测试任务能够尽快的被执行。In this embodiment, the task management module queries the database to obtain test task information, queries the idle client agent module, and allocates test task information to the idle client agent module, so that the test task represented by the test task information can be executed as soon as possible.
优选地,参照图7,为本公开调用第三方测试工具的测试方法第一实施例中步骤S40之后追加步骤的流程示意图,上述步骤S40之后还包括:Preferably, referring to FIG. 7, a schematic flowchart of an additional step after step S40 in the first embodiment of the test method for invoking a third-party test tool according to the present disclosure, after the step S40, the method further includes:
步骤S50,所述调用模块获取所述第三方测试工具执行完所述测试任务后反馈的测试报告,将所述测试报告处理为预置的文本格式保存为已处理测试报告,向所述客户端代理模块反馈所述测试任务完成的通知消息;Step S50, the calling module acquires a test report that is feedback after the third-party test tool executes the test task, and processes the test report into a preset text format and saves the processed test report as a processed test report to the client. The proxy module feeds back the notification message that the test task is completed;
步骤S60,当所述客户端代理模块接收到所述通知消息时,结合所述任务管理模块和所述任务信息获取模块将所述已处理测试报告显示在用户显示界面。Step S60, when the client proxy module receives the notification message, display the processed test report on the user display interface in combination with the task management module and the task information obtaining module.
本实施例中当第三方测试工具执行完测试以后,调用模块获取该第三方测试工具执行完测试以后的测试报告,并向调用该调用模块的客户端代理模块反馈测试任务完成的通知消息。In this embodiment, after the third-party testing tool performs the test, the calling module obtains the test report after the third-party testing tool executes the test, and feeds back the notification message of the completion of the testing task to the client agent module that invokes the calling module.
当调用模块获取到测试报告后,对测试报告的格式进行处理保存为已处理测试报告,使得各种第三方测试工具执行完测试以后都能以同一种格式呈现测试报告。可以理解的是,即可以向用户提供统一格式的测试报告,也可以提供第三方测试工具执行完测试任务后的自动生成的原始测试报告。After the calling module obtains the test report, the format of the test report is processed and saved as a processed test report, so that various third-party test tools can present the test report in the same format after performing the test. It can be understood that the test report in a unified format can be provided to the user, and the automatically generated original test report after the third party test tool performs the test task can also be provided.
例如,当某第三方测试工具执行完测试后,测试报告为Word格式的文本文件,此时,获取Word、格式中的文本信息,将该文本信息处理为PDF格式保存。同时,也可以将测试报告按照测试结果的危险等级进行排序,测试报告按照高危、中危、低危进行分类处理并保存。For example, when a third-party testing tool performs a test, the test report is a text file in Word format. At this time, the text information in Word and format is obtained, and the text information is processed into a PDF format for saving. At the same time, the test report can also be sorted according to the hazard level of the test results, and the test report is classified and stored according to high risk, intermediate risk and low risk.
本实施例通过调用模块获取任务完成后的测试报告,并将测试报告处理为已处理测试报告,再结合任务管理模块、任务信息获取模块将已处理测试报告反馈显示在用户界面,使得用户通过在任务信息获取模块输入测试任务后能够在任务信息获取模块获取测试报告。In this embodiment, the test report after the task is completed is obtained by calling the module, and the test report is processed into the processed test report, and then the task management module and the task information obtaining module are combined to display the processed test report feedback on the user interface, so that the user passes the After the task information acquisition module inputs the test task, the task information acquisition module can obtain the test report.
优选地,参照图8,为图7所述实施例中步骤S60的细化流程示意图,上述步骤S60包括:Preferably, referring to FIG. 8 , it is a schematic flowchart of the refinement of step S60 in the embodiment in FIG. 7 , where the foregoing step S60 includes:
步骤S610,当所述客户端代理模块获取到所述通知消息时,向所述调用模块获取并保存所述已处理测试报告;Step S610, when the client proxy module obtains the notification message, acquiring and saving the processed test report to the calling module;
步骤S620,任务管理模块访问所述客户端代理模块,当获取到所述通知消息时,将所述数据库中所述测试任务信息对应的测试执行状态标记为已完成状态,将所述已处理测试报告下载并保存在所述数据库中。Step S620: The task management module accesses the client proxy module, and when the notification message is obtained, marking the test execution status corresponding to the test task information in the database as a completed state, and the processed test is performed. The report is downloaded and saved in the database.
步骤S630,当所述任务信息获取模块获取到所述数据库中所述测试任务信息对应的 测试执行状态为已完成状态时,从所述数据库获取所述已处理测试报告,显示在所述用户显示界面。Step S630, when the task information obtaining module acquires the corresponding test task information in the database. When the test execution state is the completed state, the processed test report is obtained from the database and displayed on the user display interface.
本实施例中上述通知消息是调用模块向客户端代理模块发送的消息,通知消息用于通知客户端代理模块,该测试任务已执行完成。当述客户端代理模块接收到测试任务完成的通知消息后,向该任务管理模块获取已处理测试报告,将已处理测试报告保存在客户端代理模块所在的服务器中。In the embodiment, the notification message is a message sent by the calling module to the client proxy module, and the notification message is used to notify the client proxy module that the test task has been executed. After receiving the notification message of the completion of the test task, the client agent module obtains the processed test report from the task management module, and saves the processed test report in the server where the client agent module is located.
当任务管理模块访问客户端代理模块并获取到测试任务完成的通知消息时,表明此时测试任务已经完成,任务管理模块将数据库中测试任务信息对应的测试执行状态标记为已完成状态,同时从客户端代理模块下载已处理测试报告保存在数据库中。可以为任务管理模块设定访问客户端代理模块的时间,例如,设置任务管理模块定时获取测试任务的执行情况。When the task management module accesses the client proxy module and obtains the notification message of the completion of the test task, it indicates that the test task has been completed at this time, and the task management module marks the test execution state corresponding to the test task information in the database as the completed state, and simultaneously The client agent module downloads the processed test report and saves it in the database. The time for accessing the client proxy module can be set for the task management module, for example, setting the task management module to periodically obtain the execution status of the test task.
当任务信息获取模块获取到数据库中的测试任务信息对应的测试执行状态为已完成状态时,表明任务信息获取模块获取到提交进行测试的测试任务已经完成,并且已经产生了测试报告。此时从数据库中获取已处理测试报告,同时将已处理测试报告显示在用户显示界面,用户可以对已处理测试报告进行查看、保存等操作。也可以在用户显示界面显示已处理测试报告的详细信息和已处理测试报告的下载链接,具体的测试后显示测试报告的方式可以根据需要进行选择。When the task information obtaining module obtains the test execution state corresponding to the test task information in the database as the completed state, it indicates that the task information obtaining module obtains the test task submitted for testing has been completed, and the test report has been generated. At this time, the processed test report is obtained from the database, and the processed test report is displayed on the user display interface, and the user can view and save the processed test report. You can also display the detailed information of the processed test report and the download link of the processed test report on the user display interface. The way to display the test report after the specific test can be selected as needed.
本实施例当客户端代理模块获取到测试任务完成的通知消息后,向调用模块获取并保存已处理测试报告,任务管理模块访问客户端代理并获取到测试任务完成的通知消息后将数据库中该测试任务信息对应的测试执行状态标记为已完成状态,使得任务信息获取模块可以获取测试的执行情况,并及时下载测试任务执行完之后的已处理测试报告反馈给用户,使用户在调用第三方测试工具执行完测试后能及时获取测试结果。In this embodiment, after the client agent module obtains the notification message of the completion of the test task, the client module acquires and saves the processed test report, and the task management module accesses the client agent and obtains the notification message of the completion of the test task, and then the database The test execution status corresponding to the test task information is marked as completed, so that the task information acquisition module can obtain the execution status of the test, and download the processed test report after the test task is executed in time to feedback to the user, so that the user invokes the third-party test. The tool can get the test results in time after the test is executed.
工业实用性Industrial applicability
本公开涉及涉及云测试技术领域,实现了通过平台就可以调用各种第三方工具执行测试,实现便捷、高效的测试方式。The present disclosure relates to the field of cloud testing technology, and realizes that various third-party tools can be used to execute tests through the platform, thereby implementing a convenient and efficient testing method.
以上仅为本公开的优选实施例,并非因此限制本公开的专利范围,凡是利用本公开说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本公开的专利保护范围内。 The above is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the patents of the present disclosure, and the equivalent structure or equivalent process transformations made by the present disclosure and the contents of the drawings may be directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present disclosure.

Claims (10)

  1. 一种调用第三方测试工具的测试系统,包括:A test system that invokes third-party testing tools, including:
    任务信息获取模块,设置为获取用户提交的测试任务信息,将所述测试任务信息保存在预置的数据库中;The task information obtaining module is configured to obtain test task information submitted by the user, and save the test task information in a preset database;
    任务管理模块,设置为获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块;a task management module, configured to acquire the test task information saved by the database, and send the test task information to a client agent module;
    所述客户端代理模块,设置为在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方测试工具的信息向对应的调用模块发送所述测试任务信息包含的测试参数;The client proxy module is configured to: after receiving the test task information, send, according to the information of the third-party testing tool included in the test task information, the test parameter included in the test task information to the corresponding calling module;
    所述调用模块,设置为在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。The calling module is configured to, after receiving the test parameter, invoke the third-party testing tool to perform a test task based on the test parameter.
  2. 如权利要求1所述的系统,其中,所述任务管理模块包括:The system of claim 1 wherein said task management module comprises:
    获取单元,设置为访问所述数据库,获取所述数据库包含的所述测试任务信息;An obtaining unit, configured to access the database, and obtain the test task information included in the database;
    查询单元,设置为在获取到所述测试任务信息后,查询所述测试任务信息对应的测试执行状态;a query unit, configured to query a test execution state corresponding to the test task information after obtaining the test task information;
    查询分配单元,设置为当所述测试执行状态为待执行状态时,查询系统进程中状态为空闲的客户端代理模块,向所述客户端代理模块发送所述测试任务信息。The query allocation unit is configured to: when the test execution state is a to-be-executed state, query a client proxy module whose state is idle in the system process, and send the test task information to the client proxy module.
  3. 如权利要求1所述的系统,其中,所述调用模块还设置为获取所述第三方测试工具执行完所述测试任务后反馈的测试报告,将所述测试报告处理为预置的文本格式保存为已处理测试报告,向所述客户端代理模块反馈所述测试任务完成的通知消息。The system of claim 1, wherein the invoking module is further configured to obtain a test report that is feedback after the third-party testing tool performs the testing task, and process the test report into a preset text format. For the processed test report, the notification message of the completion of the test task is fed back to the client agent module.
  4. 如权利要求3所述的系统,其中,所述客户端代理模块还设置为当接收到所述通知消息时,向所述调用模块获取并保存所述已处理测试报告。The system of claim 3 wherein said client agent module is further configured to retrieve and save said processed test report to said calling module upon receipt of said notification message.
  5. 如权利要求4所述的系统,其中,所述任务管理模块还设置为访问所述客户端代理模块,当获取到所述通知消息时,将所述数据库中所述测试任务信息对应的测试执行状态标记为已完成状态,将所述已处理测试报告下载并保存在所述数据库中。The system of claim 4, wherein the task management module is further configured to access the client proxy module, and when the notification message is obtained, perform test execution corresponding to the test task information in the database The status is marked as completed and the processed test report is downloaded and saved in the database.
  6. 如权利要求5所述的系统,其中,所述任务信息获取模块还设置为访问所述数据库,当获取到所述数据库中所述测试任务信息对应的测试执行状态为已完成状态时,从所述数据库获取所述已处理测试报告,显示在用户显示界面。The system of claim 5, wherein the task information obtaining module is further configured to access the database, and when the test execution state corresponding to the test task information in the database is obtained as a completed state, The database obtains the processed test report and displays it on the user display interface.
  7. 一种调用第三方测试工具的测试方法,包括以下步骤:A test method that invokes a third-party test tool, including the following steps:
    任务信息获取模块获取用户提交的测试任务信息,将所述测试任务信息保存在预置的 数据库中;The task information obtaining module acquires test task information submitted by the user, and saves the test task information in a preset In the database;
    任务管理模块获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块;The task management module acquires the test task information saved by the database, and sends the test task information to the client agent module;
    所述客户端代理模块在接收到所述测试任务信息后,根据所述测试任务信息包含的第三方测试工具的信息向对应的调用模块发送所述测试任务信息包含的测试参数;After receiving the test task information, the client proxy module sends the test parameter included in the test task information to the corresponding calling module according to the information of the third-party testing tool included in the test task information;
    所述调用模块在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务。After receiving the test parameter, the calling module invokes the third-party testing tool to perform a test task based on the test parameter.
  8. 如权利要求7所述的方法,其中,所述任务管理模块获取所述数据库保存的所述测试任务信息,将所述测试任务信息发送给客户端代理模块包括:The method of claim 7, wherein the task management module acquires the test task information saved by the database, and the sending the test task information to the client agent module comprises:
    访问所述数据库,获取所述数据库包含的所述测试任务信息;Accessing the database to obtain the test task information included in the database;
    在获取到所述测试任务信息后,查询所述测试任务信息对应的测试执行状态;After obtaining the test task information, querying a test execution state corresponding to the test task information;
    当所述测试执行状态为待执行状态时,查询系统进程中状态为空闲的客户端代理模块,向所述客户端代理模块发送所述测试任务信息。When the test execution state is a to-be-executed state, the client proxy module in the system process state is idle, and the test task information is sent to the client proxy module.
  9. 如权利要求7或8所述的方法,其中,所述所述调用模块在接收到所述测试参数后,调用所述第三方测试工具基于所述测试参数执行测试任务之后包括:The method according to claim 7 or 8, wherein the calling module, after receiving the test parameter, after calling the third-party test tool to perform a test task based on the test parameter, comprises:
    所述调用模块获取所述第三方测试工具执行完所述测试任务后反馈的测试报告,将所述测试报告处理为预置的文本格式保存为已处理测试报告,向所述客户端代理模块反馈所述测试任务完成的通知消息;The calling module acquires a test report fed back by the third-party testing tool after performing the testing task, and processes the test report into a preset text format and saves the processed test report as a processed test report, and provides feedback to the client agent module. The notification message that the test task is completed;
    当所述客户端代理模块接收到所述通知消息时,结合所述任务管理模块和所述任务信息获取模块将所述已处理测试报告显示在用户显示界面。And when the client proxy module receives the notification message, displaying the processed test report on the user display interface in conjunction with the task management module and the task information acquisition module.
  10. 如权利要求9所述的方法,其中,所述当所述客户端代理模块接收到所述通知消息时,结合所述任务管理模块和所述任务信息获取模块将所述已处理测试报告显示在用户显示界面包括:The method of claim 9, wherein said said client agent module displays said processed test report in conjunction with said task management module and said task information acquisition module when said client agent module receives said notification message The user display interface includes:
    当所述客户端代理模块获取到所述通知消息时,向所述调用模块获取并保存所述已处理测试报告;When the client proxy module obtains the notification message, acquiring and saving the processed test report to the calling module;
    任务管理模块访问所述客户端代理模块,当获取到所述通知消息时,将所述数据库中所述测试任务信息对应的测试执行状态标记为已完成状态,将所述已处理测试报告下载并保存在所述数据库中。The task management module accesses the client proxy module, and when the notification message is obtained, marking the test execution status corresponding to the test task information in the database as a completed state, and downloading the processed test report and Saved in the database.
    所述任务信息获取模块访问所述数据库,当获取到所述数据库中所述测试任务信息对应的测试执行状态为已完成状态时,从所述数据库获取所述已处理测试报告,显示在所述用户显示界面。 The task information obtaining module accesses the database, and when the test execution state corresponding to the test task information in the database is obtained, the processed test report is obtained from the database, and is displayed in the database. User display interface.
PCT/CN2017/076694 2016-04-11 2017-03-15 Test system and method invoking third-party test tool WO2017177783A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610225023.1A CN107291611A (en) 2016-04-11 2016-04-11 Call the test system and method for third-party testing instrument
CN201610225023.1 2016-04-11

Publications (1)

Publication Number Publication Date
WO2017177783A1 true WO2017177783A1 (en) 2017-10-19

Family

ID=60041398

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/076694 WO2017177783A1 (en) 2016-04-11 2017-03-15 Test system and method invoking third-party test tool

Country Status (2)

Country Link
CN (1) CN107291611A (en)
WO (1) WO2017177783A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908568A (en) * 2017-11-29 2018-04-13 中标软件有限公司 Operating system performance automated testing method and device
CN111488283A (en) * 2020-04-14 2020-08-04 拉扎斯网络科技(上海)有限公司 Task generation method and device, electronic equipment and storage medium
CN112597043A (en) * 2020-12-28 2021-04-02 深圳供电局有限公司 Software testing method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014088398A1 (en) * 2012-12-06 2014-06-12 Mimos Berhad Automated test environment deployment with metric recommender for performance testing on iaas cloud
CN104461856A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Performance test method, device and system based on cloud computing platform
CN104539487A (en) * 2015-01-20 2015-04-22 成都益联科创科技有限公司 Method for testing system based on cloud platform and evaluating reliability

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014088398A1 (en) * 2012-12-06 2014-06-12 Mimos Berhad Automated test environment deployment with metric recommender for performance testing on iaas cloud
CN104461856A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Performance test method, device and system based on cloud computing platform
CN104539487A (en) * 2015-01-20 2015-04-22 成都益联科创科技有限公司 Method for testing system based on cloud platform and evaluating reliability

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908568A (en) * 2017-11-29 2018-04-13 中标软件有限公司 Operating system performance automated testing method and device
CN107908568B (en) * 2017-11-29 2024-03-15 中标软件有限公司 Operating system performance automatic test method and device
CN111488283A (en) * 2020-04-14 2020-08-04 拉扎斯网络科技(上海)有限公司 Task generation method and device, electronic equipment and storage medium
CN111488283B (en) * 2020-04-14 2023-06-16 拉扎斯网络科技(上海)有限公司 Task generation method and device, electronic equipment and storage medium
CN112597043A (en) * 2020-12-28 2021-04-02 深圳供电局有限公司 Software testing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN107291611A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
US10140205B1 (en) Systems and methods for infrastructure validation
US10127069B2 (en) Methods and apparatus to automatically configure monitoring of a virtual machine
US8819202B1 (en) Service configuration and deployment engine for provisioning automation
US10911302B2 (en) Network node policy generation and implementation
US20150074659A1 (en) Methods and Apparatus to Perform Web-Based Installations and/or Upgrade Architectures for Enterprise Software
US8510712B1 (en) Testing in-container software objects
CN107896244B (en) Version file distribution method, client and server
WO2017124976A1 (en) Method and device for acquiring application resource
US10049033B2 (en) Application gateway for cloud computing systems
EP1946222A1 (en) Automated device driver management
CN109558320B (en) System testing method, device, system, equipment and computer readable storage medium
JP6201917B2 (en) System and method for configuring field devices
WO2017177783A1 (en) Test system and method invoking third-party test tool
WO2021013056A1 (en) Microservice-based data processing method and apparatus, and device and readable storage medium
US10506400B2 (en) Data download method and apparatus
CN110750453B (en) HTML 5-based intelligent mobile terminal testing method, system, server and storage medium
CN113721973A (en) Configuration file generation method, device, equipment and medium
WO2021093672A1 (en) Method for embedding external system, workflow system, device and computer readable storage medium
US10073689B2 (en) Managing application lifecycles within a federation of distributed software applications
CN116521460A (en) Screen unlocking method and device for test equipment, electronic equipment and storage medium
CN111125205A (en) Signboard data display method, terminal and storage medium
US9542171B2 (en) Managing an application modification process
CN110336693B (en) Method, device, equipment and storage medium for managing network block equipment
CN113176913B (en) Processing method and device of JAVA agent, terminal equipment and storage medium
CN112181372B (en) Construction method and device of automobile service management system and electronic equipment

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17781759

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17781759

Country of ref document: EP

Kind code of ref document: A1