CN101876936A - Service test method - Google Patents
Service test method Download PDFInfo
- Publication number
- CN101876936A CN101876936A CN2009102298809A CN200910229880A CN101876936A CN 101876936 A CN101876936 A CN 101876936A CN 2009102298809 A CN2009102298809 A CN 2009102298809A CN 200910229880 A CN200910229880 A CN 200910229880A CN 101876936 A CN101876936 A CN 101876936A
- Authority
- CN
- China
- Prior art keywords
- test
- testing
- class
- service
- principle
- 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
- 238000010998 test method Methods 0.000 title claims abstract description 17
- 238000012360 testing method Methods 0.000 claims abstract description 103
- 238000000034 method Methods 0.000 claims abstract description 60
- 238000011161 development Methods 0.000 claims abstract description 17
- 238000013459 approach Methods 0.000 claims description 6
- 238000011990 functional testing Methods 0.000 claims description 6
- 230000008859 change Effects 0.000 claims description 3
- 230000006872 improvement Effects 0.000 claims description 3
- 238000005259 measurement Methods 0.000 claims description 2
- 230000009466 transformation Effects 0.000 description 8
- 238000013142 basic testing Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000007667 floating Methods 0.000 description 2
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000007493 shaping process Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides a service test method, which comprises the following testing content and steps of: 1) establishing a testing environment; 2) establishing a test principle; 3) determining a tested object; 4) developing a test program; 5) running a test; 6) examining a test result; and 7) modifying a service program. The method can load service application program components and resources in an environment without a server and a world wide web container, quickly establish an object by using a data exchange language, efficiently perform testing, debugging and breakpoint tracking on service codes of each layer of an application program, and improve the code quality, the correctness and the development efficiency.
Description
Technical field
The present invention relates to a kind of service test method, specifically a kind of fast, effectively, be independent of the testing tool and the method for testing of server and WWW container, in order to improve code quality, correctness and development efficiency, also relate to unit testing, the exchanges data language, configuration file loads, test frame, the use of the integrated developing instrument of enterprise's application and development.
Background technology
Traditional software development process is divided into demand, summary design, detailed design, coding, test, operation, maintenance, wherein test is an important link, being related to the satisfaction of client behind software quality and the Software Delivery, is the most important thing in the software development process.
Modern Software Development Methods, agile development and the test that continues in integrated play important role especially.Unit testing is named in test in the agile development usually.Unit testing is meant at program module (least unit of software design) carries out the test job of verifying correctness.The test of enterprise's application and development at present is published to the program of finishing writing in server and the WWW container usually, and by the correctness of interface operation test procedure, this method wastes time and energy usually, is difficult to realize robotization.Unit testing can address this problem, testing tool commonly used at present has junit, testNg etc., the cover operational trials framework that this invention is developed on the basis of junit exactly, loaded with traffic assembly, resource have as required been realized, use exchanges data language (JSON) to produce object, simplify the structure of test desired parameters, save the development time.
Summary of the invention
The purpose of this invention is to provide a kind of service test method.Purpose provide a kind of fast, effectively, be independent of the testing tool and the method for testing of server and WWW container, improve code quality, correctness and development efficiency.
The objective of the invention is to realize in the following manner, content measurement and step are as follows:
1) sets up test environment; 2) formulate the test principle; 3) determine tested object; 4) development and testing program; 5) operation test; 6) check test result; 7) revise business procedure; Wherein
(1) sets up test environment: the class libraries that in the build path of application development environment, adds this framework;
2) test principle: comprise a class, method, a paths;
(1) class is: unit testing will guarantee certain graininess, from the unit testing to the functional test, granularity between this can be increasing, more backward, the programmer can be few more the concern details, directly jump in the functional test, can allow the programmer omit some problems, in the coarseness test afterwards, they can change the fatal problem that is difficult to reproduction or can not reappears into;
(2) paths: for a plurality of different execution route of a method separately, precondition and postcondition clear and definite must guarantee once only to survey a path of a method;
(3) methods: a method is difficult to test, and with regard to this method of reconstruct, reduced parameter, minimizing rely on, with the testability of raising method; The assurance method of testing is succinct, and succinct method of testing could guarantee the correctness of test logic;
3) determine tested object
Tested to as if operation system in operational approach or form any one method of operational approach, promptly constitute operation system any one class any one testable method or through improvement or reconstruct after testable method; According to the test principle, the method that does not have testability is reconstructed;
4) development and testing program
(1) newly-built test class is inherited the test base class, and its building method calls the building method of test base class, and loads required assembly of this test and resource;
(2) according to the test principle, realize method of testing, the structure of parameter object uses following method:
1〉adopt code directly to construct;
2〉adopt exchanges data language (JSON) form structure;
5) operation test
(1) uses integrated developing instrument operation test or service routine script operation test;
(2) use integrated developing instrument operation test debugging breakpoints, check the state of business object and its assembly that is relied on;
6) check test result
Whether checkout passes through, if do not pass through, carries out for the 7th step;
7) revise business procedure, search mistake, carried out for the 5th step, pass through up to test.
Method of the present invention compared with prior art has the following advantages:
(1) can break away from server and the WWW container carries out program test;
(2) charging assembly, resource are as required constructed business object and test parameter fast, save the test duration, raise the efficiency;
(3) make the developer in the process of test, improve code, improve code quality.
Embodiment
Comprise 1) use the resource loader to load needed assembly of test and resource on demand; 2) concrete test class need not oneself loading, as long as inherit the basic test class, realizes the method for testing of oneself; 3) use the transformation model quick constructing variable object of exchanges data language JSON to business object; 4) break away from server and WWW container; Wherein:
1) use the resource loader to load needed assembly of test and resource on demand; The resource loader comprises file loader and catalogue loader; Loader uses relative path, absolute path charging assembly and resource, and supports various protocols, comprises HTTP HTTP, transmission control protocol tcp, secure socket layer protocol ssl; Loader only need load assembly, the resource relevant with tested subject component, does not load and test irrelevant assembly and resource; Prompting does not load in the test assembly and the resource relevant with tested object, and the suggestion developer loads these assemblies and resource.
2) concrete test class need not oneself loading, as long as inherit the basic test class, realizes that the method for testing of oneself gets final product.The basic test class uses the loader described in the claim 2 to load basis, common component; Concrete operational trials class is inherited other assembly that the basic test class uses the loader loader itself described in the claim 2 to need, and realizes method of testing.
3) use the transformation model quick constructing variable object of exchanges data language json to business object.
Exchanges data language JSON arrives the transformation model of business object:
(1) contextual definition of transformation model: comprise the converter of a plurality of acquiescences in the context of transformation model, and can register new converter by register method.The context of transformation model can be created different transformation model contexts by instantiation under varying environment.
(2) all converters are all realized the basic interface of converter in the transformation model, and a conversion method that derives is arranged in the interface; The converter of acquiescence comprises: the object converter, enumerate the converter of converter, key value mapping table converter, tabulation converter, array converter, character string converter, numeric type, wherein the converter of numeric type comprises integer converter, single-precision floating point number converter, long shaping converter, double-precision floating point number converter, A/D converter of high precision, and the converter of all numeric types is inherited the digital quantizer base class.
Embodiment:
1) sets up test environment; 2) test principle; 3) determine tested object; 4) development and testing program; 5) operation test; 6) check test result; 7) revise business procedure.Below explanation respectively.
(1) sets up test environment: the class libraries that in the build path of application development environment, adds this framework.
2) test principle: comprise a class, method, a paths;
(1) unit testing will guarantee certain graininess.From the unit testing to the functional test, granularity between this can be increasing, more backward, the programmer can be few more the concern details, if directly jump in the functional test, can allow the programmer omit some problems, in the coarseness test afterwards, they can change the fatal problem that is difficult to reproduction or can not reappears into.
(2) for a plurality of different execution route of a method separately, precondition and postcondition clear and definite must guarantee once only to survey a path of a method.
If a method is difficult to test (parametric configuration difficulty, dependence are too much), this method of reconstruct, reduced parameter, minimizing rely on, with the testability of raising method.
(3) guarantee that method of testing is succinct, succinct method of testing could guarantee the correctness of test logic.
3) determine tested object
Tested to as if operation system in operational approach or form any one method of operational approach.Promptly constitute operation system any one class any one testable method or through improvement or reconstruct after testable method.
According to the test principle, the method that does not have testability is reconstructed.
4) development and testing program
(1) newly-built test class is inherited the test base class, and its building method calls the building method of test base class, and loads required assembly of this test and resource.
(2) according to the test principle, realize method of testing.The structure of parameter object can use following method:
1〉adopt code directly to construct
2〉adopt exchanges data language (JSON) form structure
5) operation test
(1) uses integrated developing instrument operation test or service routine script operation test
(2) if use the integrated developing instrument operation test can debugging breakpoints, check the state of business object and its assembly that is relied on.
6) check test result
Whether checkout passes through, if do not pass through, carries out for the 7th step.
7) revise business procedure
Search mistake, carried out for the 5th step, pass through up to test.
Claims (1)
1. a service test method is characterized in that, content measurement and step are as follows:
1) sets up test environment; 2) formulate the test principle; 3) determine tested object; 4) development and testing program; 5) operation test; 6) check test result; 7) revise business procedure; Wherein
(1) sets up test environment: the class libraries that in the build path of application development environment, adds this framework;
2) test principle: comprise a class, method, a paths;
(1) class is: unit testing will guarantee certain graininess, from the unit testing to the functional test, granularity between this can be increasing, more backward, the programmer can be few more the concern details, directly jump in the functional test, can allow the programmer omit some problems, in the coarseness test afterwards, they can change the fatal problem that is difficult to reproduction or can not reappears into;
(2) paths: for a plurality of different execution route of a method separately, precondition and postcondition clear and definite must guarantee once only to survey a path of a method;
(3) methods: a method is difficult to test, and with regard to this method of reconstruct, reduced parameter, minimizing rely on, with the testability of raising method; The assurance method of testing is succinct, and succinct method of testing could guarantee the correctness of test logic;
3) determine tested object
Tested to as if operation system in operational approach or form any one method of operational approach, promptly constitute operation system any one class any one testable method or through improvement or reconstruct after testable method; According to the test principle, the method that does not have testability is reconstructed;
4) development and testing program
(1) newly-built test class is inherited the test base class, and its building method calls the building method of test base class, and loads required assembly of this test and resource;
(2) according to the test principle, realize method of testing, the structure of parameter object uses following method:
1〉adopt code directly to construct;
2〉adopt exchanges data language (JSON) form structure;
5) operation test
(1) uses integrated developing instrument operation test or service routine script operation test;
(2) use integrated developing instrument operation test debugging breakpoints, check the state of business object and its assembly that is relied on;
6) check test result
Whether checkout passes through, if do not pass through, carries out for the 7th step;
7) revise business procedure, search mistake, carried out for the 5th step, pass through up to test.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102298809A CN101876936A (en) | 2009-11-17 | 2009-11-17 | Service test method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102298809A CN101876936A (en) | 2009-11-17 | 2009-11-17 | Service test method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101876936A true CN101876936A (en) | 2010-11-03 |
Family
ID=43019495
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009102298809A Pending CN101876936A (en) | 2009-11-17 | 2009-11-17 | Service test method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101876936A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043716A (en) * | 2010-12-24 | 2011-05-04 | 南京联创科技集团股份有限公司 | Automatic software testing method based on business driving |
CN103513966A (en) * | 2012-06-15 | 2014-01-15 | 北京力美科技有限公司 | PHP developing framework based on assemblies |
CN103678130A (en) * | 2013-12-17 | 2014-03-26 | 中国联合网络通信集团有限公司 | Automated performance test method and platform |
CN103902445A (en) * | 2012-12-27 | 2014-07-02 | 中国移动通信集团吉林有限公司 | Regression test object determination method and device |
-
2009
- 2009-11-17 CN CN2009102298809A patent/CN101876936A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043716A (en) * | 2010-12-24 | 2011-05-04 | 南京联创科技集团股份有限公司 | Automatic software testing method based on business driving |
CN103513966A (en) * | 2012-06-15 | 2014-01-15 | 北京力美科技有限公司 | PHP developing framework based on assemblies |
CN103902445A (en) * | 2012-12-27 | 2014-07-02 | 中国移动通信集团吉林有限公司 | Regression test object determination method and device |
CN103902445B (en) * | 2012-12-27 | 2016-11-23 | 中国移动通信集团吉林有限公司 | A kind of regression test object determines method and device |
CN103678130A (en) * | 2013-12-17 | 2014-03-26 | 中国联合网络通信集团有限公司 | Automated performance test method and platform |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109408373B (en) | Test method of intelligent contract, computer readable storage medium and test terminal | |
CN103150249B (en) | A kind of method and system of automatic test | |
CN102880546B (en) | Software integration testing method and system based on extensible markup language (XML) database | |
CN103425574A (en) | Method and device for testing applications | |
Zhou et al. | Towards a practical approach to test aspect-oriented software | |
Hasselbring et al. | iObserve: integrated observation and modeling techniques to support adaptation and evolution of software systems | |
CN103186463B (en) | Determine the method and system of the test specification of software | |
Taley et al. | Comprehensive study of software testing techniques and strategies: a review | |
JP2024510977A (en) | System and method for message broker migration in application environment migration | |
CN115563019A (en) | UVM and C combined verification method and system | |
CN101876936A (en) | Service test method | |
Jin-Hua et al. | The w-model for testing software product lines | |
Bianculli et al. | SOABench: Performance evaluation of service-oriented middleware made easy | |
CN116431103B (en) | Digital DevOps platform design method for embedded software | |
Naslavsky et al. | Towards traceability of model-based testing artifacts | |
Arora et al. | Evaluation of flow graph and dependence graphs for program representation | |
Zhang et al. | Automated unit testing intelligent agents in PDT | |
Cooray et al. | Test reconfiguration for service oriented applications | |
Frechette et al. | Regression Test Reduction for Object‐Oriented Software: A Control Call Graph Based Technique and Associated Tool | |
Bassil | Distributed, Cross-Platform, and Regression Testing Architecture for Service-Oriented Architecture | |
Balasubramaniam et al. | Challenges for assuring quality of service in a service-oriented environment | |
Jyoti | A Systematic Review and Comparative study of existing testing techniques for Aspect-oriented software systems | |
Ahmed et al. | An Adaptation Model for Android Application Testing with Refactoring | |
Harrer et al. | A pattern language for workflow engine conformance and performance benchmarking | |
Adamek et al. | Erroneous architecture is a relative concept. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20101103 |