WO2013097788A1 - 基于关联测试用例自动生成的信息交互测试装置及方法 - Google Patents

基于关联测试用例自动生成的信息交互测试装置及方法 Download PDF

Info

Publication number
WO2013097788A1
WO2013097788A1 PCT/CN2012/087973 CN2012087973W WO2013097788A1 WO 2013097788 A1 WO2013097788 A1 WO 2013097788A1 CN 2012087973 W CN2012087973 W CN 2012087973W WO 2013097788 A1 WO2013097788 A1 WO 2013097788A1
Authority
WO
WIPO (PCT)
Prior art keywords
test case
information interaction
file
test
association
Prior art date
Application number
PCT/CN2012/087973
Other languages
English (en)
French (fr)
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 中国银联股份有限公司
Priority to US14/369,185 priority Critical patent/US9483386B2/en
Priority to EP12863644.6A priority patent/EP2799995A4/en
Publication of WO2013097788A1 publication Critical patent/WO2013097788A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Definitions

  • the present invention relates to an information interaction test apparatus and method, and more particularly to an information interaction test apparatus and method automatically generated based on associated test cases. Background technique
  • benchmark information interactions ie, information interactions that occur independently of other information interactions
  • the user requests a return, and the requesting party can initiate a return transaction for the consumer transaction.
  • the consumer transaction is a benchmark information interaction
  • the return transaction is a related transaction
  • the association information interaction and the reference information interaction are matched by the associated domain, that is, a group of unique associated domains (for example, in the financial field,
  • a unique set of associated domains can include the original Serial number transaction, acceptance mechanism original transaction identification code, original transaction time, the primary account number, etc.) can exchange information associated with a unique reference information to determine the interaction.
  • the basic workflow of the existing information interaction test apparatus and method is as follows: (1) Pre-configuring a request message template for the interaction of the reference information and the association information (where the partial domain in the request message template is a dynamically generated domain, (2) Performing multiple reference information interactions according to the same request message template in a regular request-response mode; (3) acquiring the associated domain value of a certain reference information interaction, and generating or updating the associated information interaction The dynamic domain in the request message template, thereby generating a request message for the associated information interaction, and then completing the associated information interaction in a conventional request-response mode.
  • the following two methods are generally used to obtain the associated domain value (especially the dynamic domain) in the request message of the associated information interaction: (1) The tester manually queries the information interaction log. , find a record of the baseline information interaction, manually fill in or repair based on the record Changing the associated domain value in the request message of the associated information interaction; (2) matching the database record by the application, thereby automatically modifying the request message of the related information interaction according to the searched record of the reference information exchanged in the database Associated domain value.
  • the manner in which the two associated domain values in the request message for obtaining the associated information interaction has the following problems: (1) For the first mode, the tester needs to repeatedly query the associated domain of the reference information interaction manually. Value, so the test process is cumbersome, the test speed is slow, and due to the skill level of the tester, manual filling and modification is easy to make mistakes, so the accuracy of the test results is reduced, and the test efficiency is low; (2) for the second In this way, since the test program cannot know which reference information interaction of the same type is to be associated with the associated information interaction, the last reference information interaction record of the type is usually queried from the database, and the associated information interaction is modified based on the record. Requesting the associated domain value in the message.
  • the subsequent association information interaction can only be associated with the last reference information interaction, thereby failing to meet the needs of simulating the actual scenario, and thus reducing Suitable for the entire information interaction test device and method
  • the usability and test accuracy, in addition, the cost and complexity of the entire information interaction test device is increased due to the need to arrange additional database modules.
  • the present invention proposes an information interaction test apparatus and method automatically generated based on association test cases.
  • An information interaction test apparatus automatically generated based on an association test case wherein the information interaction test apparatus automatically generated based on the association test case includes:
  • configuration module configured to store a configuration file, and update the configuration file based on the received configuration instruction
  • a test execution module configured to retrieve a test case file and perform information interaction based on a processing configuration file of a type to which the test case belongs, and all associated information types according to a type of the test case after the information interaction is completed , call the associated test for each type of associated information
  • the trial case generation module generates an associated test case.
  • the associated test case generation module after receiving the associated test case generation instruction, based on the reference information interaction and a predetermined determination by an application type provided by the system under test
  • the rule automatically generates an associated test case file corresponding to all associated information interactions that can be triggered by the interaction of the reference information, and stores the generated associated test case file in a predetermined file structure of the storage module;
  • the storage module is configured to store the benchmark test case file, the associated test case file, and test case execution result statistics
  • the user interface is configured to receive a configuration instruction input by the user, and forward the configuration instruction to the configuration module, and the user interface is further configured to display the test case execution result statistics.
  • the test execution module is further configured to: retrieve an associated test case file based on the configuration file, and perform association information interaction based on the associated test case file, and the associated information interaction is completed. Then, in the case that it is determined that a subsequent further related information interaction needs to be generated, the associated test case generation instruction is sent to the associated test case generation module.
  • the associated test case generation module is further configured to: after receiving the associated test case generation instruction, interact based on the associated information and an application provided by the system under test
  • the predetermined rule determined by the type automatically generates an associated test case file corresponding to all further associated information interactions that can be triggered by the associated information interaction, and stores the generated associated test case file in a predetermined file structure of the storage module. in.
  • the configuration file includes a case type processing configuration file, test case set scheduling information, a verification condition of each test case, and a naming rule of the associated test case file.
  • the test execution module further includes: a load and request message generating unit, wherein the load and request message generating unit is configured to: use the benchmark test case file based on the scheduling instruction Or the associated test case file is loaded into the memory, and a request message applicable to the system under test is generated according to the benchmark test case file or the associated test case file, and the request message is generated according to a predetermined rule. Transfer to the sending unit;
  • a sending unit configured to establish and maintain a communication link between the test execution module and the system under test, and transmit the received request message to the Be Measurement system
  • the receiving unit is configured to receive a response message from the system under test corresponding to the request message within a predetermined time threshold, and transmit the response message to a response verification unit;
  • the response verification unit is configured to determine whether the response message is valid based on a predetermined rule, and if the determination result is valid, the response verification unit is further configured according to the benchmark test case file or the associated test case in the configuration file.
  • the verification condition corresponding to the file verifies whether the response message meets the test requirement, and stores the corresponding test case execution result statistics in the storage module.
  • the response verification unit is further configured to determine, according to a predetermined rule, whether the reference information file interaction or the related information interaction corresponding to the reference test case file or the associated test case file needs to generate a subsequent Correlation information interaction, if the judgment result is that the subsequent association information interaction needs to be generated, sending the associated test case generation instruction to the associated test case generation module.
  • the predetermined file structure for storing the benchmark test case file and the associated test case file in the storage module is a tree file structure.
  • the name of the associated test case file is used as a way of associating the corresponding reference test case file.
  • the associated test case generation module acquires the linkable information interaction type that can be generated according to the type of the reference information interaction, and separately obtains the reference information according to each of the linkable interaction types that can be generated. Acquiring the required association field value in the request message or the response message of the interaction, so as to generate each associated test case file respectively based on each of the generated association information interaction type and the required association domain value.
  • the associated test case generation module determines a storage path of the associated test case file in the tree file structure according to an associated information interaction type.
  • the associated test case generation module generates a name of the associated test case file according to the naming rule in the configuration file.
  • the naming rules can be updated by the configuration instructions.
  • An information interaction test method automatically generated based on an association test case wherein the information interaction test method automatically generated based on the association test case comprises the following steps:
  • the predetermined rule determined based on the reference information interaction and the application type provided by the system under test is automatically generated and Correlating the associated test case file corresponding to all the related information that can be triggered by the reference information interaction, and storing the generated associated test case file in a predetermined file structure;
  • step (A4) after the completion of the association information interaction, in the case that it is determined that a subsequent further association information interaction needs to be generated, based on the association information interaction and a predetermined rule determined by the application type provided by the system under test Automatically generating an associated test case file corresponding to all further associated information interactions that can be triggered by the associated information interaction, and storing the generated associated test case file in the predetermined file structure, and then returning to step (A3) until The entire test process is over.
  • the configuration file includes test case set scheduling information, a verification condition of each test case, and a naming rule of the associated test case file.
  • step (A1) further comprises:
  • step (A3) further comprises:
  • C4 determining, according to a predetermined rule, whether the response message is valid, and if the determination result is valid, verifying, according to the verification condition corresponding to the associated test case file in the configuration file, whether the response message conforms to the test. Request, and store the corresponding test case execution result statistics.
  • the step (A1) further includes: determining, according to a predetermined rule, whether the reference information interaction corresponding to the benchmark test case file needs to generate subsequent association information interaction, if the determination result is required to be generated Subsequent association information interaction, step (A2) is performed.
  • the step (A3) further includes: determining, according to a predetermined rule, whether the association information interaction corresponding to the associated test case file needs to generate subsequent association information interaction, if the determination result is required to be generated Subsequent association information interaction, step (A4) is performed.
  • the predetermined file structure for storing the benchmark test case file and the associated test case file is a tree file structure.
  • the storage path of the generated associated test case file in the tree file structure and the name of the associated test case file are used as a reference test case file corresponding to the association test case file.
  • the generated association information interaction type is acquired according to the type of the reference information interaction, and the request message or the response is respectively exchanged from the reference information according to each of the generated association information interaction types. Get the required associated domain value in the message, so that each can be based on each The associated information interaction type and the required associated domain value respectively generate respective associated test case files.
  • the storage path of the associated test case file in the tree file structure is determined according to the associated information interaction type.
  • the name of the associated test case file is generated according to the naming rules in the configuration file.
  • the naming rules can be updated by configuration instructions.
  • the information interaction test apparatus and method automatically generated based on the associated test cases disclosed by the invention have the following advantages: Since the associated test cases can be automatically generated, the test speed and the test ease of use are high, and thus the test efficiency is better. And the cost is lower. DRAWINGS
  • FIG. 1 is a structural diagram of an information interaction test apparatus automatically generated based on an associated test case according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram showing a storage structure of a test message file based on an information interaction test apparatus and method automatically generated by an associated test case according to an embodiment of the present invention
  • FIG. 3 is a flow diagram of an information interaction test method automatically generated based on associated test cases, in accordance with an embodiment of the present invention. detailed description
  • the information interaction test apparatus automatically generated based on the associated test case disclosed by the present invention includes a configuration module 2, a test execution module 3, an associated test case generation module 4, a storage module 5, and a user interface 6.
  • the configuration module 2 is configured to store a configuration file, and update the configuration file based on the received configuration instruction.
  • the test execution module 3 is configured to retrieve a benchmark test case file based on the configuration file, perform benchmark information interaction based on the benchmark test case file, and determine that a subsequent association information interaction needs to be generated after the benchmark information interaction is completed.
  • the associated test case generation instruction is transmitted.
  • the associated test case generation module 4 is configured to automatically generate and perform the predetermined rule determined by the reference information interaction and the application type provided by the system under test after receiving the associated test case generation instruction.
  • the associated test case file corresponding to all the associated information that can be triggered by the reference information interaction is stored, and the generated associated test case file is stored in the predetermined file structure of the storage module 5.
  • the storage module 5 is configured to store the benchmark test case file, the associated test case file, and test case execution result statistics.
  • the user interface 6 is configured to receive a configuration instruction input by a user, and forward the configuration instruction to the configuration module 2, and.
  • the user interface 6 is further configured to display the test case execution result statistics.
  • the test execution module 3 is further configured to retrieve an associated test case file based on the configuration file and based on the associated test case file.
  • the associated test case generation module 4 is sent to the associated test case generation module 4 in the event that it is determined that a subsequent further association information interaction needs to be generated.
  • the associated test case generation module 4 is further configured to: after receiving the associated test case generation instruction, based on the associated information
  • the interaction and the predetermined rule determined by the type of application provided by the system under test automatically generate an associated test case file corresponding to all further associated information interactions that can be triggered by the associated information interaction, and the generated association test
  • the use case file is stored in the predetermined file structure of the storage module 5.
  • the configuration file includes test case set scheduling information, verification conditions of each test case, and naming rules of the associated test case file.
  • the test execution module 3 further includes a load and request message generating unit 7, a sending unit 8, a receiving unit 9, and a response verifying unit. 10.
  • the load and request message generating unit 7 is configured to load the benchmark test case file or the associated test case file into the memory based on the scheduling instruction, and based on the benchmark test case file or the association
  • the test case file generates a request message suitable for the system under test with a predetermined rule, and transmits the request message to the transmitting unit 8.
  • the sending unit 8 is configured to establish and maintain a communication link between the test execution module 3 and the system under test, and transmit the received request message to the quilt via the communication link. Measurement system.
  • the receiving unit 9 is configured to receive a response message from the system under test corresponding to the request message within a predetermined time threshold, and transmit the response message to the response verification unit 10.
  • the response verification unit 10 is configured to determine whether the response message is valid based on a predetermined rule (eg, calculating a MAC domain of the response message), and if the determination result is valid, the response verification unit 10 further performs the Verifying, by the verification test condition corresponding to the benchmark test case file or the associated test case file in the configuration file, whether the response message meets the test requirement, and storing the corresponding test case execution result statistics in the storage module 5 .
  • a predetermined rule eg, calculating a MAC domain of the response message
  • the response verification unit 10 is further configured to determine, according to a predetermined rule, the reference test case file or the associated test case file corresponding to the Whether the reference information interaction or the association information interaction needs to generate subsequent association information interaction, and if the judgment result is that the subsequent association information interaction needs to be generated, the associated test case generation instruction is sent to the associated test case generation module 4.
  • the predetermined file structure of the storage module 5 for storing the reference test case file and the associated test case file is ⁇ . ⁇ Shape file structure.
  • the storage path of the generated associated test case file in the tree file structure and the associated test case file are The name is used as the way to associate the corresponding benchmark case file.
  • the associated test case generation module 4 acquires the type of the associated information interaction that can be generated according to the type of the reference information interaction, and according to each The generated association information interaction type is respectively from the reference information Acquiring the required association field value in the request message or the response message of the interaction, so as to generate each associated test case file respectively based on each of the generated association information interaction type and the required association domain value.
  • the associated test case generation module 4 determines that the associated test case file is based on the associated information interaction type (including the main type and the subtype).
  • the storage path in the tree file structure is based on the associated information interaction type (including the main type and the subtype).
  • the associated test case generation module 4 generates the name of the associated test case file according to the naming rule in the configuration file. .
  • the naming rule can be updated by the configuration instruction.
  • FIG. 2 is a schematic diagram showing a storage structure of a test message file based on an information interaction test apparatus and method automatically generated by an associated test case according to an embodiment of the present invention.
  • a predetermined file structure for storing the benchmark test case file and the associated test case file is a tree file structure
  • the generated test case file is in the tree file structure by the generated associated test case file.
  • the storage path and the name of the associated test case file are used as a way to associate the corresponding reference test case file.
  • the information interaction test method automatically generated based on the associated test case disclosed by the present invention includes the following steps: (1) Retrieving a benchmark test case file based on the configuration file and performing benchmark information interaction based on the benchmark test case file (A2) automatically, after the completion of the interaction of the reference information, in the case that it is determined that a subsequent association information interaction needs to be generated, based on the reference information interaction and a predetermined rule determined by the application type provided by the system under test Correlating the test case file corresponding to all the related information that can be triggered by the interaction with the reference information, and storing the generated associated test case file in a predetermined file structure; (A3) retrieving the association based on the configuration file] The trial file and the associated information interaction are performed based on the associated '] trial file; (A4) after the completion of the association information interaction, in the case that it is determined that a subsequent further association information
  • the configuration file includes test case set scheduling information, verification conditions of each test case, and naming rules of the associated test case file. .
  • the step (A1) further includes: (B1) loading the benchmark test case file into the memory based on the configuration file. And generating, based on the benchmark test case file, a request message applicable to the system under test with a predetermined rule; (B2) transmitting the request message to the system under test; (B3) within a predetermined time threshold Receiving a response message from the system under test corresponding to the request message; (B4) determining whether the response message is valid based on a predetermined rule (eg, calculating a MAC domain of the response message), and if If the result is valid, the test case execution result statistics are tested according to the benchmark in the configuration file.
  • a predetermined rule eg, calculating a MAC domain of the response message
  • the step (A3) further includes: (C1) loading the associated test case file into the memory based on the configuration file. And generating a request message applicable to the system under test according to the predetermined rule based on the associated test case file; (C2) transmitting the request message to the system under test; (C3) within a predetermined time threshold Receiving a response message from the system under test corresponding to the request message; (C4) determining whether the response message is valid based on a predetermined rule (eg, calculating a MAC domain of the response message), and if If the result is valid, the result statistics are further executed according to the test case corresponding to the off in the configuration file.
  • a predetermined rule eg, calculating a MAC domain of the response message
  • the step (A1) further includes: determining, based on a predetermined rule, whether the reference information interaction corresponding to the benchmark test case file needs to be generated subsequently Relevant information interaction, if the judgment result is required To generate subsequent associated information interactions, step (A2) is performed.
  • the step (A3) further includes: determining, according to a predetermined rule, whether the association information interaction corresponding to the associated test case file needs to be generated subsequently The associated information is exchanged. If the result of the determination is that the subsequent related information interaction needs to be generated, step (A4) is performed.
  • the predetermined file structure for storing the reference test case file and the associated test case file is a tree file structure.
  • the storage path of the generated associated test case file in the tree file structure and the associated test case file are The name is used as the way to associate the corresponding benchmark case file.
  • the type of the associated information interaction that can be generated is obtained according to the type of the reference information interaction, and the interaction type according to each of the generated association information is respectively Acquiring the required associated domain value in the request message or the response message of the reference information interaction, so as to generate each associated test case based on each of the generated associated information interaction type and the required associated domain value file.
  • the name of the associated test case file is generated according to the naming rule in the configuration file.
  • the naming rule can be updated by the configuration command.

Landscapes

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

Abstract

本发明提出了基于关联测试用例自动生成的信息交互测试装置及方法,其中,所述装置中的关联测试用例生成模块可以基于基准信息交互以及由被测系统所提供的应用类型所确定的预定规则自动生成与所述基准信息交互能够引发的所有关联信息交互对应的关联测试用例文件。本发明所公开的基于关联测试用例自动生成的信息交互测试装置及方法具有高的测试速度和测试易用性,并且成本较低。

Description

基于关联测试用例自动生成的信息交互测试装置及方法 技术领域
本发明涉及信息交互测试装置及方法, 更具体地, 涉及基于关联测试用例 自动生成的信息交互测试装置及方法。 背景技术
目前, 随着基于网络的应用的日益广泛以及不同领域(例如金融领域)的 业务种类的日益丰富,基于请求-应答模式的信息交互(特别是安全性信息(即 对安全性要求较高的信息, 例如金融交易信息) 交互)过程变得越来越复杂, 例如, 基准信息交互 (即不由其他信息交互关联产生而独立发生的信息交互) 通常会伴随之后产生的一个或多个关联信息交互(即请求方在发起基准信息交 互之后针对该基准信息交互发起的信息交互, 例如, 在金融领域中, 一笔消费 交易完成后, 用户要求退货, 请求方可以发起针对该笔消费交易的退货交易, 其中所述消费交易是基准信息交互、 所述退货交易是关联交易), 其中, 关联 信息交互与基准信息交互通过关联域而匹配, 即一组唯一的关联域(例如, 在 金融领域中, 该一组唯一的关联域可以包括原始交易流水号、原始交易受理机 构标识码、 原始交易时间、 主账号等)可以使关联信息交互唯一确定其基准信 息交互。 由此, 针对基于请求 -应答模式并可能存在一个或多个关联信息交互 的信息交互系统的测试装置及方法变得越来越重要。
现有的信息交互测试装置及方法的基本工作流程如下: ( 1 )预先配置基准 信息交互和关联信息交互的请求报文模板(其中, 所述请求报文模板中的部分 域是动态生成域, 需要修改后发送); (2 ) 以常规的请求-应答模式根据同一请 求报文模板完成多个基准信息交互; (3 )获取某一基准信息交互的关联域值, 并生成或更新关联信息交互的请求报文模板中的动态域,从而产生关联信息交 互的请求报文, 随后以常规的请求-应答模式完成所述关联信息交互。
其中,在现有的信息交互测试装置及方法中,通常使用以下两种方式获得 关联信息交互的请求报文中的关联域值(特别是动态域): ( 1 )测试人员人工 查询信息交互日志, 找到基准信息交互的记录,从而根据该记录手动填写或修 改关联信息交互的请求报文中的关联域值; ( 2 )通过应用程序匹配数据库记录, 从而根据查找出的所述数据库中的基准信息交互的记录自动修改关联信息交 互的请求报文中的关联域值。
然而,上述两种获得关联信息交互的请求报文中的关联域值的方式存在如 下问题: (1 )对第一种方式而言, 由于测试时需要测试人员反复人工查询基准 信息交互的关联域值, 故测试过程繁瑣, 测试速度较慢, 并且由于受到测试人 员的技能水平的影响, 人工填写和修改易于出错, 故测试结果的准确性下降, 并且测试效率较低; (2 )针对第二种方式而言, 由于测试程序无法得知关联信 息交互将要关联同一类型的哪一个基准信息交互,故通常从数据库中查询最后 一条该类型的基准信息交互记录,并基于该记录修改关联信息交互的请求报文 中的关联域值, 由此, 如果存在同一类型的多个基准信息交互, 则随后的关联 信息交互只能关联最后一个基准信息交互, 从而不能满足模拟实际场景的需 要,并因此降低了整个信息交互测试装置及方法的适用性和测试准确性,此外, 由于需要布置额外的数据库模块,故提高了整个信息交互测试装置的成本和复 杂度。
因此, 存在如下需求: 提供一种具有高的测试速度、 测试易用性和测试效 率的低成本的基于关联测试用例自动生成的信息交互测试装置及方法。 发明内容
为了解决上述现有技术方案所存在的问题,本发明提出了基于关联测试用 例自动生成的信息交互测试装置及方法。
本发明的目的是通过以下技术方案实现的:
一种基于关联测试用例自动生成的信息交互测试装置,所述基于关联测试 用例自动生成的信息交互测试装置包括:
配置模块, 所述配置模块用于存储配置文件, 并基于接收到的配置指令更 新所述配置文件;
测试执行模块,所述测试执行模块用于调取测试用例文件并基于所述测试 用例所属类型的处理配置文件执行信息交互,以及所述信息交互完成后根据该 测试用例所属类型的所有关联信息类型,对每一关联信息类型分别调用关联测 试用例生成模块生成关联测试用例。; 关联测试用例生成模块, 所述关联测试 用例生成模块用于在接收到所述关联测试用例生成指令后,基于所述基准信息 交互以及由所述被测系统所提供的应用类型所确定的预定规则自动生成与所 述基准信息交互能够引发的所有关联信息交互对应的关联测试用例文件,并将 生成的所述关联测试用例文件存储在存储模块的预定文件结构中;
存储模块, 所述存储模块用于存储所述基准测试用例文件、所述关联测试 用例文件以及测试用例执行结果统计数据;
用户接口, 所述用户接口用于接收用户输入的配置指令, 并将所述配置指 令转送到所述配置模块, 并且, 所述用户接口还用于显示所述测试用例执行结 果统计数据。
在上面所公开的方案中,优选地, 所述测试执行模块还用于基于所述配置 文件调取关联测试用例文件并基于所述关联测试用例文件执行关联信息交互, 以及所述关联信息交互完成后在判断出需要产生后续的进一步关联信息交互 的情况下向所述关联测试用例生成模块发送关联测试用例生成指令。
在上面所公开的方案中,优选地, 所述关联测试用例生成模块还用于在接 收到所述关联测试用例生成指令后,基于所述关联信息交互以及由所述被测系 统所提供的应用类型所确定的预定规则自动生成与所述关联信息交互能够引 发的所有进一步的关联信息交互对应的关联测试用例文件,并将生成的所述关 联测试用例文件存储在所述存储模块的预定文件结构中。
在上面所公开的方案中,优选地, 所述配置文件包括案例类型的处理配置 文件、测试用例集调度信息、每个测试用例的验证条件以及所述关联测试用例 文件的命名规则。
在上面所公开的方案中, 优选地, 所述测试执行模块进一步包括: 加载及请求报文生成单元,所述加载及请求报文生成单元用于基于所述调 度指令将所述基准测试用例文件或所述关联测试用例文件加载入内存中,并且 基于所述基准测试用例文件或所述关联测试用例文件以预定规则生成适用于 所述被测系统的请求报文, 并将所述请求报文传送到发送单元;
发送单元,所述发送单元用于建立和维护所述测试执行模块与所述被测系 统之间的通信链路,并将接收到的所述请求报文经所述通信链路传送到所述被 测系统;
接收单元。所述接收单元用于在预定时间阈值内接收对应于所述请求报文 的来自所述被测系统的应答报文, 并将所述应答报文传送到应答验证单元; 应答验证单元,所述应答验证单元用于基于预定规则判断所述应答报文是 否有效, 并且如果判断结果为有效, 则所述应答验证单元进一步根据所述配置 文件中的所述基准测试用例文件或所述关联测试用例文件对应的验证条件验 证所述应答报文是否符合测试要求,并将对应的测试用例执行结果统计数据存 储在所述存储模块中。
在上面所公开的方案中,优选地, 所述应答验证单元进一步用于基于预定 规则判断所述基准测试用例文件或所述关联测试用例文件对应的基准信息交 互或关联信息交互是否需要产生后续的关联信息交互,如果判断结果为需要产 生后续的关联信息交互,则向所述关联测试用例生成模块发送所述关联测试用 例生成指令。
在上面所公开的方案中,优选地, 所述存储模块中用于存储所述基准测试 用例文件和所述关联测试用例文件的预定文件结构是树形文件结构。
在上面所公开的方案中,优选地, 所述关联测试用例文件的名称来作为其 关联对应的基准测试用例文件的方式。
在上面所公开的方案中,优选地, 所述关联测试用例生成模块根据基准信 息交互的类型获取可生成的关联信息交互类型,并根据每个可生成的关联信息 交互类型分别从所述基准信息交互的请求报文或应答报文中获取所需的关联 域值,从而基于每个所述可生成的关联信息交互类型和所述所需的关联域值分 别生成各个关联测试用例文件。
在上面所公开的方案中,优选地, 所述关联测试用例生成模块根据关联信 息交互类型确定所述关联测试用例文件在所述树形文件结构中的存储路径。
在上面所公开的方案中,优选地, 所述关联测试用例生成模块根据所述配 置文件中的所述命名规则生成所述关联测试用例文件的名称。
在上面所公开的方案中,优选地, 所述命名规则能够通过所述配置指令而 被更新。
在上面所公开的方案中, 可选地, 所述命名规则为: 关联测试用例文件的 名称=基准测试用例文件的名称 +关联信息交互类型名 +基准信息交互日期时 间。
在上面所公开的方案中, 可选地, 所述命名规则为: 关联测试用例文件的 名称=基准测试用例文件的名称 +关联信息交互类型名。
本发明的目的也可以通过以下技术方案实现:
一种基于关联测试用例自动生成的信息交互测试方法,所述基于关联测试 用例自动生成的信息交互测试方法包括以下步骤:
( A1 )基于配置文件调取基准测试用例文件并基于所述基准测试用例文件 执行基准信息交互;
( A2 )在所述基准信息交互完成之后, 在判断出需要产生后续的关联信息 交互的情况下,基于所述基准信息交互以及由被测系统所提供的应用类型所确 定的预定规则自动生成与所述基准信息交互能够引发的所有关联信息交互对 应的关联测试用例文件,并将生成的所述关联测试用例文件存储在预定文件结 构中;
( A3 )基于所述配置文件调取关联测试用例文件并基于所述关联测试用例 文件执行关联信息交互;
( A4 )在所述关联信息交互完成之后, 在判断出需要产生后续的进一步关 联信息交互的情况下,基于所述关联信息交互以及由所述被测系统所提供的应 用类型所确定的预定规则自动生成与所述关联信息交互能够引发的所有进一 步的关联信息交互对应的关联测试用例文件,并将生成的所述关联测试用例文 件存储在所述预定文件结构中, 随后返回步骤(A3 )直至整个测试过程结束。
在上面所公开的方案中,优选地,所述配置文件包括测试用例集调度信息、 每个测试用例的验证条件以及所述关联测试用例文件的命名规则。
在上面所公开的方案中, 优选地, 所述步骤(A1 )进一步包括:
( B1 )基于所述配置文件将所述基准测试用例文件加载入内存中, 并且基 于所述基准测试用例文件以预定规则生成适用于所述被测系统的请求报文;
( B2 )将所述请求报文传送到所述被测系统;
( B3 )在预定时间阈值内接收对应于所述请求报文的来自所述被测系统的 应答报文; ( B4 )基于预定规则判断所述应答报文是否有效, 并且如果判断结果为有 效,则根据所述配置文件中的所述基准测试用例文件对应的验证条件验证所述 应答报文是否符合测试要求, 并存储对应的测试用例执行结果统计数据。
在上面所公开的方案中, 优选地, 所述步骤(A3 )进一步包括:
( C1 )基于所述配置文件将所述关联测试用例文件加载入内存中, 并且基 于所述关联测试用例文件以预定规则生成适用于所述被测系统的请求报文;
( C2 )将所述请求报文传送到所述被测系统;
( C3 )在预定时间阈值内接收对应于所述请求报文的来自所述被测系统的 应答报文;
( C4 )基于预定规则判断所述应答报文是否有效, 并且如果判断结果为有 效,则进一步根据所述配置文件中的所述关联测试用例文件对应的验证条件验 证所述应答报文是否符合测试要求, 并存储对应的测试用例执行结果统计数 据。
在上面所公开的方案中, 优选地, 所述步骤(A1 )进一步包括: 基于预 定规则判断所述基准测试用例文件对应的基准信息交互是否需要产生后续的 关联信息交互, 如果判断结果为需要产生后续的关联信息交互, 则执行步骤 ( A2 )。
在上面所公开的方案中, 优选地, 所述步骤(A3 )进一步包括: 基于预 定规则判断所述关联测试用例文件对应的关联信息交互是否需要产生后续的 关联信息交互, 如果判断结果为需要产生后续的关联信息交互, 则执行步骤 ( A4 )。
在上面所公开的方案中,优选地, 用于存储所述基准测试用例文件和所述 关联测试用例文件的预定文件结构是树形文件结构。
在上面所公开的方案中,优选地,通过所述生成的关联测试用例文件在所 述树形文件结构中的存储路径和所述关联测试用例文件的名称来作为其关联 对应的基准测试用例文件的方式。
在上面所公开的方案中,优选地,根据基准信息交互的类型获取可生成的 关联信息交互类型,并根据每个可生成的关联信息交互类型分别从所述基准信 息交互的请求报文或应答报文中获取所需的关联域值,从而基于每个所述可生 成的关联信息交互类型和所述所需的关联域值分别生成各个关联测试用例文 件。
在上面所公开的方案中,优选地,根据关联信息交互类型确定所述关联测 试用例文件在所述树形文件结构中的存储路径。
在上面所公开的方案中,优选地,根据所述配置文件中的所述命名规则生 成所述关联测试用例文件的名称。
在上面所公开的方案中,优选地, 所述命名规则能够通过配置指令而被更 新。
在上面所公开的方案中, 可选地, 所述命名规则为: 关联测试用例文件的 名称=基准测试用例文件的名称 +关联信息交互类型名 +基准信息交互日期时 间。
在上面所公开的方案中, 可选地, 所述命名规则为: 关联测试用例文件的 名称=基准测试用例文件的名称 +关联信息交互类型名。
本发明所公开的基于关联测试用例自动生成的信息交互测试装置及方法 具有如下优点: 由于关联测试用例可以自动生成,故具有高的测试速度和测试 易用性, 并进而具有更优的测试效率且成本较低。 附图说明
结合附图, 本发明的技术特征以及优点将会被本领域技术人员更好地理 解, 其中:
图 1是根据本发明的实施例的基于关联测试用例自动生成的信息交互测试 装置的结构图;
图 2是根据本发明的实施例的基于关联测试用例自动生成的信息交互测试 装置和方法的测试报文文件的存储结构示意图;
图 3是根据本发明的实施例的基于关联测试用例自动生成的信息交互测试 方法的流程图。 具体实施方式
图 1是根据本发明的实施例的基于关联测试用例自动生成的信息交互测试 装置的结构图。 如图 1所示, 本发明所公开的基于关联测试用例自动生成的信 息交互测试装置包括配置模块 2、 测试执行模块 3、 关联测试用例生成模块 4、 存储模块 5和用户接口 6。 其中, 所述配置模块 2用于存储配置文件, 并基于接 收到的配置指令更新所述配置文件。 所述测试执行模块 3用于基于所述配置文 件调取基准测试用例文件并基于所述基准测试用例文件执行基准信息交互,以 及所述基准信息交互完成后在判断出需要产生后续的关联信息交互的情况下 向所述关联测试用例生成模块 4发送关联测试用例生成指令。 所述关联测试用 例生成模块 4用于在接收到所述关联测试用例生成指令后, 基于所述基准信息 交互以及由所述被测系统所提供的应用类型所确定的预定规则自动生成与所 述基准信息交互能够引发的所有关联信息交互对应的关联测试用例文件,并将 生成的所述关联测试用例文件存储在存储模块 5的预定文件结构中。 所述存储 模块 5用于存储所述基准测试用例文件、 所述关联测试用例文件以及测试用例 执行结果统计数据。 所述用户接口 6用于接收用户输入的配置指令, 并将所述 配置指令转送到所述配置模块 2 , 并且。所述用户接口 6还用于显示所述测试用 例执行结果统计数据。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述测试执行模块 3还用于基于所述配置文件调取关联测试用例文件并 基于所述关联测试用例文件执行关联信息交互,以及所述关联信息交互完成后 在判断出需要产生后续的进一步关联信息交互的情况下向所述关联测试用例 生成模块 4发送关联测试用例生成指令。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述关联测试用例生成模块 4还用于在接收到所述关联测试用例生成指 令后,基于所述关联信息交互以及由所述被测系统所提供的应用类型所确定的 预定规则自动生成与所述关联信息交互能够引发的所有进一步的关联信息交 互对应的关联测试用例文件,并将生成的所述关联测试用例文件存储在存储模 块 5的预定文件结构中。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述配置文件包括测试用例集调度信息、每个测试用例的验证条件以及 所述关联测试用例文件的命名规则。 优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述测试执行模块 3进一步包括加载及请求报文生成单元 7、发送单元 8、 接收单元 9和应答验证单元 10。其中, 所述加载及请求报文生成单元 7用于基于 所述调度指令将所述基准测试用例文件或所述关联测试用例文件加载入内存 中,并且基于所述基准测试用例文件或所述关联测试用例文件以预定规则生成 适用于所述被测系统的请求报文, 并将所述请求报文传送到所述发送单元 8。 所述发送单元 8用于建立和维护所述测试执行模块 3与所述被测系统之间的通 信链路, 并将接收到的所述请求报文经所述通信链路传送到所述被测系统。所 述接收单元 9用于在预定时间阈值内接收对应于所述请求报文的来自所述被测 系统的应答报文, 并将所述应答报文传送到所述应答验证单元 10。 所述应答验 证单元 10用于基于预定规则(例如计算所述应答报文的 MAC域)判断所述应 答报文是否有效, 并且如果判断结果为有效, 则所述应答验证单元 10进一步根 据所述配置文件中的所述基准测试用例文件或所述关联测试用例文件对应的 验证条件验证所述应答报文是否符合测试要求,并将对应的测试用例执行结果 统计数据存储在所述存储模块 5中。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中,所述应答验证单元 10进一步用于基于预定规则判断所述基准测试用例文 件或所述关联测试用例文件对应的基准信息交互或关联信息交互是否需要产 生后续的关联信息交互,如果判断结果为需要产生后续的关联信息交互, 则向 所述关联测试用例生成模块 4发送所述关联测试用例生成指令。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述存储模块 5中用于存储所述基准测试用例文件和所述关联测试用例 文件的预定文件结构是 Φ ^形文件结构。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中,通过所述生成的关联测试用例文件在所述树形文件结构中的存储路径和 所述关联测试用例文件的名称来作为其关联对应的基准测试用例文件的方式。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述关联测试用例生成模块 4根据基准信息交互的类型获取可生成的关 联信息交互类型,并根据每个可生成的关联信息交互类型分别从所述基准信息 交互的请求报文或应答报文中获取所需的关联域值,从而基于每个所述可生成 的关联信息交互类型和所述所需的关联域值分别生成各个关联测试用例文件。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述关联测试用例生成模块 4根据关联信息交互类型 (包括主类型和子 类型 )确定所述关联测试用例文件在所述树形文件结构中的存储路径。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述关联测试用例生成模块 4根据所述配置文件中的所述命名规则生成 所述关联测试用例文件的名称。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试装 置中, 所述命名规则能够通过所述配置指令而被更新。
示例性地,在本发明所公开的基于关联测试用例自动生成的信息交互测试 装置中, 所述命名规则为: 关联测试用例文件的名称 =基准测试用例文件的名 称 +关联信息交互类型名 +基准信息交互日期时间 (其中, 所述关联测试用例 文件名称中的 "基准测试用例文件的名称" 和 "基准信息交互日期时间" 清楚 地表明了被关联的基准信息交互)。
图 2是根据本发明的实施例的基于关联测试用例自动生成的信息交互测试 装置和方法的测试报文文件的存储结构示意图。 如图 2所示, 用于存储所述基 准测试用例文件和所述关联测试用例文件的预定文件结构是树形文件结构,并 且通过所述生成的关联测试用例文件在所述树形文件结构中的存储路径和所 述关联测试用例文件的名称来作为其关联对应的基准测试用例文件的方式。
图 3是根据本发明的实施例的基于关联测试用例自动生成的信息交互测试 方法的流程图。 如图 3所示, 本发明所公开的基于关联测试用例自动生成的信 息交互测试方法包括以下步骤: ( A1 )基于配置文件调取基准测试用例文件 并基于所述基准测试用例文件执行基准信息交互; (A2 )在所述基准信息交互 完成之后,在判断出需要产生后续的关联信息交互的情况下,基于所述基准信 息交互以及由被测系统所提供的应用类型所确定的预定规则自动生成与所述 基准信息交互能够引发的所有关联信息交互对应的关联测试用例文件,并将生 成的所述关联测试用例文件存储在预定文件结构中; ( A3 )基于所述配置文件 调取关联 ']试用例文件并基于所述关联 ']试用例文件执行关联信息交互; ( A4 )在所述关联信息交互完成之后, 在判断出需要产生后续的进一步关联信 息交互的情况下,基于所述关联信息交互以及由所述被测系统所提供的应用类 型所确定的预定规则自动生成与所述关联信息交互能够引发的所有进一步的 关联信息交互对应的关联测试用例文件,并将生成的所述关联测试用例文件存 储在所述预定文件结构中, 随后返回步骤( A3 )直至整个测试过程结束。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中, 所述配置文件包括测试用例集调度信息、每个测试用例的验证条件以及 所述关联测试用例文件的命名规则。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中, 所述步骤(A1 )进一步包括: (B1 )基于所述配置文件将所述基准测试 用例文件加载入内存中,并且基于所述基准测试用例文件以预定规则生成适用 于所述被测系统的请求报文; ( B2 )将所述请求报文传送到所述被测系统;( B3 ) 在预定时间阈值内接收对应于所述请求报文的来自所述被测系统的应答报文; ( B4 )基于预定规则 (例如计算所述应答报文的 MAC域)判断所述应答报文 是否有效, 并且如果判断结果为有效, 则根据所述配置文件中的所述基准测试 测试用例执行结果统计数据。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中, 所述步骤(A3 )进一步包括: (C1 )基于所述配置文件将所述关联测试 用例文件加载入内存中,并且基于所述关联测试用例文件以预定规则生成适用 于所述被测系统的请求报文; ( C2 )将所述请求报文传送到所述被测系统;( C3 ) 在预定时间阈值内接收对应于所述请求报文的来自所述被测系统的应答报文; ( C4 )基于预定规则 (例如计算所述应答报文的 MAC域)判断所述应答报文 是否有效, 并且如果判断结果为有效, 则进一步根据所述配置文件中的所述关 对应的测试用例执行结果统计数据。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中, 所述步骤(A1 )进一步包括: 基于预定规则判断所述基准测试用例文 件对应的基准信息交互是否需要产生后续的关联信息交互,如果判断结果为需 要产生后续的关联信息交互, 则执行步骤(A2 )。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中, 所述步骤(A3 )进一步包括: 基于预定规则判断所述关联测试用例文 件对应的关联信息交互是否需要产生后续的关联信息交互,如果判断结果为需 要产生后续的关联信息交互, 则执行步骤(A4 )。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中,用于存储所述基准测试用例文件和所述关联测试用例文件的预定文件结 构是树形文件结构。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中,通过所述生成的关联测试用例文件在所述树形文件结构中的存储路径和 所述关联测试用例文件的名称来作为其关联对应的基准测试用例文件的方式。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中,根据基准信息交互的类型获取可生成的关联信息交互类型, 并根据每个 可生成的关联信息交互类型分别从所述基准信息交互的请求报文或应答报文 中获取所需的关联域值,从而基于每个所述可生成的关联信息交互类型和所述 所需的关联域值分别生成各个关联测试用例文件。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中, 根据关联信息交互类型(包括主类型和子类型 )确定所述关联测试用例 文件在所述树形文件结构中的存储路径。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中, 根据所述配置文件中的所述命名规则生成所述关联测试用例文件的名 称。
优选地,在本发明所公开的基于关联测试用例自动生成的信息交互测试方 法中, 所述命名规则能够通过配置指令而被更新。
示例性地,在本发明所公开的基于关联测试用例自动生成的信息交互测试 方法中, 所述命名规则为: 关联测试用例文件的名称 =基准测试用例文件的名 称 +关联信息交互类型名 +基准信息交互日期时间 (其中, 所述关联测试用例 文件名称中的 "基准测试用例文件的名称" 和 "基准信息交互日期时间" 清楚 地表明了被关联的基准信息交互)。 尽管本发明是通过上述的优选实施方式进行描述的,但是其实现形式并不 局限于上述的实施方式。 应该认识到: 在不脱离本发明主旨和范围的情况下,

Claims

权利要求
1. 一种基于关联测试用例自动生成的信息交互测试装置, 所述基于关联 测试用例自动生成的信息交互测试装置包括:
配置模块, 所述配置模块用于存储配置文件, 并基于接收到的配置指令更 新所述配置文件;
测试执行模块,所述测试执行模块用于调取测试用例文件并基于所述测试 用例所属类型的处理配置文件执行信息交互,以及所述信息交互完成后根据该 测试用例所属类型的所有关联信息类型,对每一关联信息类型分别调用关联测 试用例生成模块生成关联测试用例;
关联测试用例生成模块,所述关联测试用例生成模块用于在接收到所述关 联测试用例生成指令后,基于所述基准信息交互以及由所述被测系统所提供的 应用类型所确定的预定规则自动生成与所述基准信息交互能够引发的所有关 联信息交互对应的关联测试用例文件,并将生成的所述关联测试用例文件存储 在存储模块的预定文件结构中;
存储模块, 所述存储模块用于存储所述基准测试用例文件、所述关联测试 用例文件以及测试用例执行结果统计数据;
用户接口, 所述用户接口用于接收用户输入的配置指令, 并将所述配置指 令转送到所述配置模块, 并且, 所述用户接口还用于显示所述测试用例执行结 果统计数据。
2. 根据权利要求 1所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述测试执行模块还用于基于所述配置文件调取关联测试用 例文件并基于所述关联测试用例文件执行关联信息交互,以及所述关联信息交 互完成后在判断出需要产生后续的进一步关联信息交互的情况下向所述关联 测试用例生成模块发送关联测试用例生成指令。
3. 根据权利要求 2所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述关联测试用例生成模块还用于在接收到所述关联测试用 例生成指令后,基于所述关联信息交互以及由所述被测系统所提供的应用类型 所确定的预定规则自动生成与所述关联信息交互能够引发的所有进一步的关 联信息交互对应的关联测试用例文件,并将生成的所述关联测试用例文件存储 在所述存储模块的预定文件结构中。
4. 根据权利要求 3所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述配置文件包括案例类型的处理配置文件、 测试用例集调 度信息、 每个测试用例的验证条件以及所述关联测试用例文件的命名规则。
5. 根据权利要求 4所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述测试执行模块进一步包括:
加载及请求报文生成单元,所述加载及请求报文生成单元用于基于所述调 度指令将所述基准测试用例文件或所述关联测试用例文件加载入内存中,并且 基于所述基准测试用例文件或所述关联测试用例文件以预定规则生成适用于 所述被测系统的请求报文, 并将所述请求报文传送到发送单元;
发送单元,所述发送单元用于建立和维护所述测试执行模块与所述被测系 统之间的通信链路,并将接收到的所述请求报文经所述通信链路传送到所述被 测系统;
接收单元。所述接收单元用于在预定时间阈值内接收对应于所述请求报文 的来自所述被测系统的应答报文, 并将所述应答报文传送到应答验证单元; 应答验证单元,所述应答验证单元用于基于预定规则判断所述应答报文是 否有效, 并且如果判断结果为有效, 则所述应答验证单元进一步根据所述配置 文件中的所述基准测试用例文件或所述关联测试用例文件对应的验证条件验 证所述应答报文是否符合测试要求,并将对应的测试用例执行结果统计数据存 储在所述存储模块中。
6. 根据权利要求 5所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述应答验证单元进一步用于基于预定规则判断所述基准测 试用例文件或所述关联测试用例文件对应的基准信息交互或关联信息交互是 否需要产生后续的关联信息交互,如果判断结果为需要产生后续的关联信息交 互, 则向所述关联测试用例生成模块发送所述关联测试用例生成指令。
7. 根据权利要求 6所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述存储模块中用于存储所述基准测试用例文件和所述关联 测试用例文件的预定文件结构是 形文件结构。
8. 根据权利要求 7所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述关联测试用例文件的名称来作为其关联对应的基准测试 用例文件的方式。
9. 根据权利要求 8所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述关联测试用例生成模块根据基准信息交互的类型获取可 生成的关联信息交互类型,并根据每个可生成的关联信息交互类型分别从所述 基准信息交互的请求报文或应答报文中获取所需的关联域值,从而基于每个所 述可生成的关联信息交互类型和所述所需的关联域值分别生成各个关联测试 用例文件。
10. 根据权利要求 9所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述关联测试用例生成模块根据关联信息交互类型确定所述 关联测试用例文件在所述树形文件结构中的存储路径。
11.根据权利要求 10所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述关联测试用例生成模块根据所述配置文件中的所述命名 规则生成所述关联测试用例文件的名称。
12.根据权利要求 11所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述命名规则能够通过所述配置指令而被更新。
1 3.根据权利要求 12所述的基于关联测试用例自动生成的信息交互测试装 置, 其特征在于, 所述命名规则为: 关联测试用例文件的名称 =基准测试用例 文件的名称 +关联信息交互类型名 +基准信息交互日期时间。
14. 根据权利要求 12所述的基于关联测试用例自动生成的信息交互测试 装置, 其特征在于, 所述命名规则为: 关联测试用例文件的名称 =基准测试用 例文件的名称 +关联信息交互类型名。
15. —种基于关联测试用例自动生成的信息交互测试方法, 所述基于关联 测试用例自动生成的信息交互测试方法包括以下步骤:
( A1 )基于配置文件调取基准测试用例文件并基于所述基准测试用例文件 执行基准信息交互;
( A2 )在所述基准信息交互完成之后, 在判断出需要产生后续的关联信息 交互的情况下,基于所述基准信息交互以及由被测系统所提供的应用类型所确 定的预定规则自动生成与所述基准信息交互能够引发的所有关联信息交互对 应的关联测试用例文件,并将生成的所述关联测试用例文件存储在预定文件结 构中;
( A3 )基于所述配置文件调取关联测试用例文件并基于所述关联测试用例 文件执行关联信息交互;
( A4 )在所述关联信息交互完成之后, 在判断出需要产生后续的进一步关 联信息交互的情况下,基于所述关联信息交互以及由所述被测系统所提供的应 用类型所确定的预定规则自动生成与所述关联信息交互能够引发的所有进一 步的关联信息交互对应的关联测试用例文件,并将生成的所述关联测试用例文 件存储在所述预定文件结构中, 随后返回步骤(A3 )直至整个测试过程结束。
16.根据权利要求 15所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 所述配置文件包括测试用例集调度信息、 每个测试用例的验 证条件以及所述关联测试用例文件的命名规则。
17.根据权利要求 16所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 所述步骤(A1 )进一步包括:
( B1 )基于所述配置文件将所述基准测试用例文件加载入内存中, 并且基 于所述基准测试用例文件以预定规则生成适用于所述被测系统的请求报文; ( B2 )将所述请求报文传送到所述被测系统;
( B3 )在预定时间阈值内接收对应于所述请求报文的来自所述被测系统的 应答报文;
( B4 )基于预定规则判断所述应答报文是否有效, 并且如果判断结果为有 效,则根据所述配置文件中的所述基准测试用例文件对应的验证条件验证所述 应答报文是否符合测试要求, 并存储对应的测试用例执行结果统计数据。
18.根据权利要求 17所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 所述步骤(A3 )进一步包括:
( C1 )基于所述配置文件将所述关联测试用例文件加载入内存中, 并且基 于所述关联测试用例文件以预定规则生成适用于所述被测系统的请求报文; ( C2 )将所述请求报文传送到所述被测系统;
( C3 )在预定时间阈值内接收对应于所述请求报文的来自所述被测系统的 应答报文;
( C4 )基于预定规则判断所述应答报文是否有效, 并且如果判断结果为有 效,则进一步根据所述配置文件中的所述关联测试用例文件对应的验证条件验 证所述应答报文是否符合测试要求, 并存储对应的测试用例执行结果统计数 据。
19.根据权利要求 18所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 所述步骤(A1 )进一步包括: 基于预定规则判断所述基准 测试用例文件对应的基准信息交互是否需要产生后续的关联信息交互,如果判 断结果为需要产生后续的关联信息交互, 则执行步骤(A2 )。
20.根据权利要求 19所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 所述步骤(A3 )进一步包括: 基于预定规则判断所述关联 测试用例文件对应的关联信息交互是否需要产生后续的关联信息交互,如果判 断结果为需要产生后续的关联信息交互, 则执行步骤(A4 )。
21.根据权利要求 20所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 用于存储所述基准测试用例文件和所述关联测试用例文件的 预定文件结构是^"形文件结构。
22.根据权利要求 21所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于,通过所述生成的关联测试用例文件在所述树形文件结构中的 存储路径和所述关联测试用例文件的名称来作为其关联对应的基准测试用例 文件的方式。
23.根据权利要求 22所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 根据基准信息交互的类型获取可生成的关联信息交互类型, 并根据每个可生成的关联信息交互类型分别从所述基准信息交互的请求报文 或应答报文中获取所需的关联域值,从而基于每个所述可生成的关联信息交互 类型和所述所需的关联域值分别生成各个关联测试用例文件。
24.根据权利要求 23所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于,根据关联信息交互类型确定所述关联测试用例文件在所述树 形文件结构中的存储路径。
25.根据权利要求 24所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于,根据所述配置文件中的所述命名规则生成所述关联测试用例 文件的名称。
26.根据权利要求 25所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 所述命名规则能够通过配置指令而被更新。
27.根据权利要求 26所述的基于关联测试用例自动生成的信息交互测试方 法, 其特征在于, 所述命名规则为: 关联测试用例文件的名称 =基准测试用例 文件的名称 +关联信息交互类型名 +基准信息交互日期时间。
28. 根据权利要求 26所述的基于关联测试用例自动生成的信息交互测试 装置, 其特征在于, 所述命名规则为: 关联测试用例文件的名称 =基准测试用 例文件的名称 +关联信息交互类型名。
PCT/CN2012/087973 2011-12-31 2012-12-31 基于关联测试用例自动生成的信息交互测试装置及方法 WO2013097788A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US14/369,185 US9483386B2 (en) 2011-12-31 2012-12-31 Information interaction test device and method based on automatic generation of associated test cases
EP12863644.6A EP2799995A4 (en) 2011-12-31 2012-12-31 DEVICE AND METHOD FOR TESTING INFORMATION INTERACTION BASED ON THE AUTOMATIC GENERATION OF ASSOCIATED TEST CASES

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110460805.0A CN103186466B (zh) 2011-12-31 2011-12-31 基于关联测试用例自动生成的信息交互测试装置及方法
CN201110460805.0 2011-12-31

Publications (1)

Publication Number Publication Date
WO2013097788A1 true WO2013097788A1 (zh) 2013-07-04

Family

ID=48677642

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/087973 WO2013097788A1 (zh) 2011-12-31 2012-12-31 基于关联测试用例自动生成的信息交互测试装置及方法

Country Status (4)

Country Link
US (1) US9483386B2 (zh)
EP (1) EP2799995A4 (zh)
CN (1) CN103186466B (zh)
WO (1) WO2013097788A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451294A (zh) * 2017-08-17 2017-12-08 北京润科通用技术有限公司 一种数据交互方法及装置

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6316120B2 (ja) * 2014-06-30 2018-04-25 日立オートモティブシステムズ株式会社 テストケース生成システム及びテストケースを記録した記録媒体
CN105095069B (zh) * 2015-06-19 2018-06-08 北京京东尚科信息技术有限公司 一种人工智能应答系统测试方法及系统
CN105528297A (zh) * 2016-01-29 2016-04-27 广州酷狗计算机科技有限公司 对web页面进行测试的方法及装置
US10582021B2 (en) * 2016-07-01 2020-03-03 Mcafee, Llc Cloud assisted behavioral automated testing
CN106126429B (zh) * 2016-08-15 2019-07-26 北京小鸟看看科技有限公司 一种测试方法及设备
TWI641247B (zh) * 2017-03-23 2018-11-11 瑞軒科技股份有限公司 訊息處理方法
CN107193632A (zh) * 2017-05-16 2017-09-22 上海斐讯数据通信技术有限公司 一种模拟证券交易的基准测试方法及系统
CN109032916A (zh) * 2017-06-08 2018-12-18 阿里巴巴集团控股有限公司 对应用程序中功能模块进行评测的方法、装置及系统
CN107908553B (zh) * 2017-11-02 2021-02-26 平安科技(深圳)有限公司 关联测试方法、应用服务器及计算机可读存储介质
CN107832227B (zh) * 2017-11-24 2020-04-10 平安科技(深圳)有限公司 业务系统的接口参数测试方法、装置、设备和存储介质
CN108897687B (zh) * 2018-06-29 2022-04-01 泰华智慧产业集团股份有限公司 一种基于数据驱动的api自动化测试方法和系统
CN109062794B (zh) * 2018-07-24 2022-04-22 北京奇艺世纪科技有限公司 一种软件测评结果的确定方法、装置及电子设备
CN109783287B (zh) * 2018-12-28 2022-09-13 北京五维星宇科技有限公司 基于配置文件的测试指令生成方法、系统、终端及介质
CN110795142B (zh) * 2019-10-18 2023-04-07 郑州阿帕斯科技有限公司 一种配置文件的生成方法及装置
CN111127223B (zh) * 2019-11-25 2023-07-18 泰康保险集团股份有限公司 保险产品测试方法、装置和存储介质
CN111078543B (zh) * 2019-12-02 2023-07-07 贝壳技术有限公司 系统动态化测试方法及测试装置
CN111221735B (zh) * 2020-01-08 2022-08-09 福建博思软件股份有限公司 一种用于自动生成业务交互测试脚本的系统
CN112579472B (zh) * 2020-12-30 2024-04-16 锐捷网络股份有限公司 测试用例的自动生成方法及装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251798A (zh) * 2008-04-01 2008-08-27 中兴通讯股份有限公司 一种基于关系的测试用例生成方法
CN101251825A (zh) * 2008-04-03 2008-08-27 北京星网锐捷网络技术有限公司 一种生成测试用例的方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6243835B1 (en) * 1998-01-30 2001-06-05 Fujitsu Limited Test specification generation system and storage medium storing a test specification generation program
US6975965B2 (en) * 2004-01-12 2005-12-13 International Business Machines Corporation System and method for heuristically optimizing a large set of automated test sets
US7873945B2 (en) * 2007-06-29 2011-01-18 Microsoft Corporation Automatically generating test cases for binary code
US8370809B2 (en) * 2010-03-18 2013-02-05 Salesforce.Com, Inc. System, method and computer program product for automated test case generation and scheduling
CN102622294B (zh) * 2011-01-28 2014-12-10 国际商业机器公司 生成用于不同测试类型的测试用例的方法和装置
US8649995B2 (en) * 2011-04-07 2014-02-11 Infosys Technologies, Ltd. System and method for efficient test case generation using input dependency information

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251798A (zh) * 2008-04-01 2008-08-27 中兴通讯股份有限公司 一种基于关系的测试用例生成方法
CN101251825A (zh) * 2008-04-03 2008-08-27 北京星网锐捷网络技术有限公司 一种生成测试用例的方法和装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451294A (zh) * 2017-08-17 2017-12-08 北京润科通用技术有限公司 一种数据交互方法及装置

Also Published As

Publication number Publication date
EP2799995A4 (en) 2016-06-08
US9483386B2 (en) 2016-11-01
CN103186466A (zh) 2013-07-03
US20140359362A1 (en) 2014-12-04
EP2799995A1 (en) 2014-11-05
CN103186466B (zh) 2016-06-15

Similar Documents

Publication Publication Date Title
WO2013097788A1 (zh) 基于关联测试用例自动生成的信息交互测试装置及方法
JP6069339B2 (ja) オラクルリワインド:メタデータドリブンのアンドゥ
RU2648966C2 (ru) Устройство и способ для обработки множества открытых api
WO2018019168A1 (zh) 通过移动浏览器唤醒app应用的方法及装置
US20210049715A1 (en) Blockchain-based data procesing method, apparatus, and electronic device
CN104506487B (zh) 云环境下隐私策略的可信执行方法
CN107436832A (zh) 一种动态埋点的方法、装置及电子设备
US20130117290A1 (en) Platform for software as a service and method for provisioning service for supporting multi-tenants using the platform
CN110569036B (zh) 一种前后端分离架构下的数据校验系统及其方法
CN112905437B (zh) 一种测试用例的方法、装置及存储介质
CN106933709A (zh) 一种测试方法及装置
CN110535654A (zh) 基于区块链的并行系统部署方法、装置和计算机设备
CN112634034B (zh) 预约方法、装置、电子设备及计算机可读存储介质
CN105653579A (zh) 一种对分布式事务进行测试的方法和装置
WO2022206431A1 (zh) 查询Fabric区块链账本数据的方法和装置
WO2019033741A1 (zh) 投资产品的资源处理方法、装置、存储介质和计算机设备
CN108829495B (zh) 多数据库修改事务的验证方法、装置、设备及存储介质
WO2024113778A1 (zh) 现场可更换单元设备的槽位确定方法、装置、设备
CN105703964A (zh) 一种在线应用系统测试方法与设备
CN104731660A (zh) 数据分配方法、装置和系统
CN116974874A (zh) 数据库的测试方法、装置、电子设备及可读存储介质
WO2021201827A1 (en) Method and apparatus maintaining private data with consortium blockchain
CN117131545A (zh) 数据处理方法及装置、存储介质、终端
CN104754029A (zh) 确定主管理服务器的方法、装置和系统
CN111339089B (zh) 一种应用于区块链的数据存储与获取方法及装置

Legal Events

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

Ref document number: 12863644

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012863644

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14369185

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE