当前位置:网站首页>Cantata9.0 | new features

Cantata9.0 | new features

2022-07-07 20:26:00 Maihexong

Cantata 9.0, from 2019 year 10 It will be officially released in June , It is an important new version with new functions . This release introduces test driven development (TDD) Support for , And enhanced Cantata Of AutoTest function , by C ++ Code provides automatic test generation technology .

Cantata 9.0 There are also many other smaller enhancements and fixes . The complete change set is documented in the release notes , Contains from 4.1 Since version Cantata All changes in . The most important changes are highlighted in the following .

Support Test Driven Development

Cantata Added test driven development (TDD) Support for . TDD It's a development method , In this method , Unit tests are written before the source code is implemented . This agile technology ensures that the development of test cases focuses on requirements rather than source code implementation , Therefore, it can help engineers write “ Cleaner ” Code for .

Cantata 9.0 Have support TDD New functions , Easily generate tests for source code that hasn't been written yet . Once the function prototype is created in the header file ,TDD Function can be used to generate test cases . A standard Cantata The project is thus created , It provides a testing framework and what users expect from Cantata Complete certifiable report obtained . Use Cantata for TDD Improved TDD Simple black box test commonly used in , Complete white box test , because Cantata You can call the encapsulated code directly , Can access private / Static data and functions .

Cantata Test Explorer In the view TDD Generate
Test scripts are automatically generated , Generate a test case for each function prototype defined in the header file . Create more test cases based on these use cases , Avoid manually adding the information contained in the function prototype to the test case . Any global data declared in the header file will also be automatically set and checked . Cantata TDD Generated an empty source file , So once the function body is implemented , You can simply rebuild and run tests to test new code .
 Insert picture description here
Cantata Trace The function can be connected with Cantata TDD Use a combination of , In order to improve the development of test cases according to requirements . Test cases can track the imported requirements at design time . The test case 、 The correlation between code and requirements makes all work clearer , And make later code refactoring easier .

Generate pile functions for all functions that have not yet been written and implemented , This enables test cases to run before the code is fully implemented . When the function is implemented , You can use Cantata The change analysis function of automatically deletes these pile functions or converts them to Cantata Packaging function ( To intercept and continue checking on these objects / Function call ). Once the test passes , The source code can then be refactored and the tests rerun to ensure that they still pass .

Yes C++ Code AutoTest

Cantata AutoTest The function has been extended to support C++ Code .AutoTest Automatically generate unit test scripts , function C++ Unit test of source code , This can be used for new or old projects , Make it easy to :

● Configure automatic test generation
o Overwrite the rule set with the selected code , To determine how the test path should be generated thoroughly
o Generate options by testing (stub/wrapper, Data check, etc ) Configure test style
● by 100% Code coverage generates complete test scripts
● After the requirement based test case is executed , For those functions that are not covered / Method , Use AutoTest Generate “ Auxiliary ” The test case , To supplement code coverage .
● Create basic regression unit tests
● Upgrade from other testing tools to Cantata

AutoTest analysis C++ Source code , By defining the goal of structured code coverage measurement ( namely 100% Function entry point ,100% sentence ,100% Make a decision or 100% The only reason MC / DC) Identify all possible code paths . Parse algorithm to create test case vector , Use powerful Cantata White box function to set data 、 Parameters and control function call interfaces , To execute all necessary code paths .

 Insert picture description here
Test vector driven code , Check the parameters passed between methods 、 Values of accessible global data 、 Call order and return value . AutoTest The generated test cases can be edited in the same way as the user generated test cases . Each test case describes the path of the code , Make it easy to maintain and track requirements .

Cantata 9.0 Medium AutoTest Support C++ 03 And early C++ The following elements of the version :
● C++ Concrete and abstract base classes
● Overloading and inheritance
● Namespaces and classes
● exception handling
● Templates that are explicitly instantiated in a given code
● Mixed C&C++ The code base

Cantata AutoTest Can be used to test that contains the above elements / Other than version C ++ Code . Automatic generation C++ Code testing , You can then add additional tests to achieve the desired code coverage goals .

Code coverage enhancement

Cover variable builds
Build variable (Build Variant) Coverage of is a new feature , Improve the ability to execute multiple build variants C / C++ Source code coverage . So ,Cantata Use precompiled definitions (#defines) Distinguish between different construction variants . Cantata Coverage Viewer Displays the collection data of multiple build variants of the same source code . You can also generate a set overlay data report that contains all the definitions , This report is suitable as proof of all build variants of the source code .

 Insert picture description here

The delay coverage analysis report is certified
Cantata The delay analysis function of passes the coverage data collected on the target back to the host , Then run the coverage check and report . This is useful for target platforms with small memory .Cantata CPPGETCOV The program is now included in SGS-TÜV SAAR GmbH In tool certification . This means that the .ctr The report can now be used as certification evidence .

HTML Override file
Now we can use HTML Generate coverage result file in format . These generated files contain information that is usually displayed in Cantata Coverage Viewer Project data in .

Undo& Redo

It can now be automatically saved in Cantata All changes made to the test script in a specific view ( namely “ Test Explorer ”,“ Test case editor ” or “ Test attribute ”). Already been Cantata View added undo / Redo function , So you can easily undo these autosaves . Existing Eclipse The button can be used in Cantata Undo and redo edits in , Or you can use ctrl + Z( undo ) or ctrl + Y( redo ) Shortcut key .

 Insert picture description here

Extended platform support

And Cantata Each version of is the same , Extended support for the platform .

Cantata With leading integrated development environment ( Built in Eclipse) And can be used as Eclipse-Ready The tool chain of plug-ins is tightly integrated . Cantata 9.0 It's based on Eclipse 2018-09 Distribution version (Eclipse 4.9) Above , Can also be used as a Eclipse-Ready Plug in installed from Juno(4.2) To Eclipse 2018-09(4.9) In the environment of .

Yes GNU GCC and g++ Compiler support has been extended to Windows Upper 8.1 Version and Linux Upper 8.3 edition .

Cantata 9.0 Can fully support all C++ 11 and 14 The linguistic features of .

More information :http://qa-systems.cn/
http://www.softtest.cn/

原网站

版权声明
本文为[Maihexong]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071821149276.html