CN105117335B - A kind of automatic Verification and regression testing method for software unit - Google Patents
A kind of automatic Verification and regression testing method for software unit Download PDFInfo
- Publication number
- CN105117335B CN105117335B CN201510530834.8A CN201510530834A CN105117335B CN 105117335 B CN105117335 B CN 105117335B CN 201510530834 A CN201510530834 A CN 201510530834A CN 105117335 B CN105117335 B CN 105117335B
- Authority
- CN
- China
- Prior art keywords
- test
- case
- software unit
- file
- testing method
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The present invention relates to a kind of automatic Verification and regression testing method for software unit, comprise the following steps:1) case designing process, for building test use cases;2) use-case implementation procedure, using the test use cases of structure, software unit is tested automatically.Compared with prior art, the present invention has the advantages that to make full use of software and hardware resources, improves operating efficiency.
Description
Technical field
The present invention relates to a kind of software unit testing technology, more particularly, to a kind of automatic Verification for software unit
And regression testing method.
Background technology
Software unit testing is the process that minimum testable unit is checked and verified, in whole software test
Occupy very big workload proportion in journey, and unit regression test activity fills often wheel software iterative development process, is soft
An important component in part Development Life Cycle.At present, the existing many unit test tools of in the market, for example, supporting
The C++Test of C/C++ language, Visual Unit, TestBed etc.;Support JUnit of Java language etc..By these works
Tool, although no longer needing to write substantial amounts of pile function and driving function so that the process of unit testing has obtained largely
Simplify, but this also simply independent execution of test case one by one, it is only capable of being referred to as semi-automatic test, still can greatly influences
The efficiency of regression test, or even the particular/special requirement that night performs automatically can not be met.In addition, different tester institutes use environment
Difference, can also reduce the maintainability of script.
The content of the invention
It is an object of the present invention to overcome the above-mentioned drawbacks of the prior art and provide one kind is used for software unit
Automatic Verification and regression testing method, it is intended to overcome the problem of prior art automaticity is low, and regression test efficiency is low
And Automation regression testing is easily supported in defect, realization.
The purpose of the present invention can be achieved through the following technical solutions:
A kind of automatic Verification and regression testing method for software unit, it is characterised in that comprise the following steps:
1) case designing process, for building test use cases;
2) use-case implementation procedure, using the test use cases of structure, software unit is tested automatically.
Described step 1) case designing process is specially:
With detailed design document, source code and last round of test use cases are tested as input, pass through key search
Compare to verify detailed design document and test case, and whether the instrument exact p-value use-case returned using automation meets source
Code Design, checking Test Sample Design with this, whether the design of reasonable and source code is consistent with detailed design document.
Rationally and whether source code design consistent with detailed design document has whether described inspection Test Sample Design
Body is:
Whether parameter marginal testing is complete;
Whether global variable output checks;
Whether source code parameter effective range is consistent with detailed design document.
If test case is unsatisfactory for design, redesign test case is carried out, until consistency checking is tested by rear,
Form final test use cases.
Described use-case implementation procedure is specially:
First, by Python scripts, traversal carries out each catalogue where the test case file of unit testing, according to survey
Example filename on probation, the map information file that a pair of generation and test case 1;
Then, according to the map information of the test case of generation and source file catalogue to be measured, exported by Python scripts
Test file;
Finally, test file is performed, unit testing is carried out to tested object, outputed test result.
If use-case performs, failure or coverage rate are not up to defined to be required, is analyzed test result, is fed back to tester
Or developer modifies.
Compared with prior art, the present invention has advantages below:
1) software and hardware resources are made full use of, improve operating efficiency;
Worked with the mechanical artificial regression test of automated test tool substitution, can not only make full use of hardware resource,
Meet the requirement that unit regression test work can perform automatically at night, also cause employee efficiently to utilize the working time, improve
Speed measuring with software.
In addition, no matter in product iterative development, coding change rate is how much, and Automation regression testing one-touch can be completed,
After the correctness for confirming product code, operating efficiency is also substantially increased.
2) ensure the stability of test environment, strengthen the maintainability of test script;
Tested automatically on uniform machinery, ensure that each test case uses identical test environment, so as to improve script
Maintainability, make it independent of test environment.
3) integrity of test case, and the uniformity of detailed design and code are ensured;
Detailed design document, tests source code and test use cases consistency verification method can in unit regression test
The one-touch code and test case for finding modification, it is inconsistent between detailed design, it may be omitted with comparing the work of code.
4) product test, maintenance cost are reduced;
In the exploitation of progressive or iteratively faster, the continuous issue of redaction make it that the exception that regression test is carried out is frequent,
Automatic test can be more efficient and strong completion unit regression test, reduce test and the maintenance cost of product
Brief description of the drawings
Fig. 1 is the particular flow sheet of the present invention;
Fig. 2 is the flow chart of use-case implementation procedure of the present invention;
Fig. 3 is the structural representation for the device that the present invention realizes Automation regression testing.
Embodiment
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.
Embodiment
Such as the flow chart that Fig. 1 is this method, it is made up of, is described as follows case designing and use-case two stages of execution:
First, the case designing stage:
With detailed design document, source code and last round of test use cases are tested as input, pass through key search
Compare to verify detailed design document and test case, and whether the instrument exact p-value use-case returned using automation meets source
Code Design, can checking Test Sample Design with this, whether the design of reasonable and source code is consistent with detailed design document,
Such as:Whether parameter marginal testing complete, global variable output whether check, source code parameter effective range whether with detailed design
Document is consistent etc..Defect is such as found above, feeds back to tester or developer respectively as needed, then tester
Member redesigns test case, modification is until test according to the amended detailed design document of developer and test source code
Consistency checking forms final test use cases by rear.
2nd, use-case performs the stage:
Using above-mentioned test use cases, test script is performed automatically, is outputed test result.If any use-case perform failure or
Coverage rate is not up to defined to be required, is analyzed test result, is fed back to tester or developer modifies.Wherein, certainly
The method that dynamicization returns is as shown in Figure 2:
First, by Python scripts, traversal carries out each catalogue where the test case file of unit testing, according to survey
Example filename on probation, the map information file that a pair of generation and test case 1;Then, reflecting according to the test case of generation
Information and source file catalogue to be measured are penetrated, test file is exported by Python scripts;Finally, test file is performed, to tested
Object carries out unit testing, outputs test result.
Fig. 3 is the structure chart for the device that this method realizes Automation regression testing, including:
Traversal Unit:For traveling through each catalogue for the test case file for carrying out unit testing, according to test case file
Name, generation and the one-to-one map information file of test case.
Generate test file unit:According to the map information of the test case of generation, test file is exported
Test execution unit:According to test file, unit testing is carried out to measurand, outputed test result.
This method is applied to Casco Signal Ltd. TSP trackside security platform products, ECID computers connection
In the unit regression test for locking the project software iterative development process such as drives subsystem, iTS intelligence train monitoring systems.
In terms of software iterative development process, after the invention, the efficiency of unit regression test is greatly improved,
The time of iterative development is saved.From the point of view of test use, it is no longer necessary to which mechanical artificial regression test, tester is just
Energy flower is very being improved into speed measuring with software in itself.
Claims (5)
1. a kind of automatic Verification and regression testing method for software unit, it is characterised in that comprise the following steps:
1) case designing process, for building test use cases;
2) use-case implementation procedure, using the test use cases of structure, software unit is tested automatically;
Described case designing process is specially:
With detailed design document, source code and last round of test use cases are tested as input, are compared by key search
To verify detailed design document and test case, and whether the instrument exact p-value use-case returned using automation meets source code
Design, checking Test Sample Design with this, whether the design of reasonable and source code is consistent with detailed design document.
2. a kind of automatic Verification and regression testing method for software unit according to claim 1, its feature exist
In, described inspection Test Sample Design whether rationally and whether source code design is consistent with detailed design document is specially:
Whether parameter marginal testing is complete;
Whether global variable output checks;
Whether source code parameter effective range is consistent with detailed design document.
3. a kind of automatic Verification and regression testing method for software unit according to claim 1 or 2, its feature
It is, if test case is unsatisfactory for design, carries out redesign test case, until consistency checking is tested by rear, structure
Into final test use cases.
4. a kind of automatic Verification and regression testing method for software unit according to claim 1, its feature exist
In described use-case implementation procedure is specially:
First, each catalogue where the test case file of unit testing is carried out by Python scripts, traversal, used according to test
Example filename, generation and the one-to-one map information file of test case;
Then, according to the map information of the test case of generation and source file catalogue to be measured, exported and tested by Python scripts
File;
Finally, test file is performed, unit testing is carried out to tested object, outputed test result.
5. a kind of automatic Verification and regression testing method for software unit according to claim 1, its feature exist
In if use-case performs, failure or coverage rate are not up to defined to be required, is analyzed test result, is fed back to tester or exploitation
Personnel modify.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510530834.8A CN105117335B (en) | 2015-08-26 | 2015-08-26 | A kind of automatic Verification and regression testing method for software unit |
HK16104680.9A HK1216681A1 (en) | 2015-08-26 | 2016-04-25 | An automatic verification and regression testing method for software unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510530834.8A CN105117335B (en) | 2015-08-26 | 2015-08-26 | A kind of automatic Verification and regression testing method for software unit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105117335A CN105117335A (en) | 2015-12-02 |
CN105117335B true CN105117335B (en) | 2017-11-10 |
Family
ID=54665333
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510530834.8A Active CN105117335B (en) | 2015-08-26 | 2015-08-26 | A kind of automatic Verification and regression testing method for software unit |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105117335B (en) |
HK (1) | HK1216681A1 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107168883B (en) * | 2017-07-26 | 2020-07-14 | 成都科来软件有限公司 | API data automatic testing method |
CN107391379B (en) * | 2017-07-28 | 2021-01-01 | 武汉斗鱼网络科技有限公司 | Automatic interface testing method and device |
CN107480532A (en) * | 2017-08-02 | 2017-12-15 | 四川长虹电器股份有限公司 | Regression testing method based on vulnerability scanning |
CN109614324B (en) * | 2018-12-03 | 2022-02-08 | 北京云测信息技术有限公司 | Test case generation method and device |
CN110096425B (en) * | 2018-12-10 | 2022-07-15 | 厦门市美亚柏科信息股份有限公司 | QT development mode-based automatic testing method and device and storage medium |
CN111078561A (en) * | 2019-12-18 | 2020-04-28 | 深圳前海环融联易信息科技服务有限公司 | Interface automation test method and device, computer equipment and storage medium |
CN112131116B (en) * | 2020-09-25 | 2023-06-27 | 中国直升机设计研究所 | Automatic regression testing method for embedded software |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103049367A (en) * | 2011-10-11 | 2013-04-17 | 神州数码信息系统有限公司 | Automatic testing method for software |
CN104536896A (en) * | 2015-01-12 | 2015-04-22 | 牟永敏 | Regression test case selecting and ranking method and system oriented to function call path |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9037915B2 (en) * | 2011-12-08 | 2015-05-19 | International Business Machines Corporation | Analysis of tests of software programs based on classification of failed test cases |
-
2015
- 2015-08-26 CN CN201510530834.8A patent/CN105117335B/en active Active
-
2016
- 2016-04-25 HK HK16104680.9A patent/HK1216681A1/en unknown
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103049367A (en) * | 2011-10-11 | 2013-04-17 | 神州数码信息系统有限公司 | Automatic testing method for software |
CN104536896A (en) * | 2015-01-12 | 2015-04-22 | 牟永敏 | Regression test case selecting and ranking method and system oriented to function call path |
Also Published As
Publication number | Publication date |
---|---|
HK1216681A1 (en) | 2016-11-25 |
CN105117335A (en) | 2015-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105117335B (en) | A kind of automatic Verification and regression testing method for software unit | |
CN109960643B (en) | Code testing method and device | |
CN106528100B (en) | System and method for model-based techniques and processes for safety-critical software development | |
US20150135164A1 (en) | Integrated Software Testing Management | |
Singh et al. | A systematic review on fault based mutation testing techniques and tools for Aspect-J programs | |
US20130290075A1 (en) | Localization quality assurance of localized software | |
Ahmad et al. | A Review on Software Testing and Its Methodology | |
CN105912469A (en) | Automatic detection method of testing scripts for rail transit vehicle-mounted controller software | |
Post et al. | Linking functional requirements and software verification | |
Khan et al. | Importance of software testing in software development life cycle | |
US20150347279A1 (en) | Methodology and tool support for test organization and migration for embedded software | |
CN112131116A (en) | Automatic regression testing method for embedded software | |
CN106933572B (en) | Measurement model based on LLVM intermediate representation program slice | |
Vanciu et al. | Hidden dependencies in software systems | |
CN111611154B (en) | Regression testing method, device and equipment | |
CN111966665B (en) | Data migration testing method and device | |
CN112527380A (en) | Continuous integration method oriented to embedded high-security software | |
CN108255697B (en) | SMT-based vehicle-mounted controller software semi-formalization requirement verification system and method | |
Andrews | Theory and practice of log file analysis | |
Singh et al. | Analysis of software testing techniques: Theory to practical approach | |
Erkkinen et al. | Model-based design for DO-178B with qualified tools | |
CN103593179A (en) | Method for developing software in a parallel computing environment | |
CN112052181A (en) | Embedded software automatic test system based on software engineering | |
Chen et al. | When a GUI regression test failed, what should be blamed? | |
CN111752823A (en) | Method, device and equipment for testing vehicle-mounted power supply application software |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1216681 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: GR Ref document number: 1216681 Country of ref document: HK |