[go: up one dir, main page]

CN101339532A - An automated testing method and device for a web application system - Google Patents

An automated testing method and device for a web application system Download PDF

Info

Publication number
CN101339532A
CN101339532A CNA2007100435893A CN200710043589A CN101339532A CN 101339532 A CN101339532 A CN 101339532A CN A2007100435893 A CNA2007100435893 A CN A2007100435893A CN 200710043589 A CN200710043589 A CN 200710043589A CN 101339532 A CN101339532 A CN 101339532A
Authority
CN
China
Prior art keywords
test
component
web application
atomic
application system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2007100435893A
Other languages
Chinese (zh)
Other versions
CN101339532B (en
Inventor
戚跃民
黎宝华
吕苏
尹祥龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN200710043589A priority Critical patent/CN101339532B/en
Publication of CN101339532A publication Critical patent/CN101339532A/en
Application granted granted Critical
Publication of CN101339532B publication Critical patent/CN101339532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种Web应用系统的自动化测试方法及装置,以解决现有的Web应用自动化测试工具不灵活、重复利用率低,测试工作量大、效率低的问题。所述方法包括:将Web应用系统的业务流程分解成原子流程的组合;对应每个原子流程创建自动化测试构件;读取预配置的测试案例,测试案例中记录了原子流程序列;对应所述序列中的每个原子流程,调用相应的测试构件,对Web应用系统进行测试。所述基于构件的自动化测试方法,能够灵活适应各种复杂多变的业务流程的自动化测试,提高了测试程序的通用性,极大提高了自动化测试效率,减少了测试工作量;而且,由于将业务流程细化到原子流程,所以可以跟踪定位到出错的原子流程,及时发现错误点,提高测试效果。

Figure 200710043589

The invention discloses an automatic testing method and device for a Web application system, in order to solve the problems of inflexibility, low reuse rate, large testing workload and low efficiency of existing Web application automatic testing tools. The method includes: decomposing the business process of the Web application system into a combination of atomic processes; creating an automated test component corresponding to each atomic process; reading a pre-configured test case, in which the atomic process sequence is recorded; corresponding to the sequence Each atomic process in calls the corresponding test component to test the Web application system. The component-based automated testing method can flexibly adapt to the automated testing of various complex and changeable business processes, improves the versatility of the test program, greatly improves the efficiency of automated testing, and reduces the workload of testing; moreover, due to the The business process is subdivided into the atomic process, so the atomic process with errors can be tracked and located, the error point can be found in time, and the test effect can be improved.

Figure 200710043589

Description

一种Web应用系统的自动化测试方法及装置 An automated testing method and device for a web application system

技术领域 technical field

本发明涉及软件测试领域,特别是涉及一种Web应用系统的自动化测试方法及装置。The invention relates to the field of software testing, in particular to an automatic testing method and device for a Web application system.

背景技术 Background technique

软件测试是软件开发、后期维护过程的重要组成部分,其测试过程贯穿软件工程的各个环节,测试的目的在于发现程序中的问题,提高软件质量;并且还用于软件投入使用后的升级测试,如软件打补丁后,需要进行回归测试来保证原功能的正确性。Software testing is an important part of software development and post-maintenance process. Its testing process runs through all aspects of software engineering. The purpose of testing is to find problems in the program and improve software quality; it is also used for upgrade testing after the software is put into use. For example, after the software is patched, a regression test is required to ensure the correctness of the original function.

Web应用系统在发布之前和升级之后都要经过测试,包括性能测试和功能测试两方面,对于功能测试,主要是对Web应用所具有的各种功能进行测试。由于每种功能具有相应的一个或多个业务流程,所以功能测试是对Web应用系统的各种业务流程进行测试。其中,所述业务流程指具有先后执行顺序的操作集合序列,不同业务流程的操作序列也不同。Web application systems must be tested before release and after upgrade, including performance testing and functional testing. For functional testing, it is mainly to test various functions of the Web application. Since each function has corresponding one or more business processes, functional testing is to test various business processes of the Web application system. Wherein, the business process refers to a collection sequence of operations with a sequential execution order, and the operation sequences of different business processes are also different.

现有的界面自动化测试工具主要是以Mercury Winrunner和IBM RationalRobot为代表的脚本解释型的自动化测试软件,其工作原理是编写执行脚本或将界面操作录制为脚本,通过播放脚本模拟界面操作来执行业务流程,达到自动化测试的目的。Existing interface automation testing tools are mainly script-interpreted automated testing software represented by Mercury Winrunner and IBM RationalRobot. process to achieve the purpose of automated testing.

例如,中国专利第200410086041.3号申请文件就公开了一种基于脚本解释工具的自动化测试系统,系统通过对测试案例的管理,解决了测试案例重用问题,测试通过后台进行,实现了测试流程自动化和测试资源的均衡管理,具有较强的灵活性,可以满足多种业务需求。中国专利第200410054163.4号公布了一种自动化测试辅助系统及相应的软件自动测试系统,该专利定义了结构化测试案例,采用了测试案例的动态执行和延迟装载技术,并将测试案例转化为商业测试软件的测试脚本,驱动商业测试软件执行测试,并记录测试结果;该系统提高了测试案例的编写和执行效率。For example, the application document of Chinese Patent No. 200410086041.3 discloses an automated test system based on script interpretation tools. The system solves the problem of test case reuse through the management of test cases. The balanced management of resources has strong flexibility and can meet various business needs. Chinese Patent No. 200410054163.4 discloses an automated test auxiliary system and corresponding software automatic test system. The patent defines structured test cases, adopts dynamic execution of test cases and delay loading technology, and converts test cases into commercial tests. The test script of the software drives the commercial test software to execute the test and records the test results; the system improves the efficiency of test case writing and execution.

上述测试方法存在如下问题:The above test method has the following problems:

其一,难于支持不同Web应用系统的千变万化的具体业务流程,由于针对Web应用的不同业务流程,需要单独编写或录制测试脚本,因此脚本编写不灵活,脚本的重复利用率低;而且,每次都需要编写或录制大量的脚本,测试工作量非常大;First, it is difficult to support the ever-changing specific business processes of different web application systems. Because of the different business processes of web applications, test scripts need to be written or recorded separately, so the script writing is inflexible and the reuse rate of scripts is low; moreover, every time Both need to write or record a large number of scripts, and the testing workload is very heavy;

其二,难于跟踪定位测试出错点和分析出错原因,因为现有自动化测试技术未分解复杂的业务流程,如果测试执行过程中发现某个业务流程出错,仅能定位到该业务流程中,很难细化地定位到具体的子业务流程。Second, it is difficult to track and locate test error points and analyze the cause of errors, because the existing automated testing technology does not decompose complex business processes. If an error is found in a certain business process during test execution, it can only be located in the business process, which is difficult. Locate specific sub-business processes in a refined manner.

发明内容 Contents of the invention

本发明所要解决的技术问题是提供一种Web应用系统的自动化测试方法及装置,以解决现有的Web应用自动化测试工具不灵活、重复利用率低,测试工作量大、效率低的问题。The technical problem to be solved by the present invention is to provide an automated testing method and device for a Web application system to solve the problems of inflexibility, low reuse rate, heavy testing workload and low efficiency of existing automated testing tools for Web applications.

为解决上述技术问题,根据本发明提供的具体实施例,本发明公开了以下技术方案:In order to solve the above technical problems, according to the specific embodiments provided by the invention, the invention discloses the following technical solutions:

一种Web应用系统的自动化测试方法,包括:An automated testing method for a web application system, comprising:

将Web应用系统的业务流程分解成原子流程的组合;Decompose the business process of the Web application system into a combination of atomic processes;

对应每个原子流程创建自动化测试构件;Create automated test components corresponding to each atomic process;

读取预配置的测试案例,测试案例中记录了原子流程序列;Read pre-configured test cases in which atomic process sequences are recorded;

对应所述序列中的每个原子流程,调用相应的测试构件,对Web应用系统进行测试。Corresponding to each atomic process in the sequence, a corresponding test component is invoked to test the Web application system.

其中,在调用测试构件之前还包括:预检所述读取的测试案例的数据是否符合规范,并检查所调用的测试构件是否存在。Wherein, before calling the test component, it also includes: pre-checking whether the data of the read test case conforms to the specification, and checking whether the called test component exists.

所述方法还包括:将测试构件执行返回值与预期结果比较,若相同,则执行下一个测试构件;若不相同,则记录出错位置和相关数据,并执行下一个测试案例;记录上述比较后的测试结果。The method also includes: comparing the return value of the test component execution with the expected result, if they are the same, then execute the next test component; if they are not the same, record the error location and related data, and execute the next test case; after recording the above comparison test results.

所述方法还包括:分析所述测试结果,生成测试报告。The method also includes: analyzing the test results and generating a test report.

所述方法还包括:跟踪记录每个执行步骤的执行情况。The method further includes: tracking and recording the execution of each execution step.

所述方法还包括:将常见业务流程包含的测试构件组合成复合构件,在调用时直接调用所述复合构件。The method further includes: combining the test components included in the common business process into a composite component, and calling the composite component directly when invoking.

一种Web应用系统的自动化测试装置,包括:An automated testing device for a web application system, comprising:

自动化测试构件库,是自动化测试构件的集合,每个测试构件对应原子流程创建,而原子流程组合成Web应用系统的业务流程;The automated test component library is a collection of automated test components. Each test component corresponds to the creation of atomic processes, and the atomic processes are combined into the business processes of the Web application system;

案例读取模块,用于读取预配置的测试案例,测试案例中记录了原子流程序列;The case reading module is used to read the pre-configured test case, and the atomic process sequence is recorded in the test case;

测试控制模块,用于对应所述序列中的每个原子流程,调用相应的测试构件,对Web应用系统进行测试。The test control module is used to correspond to each atomic process in the sequence, call the corresponding test component, and test the Web application system.

所述装置还包括:案例解析模块,用于预检所述读取的测试案例的数据是否符合规范,并检查所调用的测试构件是否存在。The device also includes: a case parsing module, used for pre-checking whether the data of the read test case conforms to the specification, and checking whether the called test component exists.

优选的,所述测试控制模块包括:测试单元,用于对应所述序列中的每个原子流程,调用相应的测试构件,对Web应用系统进行测试;控制单元,用于将测试构件执行返回值与预期结果比较,若相同,则触发所述测试单元执行下一个测试构件;若不相同,则执行下一个测试案例;记录单元,用于记录上述比较后的测试结果,并记录出错位置和相关数据。Preferably, the test control module includes: a test unit, used to correspond to each atomic process in the sequence, call the corresponding test component, and test the Web application system; a control unit, used to execute the test component to return a value Compared with the expected results, if they are the same, the test unit is triggered to execute the next test component; if not, the next test case is executed; the record unit is used to record the test results after the above comparison, and record the error location and related data.

所述装置还包括:测试结果分析模块,用于分析测试结果,生成测试报告。The device also includes: a test result analysis module for analyzing test results and generating test reports.

所述装置还包括:日志跟踪模块,用于跟踪记录每个测试步骤的执行情况。The device also includes: a log tracking module, used to track and record the execution of each test step.

一种自动化测试构件,包括:An automated testing component comprising:

构件实现,用于对应原子流程提供相应的测试功能;Component implementation, used to provide corresponding test functions corresponding to the atomic process;

接口,用于提供外部模块与构件实现之间的连接,外部模块通过所述接口调用构件实现,或者构件实现通过所述接口调用外部模块。The interface is used to provide a connection between the external module and the component implementation, and the external module calls the component implementation through the interface, or the component implementation calls the external module through the interface.

所述构件还包括:构件规约,用于提供对所述构件的说明。The component further includes: a component specification, which is used to provide a description of the component.

优选的,所述构件包括原子构件和复合构件,其中原子构件与原子流程对应,复合构件是多个原子构件的组合。Preferably, the component includes an atomic component and a composite component, wherein the atomic component corresponds to an atomic process, and the composite component is a combination of multiple atomic components.

根据本发明提供的具体实施例,本发明公开了以下技术效果:According to the specific embodiments provided by the invention, the invention discloses the following technical effects:

首先,将Web应用的复杂业务流程细化到最小单元,分解成多个相对独立的原子流程,各种业务流程是不同原子流程的组合。针对原子流程创建相应的自动化测试构件,在执行自动化测试案例时,根据案例中配置的原子流程序列动态调用与之对应的自动化测试构件,从而实现基于业务流程驱动的Web应用自动化测试。First, refine the complex business processes of Web applications to the smallest unit and decompose them into multiple relatively independent atomic processes. Various business processes are combinations of different atomic processes. Create corresponding automated test components for atomic processes. When executing automated test cases, the corresponding automated test components are dynamically invoked according to the sequence of atomic processes configured in the case, so as to realize automated testing of web applications driven by business processes.

所述基于构件的自动化测试方法,能够灵活适应各种复杂多变的业务流程的自动化测试,提高了测试程序的通用性,极大提高了自动化测试效率,减少了测试工作量;而且,由于将业务流程细化到原子流程,所以可以跟踪定位到出错的原子流程,及时发现错误点,提高测试效果。The component-based automated testing method can flexibly adapt to the automated testing of various complex and changeable business processes, improves the versatility of the testing program, greatly improves the efficiency of automated testing, and reduces the workload of testing; moreover, due to the The business process is subdivided into the atomic process, so the atomic process with errors can be tracked and located, the error point can be found in time, and the test effect can be improved.

其次,本方法基于标准的软件构件模型,提出了统一的自动化测试构件接口规范,使自动化测试构件易于移植、易于升级,可以将不同人员开发的构件轻易地进行移植,达到聚合更多的自动化测试构件资源的目的,大大提高自动化测试工具的开发维护效率和灵活性。Secondly, based on the standard software component model, this method proposes a unified automation test component interface specification, which makes the automation test components easy to transplant and upgrade, and the components developed by different personnel can be easily transplanted to achieve the aggregation of more automated tests The purpose of component resources is to greatly improve the efficiency and flexibility of the development and maintenance of automated testing tools.

再次,在测试执行过程中,如果原子流程的测试结果与预期结果不一致,将结束后续原子流程的执行,直接退出整个业务流程的测试。这样可以避免错误的测试结果数据在后续的测试过程中继续使用,而造成测试软件运行异常和错误,提高了测试的效率和系统的健壮性。Thirdly, during the test execution process, if the test result of the atomic process is inconsistent with the expected result, the execution of the subsequent atomic process will be terminated, and the test of the entire business process will be directly exited. In this way, the wrong test result data can be prevented from being continuously used in the subsequent test process, causing abnormal operation and errors of the test software, and improving the test efficiency and the robustness of the system.

附图说明 Description of drawings

图1是本发明实施例提供的自动化测试方法的步骤流程图;Fig. 1 is the flow chart of the steps of the automated testing method provided by the embodiment of the present invention;

图2是本发明以贷记调整业务为例的自动化测试方法流程图;Fig. 2 is the flow chart of the automated testing method of the present invention taking the credit adjustment business as an example;

图3是本发明实施例提供的一种自动化测试装置的结构图;Fig. 3 is a structural diagram of an automated testing device provided by an embodiment of the present invention;

图4是本发明实施例提供的一种自动化测试构件的结构图。Fig. 4 is a structural diagram of an automated testing component provided by an embodiment of the present invention.

具体实施方式 Detailed ways

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

本发明实施例提出一种基于构件的Web应用业务流程自动化测试方法。所述方法把Web应用的复杂业务分解成多个相对独立的原子流程,针对这些原子业务流程设计相对应的自动化测试构件,自动化测试工具在执行自动化测试案例时,根据案例中配置的原子业务流程序列动态调用与之对应的自动化测试构件,从而实现基于业务流程驱动的Web应用自动化测试。An embodiment of the present invention proposes a component-based automated testing method for a Web application business process. The method decomposes the complex business of the Web application into a plurality of relatively independent atomic processes, and designs corresponding automated test components for these atomic business processes. When the automated test tool executes the automated test case, it The sequence dynamically invokes the corresponding automated testing components, so as to realize the automated testing of Web applications driven by business processes.

在本发明实施例中,引入构件的概念,软件构件是面向软件体系架构的可复用软件模块,是一个带有规范化接口和显式上下文依赖的软件模块,能被独立发布并且可以被组装。构件应该易于通过参数化等方式在不同语境中进行配置,并能在不同的硬件运行平台和软件环境中工作。In the embodiment of the present invention, the concept of components is introduced. A software component is a software architecture-oriented reusable software module, a software module with standardized interfaces and explicit context dependencies, which can be released independently and assembled. Components should be easy to configure in different contexts through parameterization, and can work in different hardware operating platforms and software environments.

基于构件的自动化测试方法,是一种针对Web应用业务流程使用自动化测试构件组装测试的方法,将各个业务流程分解为原子流程之后,在配置测试案例时只需要简单地调用各个测试构件“组装”起来即可。例如,一个业务流程包括A、B、C、D四个子业务流程,测试人员为了全面覆盖测试该业务流程,可能需要测试到以下三个流程:A->B->C->D,A->B->D,A->C->D。如果采用现有技术所述的测试方法,测试工具需要分别对三个流程开发测试程序,当测试人员的需求发生改变,如需要测试另外一个流程A->D时,以前开发的测试程序就不能“随需应变”了。而本发明实施例基于构件的测试方法针对四个子业务流程,分别制作了相对应的自动化测试构件a、b、c、d,测试人员在测试时可以根据业务的需要把测试构件“组装”起来测试不同的业务流程。The component-based automated testing method is a method for assembling and testing web application business processes using automated test components. After decomposing each business process into atomic processes, you only need to simply call each test component "assembly" when configuring the test case Just get up. For example, a business process includes four sub-business processes A, B, C, and D. In order to fully cover and test the business process, testers may need to test the following three processes: A->B->C->D, A- >B->D, A->C->D. If the test method described in the prior art is adopted, the test tool needs to develop test programs for the three processes respectively. When the needs of the testers change, such as when another process A->D needs to be tested, the previously developed test program cannot "On Demand" too. However, the component-based testing method in the embodiment of the present invention aims at the four sub-business processes, respectively making corresponding automated testing components a, b, c, and d, and the testers can "assemble" the testing components according to the needs of the business during the test. Test different business processes.

在实际应用中,Web应用系统通常针对某类特殊业务,而处理同一类业务存在很多相同的基本操作,因此分解成最小单元的原子流程不仅适用于一个业务流程,也适用于该类业务的其他流程。基于所述原理,在设计自动化测试构件时,针对同一类业务模块创建可重复使用的测试构件,而不同的构件组合能够测试该业务的各种可能的业务流程。测试构件的设计对测试过程十分重要,因为可多次重复使用的构件,可提高自动化测试工具的开发维护效率和灵活性。In practical applications, web application systems usually target a certain type of business, and many of the same basic operations exist when dealing with the same type of business. Therefore, the atomic process decomposed into the smallest unit is not only applicable to one business process, but also applicable to other business processes of this type. process. Based on the above principles, when designing automated test components, reusable test components are created for the same type of business modules, and different component combinations can test various possible business processes of the business. The design of test components is very important to the testing process, because components that can be reused many times can improve the development and maintenance efficiency and flexibility of automated test tools.

下面详细说明调用测试构件对Web应用系统进行测试的过程。参照图1,是所述自动化测试方法的步骤流程图。The process of invoking the test component to test the Web application system will be described in detail below. Referring to Fig. 1, it is a flowchart of the steps of the automated testing method.

步骤101,配置测试案例。需要针对每个业务流程进行配置,因为测试案例完全与被测的业务流程相关,如果业务流程发生改变,测试案例也要进行相应修改。测试案例的主要数据结构如表1所示:Step 101, configure a test case. It needs to be configured for each business process, because the test case is completely related to the business process under test. If the business process changes, the test case should be modified accordingly. The main data structure of the test case is shown in Table 1:

  中文数据名称 Chinese data name   数据名称 data name   类型 type   长度 length   说明 illustrate   案例编号 case number   CaseID CaseID   整数自动编号 integer autonumber   4 4   测试案例的唯一编号 The unique number of the test case   所测模块 Tested module   TestModule TestModule   数字 number   4 4   外键关联到测试模块表 A foreign key is associated to the test module table   原子业务流程序列 Atomic Business Process Sequence   TestFlow TestFlow   文本 text   不限 Unlimited   该字段指明测试业务子流程的序列,它由原子业务流程的编号组成,这些编号通过分隔符间隔起来。 This field indicates the sequence of test business sub-processes, which consists of numbers of atomic business processes separated by separators.

 测试通过条件 Test pass condition   Expectation Expectation   文本 text   不限 Unlimited   各个原子业务流程对应的自动化测试构件在测试成功的情况下的返回值组成的序列,即期望值。 The sequence of return values of the automated test components corresponding to each atomic business process when the test is successful, that is, the expected value.  测试案例描述 Test case description   Description Description   文本 text   不限 Unlimited   对案例的描述 Description of the case  测试输入数据1 Test input data 1   Datal Datal   文本 text   不限 Unlimited   页面中需要输入的数据或案例参数 The data or case parameters that need to be entered on the page  …… ...  测试输入数据n Test input data n   Datal Datal   文本 text   不限 Unlimited   页面中需要输入的数据或案例参数 The data or case parameters that need to be entered on the page

表1测试案例的数据结构表Table 1 Data structure table of test cases

表1中,“案例编号”用于在测试执行过程中区别多个测试案例,“所测模块”表明被测试的Web应用系统中的业务模块,“原子业务流程序列”记录了被测试的业务流程所包含的原子业务流程及原子业务流程的执行顺序,“测试通过条件”用于与测试结果进行比较来发现Web应用系统中存在的问题。In Table 1, "case number" is used to distinguish multiple test cases during test execution, "tested module" indicates the business module in the tested Web application system, and "atomic business process sequence" records the tested business The atomic business process contained in the process and the execution sequence of the atomic business process, the "test pass condition" is used to compare with the test results to find the problems in the Web application system.

步骤102,读取测试案例。Step 102, read the test case.

优选步骤103,预检测试案例的数据是否符合规范,如果不符合规范则返回错误信息给测试人员;如果预检通过,则为测试案例的执行准备数据、申请资源等。The preferred step 103 is to pre-check whether the data of the test case conforms to the specification, and return an error message to the tester if it does not meet the specification; if the pre-check is passed, prepare data and apply for resources for the execution of the test case.

在预检时,首先检查测试案例的关键数据项的填写是否符合案例规范,例如表1中的各项是否按照各个字段的要求填写;其次需要转换原子业务流程的编号为构件的编号,并检查需要调用的自动化测试构件是否存在,如果存在则加载到内存中,准备执行,否则返回不符合规范的详细信息给测试人员。本步骤可以及时避免错误的测试案例数据进入测试环节,造成测试过程运行异常和错误。During the pre-check, first check whether the filling of the key data items of the test case conforms to the case specification, for example, whether the items in Table 1 are filled in according to the requirements of each field; secondly, it is necessary to convert the number of the atomic business process to the number of the component, and check Whether the automated test component that needs to be called exists, if it exists, it will be loaded into the memory and ready to be executed, otherwise, the detailed information that does not meet the specification will be returned to the tester. This step can prevent wrong test case data from entering the test link in time, causing abnormal operation and errors in the test process.

步骤104,根据测试案例配置的原子业务流程序列,依次调用匹配的自动化测试构件串行化执行,对Web应用系统的具体业务流程进行测试,并记录测试结果。Step 104: According to the atomic business process sequence configured in the test case, sequentially call the matching automated test components for serial execution, test the specific business process of the Web application system, and record the test results.

优选的,在测试过程中,每执行完一个原子业务流程,将相应测试构件的执行返回值与上述“测试通过条件”进行比较,如果相同,则继续测试下一个原子业务流程;如果不相同,则该原子业务流程出现问题,立即结束本次测试案例的执行。这样可以及时发现错误点,避免错误的测试结果数据在后续的测试过程中继续使用,而造成测试软件运行异常和错误;还可以及时发现Web应用系统的问题,并将具体原子业务流程的出错位置和相关数据记录下来,作为测试结果的一部分。Preferably, during the testing process, each time an atomic business process is executed, the execution return value of the corresponding test component is compared with the above-mentioned "test passing condition", and if they are the same, continue to test the next atomic business process; if they are not the same, If there is a problem with the atomic business process, the execution of this test case will be ended immediately. In this way, the error point can be found in time, and the wrong test result data can be prevented from being used continuously in the subsequent test process, resulting in abnormal operation and errors of the test software; it can also find the problem of the web application system in time, and the error location of the specific atomic business process and related data are recorded as part of the test results.

优选步骤105,对所述测试结果进行分析,统计其中的测试通过率等数据,并将分析统计结果按照指定格式组织成测试报告,输出给测试人员。The preferred step 105 is to analyze the test results, count the test pass rate and other data, and organize the analysis and statistics results into a test report according to the specified format, and output it to the testers.

优选的,在上述测试执行的整个过程中,跟踪记录每个测试步骤的执行情况,并生成日志文件,以备测试人员事后分析使用。例如根据测试报告记录的出错位置,通过查找日志文件更多的上下文信息,分析得到出错原因。Preferably, during the entire process of the above-mentioned test execution, the execution status of each test step is tracked and recorded, and log files are generated for use by testers for subsequent analysis. For example, according to the error location recorded in the test report, by looking for more contextual information in the log file, analyze the cause of the error.

下面通过一个详细的例子说明基于构件的自动化测试过程,本实施例中被测试的Web应用系统是内卡差错处理平台。The component-based automated testing process is described below through a detailed example. The tested Web application system in this embodiment is an internal card error handling platform.

本平台实现对收单机构(如POS机、ATM机)和发卡机构(如发卡银行)之间的取现、消费交易中存在错账的交易进行差错处理(账务调整)。平台功能:确认查询、贷记调整、一次退单等差错业务等。出现的差错可能是:持卡人在ATM上取款未吐钞,但持卡人账户已被扣账或持卡人在商户POS消费,POS显示交易不成功,但实际上已扣减持卡人账户余额等情况。对于每笔交易,发卡方均保留完整的原始交易数据,进行差错调整时,需要调用这些原始数据进行处理,以进行平帐和清算。This platform implements error processing (account adjustment) for cash withdrawal and consumption transactions between acquirers (such as POS machines, ATMs) and card issuers (such as card issuers). Platform functions: error services such as confirmation inquiry, credit adjustment, one-time chargeback, etc. The error may be: the cardholder does not dispense cash when withdrawing money at the ATM, but the cardholder's account has been debited, or the cardholder spends at the merchant's POS, and the POS shows that the transaction is unsuccessful, but the cardholder has actually been debited account balance etc. For each transaction, the card issuer retains complete original transaction data, and when making error adjustments, it needs to invoke these original data for processing to balance accounts and clear accounts.

以贷记调整业务为例,下面介绍具体的操作过程,当发生贷记差错时,首先由收单机构经办员登录差错处理平台,根据原交易数据(主账号、清算日期)查询出原始的用户交易数据,选择出有差错的交易,选择发起贷记调整申请,填写相关的申请信息,并提交申请,等待审核。复核员登录平台后,查询未复核的贷记申请,复核通过后,该笔差错交易数据记入数据库等待清算,完成贷记调整的操作过程。Taking the credit adjustment business as an example, the following describes the specific operation process. When a credit error occurs, first, the operator of the acquiring agency logs in to the error processing platform, and queries the original transaction data (main account number, settlement date) User transaction data, select the transaction with errors, choose to initiate a credit adjustment application, fill in the relevant application information, and submit the application, waiting for review. After the reviewer logs in to the platform, he inquires about the credit application that has not been reviewed. After the review is passed, the erroneous transaction data is entered into the database for liquidation, and the operation process of credit adjustment is completed.

贷记调整业务作为一个待测模块就是Web应用业务流程,它可以被分解为以下几个原子业务流程:收单机构经办员登录进入差错平台sf1、收单机构经办员查询出需要做贷记调整的历史交易sf2、收单机构经办员对查询出的交易发起贷记调整交易sf3、收单机构经办员退出差错平台sf4、收单机构复核员登录进入差错平台sf5、收单机构复核员查找到这笔贷记调整进行复核操作sf6、收单机构复核员撤销复核通过的交易sf7、收单机构复核员退出差错平台sf8、收单机构经办员修改复核未通过的交易sf9、收单机构经办员删除复核未通过的交易sf10。The credit adjustment business, as a module to be tested, is the business process of the Web application, which can be decomposed into the following atomic business processes: the agent of the acquiring institution logs into the error platform sf1, and the agent of the acquiring institution inquires that a loan needs to be made Historical transaction sf2 for debit adjustment, acquiring institution operator initiates credit adjustment transaction sf3 for the queried transaction, acquiring institution operator exits error platform sf4, acquirer reviewer logs in to error platform sf5, acquiring institution The reviewer finds out the credit adjustment and performs the review operation sf6, the reviewer of the acquirer cancels the transaction that passed the review sf7, the reviewer of the acquirer exits the error platform sf8, the operator of the acquirer modifies the transaction that failed the review sf9, The clerk of the acquirer deletes the transaction sf10 that fails the review.

经过分析,可以把sf1和sf5合并成一个登录差错平台的自动化测试构件c1,把sf4和sf8合并成一个退出差错平台的自动化测试构件c4,把sf2设计成构件c2,把sf3设计成构件c3,把sf6设计成构件c6,把sf7设计成构件c7,把sf9设计成构件c9,把sf10设计成构件c10。After analysis, sf1 and sf5 can be combined into an automated test component c1 that logs into the error platform, sf4 and sf8 can be combined into an automated test component c4 that exits the error platform, sf2 is designed as component c2, and sf3 is designed as component c3. Design sf6 as component c6, design sf7 as component c7, design sf9 as component c9, and design sf10 as component c10.

对于贷记调整业务的测试,现列举2个常见的测试案例,如表2所示。For the test of the credit adjustment business, two common test cases are listed, as shown in Table 2.

  案例名称 case name   原子业务流程序列 Atomic Business Process Sequence   说明 illustrate   Case1 Case1   sf1->sf2->sf3->sf4->sf5->sf6->sf8 sf1->sf2->sf3->sf4->sf5->sf6->sf8  测试贷记调整业务的常规流程(由经办员发起,复核员复核通过),转换为调用的构件序列为c1->c2->c3->c4->c1->c6->c4。注:两次调用c1和c4输入的参数不同。 The routine process of test credit adjustment business (initiated by the operator and passed by the reviewer), the component sequence converted to call is c1->c2->c3->c4->c1->c6->c4. Note: The parameters of the two calls to c1 and c4 are different.   Case2 Case2   sf1->sf2->sf3->sf4->sf5->sf7->sf8->sf1->sf9->sf4 sf1->sf2->sf3->sf4->sf5->sf7->sf8->sf1->sf9->sf4  该案例是一个异常案例,用于测试不经过复核就进行撤销的错误流程能否通过,如果该流程经过测试发现所有原子业务流程能够执行完成,说明差错平台是有错误的。转换为调用的构件序列是c1->c2->c3->c4->c1->c7->c4->c1->c9->c4。 This case is an abnormal case, which is used to test whether the error process of canceling without review can pass. If the process is tested and found that all atomic business processes can be executed, it means that the error platform is wrong. The building block sequence converted to calling is c1->c2->c3->c4->c1->c7->c4->c1->c9->c4.

表2贷记调整业务的测试案例表Table 2 Test case table for credit adjustment business

表2中,原子业务流程是根据具体业务分解成的最小业务流程单元,如本例中的sf1、sf3等等;原子业务流程序列是原子业务流程的测试执行序列,如本例中sf1->sf2->sf3->sf4->sf5->sf6->sf8。In Table 2, the atomic business process is the smallest business process unit decomposed according to the specific business, such as sf1, sf3, etc. in this example; the atomic business process sequence is the test execution sequence of the atomic business process, such as sf1-> in this example sf2->sf3->sf4->sf5->sf6->sf8.

参照图2,是本发明以贷记调整业务为例的自动化测试方法流程图。Referring to FIG. 2 , it is a flow chart of the automatic testing method of the present invention taking the credit adjustment business as an example.

步骤201,读取所有的测试案例,进行数据规范的检查,并检查需要调用的测试构件是否存在。如果通过检查,则继续步骤202;否则,结束本案例的测试,将错误信息返回给测试人员。Step 201, read all the test cases, check the data specification, and check whether the test components that need to be invoked exist. If the check is passed, continue to step 202; otherwise, end the test of this case, and return the error message to the tester.

步骤202,为测试案例的执行准备数据。根据具体的测试案例,准备相应的测试输入数据。Step 202, preparing data for the execution of the test case. According to the specific test case, prepare the corresponding test input data.

步骤203,根据原子业务流程序列,判断所有的原子业务流程是否测试完毕,如果没有,继续步骤204;如果全部测试完毕,则跳转到步骤207,记录全部的测试结果。Step 203, according to the atomic business process sequence, judge whether all atomic business processes have been tested, if not, continue to step 204; if all tests are completed, jump to step 207, and record all test results.

步骤204,为待测试的原子业务流程准备测试构件的参数。本例中,构件c1对应两个原子业务流程sf1和sf5,在案例1中被两次调用,但调用构件c1的原子业务流程不同,因此需要向构件c1传递不同的参数,来执行不同的原子业务流程。Step 204, preparing the parameters of the test component for the atomic business process to be tested. In this example, component c1 corresponds to two atomic business processes sf1 and sf5, which are called twice in case 1, but the atomic business processes calling component c1 are different, so different parameters need to be passed to component c1 to execute different atomic processes Business Process.

步骤205,调用相应的自动化测试构件,向构件传递相应的参数,对原子业务流程进行测试。Step 205, calling the corresponding automated test component, passing corresponding parameters to the component, and testing the atomic business process.

步骤206,获得所述自动化测试构件的执行返回值,检查是否与预期值相符,如果相符,返回步骤203,继续下一个原子业务流程的测试;如果不符,则结束当前测试案例的执行,执行步骤207,将出错位置和相关数据记录下来。Step 206, obtain the execution return value of the automated test component, check whether it matches the expected value, if it matches, return to step 203, and continue the test of the next atomic business process; if not, end the execution of the current test case, and execute the step 207. Record the error location and related data.

步骤207,记录测试结果,并生成测试报告,一个测试案例执行结束。其中,所述测试结果包括测试成功次数、失败次数、出错位置、错误原因代码等信息。In step 207, test results are recorded and a test report is generated, and the execution of a test case ends. Wherein, the test result includes information such as the number of successful tests, the number of failed tests, error locations, and error reason codes.

步骤208,判断测试案例是否全部执行完毕,若还有其他案例,则返回到步骤202,开始下一个测试案例的执行;如果所有测试案例已全部执行,则结束本次运行。Step 208, judge whether all the test cases have been executed, if there are other cases, return to step 202, start the execution of the next test case; if all the test cases have been executed, end this run.

针对所述基于构件的自动化测试方法,本发明实施例还提供了一种Web应用系统的自动化测试装置。参照图3,是所述装置的结构图,主要包括自动化测试构件库301、案例读取模块302和测试控制模块303。For the component-based automated testing method, the embodiment of the present invention also provides an automated testing device for a Web application system. Referring to FIG. 3 , it is a structural diagram of the device, which mainly includes an automated test component library 301 , a case reading module 302 and a test control module 303 .

所述自动化测试构件库301是自动化测试构件的一个集合,该集合把构件的描述部分进行结构化存储,便于测试人员和自动化测试工具的模块根据各种条件检索自动化测试构件。并且,自动化测试构件库301也给测试人员提供了自动化测试构件维护升级的功能。其中,每个测试构件对应原子业务流程而创建,不同的测试构件组合用于测试不同的业务流程。一个测试构件可能对应一个原子业务流程,也可能对应多个原子业务流程,如果对应多个,则通过接收不同的参数赋值来测试不同的原子业务流程。The automated test component library 301 is a collection of automated test components, which store the description part of the components in a structured manner, so that testers and automated test tool modules can retrieve automated test components according to various conditions. Moreover, the automated test component library 301 also provides testers with the function of maintaining and upgrading the automated test components. Among them, each test component is created corresponding to the atomic business process, and different test component combinations are used to test different business processes. A test component may correspond to one atomic business process, or may correspond to multiple atomic business processes. If it corresponds to more than one, different atomic business processes are tested by receiving different parameter assignments.

案例读取模块302用于读取预先配置的测试案例,送到测试控制模块303执行。测试控制模块303用于调度测试案例的执行,根据测试案例中的原子业务流程序列,从自动化测试构件库301中调用相应的测试构件,串行化测试原子业务流程,并记录测试结果。The case reading module 302 is used to read pre-configured test cases and send them to the test control module 303 for execution. The test control module 303 is used to schedule the execution of test cases, call the corresponding test components from the automated test component library 301 according to the sequence of atomic business processes in the test cases, serialize the test atomic business processes, and record the test results.

优选的,所述测试控制模块303包括测试单元、控制单元和记录单元。其中,测试单元用于对应每个原子业务流程,从自动化测试构件库301中调用相匹配的测试构件,对Web应用系统的具体业务流程进行测试。控制单元对整个流程中的案例执行、测试构件调用等起到调度作用,当接收到测试单元发送的构件执行返回值后,将所述返回值与测试案例中记录的预期值进行比较,若相符,则触发测试单元调用构件继续执行下一个原子业务流程;若不相符,则结束当前测试案例的执行,并触发记录单元将出错位置和相关数据记录下来。当所有的原子业务流程都测试完毕后,控制单元调度下一个测试案例进行测试。所述记录单元用于在测试案例执行完毕后记录每个构件执行的测试结果,并将上述与预期值的比较结果作为测试结果的一部分,测试结果中还包括出错位置和相关数据。Preferably, the test control module 303 includes a test unit, a control unit and a recording unit. Wherein, the test unit is used to correspond to each atomic business process, call the matching test component from the automated test component library 301, and test the specific business process of the Web application system. The control unit plays a role in scheduling case execution and test component invocation in the whole process. After receiving the component execution return value sent by the test unit, it compares the return value with the expected value recorded in the test case, and if it matches , then trigger the test unit to call the component to continue to execute the next atomic business process; if not, end the execution of the current test case, and trigger the recording unit to record the error location and related data. When all atomic business processes are tested, the control unit schedules the next test case for testing. The recording unit is used to record the test result executed by each component after the test case is executed, and take the comparison result with the expected value as a part of the test result, and the test result also includes error location and related data.

优选的,所述装置还包括测试结果分析模块304,用于对测试控制模块303得到的测试结果进行分析统计,并按照指定格式生成测试报告。Preferably, the device further includes a test result analysis module 304, configured to analyze and count the test results obtained by the test control module 303, and generate a test report according to a specified format.

优选的,所述装置还包括案例解析模块305,用于检查测试案例的数据是否符合案例规范,并将原子业务流程的编号转换为测试构件编号,检查自动化测试构件库301中是否存在需要调用的测试构件编号。若通过检查,则触发所述测试控制模块303,否则将出错信息返回给测试人员。Preferably, the device also includes a case analysis module 305, which is used to check whether the data of the test case conforms to the case specification, and converts the number of the atomic business process into a test component number, and checks whether there is a need to call in the automated test component library 301. Test build number. If the check is passed, the test control module 303 is triggered, otherwise an error message is returned to the tester.

优选的,所述装置还包括日志跟踪模块306,用于跟踪记录所述案例读取模块302、测试控制模块303、测试结果分析模块304和案例解析模块305的执行,并生成日志文件,以备测试人员事后分析使用。例如根据测试报告记录的出错位置,通过查找日志文件更多的上下文信息,分析得到出错原因。Preferably, the device also includes a log tracking module 306, which is used to track and record the execution of the case reading module 302, test control module 303, test result analysis module 304 and case analysis module 305, and generate log files for future use. Testers analyze usage after the fact. For example, according to the error location recorded in the test report, by looking for more contextual information in the log file, analyze the cause of the error.

优选的,所述装置还包括案例配置模块,用于针对Web应用系统的业务特点,从系统所有可能执行的业务流程来配置各种测试案例,达到全面测试Web应用系统的目的。测试案例的主要数据结构可参照表1所示。Preferably, the device further includes a case configuration module, which is used to configure various test cases from all possible business processes executed by the system according to the business characteristics of the Web application system, so as to achieve the purpose of comprehensively testing the Web application system. The main data structure of the test case can be shown in Table 1.

所述自动化测试装置的执行过程是:在接收到测试人员发出的测试执行指令后,案例读取模块302开始读取测试案例,然后由案例解析模块305对案例数据进行检查,如果预检通过,则为测试案例的执行准备数据、申请资源等操作,一切准备完毕之后将控制权交由测试控制模块303继续处理。测试控制模块303按照测试案例的顺序依次执行各个测试案例,在执行单个测试案例时,根据案例解析模块305转换后的构件序列,依次从自动化测试构件库301调用自动化测试构件执行。在获得自动化测试构件的执行返回值后,检查是否与“测试通过条件”字段中预期的值相同,如果相同则继续执行下一个自动化测试构件,否则直接返回测试结果,包括出错的原子业务流程所处位置和出错原因。待所有的原子业务流程测试完成之后,测试控制模块303记录测试结果,测试结果分析模块304对测试结果进行分析后生成测试报告,然后进入下一个测试案例的测试执行环节。The execution process of the automated testing device is: after receiving the test execution instruction sent by the tester, the case reading module 302 starts to read the test case, and then the case analysis module 305 checks the case data, if the pre-check passes, Prepare data, apply for resources, and other operations for the execution of the test case. After all preparations are completed, the control right is handed over to the test control module 303 for further processing. The test control module 303 executes each test case sequentially according to the order of the test cases. When executing a single test case, according to the sequence of components converted by the case analysis module 305, it sequentially calls the automated test component library 301 for execution. After obtaining the execution return value of the automated test component, check whether it is the same as the expected value in the "test passing condition" field, if it is the same, continue to execute the next automated test component, otherwise directly return the test result, including the error caused by the atomic business process location and cause of error. After all atomic business process tests are completed, the test control module 303 records the test results, and the test result analysis module 304 generates a test report after analyzing the test results, and then enters the test execution link of the next test case.

本发明实施例还提供了一种具有统一的接口规范、易于移植、易于升级的自动化测试构件,用于上述的自动化测试装置中,并且能够在不同的硬件运行平台和软件环境中工作。The embodiment of the present invention also provides an automated testing component with uniform interface specifications, easy to transplant, and easy to upgrade, which is used in the above-mentioned automated testing device and can work in different hardware operating platforms and software environments.

参照图4,是所述自动化测试构件的结构图,所述构件包括接口401、构件实现402和构件规约403。接口401提供了外部模块与构件实现402之间的连接,外部模块通过所述接口调用构件实现,或者构件实现通过所述接口调用外部模块。在测试执行时,测试控制模块303就是通过所述接口401来调用构件实现402进行测试的。构件实现402对应原子业务流程,提供相应的测试功能,是自动化测试构件所实现的测试对应的原子业务流程的测试程序,它是自动化测试构件的核心。构件规约403是对自动化测试构件的结构规定约束,它的主要作用是指明该构件的结构和描述,是用xml技术实现的。构件规约403可以理解为对构件的说明,便于测试人员查找和掌握每个构件的相关信息。Referring to FIG. 4 , it is a structural diagram of the automated test component, and the component includes an interface 401 , a component implementation 402 and a component specification 403 . The interface 401 provides the connection between the external module and the component implementation 402, the external module calls the component implementation through the interface, or the component implementation calls the external module through the interface. When the test is executed, the test control module 303 calls the component implementation 402 through the interface 401 to perform the test. Component implementation 402 corresponds to the atomic business process and provides corresponding testing functions. It is the test program of the atomic business process implemented by the automated test component and is the core of the automated test component. The component specification 403 specifies the constraints on the structure of the automated test component, and its main function is to specify the structure and description of the component, which is realized by xml technology. Component specification 403 can be understood as a description of components, which is convenient for testers to find and grasp the relevant information of each component.

下表是构件规约中对构件描述部分的主要元素及其说明:The following table is the main elements and descriptions of the component description part in the component specification:

  元素名称 element name   说明 illustrate   id id   构件编号,构件的唯一标识 Component number, the unique identification of the component   name name   构件的名称 The name of the component   type type   构件的类型,标识该构件是原子构件还是复合构件 The type of component, which identifies whether the component is an atomic component or a composite component   related-component related-component   该元素表示与当前构件相关联的构件,只有当type为复合构件时,该元素的内容才有意义 This element represents the component associated with the current component, and the content of this element is meaningful only when the type is a composite component   source source   构件的来源,即为什么生产该构件 The source of the component, i.e. why the component was produced   age age   构件的生命期,说明构件的成熟度和稳定性 Component life cycle, indicating the maturity and stability of the component   web-application web-application   自动化测试构件所测试的应用系统名称 The name of the application system tested by the automated test component   module module   构件所测试的业务模块名称 The name of the business module tested by the component   flow flow   构件所对应的原子业务流程名称 The name of the atomic business process corresponding to the component   function-description function-description   对构件的所测试功能的描述 A description of the tested functionality of the component   version version   构件的版本 The version of the component   history history   构件的历史,主要包括版本变更历史 Component history, mainly including version change history   author author   构件的作者或厂商 The author or vendor of the component   memo memo   构件的备注说明 Component Remarks

表3构件规约中对构件描述部分的说明表Table 3 Explanation of the component description part in the component specification

自动化测试构件分为原子自动化测试构件和复合自动化测试构件,所述原子自动化测试构件的构件规约部分需要标明该构件是原子自动化测试构件,并描述该构件的功能、版本号等等信息;复合自动化测试构件的构件规约部分需要标明该构件是复合自动化测试构件并描述该构件的功能、版本号等等信息之外,还需要说明该复合构件是由哪些原子构件组成,这些原子构件的组成顺序,以及各个原子构件的映射等。Automated test components are divided into atomic automated test components and composite automated test components. The component specification part of the atomic automated test component needs to indicate that the component is an atomic automated test component, and describe the function, version number, etc. of the component; composite automated test components The component specification part of the test component needs to indicate that the component is a composite automated test component and describe the function, version number and other information of the component, and also need to indicate which atomic components the composite component is composed of, and the composition sequence of these atomic components. And the mapping of each atomic component, etc.

为了说明原子构件和复合构件,现以贷记调整业务为例,上面提及的各个自动化测试构件c1、c2、c3、c4......都是原子自动化测试构件,它们对应实现了最小的原子业务流程。但是在很多情况下,为了某个固定的常见业务流程,例如经办员发起贷记调整到复核员复合通过这个常见的测试流程,在实际中使用率又非常高,就可以把原子自动化测试构件c1->c2->c3->c4->c1->c6->c4组合起来做成一个复合构件,在每次执行构件序列c1->c2->c3->c4->c1->c6->c4时,直接调用相应的复合构件即可。这样就避免了因为构件把业务流程都分散成原子业务流程而带来的多次调用原子构件的缺点,从而提高了测试效率。In order to illustrate atomic components and composite components, the credit adjustment business is taken as an example. The above-mentioned automated test components c1, c2, c3, c4... are all atomic automated test components, and they correspond to the minimum atomic business process. However, in many cases, for a fixed common business process, such as the operator initiates a credit adjustment to the reviewer to pass this common test process, and the usage rate is very high in practice, the atomic automated test component can be used c1->c2->c3->c4->c1->c6->c4 are combined to form a composite component, and each execution component sequence c1->c2->c3->c4->c1->c6- > c4, just call the corresponding composite component directly. In this way, the shortcoming of calling atomic components many times due to components dispersing business processes into atomic business processes is avoided, thereby improving test efficiency.

图3、图4所示装置中未详述的部分可以参见图1、图2所示方法的相关部分,为了篇幅考虑,在此不再详述。The parts not detailed in the apparatus shown in Fig. 3 and Fig. 4 can refer to the relevant parts of the method shown in Fig. 1 and Fig. 2 , and will not be described in detail here for the sake of space.

以上对本发明所提供的一种Web应用系统的自动化测试方法及装置,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处。综上所述,本说明书内容不应理解为对本发明的限制。The above is a detailed introduction to the automated testing method and device of a Web application system provided by the present invention. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The descriptions of the above embodiments are only used to help Understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims (14)

1, a kind of automated testing method of Web application system is characterized in that, comprising:
The operation flow of Web application system is resolved into the combination of atom flow process;
Corresponding each atom flow process is created the automatic test member;
Read pre-configured test cases, write down atomic current program row in the test cases;
Each atom flow process in the corresponding described sequence is called corresponding test member, and the Web application system is tested.
2, method according to claim 1 is characterized in that, also comprises before calling test member: whether the data of the described test cases that reads of preliminary examination compliant, and checks whether the test member of being called exists.
3, method according to claim 1 is characterized in that, also comprises:
Test member is carried out rreturn value and expected results comparison,, then carry out next test member if identical; If inequality, then write down Error Location and related data, and carry out next test cases;
Write down the test result after the above-mentioned comparison.
4, method according to claim 3 is characterized in that, also comprises: analyze described test result, generate test report.
5, method according to claim 1 is characterized in that, also comprises: the implementation status of each execution in step of track record.
6, method according to claim 1 is characterized in that, also comprises: the test member that common operation flow is comprised is combined into composite component, directly calls described composite component when calling.
7, a kind of automatic test device of Web application system is characterized in that, comprising:
The automatic test component base is the set of automatic test member, and the corresponding atom flow process of each test member is created, and the atom flow process is combined into the operation flow of Web application system;
The case read module is used to read pre-configured test cases, has write down atomic current program row in the test cases;
Testing control module is used for each atom flow process of corresponding described sequence, calls corresponding test member, and the Web application system is tested.
8, device according to claim 7 is characterized in that, also comprises: the case parsing module, whether the data that are used for the described test cases that reads of preliminary examination compliant, and checks whether the test member of being called exists.
9, device according to claim 7 is characterized in that, described testing control module comprises:
Test cell is used for each atom flow process of corresponding described sequence, calls corresponding test member, and the Web application system is tested;
Control module is used for that test member is carried out rreturn value and expected results compares, if identical, then trigger described test cell and carries out next test member; If inequality, then carry out next test cases;
Record cell is used to write down the test result after the above-mentioned comparison, and record Error Location and related data.
10, device according to claim 9 is characterized in that, also comprises: the test result analysis module, be used for the analytical test result, and generate test report.
11, device according to claim 7 is characterized in that, also comprises: the log tracks module is used for the implementation status of each testing procedure of track record.
12, a kind of automatic test member is characterized in that, comprising:
Member realizes that being used for corresponding atom flow process provides corresponding test function;
Interface, being connected between being used to external module is provided and member is realized, external module realizes that by described interface interchange member perhaps member is realized by described interface interchange external module.
13, member according to claim 12 is characterized in that, also comprises: component specification is used to provide the explanation to described member.
14, member according to claim 12 is characterized in that: described member comprises atom member and composite component, and wherein the atom member is corresponding with the atom flow process, and composite component is the combination of a plurality of atom members.
CN200710043589A 2007-07-06 2007-07-06 Web application system automatized test method and apparatus Active CN101339532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710043589A CN101339532B (en) 2007-07-06 2007-07-06 Web application system automatized test method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710043589A CN101339532B (en) 2007-07-06 2007-07-06 Web application system automatized test method and apparatus

Publications (2)

Publication Number Publication Date
CN101339532A true CN101339532A (en) 2009-01-07
CN101339532B CN101339532B (en) 2012-09-05

Family

ID=40213603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710043589A Active CN101339532B (en) 2007-07-06 2007-07-06 Web application system automatized test method and apparatus

Country Status (1)

Country Link
CN (1) CN101339532B (en)

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101860627A (en) * 2010-05-25 2010-10-13 中兴通讯股份有限公司 Service management method of access gateway and access gateway
CN101866313A (en) * 2009-04-17 2010-10-20 埃森哲环球服务有限公司 exchangeable application components
CN101977132A (en) * 2010-11-18 2011-02-16 北京航空航天大学 Switching network virtual link traffic control function testing device
CN102289365A (en) * 2010-06-21 2011-12-21 中兴通讯股份有限公司 Method and device for constructing script driving software
CN101526919B (en) * 2009-04-29 2011-12-28 福建星网锐捷网络有限公司 Method for generating script files to test Web application software and device thereof
CN102622292A (en) * 2011-01-27 2012-08-01 中国人民解放军63928部队 Web application function testing method based on standardized testing language
CN102799960A (en) * 2012-06-18 2012-11-28 北京大学 Parallel operation flow anomaly detection method oriented to data model
CN103049371A (en) * 2012-11-07 2013-04-17 青岛海信传媒网络技术有限公司 Testing method and testing device of Android application programs
CN103810094A (en) * 2012-11-14 2014-05-21 中国农业银行股份有限公司 Executing method and device for test case and test tool
CN104408657A (en) * 2014-11-21 2015-03-11 深圳市银雁金融配套服务有限公司 Business data processing method and device
WO2015039566A1 (en) * 2013-09-22 2015-03-26 Tencent Technology (Shenzhen) Company Limited Method and system for facilitating automated web page testing
CN104866422A (en) * 2015-05-20 2015-08-26 中国互联网络信息中心 Web Service automatic test system and method
CN105407012A (en) * 2015-10-27 2016-03-16 浪潮(北京)电子信息产业有限公司 Automatic test method and device
CN105930259A (en) * 2015-12-23 2016-09-07 中国银联股份有限公司 Method and apparatus for WEB regression testing
CN106789393A (en) * 2016-11-16 2017-05-31 武汉烽火网络有限责任公司 A kind of CS frameworks communication equipment automatization test system and method
CN107038117A (en) * 2017-03-23 2017-08-11 北京工业大学 It is a kind of based on the web automated testing methods that reference is defined between event handling function
CN107329891A (en) * 2017-06-06 2017-11-07 千寻位置网络有限公司 Automation regression testing method based on structural data and REST interfaces
CN107656872A (en) * 2017-10-09 2018-02-02 平安普惠企业管理有限公司 Method for testing software, device, equipment and computer-readable storage medium
CN107729019A (en) * 2017-10-09 2018-02-23 平安普惠企业管理有限公司 Method, apparatus, equipment and the computer-readable storage medium of version deployment
CN107861879A (en) * 2017-11-28 2018-03-30 成都视达科信息技术有限公司 A kind of method and system for realizing software automated testing
CN108228443A (en) * 2016-12-14 2018-06-29 北京国双科技有限公司 A kind of test method and device of web applications
CN108334336A (en) * 2017-10-10 2018-07-27 平安普惠企业管理有限公司 Atomic operation automated method, system, device and computer storage media
CN108984385A (en) * 2017-06-05 2018-12-11 北京星河泰视特科技有限公司 A kind of dynamic testing method and system
CN109032941A (en) * 2018-07-20 2018-12-18 郑州云海信息技术有限公司 The sustainable integrated interface automated testing method and system of test case driving
CN109947642A (en) * 2019-02-28 2019-06-28 中国银行股份有限公司 Automated hierarchical test method based on case classification, apparatus and system
CN110908900A (en) * 2019-11-11 2020-03-24 神华粤电珠海港煤炭码头有限责任公司 Method and device for analyzing PLC program by applying key frame deduction method
CN111309636A (en) * 2020-05-14 2020-06-19 炬星科技(深圳)有限公司 Robot automation test system, method, construction server and storage medium
CN111930606A (en) * 2019-05-13 2020-11-13 阿里巴巴集团控股有限公司 Automatic generation method of data processing flow test report and related device
CN113434221A (en) * 2021-07-22 2021-09-24 武汉中科医疗科技工业技术研究院有限公司 Software automatic operation method, device, system and server equipment
CN113568827A (en) * 2021-06-18 2021-10-29 北京房江湖科技有限公司 Component user interface testing method, device, electronic device and storage medium
CN114238356A (en) * 2021-12-21 2022-03-25 建信金融科技有限责任公司 Test case snapshot generation method, device, equipment and readable storage medium
CN115309644A (en) * 2022-08-09 2022-11-08 中国银行股份有限公司 Method and device for testing query page
CN115509946A (en) * 2022-10-27 2022-12-23 成都泰瑞通信设备检测有限公司 Computer network software testing system and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100347682C (en) * 2004-12-08 2007-11-07 上海科泰世纪科技有限公司 Automatic detection building method
CN1955945A (en) * 2005-10-25 2007-05-02 国际商业机器公司 Method and device for automatic generating test executive routine sequence of software test process

Cited By (44)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866313B (en) * 2009-04-17 2015-08-19 埃森哲环球服务有限公司 Exchangeable application components
CN101866313A (en) * 2009-04-17 2010-10-20 埃森哲环球服务有限公司 exchangeable application components
CN101526919B (en) * 2009-04-29 2011-12-28 福建星网锐捷网络有限公司 Method for generating script files to test Web application software and device thereof
CN101860627A (en) * 2010-05-25 2010-10-13 中兴通讯股份有限公司 Service management method of access gateway and access gateway
CN102289365A (en) * 2010-06-21 2011-12-21 中兴通讯股份有限公司 Method and device for constructing script driving software
CN101977132A (en) * 2010-11-18 2011-02-16 北京航空航天大学 Switching network virtual link traffic control function testing device
CN101977132B (en) * 2010-11-18 2013-04-03 北京航空航天大学 Switching network virtual link traffic control function testing device
CN102622292A (en) * 2011-01-27 2012-08-01 中国人民解放军63928部队 Web application function testing method based on standardized testing language
CN102799960A (en) * 2012-06-18 2012-11-28 北京大学 Parallel operation flow anomaly detection method oriented to data model
CN102799960B (en) * 2012-06-18 2016-06-08 北京大学 The concurrent service flow process method for detecting abnormality of data-orlented model
CN103049371A (en) * 2012-11-07 2013-04-17 青岛海信传媒网络技术有限公司 Testing method and testing device of Android application programs
CN103810094A (en) * 2012-11-14 2014-05-21 中国农业银行股份有限公司 Executing method and device for test case and test tool
CN103810094B (en) * 2012-11-14 2016-10-05 中国农业银行股份有限公司 Execution method, device and the testing tool of a kind of test cases
WO2015039566A1 (en) * 2013-09-22 2015-03-26 Tencent Technology (Shenzhen) Company Limited Method and system for facilitating automated web page testing
CN104408657A (en) * 2014-11-21 2015-03-11 深圳市银雁金融配套服务有限公司 Business data processing method and device
CN104866422A (en) * 2015-05-20 2015-08-26 中国互联网络信息中心 Web Service automatic test system and method
CN105407012A (en) * 2015-10-27 2016-03-16 浪潮(北京)电子信息产业有限公司 Automatic test method and device
CN105930259A (en) * 2015-12-23 2016-09-07 中国银联股份有限公司 Method and apparatus for WEB regression testing
CN105930259B (en) * 2015-12-23 2018-10-16 中国银联股份有限公司 A kind of method and apparatus of WEB regression tests
CN106789393A (en) * 2016-11-16 2017-05-31 武汉烽火网络有限责任公司 A kind of CS frameworks communication equipment automatization test system and method
CN106789393B (en) * 2016-11-16 2019-09-06 烽火通信科技股份有限公司 A kind of CS framework communication equipment automatization test system and method
CN108228443A (en) * 2016-12-14 2018-06-29 北京国双科技有限公司 A kind of test method and device of web applications
CN107038117A (en) * 2017-03-23 2017-08-11 北京工业大学 It is a kind of based on the web automated testing methods that reference is defined between event handling function
CN107038117B (en) * 2017-03-23 2020-11-06 北京工业大学 Web automatic testing method based on definition-reference between event processing functions
CN108984385B (en) * 2017-06-05 2022-07-08 北京星河泰视特科技有限公司 Dynamic testing method and system
CN108984385A (en) * 2017-06-05 2018-12-11 北京星河泰视特科技有限公司 A kind of dynamic testing method and system
CN107329891A (en) * 2017-06-06 2017-11-07 千寻位置网络有限公司 Automation regression testing method based on structural data and REST interfaces
CN107729019A (en) * 2017-10-09 2018-02-23 平安普惠企业管理有限公司 Method, apparatus, equipment and the computer-readable storage medium of version deployment
CN107656872A (en) * 2017-10-09 2018-02-02 平安普惠企业管理有限公司 Method for testing software, device, equipment and computer-readable storage medium
CN107656872B (en) * 2017-10-09 2020-09-29 平安普惠企业管理有限公司 Software testing method, device, equipment and computer storage medium
CN108334336A (en) * 2017-10-10 2018-07-27 平安普惠企业管理有限公司 Atomic operation automated method, system, device and computer storage media
CN107861879A (en) * 2017-11-28 2018-03-30 成都视达科信息技术有限公司 A kind of method and system for realizing software automated testing
CN109032941A (en) * 2018-07-20 2018-12-18 郑州云海信息技术有限公司 The sustainable integrated interface automated testing method and system of test case driving
CN109947642A (en) * 2019-02-28 2019-06-28 中国银行股份有限公司 Automated hierarchical test method based on case classification, apparatus and system
CN111930606A (en) * 2019-05-13 2020-11-13 阿里巴巴集团控股有限公司 Automatic generation method of data processing flow test report and related device
CN110908900A (en) * 2019-11-11 2020-03-24 神华粤电珠海港煤炭码头有限责任公司 Method and device for analyzing PLC program by applying key frame deduction method
CN111309636A (en) * 2020-05-14 2020-06-19 炬星科技(深圳)有限公司 Robot automation test system, method, construction server and storage medium
CN113568827A (en) * 2021-06-18 2021-10-29 北京房江湖科技有限公司 Component user interface testing method, device, electronic device and storage medium
CN113434221A (en) * 2021-07-22 2021-09-24 武汉中科医疗科技工业技术研究院有限公司 Software automatic operation method, device, system and server equipment
CN113434221B (en) * 2021-07-22 2024-05-24 武汉中科医疗科技工业技术研究院有限公司 Software automation operation method, device, system and server equipment
CN114238356A (en) * 2021-12-21 2022-03-25 建信金融科技有限责任公司 Test case snapshot generation method, device, equipment and readable storage medium
CN114238356B (en) * 2021-12-21 2024-12-10 建信金融科技有限责任公司 Test case snapshot generation method, device, equipment and readable storage medium
CN115309644A (en) * 2022-08-09 2022-11-08 中国银行股份有限公司 Method and device for testing query page
CN115509946A (en) * 2022-10-27 2022-12-23 成都泰瑞通信设备检测有限公司 Computer network software testing system and method

Also Published As

Publication number Publication date
CN101339532B (en) 2012-09-05

Similar Documents

Publication Publication Date Title
CN101339532A (en) An automated testing method and device for a web application system
CN101135989B (en) Method and device for automated testing of a web application system
CN100395724C (en) A testing method and system for a graphical user interface
US7895470B2 (en) Collecting and representing knowledge
US7203928B2 (en) Method and system for generating and maintaining uniform test results
Mariani et al. Dynamic detection of cots component incompatibility
EP2133795A1 (en) System and method for testing a software product
US20050223360A1 (en) System and method for providing a generic user interface testing framework
CN112699055B (en) Software automatic test method and system with lower maintenance cost
CN100375057C (en) An automated test auxiliary system and corresponding software automatic test method
US20080313208A1 (en) Apparatus, system, and method for automated context-sensitive message organization
EP2557499A1 (en) A system and method for automatic impact variable analysis and field expansion in mainframe systems
US20050229161A1 (en) Generic user interface testing framework with load-time libraries
CN117370217B (en) Automatic interface test result generation method based on python
EP2913757A1 (en) Method, system, and computer software product for test automation
Blanco Practical OpenTelemetry
CN112131116A (en) Automatic regression testing method for embedded software
US20050228644A1 (en) Generic user interface testing framework with rules-based wizard
CN111881056A (en) Automatic test framework and test method
CN113742249B (en) Test script granulation method and system based on desktop operating system
CN119829454A (en) Browser automatic test method, system, terminal equipment and storage medium
KR100969877B1 (en) Quality Test Automation System
CN118378719B (en) A method for building a machine learning workflow
Sneed et al. The design and use of WSDL‐Test: a tool for testing Web services
TWI414995B (en) Development and execution platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant