I am trying to do unit testing with Rhapsody 7.6. I have a class, i want to test individual functions, make judgement whether it is passing or failing based on some return values or maybe code coverage.
1. Which is the best way to do UT: Assertion based testing or Animation based testing
2. I am trying to do assertion based testing, but I am not getting any examples which demonstrate the proper usage of assertion based testing.
Please help me with this regards
chr_btc-es 270002EDQ968 Posts
Re: Unit testing in Rhapsody 7.62012-11-07T17:17:03ZThis is the accepted answer. This is the accepted answer.Hi,
assertion based testing mode is the default (for C++ and C) since Rhapsody 7.6: If you perform the TC tutorial for C or C++, you will automatically use assertion based testing mode. During the tutorial, all kinds of TestCases will be created so you can get an impression what kind of TestCases might fit to your own projects.
The tutorials are available via the Testing Welcome Screen or in the installation: Folder Rhapsody/Doc/pdf_docs.
Rhapsody 7.6 comes with two TC samples containing pre defined assertion based tests: CSDOperators, CModelCodeCoverage. Both are using C.
In Rhapsody 7.6.1, samples for C++ have been added.
Hope this helps, Christian.