CN102622292A - Web application function testing method based on standardized testing language - Google Patents
Web application function testing method based on standardized testing language Download PDFInfo
- Publication number
- CN102622292A CN102622292A CN201110029531XA CN201110029531A CN102622292A CN 102622292 A CN102622292 A CN 102622292A CN 201110029531X A CN201110029531X A CN 201110029531XA CN 201110029531 A CN201110029531 A CN 201110029531A CN 102622292 A CN102622292 A CN 102622292A
- Authority
- CN
- China
- Prior art keywords
- web
- test
- testing
- pages
- language
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention relates to a web application function testing method based on a standardized testing language. A testing device adopted in the method is an external computer system. The method comprises the following steps: Web page content testing; Web session management testing and Web usage scenario testing. The technical scheme can not only test basic Web application functions, but also test interaction-involved complex functions of Web application session management and usage scenario, and can effectively solve the problems of Web application function testing and testing reuse.
Description
Technical field
The present invention relates to a kind of method for testing software, specifically relate to a kind of Web application function method of testing based on the standardized test language.
Background technology
The major technique of existing Web application testing is much the same with traditional software testing technology, is divided into static test and dynamic test.Static test refers to not working procedure, through manual work or instrument program and document is carried out the mistake of analytical review to exist in the discovery procedure.It comprises that code inspection, code are looked into, desktop analysis, static analysis and Technical Review.Dynamic test refers to through manual work or the mistake of instrument working procedure to exist in the discovery procedure.Dynamic test comprises test (Black-box Testing) based on stipulations, based on the test (grey box test) that combines with stipulations of the test (white-box testing) of program and program.
Existing Web application testing method and model mainly contain expansion control current test model, object oriented test model.
Expansion control current test method has used the thought of OO test structure and some Design Modes to support the test that Web uses, and adapts to the new features that Web uses.The control current test is a kind of basic path testing method, uses flow graph to come the control stream of descriptive system.Module in the corresponding program of each node among the figure generates the test path set according to flow graph, and then selects suitable input, satisfies certain coverage rate.This method uses the control flow graph of expansion to express the contact of inter-entity in the Web application.In the control flow graph of expansion three kinds of elements being arranged, is respectively node, limit and branch.Node is represented a html file or script file.Branch is divided into user branch and program branches, and the branch that produces is selected by the user by user branch according to the needs of oneself; Program branches is to be brought in by server according to user's input information to select the next one should be redirected to which node.The limit is divided into three kinds, is respectively hyperlink limit, HTTP redirection limit and inline limit.Hyperlink limit user selects the hyperlink in the page to produce; To be server be redirected to another page according to user's input on the HTTP redirection limit produces; Inline limit shows the relation between the inside modules.
The object oriented test model had both been considered the expression of the static structure of application software, had considered the expression of dynamic interaction and behavior again, and model is divided into object, behavior, three parts of structure.Wherein, object model on the basis that original UML representes, has been introduced four kinds of new relations to the characteristics of Web application software, is used for describing the relation between the web page and the assembly; Behavior model has been supported the test of the state dependent behavior between the navigation test and the page; Structural model has been expanded traditional data current test skill, applies it to web test, obtains traffic flow information through different flow graphs, and other control flow graph of various levels is used for finding the definition-use chain of the variable of customer terminal webpage script and serve end program.
The Web application software is compared with traditional software; Have many singularity, show distributed multi-layer framework, realize that technical sophistication is various, constituent is complicated, user distribution and enormous amount, running environment isomery are various, operational process has and has characteristics distributed, concurrent, dynamic, real-time, interactive on uncertainty, the operating mechanism.These distinguishing features that Web uses are for test brings huge challenge and difficulty, show that content measurement is many, technical sophistication, lack document, be difficult to clear and definite testing requirement, the EOT condition is difficultly confirmed, regression test is frequent, it is high to test risk.
Summary of the invention
The purpose of this invention is to provide a kind of Web application function method of testing, make the tester design Web application testing use-case by enough standard testing language TTCN-3, solve Web application function test problem and test and reuse problem based on the standardized test language.
The present invention adopts following technical proposals to realize the object of the invention:
A kind of Web application function method of testing based on the standardized test language, its improvements are that the proving installation that said method is used is an external computer system; Said method comprises the steps:
A, the Web content of pages is tested;
B, the Web session management is tested;
C, Web is used scrnario testing;
In the said steps A, said test comprises the steps to the Web content of pages:
A) data type of using with the said Web content of pages test of standardized test language definition;
B) with said standardized test language template instantiation Web content of pages test data type, obtain said Web content of pages test data;
C) the said Web content of pages test case of definition is called Web content of pages trial function, realizes said Web content of pages behavioral test;
Among the said step B, said test comprises the steps to the Web session management:
1) basic operation that utilizes standardized test language modeling user capture Web to use, the realization analog subscriber is striden the operation behavior of the page;
2) utilize the value of standardized test language to operate, realize that the maintenance customer strides the test data of the page;
Among the said step C, saidly use scene to comprise basic stream and alternative flows to Web, said Web uses scrnario testing to comprise the steps:
1. utilize said basic stream of standardized test language description and alternative flows;
2. generate the different Web use scene of at least one through combination different elementary streams and alternative flows;
3. each that travels through that each Web uses scene flows and alternative flows basically, accomplishes the test that Web uses scene.
A kind of optimized technical scheme provided by the invention is: said Web content of pages test data type comprises Web address style, hyperlink type, form types, Web request type and Web respond style; Said instantiation comprises address and the instantiation expection Web response results that the tested Web of instantiation uses.
Second optimized technical scheme provided by the invention is: said operation behavior comprises certain page of input network address visit, clicks hyperlink another page of visit on the page and clicks list submit button submission form; The Web response message that said value operation receives is saved in a self-defining outcome variable; The user is accession page between session, calls value operational access or new variables more, realizes striding during the conversation test maintenance of page test data.
Compared with prior art, the beneficial effect that reaches of the present invention is:
The invention property ground in the software test field, has been expanded TTCN-3 Language Application scope with the TTCN-3 language application, adopts standard testing language TTCN-3 to carry out the Web application testing, has following advantage:
1, method provided by the invention has standardization, reusable advantage; Because the TTCN-3 language is a kind of international standard, adopt the test case of this language design, do not rely on hardware platform, operating system, programming language; Effectively having separated Test Design realizes with test; And considered the reusability that test case designs, and utilize methods maximization tests such as function parameterization, template parameterization, test case parametrization to reuse, have good reusability;
2, compare with method with existing test model; Method provided by the invention can not only be tested Web effectively and used basic function; Can also test the Web application session management, use scene to relate to mutual sophisticated functions, can effectively find basic and deep-seated problem of overall importance.
Embodiment
Specify embodiment of the present invention below in conjunction with specific embodiment.
A kind of Web application function method of testing based on the standardized test language provided by the invention is divided into the test of Web content of pages, the test of Web session management, three levels of Web use scrnario testing with the test of Web application function, and three levels to the Web application function provide the process that adopts standardized test language TTCN-3 to test respectively.
A kind of standardized Web application function method of testing provided by the invention comprises the steps:
(1) Web content of pages test: Web uses mainly based on http protocol, and the user submits the HTTP request to through browser, and server process user's request is also returned http response, that is to say in the function quintessence of Web application to realize through HTTP message.The content of pages test checks just whether the HTTP message content is consistent with designing requirement, whether correct;
(2) Web session management test: because http protocol is stateless, for preserving user session state, Web uses and adopts Cookies, Session variable, Application variable method; The session management test promptly is whether the realization of inspection Web application session management correlation function is correct;
(3) Web uses scrnario testing: except the test of basic functions such as content of pages, session management; More deep functional test often need be considered complicated application scenarios; Use scene to make up all kinds of basic functions often and realize more complicated more comprehensive function; Use scrnario testing most important for the investigation of Web using integral function, Web using integral function can disclose the critical software defective of the influence overall situation.
Embodiment 1
Web application function method of testing with based on standardized test language TTCN-3 is an example, specifies Web content of pages test of the present invention:
The test of Web content of pages
The content of pages that Web uses has polytype, and content of pages comprises basic character string text, form types, form types, form types, hyperlink type and picture, audio frequency and video and animation multimedia type.The present invention only considers the type that HTML is relevant, does not consider the test of content of multimedia.The test of Web content of pages is whether the checking web content is consistent with the expection content.
The test of Web content of pages may further comprise the steps:
A) data type that adopts the test of standardized test language TTCN-3 definition Web content of pages to use, the data type that the test of Web content of pages is used comprises Web address style, hyperlink type, form types, Web request type and Web respond style;
B) adopt TTCN-3 template instances test data type, obtain test data, for example the address of the tested Web application of instantiation, expection Web response results;
C) definition content of pages test case is called trial function, realizes behavioral test.
Test with content of text, list content is an example below, introduces the Web content of pages method of testing of using TTCN-3:
(1) content of text test
Adopt TTCN-3 template instances test data type, obtain test data;
The tested Web of the instantiation address of using at first;
Follow instantiation expection Web response results;
Define the content of text trial function then;
If the behavioral test of trial function is the Web response message that returns and the template match messages of expection, and then the test judgement result is for passing through, otherwise is to fail.
(2) list content test
List is commonly used to collect user profile, and the list content test is whether each input domain of checking list is correctly accepted and the explicit user input; The list test process is following:
At first use the element instantiation form types in title, method, action and each territory of tested list, the form data of definition expectation;
Define list content test use-case then;
If each territory coupling of the list content of list content that receives and expectation is judged that this use-case passes through, otherwise is not passed through.
Embodiment 2
Web application function method of testing with based on standardized test language TTCN-3 is an example, specifies Web session management test of the present invention:
The test of Web session management
Because http protocol is stateless, Web is applied as to the user and provides personalized service, and need safeguard the session status of different user.The Web application session management is often realized through Cookies, Session variable, Application variable method, its essence is to administer and maintain the visit data that the user strides a plurality of pages.Therefore the session management test mainly is correctness, the consistance that the checking user strides the visit data of the page; The key that realizes the test of Web application session management is that analog subscriber is striden the operation behavior of the page and the test data that the maintenance customer strides the page.Web session management testing procedure is following:
A) basic operation that utilizes TTCN-3 modeling user capture Web to use, the realization analog subscriber is striden the operation behavior of the page; The user uses the Web application, and operation behavior comprises certain page of input network address visit, clicks another page of hyperlink visit, click list submit button submission form on the page;
B) utilize the value of TTCN-3 to operate, realize that the maintenance customer strides the test data of the page; The value operation is saved in a self-defining outcome variable with the Web response message that receives; The user visits a series of pages between session, can repeatedly call the value operational access or upgrade this variable, thereby stride the maintenance of page test data during the realization conversation test.
Embodiment 3
Web application function method of testing with based on standardized test language TTCN-3 is an example, specifies Web of the present invention and uses scrnario testing:
Web uses scrnario testing
The utilization scene can systematically be described function point or the operation flow used, covers application demand more completely, thereby improves test coverage; Use scene to comprise basic stream and alternative flows; Using the implementation step of scrnario testing method based on the Web of TTCN-3 is to utilize TTCN-3 to describe basic stream and alternative flows; Generate different Web through combination different elementary streams and alternative flows and use scene, each that travels through each scene flows the test with this scene of alternative flows completion basically.
Benq uses the scrnario testing method in the Web of TTCN-3 the example of in a Taobao, buying books, and table 1 has shown the basic stream and the alternative flows of buying books.
Basic stream of table 1 and alternative flows
Should be noted that at last: combine the foregoing description technical scheme of the present invention only to be described but not its restriction.Under the those of ordinary skill in field be to be understood that: those skilled in the art can specific embodiments of the invention make amendment or are equal to replacement, but these modifications or change are all among the claim protection domain that application is awaited the reply.
Claims (3)
1. the Web application function method of testing based on the standardized test language is characterized in that the proving installation that said method is used is an external computer system; Said method comprises the steps:
A, the Web content of pages is tested;
B, the Web session management is tested;
C, Web is used scrnario testing;
In the said steps A, said test comprises the steps to the Web content of pages:
A) data type of using with the said Web content of pages test of standardized test language definition;
B) with said standardized test language template instantiation Web content of pages test data type, obtain said Web content of pages test data;
C) the said Web content of pages test case of definition is called Web content of pages trial function, realizes said Web content of pages behavioral test;
Among the said step B, said test comprises the steps to the Web session management:
1) basic operation that utilizes standardized test language modeling user capture Web to use, the realization analog subscriber is striden the operation behavior of the page;
2) utilize the value of standardized test language to operate, realize that the maintenance customer strides the test data of the page;
Among the said step C, saidly use scene to comprise basic stream and alternative flows to Web, said Web uses scrnario testing to comprise the steps:
1. utilize said basic stream of standardized test language description and alternative flows;
2. generate the different Web use scene of at least one through combination different elementary streams and alternative flows;
3. each that travels through that each Web uses scene flows and alternative flows basically, accomplishes the test that Web uses scene.
2. a kind of Web application function method of testing as claimed in claim 1 based on the standardized test language; It is characterized in that said Web content of pages test data type comprises Web address style, hyperlink type, form types, Web request type and Web respond style; Said instantiation comprises address and the instantiation expection Web response results that the tested Web of instantiation uses.
3. a kind of Web application function method of testing as claimed in claim 1 based on the standardized test language; It is characterized in that said operation behavior comprises certain page of input network address visit, clicks hyperlink another page of visit on the page and clicks list submit button submission form; The Web response message that said value operation receives is saved in a self-defining outcome variable; The user is accession page between session, calls value operational access or new variables more, realizes striding during the conversation test maintenance of page test data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110029531XA CN102622292A (en) | 2011-01-27 | 2011-01-27 | Web application function testing method based on standardized testing language |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110029531XA CN102622292A (en) | 2011-01-27 | 2011-01-27 | Web application function testing method based on standardized testing language |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102622292A true CN102622292A (en) | 2012-08-01 |
Family
ID=46562219
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110029531XA Pending CN102622292A (en) | 2011-01-27 | 2011-01-27 | Web application function testing method based on standardized testing language |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102622292A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104360942A (en) * | 2014-11-07 | 2015-02-18 | 电信科学技术第十研究所 | Form test computer realization method, computer and system |
CN104468275A (en) * | 2014-12-18 | 2015-03-25 | 辽宁生产力促进中心 | Industrial cluster creative platform testing device and method |
CN106575248A (en) * | 2014-05-18 | 2017-04-19 | 周凯 | Performance testing system and method |
CN107870854A (en) * | 2016-09-27 | 2018-04-03 | 北京京东尚科信息技术有限公司 | Chart storehouse data accuracy method of testing and test device |
CN111858380A (en) * | 2020-07-31 | 2020-10-30 | 北京字节跳动网络技术有限公司 | Model construction method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6249882B1 (en) * | 1998-06-15 | 2001-06-19 | Hewlett-Packard Company | Methods and systems for automated software testing |
CN101339532A (en) * | 2007-07-06 | 2009-01-07 | 中国银联股份有限公司 | Web application system automatized test method and apparatus |
-
2011
- 2011-01-27 CN CN201110029531XA patent/CN102622292A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6249882B1 (en) * | 1998-06-15 | 2001-06-19 | Hewlett-Packard Company | Methods and systems for automated software testing |
CN101339532A (en) * | 2007-07-06 | 2009-01-07 | 中国银联股份有限公司 | Web application system automatized test method and apparatus |
Non-Patent Citations (1)
Title |
---|
施寅生等: "基于TTCN-3的Web应用功能测试方法", 《计算机应用》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106575248A (en) * | 2014-05-18 | 2017-04-19 | 周凯 | Performance testing system and method |
CN104360942A (en) * | 2014-11-07 | 2015-02-18 | 电信科学技术第十研究所 | Form test computer realization method, computer and system |
CN104468275A (en) * | 2014-12-18 | 2015-03-25 | 辽宁生产力促进中心 | Industrial cluster creative platform testing device and method |
CN107870854A (en) * | 2016-09-27 | 2018-04-03 | 北京京东尚科信息技术有限公司 | Chart storehouse data accuracy method of testing and test device |
CN107870854B (en) * | 2016-09-27 | 2020-06-30 | 北京京东尚科信息技术有限公司 | Method and device for testing data accuracy of chart library |
CN111858380A (en) * | 2020-07-31 | 2020-10-30 | 北京字节跳动网络技术有限公司 | Model construction method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105335293B (en) | A kind of automatization test system and method based on interface concurrent | |
Butkiewicz et al. | Understanding website complexity: measurements, metrics, and implications | |
Mariani et al. | Compatibility and regression testing of COTS-component-based software | |
Zhang et al. | Compatibility testing service for mobile applications | |
US8819638B2 (en) | Application protoyping suite | |
US20060168115A1 (en) | Method and system of encapsulating web site transactions for computer-aided generation of web services | |
CN112104709B (en) | Intelligent contract processing method, device, medium and electronic equipment | |
Zarrad et al. | Evaluating network test scenarios for network simulators systems | |
CN104639653A (en) | Self-adaptive method and system based on cloud architecture | |
CN105159833A (en) | Automatic testing device and method | |
CN108388515A (en) | Test data generating method, device, equipment and computer readable storage medium | |
CN105912473A (en) | BDD-based mobile APP automatic testing platform and testing method | |
CN109032917A (en) | Page adjustment method and system, mobile terminal and computer end | |
CN102622292A (en) | Web application function testing method based on standardized testing language | |
CN110347378A (en) | The building method and device of item development environment | |
Akour et al. | Mobile software testing: Thoughts, strategies, challenges, and experimental study | |
CN110780856A (en) | Electricity consumption data publishing platform based on micro-service | |
CN107122307B (en) | Internet of things execution system | |
Khaliluzzaman et al. | Pre and post controller based MVC architecture for web application | |
CN113778897A (en) | Automatic test method, device, equipment and storage medium of interface | |
CN103186384A (en) | Business-component-oriented software designing and analyzing system and using method thereof | |
Martín et al. | Guidance for the development of accessibility evaluation tools following the unified software development process | |
Patel et al. | Designing an Enhanced Simulation Module for Multimedia Transmission Over Wireless Standards | |
EP2721494B1 (en) | System and method to in-line script dependencies | |
CN113469740A (en) | Advertisement data acquisition method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20120801 |