CN104572466A - Automatic testing method and device - Google Patents

Automatic testing method and device Download PDF

Info

Publication number
CN104572466A
CN104572466A CN201510015320.9A CN201510015320A CN104572466A CN 104572466 A CN104572466 A CN 104572466A CN 201510015320 A CN201510015320 A CN 201510015320A CN 104572466 A CN104572466 A CN 104572466A
Authority
CN
China
Prior art keywords
test
flow process
script
node
flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510015320.9A
Other languages
Chinese (zh)
Inventor
刘长威
温凤龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201510015320.9A priority Critical patent/CN104572466A/en
Publication of CN104572466A publication Critical patent/CN104572466A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides an automatic testing method and an automatic testing device. The automatic testing method and the automatic testing device can test a flow type system, and additionally can clearly present test results of all flow nodes. The automatic testing method includes: saving a plurality of testing scripts corresponding to a plurality of testing nodes, which are used in a flow path; sequentially running the plurality of the testing scripts corresponding to the plurality of the testing nodes according to the flow path, and then verifying running results of the testing scripts.

Description

Automated testing method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of automated testing method and device.
Background technology
Automatic test is a very important link in current software testing quality system, is supplementary effectively to of original pure manual function test.Usually, after devising functional test use-case and pass through evaluation, manually perform test by tester step by step according to the code described in functional test use-case, actual result and expected result are compared.In the process, in order to save manpower, time or hardware resource, improve testing efficiency, just the concept of automatic test is introduced, that is: by automation tools or automatized script, functional test use-case is converted into automatic test cases, a kind of process being converted into machine execution with the behavioral test artificially driven.
According to system architecture, automated testing method is divided, be broadly divided into: interface level automatic test, page-level automatic test and background task level automatic test, according to the own characteristic of different system, select corresponding automated testing method.The automatic test scheme of above three types, although the bottom automated test frame used is different, all follows several processes as shown in Figure 1 usually.Fig. 1 is the schematic diagram of the general step according to automatic test of the prior art, illustrated therein is automatic test demand analysis, automated test frame type selecting, automatic test cases arranges, automatic test script writes, the five steps such as automatic test project operation.
For existing automated testing method, usually different automated test frame can be selected according to system own characteristic, but for complex structure, the system that process is stronger, usually one of them aspect is just selected to carry out automatic test at present, as: page-level, interface level or background task level, namely select multi-level multifaceted automatic test scheme.Inventor is realizing finding in process of the present invention, and the above-mentioned way of prior art is relatively independent for the automated testing method of each aspect of each rank, lacks contact each other.And a lot of system presents obvious process at present, the multi-level multifaceted automatic test scheme of above-mentioned selection is difficult to systematically test macro operation flow, and can not present each flow nodes test result clearly.
Summary of the invention
In view of this, the invention provides a kind of automated testing method and device, the test of system can be carried out the system of process; The test result of each flow nodes can be presented in addition clearly.
For achieving the above object, according to an aspect of the present invention, a kind of automated testing method is provided.
Automated testing method of the present invention comprises: preserve the multiple test scripts corresponding to multiple test node in flow process; Run described multiple test node test script successively according to described flow process, then the operation result of test script is verified.
Alternatively, the method also comprises: the process flow diagram showing described flow process in man-machine interface; After the step that the operation result of test script is verified, also comprise: on described process flow diagram, according to the correctness of test script operation result corresponding to test node, show each test node with different colors.
Alternatively, before preserving the step of the multiple test scripts corresponding to multiple test node in flow process, also comprise: preserve the multiple test nodes in described flow process.
Alternatively, the step running described multiple test node test script according to described flow process successively comprises: preserve automatic testing process running example, comprise described multiple test node in this example; Start and run described example.
According to a further aspect in the invention, a kind of automatic test device is provided.
Automatic test device of the present invention comprises: flow process script customized module, for preserving the multiple test scripts corresponding to multiple test node in flow process; Flow process script runs module, for running described multiple test node test script successively according to described flow process; Result of flow correction verification module, for verifying the operation result of test script.
Alternatively, also comprise result of flow display module, for: the process flow diagram showing described flow process in man-machine interface; On described process flow diagram, according to the correctness of test script operation result corresponding to each test node, show each test node with different colors.
Alternatively, also comprise flow definition module, before preserving described test script at described flow process script customized module, preserve multiple test nodes that described flow process is divided.
Alternatively, described flow process script run module also for: preserve automatic testing process running example, in this example, comprise multiple test node; Start and run described example.
According to technical scheme of the present invention, write test script according to the test node in tested flow process, perform these test scripts successively by flow process, the test of orderly, the system to flow process can be realized.At the process flow diagram of man-machine interface flow for displaying, and show the state of the test result of test node, tester can be made intuitively, clearly to fully understand the test case of whole flow process.
Accompanying drawing explanation
Accompanying drawing is used for understanding the present invention better, does not form inappropriate limitation of the present invention.Wherein:
Fig. 1 is the schematic diagram of the general step according to automatic test of the prior art;
Fig. 2 is the schematic diagram of a kind of preferred steps according to the embodiment of the present invention;
Fig. 3 is a kind of process flow diagram in man-machine interface display;
Fig. 4 is the schematic diagram of the main modular of automatic test device according to the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, one exemplary embodiment of the present invention is explained, comprising the various details of the embodiment of the present invention to help understanding, they should be thought it is only exemplary.Therefore, those of ordinary skill in the art will be appreciated that, can make various change and amendment, and can not deviate from scope and spirit of the present invention to the embodiments described herein.Equally, for clarity and conciseness, the description to known function and structure is eliminated in following description.
In embodiments of the present invention, corresponding to each test node, write multiple test script in advance, each test script is used for test test node respectively; Then press the test script corresponding to each test node of process flow operation, the test of system can be carried out flow process, that is can be not limited to the test of the single aspects such as page-level, interface level or background task level.Fig. 2 is the schematic diagram of a kind of preferred steps according to the embodiment of the present invention.
Step S21: preserve multiple test nodes that flow process is divided.For the flow process of a business, in general flow nodes and therefrom selection function test point can be divided by more than a kind of mode, tester, by being familiar with operation flow, Carding Function test point, selects to need the flow nodes of carrying out testing as test node.The test of following steps is that the test node preserved according to this step carries out, and different flow nodes that is can be selected neatly to test as test node.
Step S22: preserve the multiple test scripts corresponding to multiple test node in flow process.According to the test node selected in step S21, tester can write corresponding test script, that is has relation one to one between test node and test script.
Step S23: according to flow process, runs above-mentioned multiple test scripts successively.Because one_to_one corresponding between test script and test node, and there is between test node the context according to flow process, so test script runs successively, and successively draw operation result.Tester can set up different automatic testing process running examples, can comprise different test nodes in each example, starts and runs this example, namely testing these flow nodes.Like this, after once having tested, can a newly-built running example, the test node wherein comprised is that test last time finds vicious node, so just without the need to again testing correct flow nodes, raising testing efficiency.
Step S24: the operation result of test script is verified.In the present embodiment, a kind of process flow diagram preferably showing above-mentioned flow process in man-machine interface.Process flow diagram such as shown in Fig. 3, Fig. 3 is a kind of process flow diagram in man-machine interface display.According to the test node that tester selects, draw the line between node and node according to flow process thus obtain process flow diagram.Because for an operation flow, dividing mode, the selection mode of node can have multiple, therefore press the scheme of the present embodiment, multiple process flow diagram can be drawn out, each process flow diagram, as a test case, realizes customization automatic testing process figure, flow process is carried out to the test of various ways.Fig. 3 is only a kind of example, wherein includes 6 test nodes 31 to 36, also has several decision node to draw conditional branching in addition in flow process.So just can be whether correct according to the check results in step S24, with the corresponding test node (step S25) of different colours display man-machine interface.Operation result such as the test script of test node 32 carries out verifying rear discovery operation result mistake, just by shown in red for test node 32 (representing with thick black solid line in figure).As check results is correct, corresponding test node still shows with default color.
Because the method for the present embodiment is the order according to flow process, each test node testing results script is tested, so the test result of the multiple nodes in flow process can be obtained; On the other hand as business flow process can show intuitively, systematically, so the test result of wherein each node can be shown in the flow process demonstrated further by the mode of the present embodiment, make the development situation that tester is convenient, be well understood to operation system.
Fig. 4 is the schematic diagram of the main modular of automatic test device according to the embodiment of the present invention.As shown in Figure 4, the automatic test device 40 of the embodiment of the present invention mainly comprises flow process script customized module 41, flow process script runs module 42 and result of flow correction verification module 43.Flow process script customized module 41 is for preserving the multiple test scripts corresponding to multiple test node in flow process; Flow process script runs module 42 for running multiple test node test script successively according to this flow process; Result of flow correction verification module 43 is for verifying the operation result of test script.
Automatic test device 40 also can comprise result of flow display module (not shown), for the process flow diagram of flow for displaying in man-machine interface; And on this process flow diagram, according to the correctness of test script operation result corresponding to each test node, show each test node with different colors.
Automatic test device 40 also can comprise flow definition module (not shown), before preserving test script at flow process script customized module 41, preserves the multiple test nodes divided flow process.
Flow process script runs module 42 and also can be used for preserving automatic testing process running example, comprises multiple test node in this example; And start and run this example.
According to the technical scheme of the embodiment of the present invention, write test script according to the test node in tested flow process, perform these test scripts successively by flow process, the test of orderly, the system to flow process can be realized.At the process flow diagram of man-machine interface flow for displaying, and show the state of the test result of test node, tester can be made intuitively, clearly to fully understand the test case of whole flow process.
Below describe ultimate principle of the present invention in conjunction with specific embodiments, in apparatus and method of the present invention, obviously, each parts or each step can decompose and/or reconfigure.These decompose and/or reconfigure and should be considered as equivalents of the present invention.Further, the step performing above-mentioned series of processes can order naturally following the instructions perform in chronological order, but does not need necessarily to perform according to time sequencing.Some step can walk abreast or perform independently of one another.
Above-mentioned embodiment, does not form limiting the scope of the invention.It is to be understood that depend on designing requirement and other factors, various amendment, combination, sub-portfolio can be there is and substitute in those skilled in the art.Any amendment done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within scope.

Claims (8)

1. an automated testing method, is characterized in that, comprising:
Preserve the multiple test scripts corresponding to multiple test node in flow process;
Run described multiple test node test script successively according to described flow process, then the operation result of test script is verified.
2. method according to claim 1, is characterized in that,
The method also comprises: the process flow diagram showing described flow process in man-machine interface;
After the step that the operation result of test script is verified, also comprise: on described process flow diagram, according to the correctness of test script operation result corresponding to test node, show each test node with different colors.
3. method according to claim 1 and 2, is characterized in that, before preserving the step of the multiple test scripts corresponding to multiple test node in flow process, also comprises: preserve the multiple test nodes in described flow process.
4. method according to claim 1 and 2, is characterized in that, the step running described multiple test node test script according to described flow process successively comprises:
Preserve automatic testing process running example, in this example, comprise described multiple test node;
Start and run described example.
5. an automatic test device, is characterized in that, comprising:
Flow process script customized module, for preserving the multiple test scripts corresponding to multiple test node in flow process;
Flow process script runs module, for running described multiple test node test script successively according to described flow process;
Result of flow correction verification module, for verifying the operation result of test script.
6. device according to claim 5, is characterized in that, also comprises result of flow display module, for:
Man-machine interface shows the process flow diagram of described flow process;
On described process flow diagram, according to the correctness of test script operation result corresponding to each test node, show each test node with different colors.
7. the device according to claim 5 or 6, is characterized in that, also comprises flow definition module, before preserving described test script at described flow process script customized module, preserves the multiple test nodes divided described flow process.
8. the device according to claim 5 or 6, is characterized in that, described flow process script run module also for:
Preserve automatic testing process running example, in this example, comprise multiple test node;
Start and run described example.
CN201510015320.9A 2015-01-13 2015-01-13 Automatic testing method and device Pending CN104572466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510015320.9A CN104572466A (en) 2015-01-13 2015-01-13 Automatic testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510015320.9A CN104572466A (en) 2015-01-13 2015-01-13 Automatic testing method and device

Publications (1)

Publication Number Publication Date
CN104572466A true CN104572466A (en) 2015-04-29

Family

ID=53088598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510015320.9A Pending CN104572466A (en) 2015-01-13 2015-01-13 Automatic testing method and device

Country Status (1)

Country Link
CN (1) CN104572466A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144618A (en) * 2018-09-10 2019-01-04 中铝视拓智能科技有限公司 A kind of service flow execution method and relevant apparatus
CN110347590A (en) * 2019-06-18 2019-10-18 平安普惠企业管理有限公司 The interface testing control method and device of operation system
CN113467859A (en) * 2021-06-15 2021-10-01 惠州市德赛西威汽车电子股份有限公司 Dynamic execution method based on action script and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010011370A1 (en) * 1998-09-03 2001-08-02 Elsa L. Gunter Interactive software testing system and method
CN103530231A (en) * 2013-10-12 2014-01-22 北京京东尚科信息技术有限公司 Application program testing method and system based on service process control
CN103595819A (en) * 2013-11-26 2014-02-19 蓝盾信息安全技术股份有限公司 Method for online testing service usability of web system
CN103885883A (en) * 2014-04-10 2014-06-25 国家电网公司 Method for real-time display of test procedure by means of network diagram

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010011370A1 (en) * 1998-09-03 2001-08-02 Elsa L. Gunter Interactive software testing system and method
CN103530231A (en) * 2013-10-12 2014-01-22 北京京东尚科信息技术有限公司 Application program testing method and system based on service process control
CN103595819A (en) * 2013-11-26 2014-02-19 蓝盾信息安全技术股份有限公司 Method for online testing service usability of web system
CN103885883A (en) * 2014-04-10 2014-06-25 国家电网公司 Method for real-time display of test procedure by means of network diagram

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144618A (en) * 2018-09-10 2019-01-04 中铝视拓智能科技有限公司 A kind of service flow execution method and relevant apparatus
CN110347590A (en) * 2019-06-18 2019-10-18 平安普惠企业管理有限公司 The interface testing control method and device of operation system
CN113467859A (en) * 2021-06-15 2021-10-01 惠州市德赛西威汽车电子股份有限公司 Dynamic execution method based on action script and storage medium
CN113467859B (en) * 2021-06-15 2024-04-09 惠州市德赛西威汽车电子股份有限公司 Dynamic execution method based on action script and storage medium

Similar Documents

Publication Publication Date Title
CN106294120B (en) Method, apparatus and computer program product for testing code
CN106708718B (en) Service framework interface test method and device
CN106095677B (en) The RESTful Webservice automatic interface testing methods realized based on Robot Framework
CN108415830B (en) Method and device for generating software test case
CN106980571B (en) Method and equipment for constructing test case suite
CN104881364A (en) Automated testing method and system applied to Android system
CN105243016B (en) The methods, devices and systems being monitored to the terminal device on test platform
CN107861876A (en) Method of testing, device, computer equipment and readable storage medium storing program for executing
US11736365B2 (en) System and method for network management automation
CN104778118B (en) The improved method of automatization testing technique
US20160359687A1 (en) System and method for network management automation
CN104572466A (en) Automatic testing method and device
CN107015902B (en) Test method and test equipment
CN110287104A (en) Method for generating test case, device, terminal and computer readable storage medium
CN108170602B (en) Test case generation method and device, terminal and computer readable medium
CN110515843B (en) Test case priority ordering method based on defect set and inverted index
CN105739481B (en) The test method of industrial control software, apparatus and system
CN103885883A (en) Method for real-time display of test procedure by means of network diagram
CN107066376A (en) A kind of automatic test verification method tested for GUI
CN111078526A (en) Test case generation method and device and storage medium
CN110597728A (en) Method, device and system for constructing test data
CN107919998B (en) Sensor server function testing method and system based on JMeter
CN107451063B (en) Script testing method and device
CN112783775B (en) Special character input testing method and device
CN111897725B (en) Automatic test method, medium, equipment and system for middle platform service

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150429

RJ01 Rejection of invention patent application after publication