Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Product Lifecycle
  3. Application Lifecycle
  4. Unit testing

Unit testing

Scheduled Pinned Locked Moved Application Lifecycle
questionc++testingbeta-testingtools
3 Posts 3 Posters 12 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_14696978
    wrote on last edited by
    #1

    Hi I am not sure what is the right forum to publish this in (here or in the C++ forum) But I coudln't find any information about it too, which is odd. Anyway, Unit testing in C++: Since it is not as popular as unit testing in other high level languages, I need your recommendations and insights. I have a lot of legacy code- I was just given a project to which I have to have covered by at least 70% unit tests. I need to do a lot of refactoring. Different tools (mocking tools) offer different things and has different limitations. So it might be smarter to ask the people who have already done this and know better than I do - what do you use? Is there a mocking tool (along with a supported testing framework) that can mock concrete classes, virtual, static and non static method, private methods, etc? Thanks a lot for your help:)

    I B 2 Replies Last reply
    0
    • M Member_14696978

      Hi I am not sure what is the right forum to publish this in (here or in the C++ forum) But I coudln't find any information about it too, which is odd. Anyway, Unit testing in C++: Since it is not as popular as unit testing in other high level languages, I need your recommendations and insights. I have a lot of legacy code- I was just given a project to which I have to have covered by at least 70% unit tests. I need to do a lot of refactoring. Different tools (mocking tools) offer different things and has different limitations. So it might be smarter to ask the people who have already done this and know better than I do - what do you use? Is there a mocking tool (along with a supported testing framework) that can mock concrete classes, virtual, static and non static method, private methods, etc? Thanks a lot for your help:)

      I Offline
      I Offline
      IlanGreen
      wrote on last edited by
      #2

      Hi,
      I recall being in the same situation 2 years ago.I had a lot of legacy code in my project and I had write unit tests for it.
      I have spent hours on researching and trying different tools for the task I was given, and it was not easy to find mocking tools
      that could satisfy my needs when it comes to different limitations I had which are similar to the ones you mentioned.
      I have tried different ones but then found GMock and later on FakeIT, both did quite a good job but couldn't help me with
      concret&static classes, private/static/virtual methods and I had to do a lot of refactoring in my code.
      Researching a little more and I found Isolator ++ (which is actually free now, I had to pay back then), which amazingly took care of such cases
      and saved me a lot of time...so you know where my recommendation goes to :slightly_smiling_face:

      1 Reply Last reply
      0
      • M Member_14696978

        Hi I am not sure what is the right forum to publish this in (here or in the C++ forum) But I coudln't find any information about it too, which is odd. Anyway, Unit testing in C++: Since it is not as popular as unit testing in other high level languages, I need your recommendations and insights. I have a lot of legacy code- I was just given a project to which I have to have covered by at least 70% unit tests. I need to do a lot of refactoring. Different tools (mocking tools) offer different things and has different limitations. So it might be smarter to ask the people who have already done this and know better than I do - what do you use? Is there a mocking tool (along with a supported testing framework) that can mock concrete classes, virtual, static and non static method, private methods, etc? Thanks a lot for your help:)

        B Offline
        B Offline
        Bohdan Stupak
        wrote on last edited by
        #3

        I guess I'm a bit late for the party. But I still think it's a useful reminder that if you want to check your application for correctness you may employ other tests as well. I.e. end-to-end tests. Might be easier to get a legacy system under test with them

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups