Topic
8 replies Latest Post - ‏2013-12-03T12:41:35Z by chr_btc-es
SystemAdmin
SystemAdmin
1305 Posts
ACCEPTED ANSWER

Pinned topic TestConductor Code Coverage ?

‏2012-08-20T02:25:00Z |
Hi all,

Has anyone seen a TestConductor annotation error when using the code coverage feature? I’m new to TestConductor and just trying to get the samples working. I’ve tried the CppCashRegister and CppModelCodeCoverage projects with the same results. The only mods I’ve made to these samples was to change the compiler settings from "Microsoft" to "MSVC9".

I’m using Rhapsody 7.6.1 and Microsoft Visual Studio 2010 (MSVC9)

Below is the output from the sample CppModelCodeCoverage project when attempting to build. I'm using the TestConductor update and build menu items.

I'm assuming this is some kind of settings issue. Any clues?

Building
TPkg_Calc_Comp.exe
Executing: ""C:\Users\EdwardsAL\IBM\Rational\Rhapsody\7.6.1\Share"\etc\msvc9make.bat TPkg_Calc_Comp.mak build x86"
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
TCon_Calc.cpp
TCon_Calc.cpp(29) : warning C4355: 'this' : used in base member initializer list
TCon_Calc.cpp(29) : warning C4355: 'this' : used in base member initializer list
TCon_Calc.cpp(29) : warning C4355: 'this' : used in base member initializer list
Display.cpp
DummyDriver_of_Calc.cpp
TCon_Calc_Scheduler.cpp
CSC_SD_tc_0.cpp
CSC_SD_tc_1.cpp
CSC_SD_tc_2.cpp

Starting annotation of file Calc.cpp

C:\Testing\TestConductor_Investigation\TestConductor\CppModelCodeCoverage\TPkg_Calc_Comp\CodelCovConfig>"C:/Program Files (x86)/IBM/Rational/Rhapsody/7.6.1/TestConductor/cppfs.exe" --options_file "C:/Testing/TestConductor_Investigation/TestConductor/CppModelCodeCoverage/TPkg_Calc_Comp/CodelCovConfig/tmp/args1_cppfs.txt" 1>"C:/Testing/TestConductor_Investigation/TestConductor/CppModelCodeCoverage/TPkg_Calc_Comp/CodelCovConfig/tmp/out1_fs.txt" 2>&1
An error happened during annotation of source code.

Found errors when annotating source code. Please check code errors in file C:/Testing/TestConductor_Investigation/TestConductor/CppModelCodeCoverage/TPkg_Calc_Comp/CodelCovConfig/tmp/out1_fs.txt

Aborting annotation!
NMAKE : fatal error U1077: '"C:/Program Files (x86)/IBM/Rational/Rhapsody/7.6.1/TestConductor/TCCodeAnnotation.exe"' : return code '0x1'
Stop.

Build Done
ERROR: Failed to build code for CG Configuration 'TPkg_Calc::TPkg_Calc_Comp::CodelCovConfig'.
Updated on 2012-12-03T09:40:20Z at 2012-12-03T09:40:20Z by RichaM
  • chr_btc-es
    chr_btc-es
    67 Posts
    ACCEPTED ANSWER

    Re: TestConductor Code Coverage ?

    ‏2012-08-20T07:22:39Z  in response to SystemAdmin
    Hi,

    with Rhapsody 7.6.1, computation of code coverage is supported only for VS 2008 (or VC 6).
    VS 2010 will be supported in the upcoming release (8.0).

    Regards, Christian.
    • SystemAdmin
      SystemAdmin
      1305 Posts
      ACCEPTED ANSWER

      Re: TestConductor Code Coverage ?

      ‏2012-08-20T13:23:09Z  in response to chr_btc-es
      Thanks a lot Christian for the quick response. We may have to switch to VS 2008 for the time being.
      Anthony
      • RichaM
        RichaM
        70 Posts
        ACCEPTED ANSWER

        Re: TestConductor Code Coverage ?

        ‏2012-12-03T09:40:20Z  in response to SystemAdmin
        Hi

        I want to test my rhapsody class with assertion based testing mode using test conductor
        I am using rhapsody 7.6.1.2 and visual studio 2008 as a compiler
        The configuration :: environment has tailor made by us. Which is using visual studio 2008 internally as a compiler
        I created test architecture on class ABC. If I enable compute code coverage option then it gives error as "Code coverage not yet supported for MyConfiguration environment"
        Can you tell me, how can I get code coverage of my class? What changes I need to do in my configuration so that rhapsody will start generating code coverage?
        Thanks in advance
        • chr_btc-es
          chr_btc-es
          67 Posts
          ACCEPTED ANSWER

          Re: TestConductor Code Coverage ?

          ‏2013-12-03T09:09:33Z  in response to RichaM

          Hi,

           

          to be able to compute code coverage, TestConductor needs to know the compiler (and version) being used. For some pre defined Rhapsody environments TestConductor knows the compiler, for other (especially user defined environments) some information about the compiler must be provided by an options file. Please see TestConductor user guide how to do this.

           

          Regards, Christian.

  • MANOHARREDDY
    MANOHARREDDY
    2 Posts
    ACCEPTED ANSWER

    Re: TestConductor Code Coverage ?

    ‏2013-11-29T11:55:02Z  in response to SystemAdmin

    Hello Anthony,

     

    I am using Rhapsody 8.0.3 and Visual Studio 2010 and I am facing the problem with build. It says "ERROR: Failed to build code for CG Configuration".

    Appreciate if you could help me out by letting me know how you were able to resolve your problem.

     

    Thanks

    Manohar Reddy

    • chr_btc-es
      chr_btc-es
      67 Posts
      ACCEPTED ANSWER

      Re: TestConductor Code Coverage ?

      ‏2013-12-03T09:14:03Z  in response to MANOHARREDDY

      Hi,

       

      can you add a little bit more information, what error messages do you get in the output window?

       

      Regards, Christian.

      • This reply was deleted by MANOHARREDDY 2013-12-03T10:37:58Z.
      • MANOHARREDDY
        MANOHARREDDY
        2 Posts
        ACCEPTED ANSWER

        Re: TestConductor Code Coverage ?

        ‏2013-12-03T10:38:42Z  in response to chr_btc-es

        Hello Christian,

        Thanks very much for your response.

        When I try to build it throws an error saying "ERROR: Failed to build code for CG Configuration 'TPkg_DrinkDispenser::TPkg_DrinkDispenser_Comp::DefaultConfig'." in the output window.

        Appreciate if you could help me in getting this resolved.

         

        Regards

        Manohar

        • chr_btc-es
          chr_btc-es
          67 Posts
          ACCEPTED ANSWER

          Re: TestConductor Code Coverage ?

          ‏2013-12-03T12:41:35Z  in response to MANOHARREDDY

          Can you see some more compiler error messages in the output window (log tab), can you paste them here?

          Can you compile the code if you are not computing code coverage?

           

          Which compile environment are you using?

           

          Regards, Christian.