Topic
  • 4 replies
  • Latest Post - ‏2013-07-03T09:41:06Z by urossec_ie4000
urossec_ie4000
urossec_ie4000
4 Posts

Pinned topic TestConductor CUnit integration?

‏2013-06-19T12:13:53Z |

Hello!

 

I am wondering if anyone has ever used the TestConductor's feature of integrating CUnit framework tests into Rhapsody.

Would appreciate very much if someonce could provide an example. 

 

Many thanks, 

Uros

  • pathfinder_hartmut
    pathfinder_hartmut
    49 Posts
    ACCEPTED ANSWER

    Re: TestConductor CUnit integration?

    ‏2013-07-03T07:20:57Z  

    Hi Hartmut,

     

    Thank you very much for the example. It runs very well on my version of Rhapsody (8.03). However, I have a few more questions.

    I was trying to reproduce the "TPkg_Calculator_RTCUnitTesting" testing package you've provided in your example. I've created (using "create TestArchitecture) a new Test Architecture and changed its context to CUnitContext. I have also applied the CUnitConfig stereotype to the configuration. The created architecture differs from the one you've provided in your example (no TestArchitecture package, no TestControl package) and the CunitContext's set of operations is not automatically added to the context after performing (Update TestCase, "Update TestContext" and "Update TestPackage".

    What I have gathered from the example is that the "TPkg_Calculator_RTCUnitTesting" is created from the "TPkg_Calculator_RTCTesting" using "Change to > CUnitContext" transformation. I am guessing that the "TPkg_Calculator_RTCTesting" was also derived using some other TestConfiguration which was later on deleted from the project. 

    I would like to get the details on how the "TPkg_Calculator_RTCUnitTesting" / "TPkg_Calculator_RTCTesting" can be produced. Preferably a step by step tutorial. 

    Regards,

    Uros

    Hi Uros,

     

    make sure that environment variable CPPUNITHOME or CUNITHOME, respectively, is set and contains the path of a vaild unit testing framework.

    make sure that Testing Mode is set to 'AnimationBased'  (Menu Tools->TestConductor).

    in newly created TestArchitecture invoke 'Change to' on TestContext. Change to 'Cpp Unit Context' or  'CUnitt Context', repectively.

    Go to the configuration of the TestArchitecture, open features dialog and add stereotype <<CppUnitConfig>> or <<CUnitConfig>>, respectively.

    Add Code, Flowchart and Statechart TestCases according to your needs.

    Update, Build, Execute TestCases.

    In the configuration of the TestArchitecure you find a set of tags, which can be used to tailor the use of the respective unit testing framework according to your needs.

     

    Regards, Hartmut

     

     

     

     

    then create a TestArchitecture on some class of the design

  • pathfinder_hartmut
    pathfinder_hartmut
    49 Posts

    Re: TestConductor CUnit integration?

    ‏2013-06-24T06:51:59Z  

    Hi Uros,

     

    please find attached a small sample model using the C_Unit integration as described in the TC User Guide.

     

    Regards, Hartmut

    Attachments

  • urossec_ie4000
    urossec_ie4000
    4 Posts

    Re: TestConductor CUnit integration?

    ‏2013-07-02T12:10:41Z  

    Hi Uros,

     

    please find attached a small sample model using the C_Unit integration as described in the TC User Guide.

     

    Regards, Hartmut

    Hi Hartmut,

     

    Thank you very much for the example. It runs very well on my version of Rhapsody (8.03). However, I have a few more questions.

    I was trying to reproduce the "TPkg_Calculator_RTCUnitTesting" testing package you've provided in your example. I've created (using "create TestArchitecture) a new Test Architecture and changed its context to CUnitContext. I have also applied the CUnitConfig stereotype to the configuration. The created architecture differs from the one you've provided in your example (no TestArchitecture package, no TestControl package) and the CunitContext's set of operations is not automatically added to the context after performing (Update TestCase, "Update TestContext" and "Update TestPackage".

    What I have gathered from the example is that the "TPkg_Calculator_RTCUnitTesting" is created from the "TPkg_Calculator_RTCTesting" using "Change to > CUnitContext" transformation. I am guessing that the "TPkg_Calculator_RTCTesting" was also derived using some other TestConfiguration which was later on deleted from the project. 

    I would like to get the details on how the "TPkg_Calculator_RTCUnitTesting" / "TPkg_Calculator_RTCTesting" can be produced. Preferably a step by step tutorial. 

    Regards,

    Uros

  • pathfinder_hartmut
    pathfinder_hartmut
    49 Posts

    Re: TestConductor CUnit integration?

    ‏2013-07-03T07:20:57Z  

    Hi Hartmut,

     

    Thank you very much for the example. It runs very well on my version of Rhapsody (8.03). However, I have a few more questions.

    I was trying to reproduce the "TPkg_Calculator_RTCUnitTesting" testing package you've provided in your example. I've created (using "create TestArchitecture) a new Test Architecture and changed its context to CUnitContext. I have also applied the CUnitConfig stereotype to the configuration. The created architecture differs from the one you've provided in your example (no TestArchitecture package, no TestControl package) and the CunitContext's set of operations is not automatically added to the context after performing (Update TestCase, "Update TestContext" and "Update TestPackage".

    What I have gathered from the example is that the "TPkg_Calculator_RTCUnitTesting" is created from the "TPkg_Calculator_RTCTesting" using "Change to > CUnitContext" transformation. I am guessing that the "TPkg_Calculator_RTCTesting" was also derived using some other TestConfiguration which was later on deleted from the project. 

    I would like to get the details on how the "TPkg_Calculator_RTCUnitTesting" / "TPkg_Calculator_RTCTesting" can be produced. Preferably a step by step tutorial. 

    Regards,

    Uros

    Hi Uros,

     

    make sure that environment variable CPPUNITHOME or CUNITHOME, respectively, is set and contains the path of a vaild unit testing framework.

    make sure that Testing Mode is set to 'AnimationBased'  (Menu Tools->TestConductor).

    in newly created TestArchitecture invoke 'Change to' on TestContext. Change to 'Cpp Unit Context' or  'CUnitt Context', repectively.

    Go to the configuration of the TestArchitecture, open features dialog and add stereotype <<CppUnitConfig>> or <<CUnitConfig>>, respectively.

    Add Code, Flowchart and Statechart TestCases according to your needs.

    Update, Build, Execute TestCases.

    In the configuration of the TestArchitecure you find a set of tags, which can be used to tailor the use of the respective unit testing framework according to your needs.

     

    Regards, Hartmut

     

     

     

     

    then create a TestArchitecture on some class of the design

  • urossec_ie4000
    urossec_ie4000
    4 Posts

    Re: TestConductor CUnit integration?

    ‏2013-07-03T09:41:06Z  

    Hi Uros,

     

    make sure that environment variable CPPUNITHOME or CUNITHOME, respectively, is set and contains the path of a vaild unit testing framework.

    make sure that Testing Mode is set to 'AnimationBased'  (Menu Tools->TestConductor).

    in newly created TestArchitecture invoke 'Change to' on TestContext. Change to 'Cpp Unit Context' or  'CUnitt Context', repectively.

    Go to the configuration of the TestArchitecture, open features dialog and add stereotype <<CppUnitConfig>> or <<CUnitConfig>>, respectively.

    Add Code, Flowchart and Statechart TestCases according to your needs.

    Update, Build, Execute TestCases.

    In the configuration of the TestArchitecure you find a set of tags, which can be used to tailor the use of the respective unit testing framework according to your needs.

     

    Regards, Hartmut

     

     

     

     

    then create a TestArchitecture on some class of the design

    Thank you very much for the quick answer, Hartmut.

    Setting the TestConductor's mode to 'AnimationBased' did the trick for me.

     

    Regards,

    Uros