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. General Programming
  3. C / C++ / MFC
  4. how to write UnitTest for a class derived from MFC class like CWinApp?

how to write UnitTest for a class derived from MFC class like CWinApp?

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestionai-testingtesting
2 Posts 2 Posters 0 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.
  • P Offline
    P Offline
    pk jain
    wrote on last edited by
    #1

    Hi, I need do wirte Unit-testing(Automated testing)code for our project. Some of the modules are developed in VC++(Using MFC).Its a Multiple Document Interface[MDI] application. I tried to use CPPUnit framework ,but i'm getting difficulties. Also CPPUNIT don't have TestCoverage facility. Hence kidly guide me how can i write test cases for pure MFC code. I mean the Unit testing code can handel MFC library & also the tool can able do the TestCoverage analysis.Any best & friendly Unit tesitng framework is avaialblle? Kindly help me out. Thanks in advance :)

    S 1 Reply Last reply
    0
    • P pk jain

      Hi, I need do wirte Unit-testing(Automated testing)code for our project. Some of the modules are developed in VC++(Using MFC).Its a Multiple Document Interface[MDI] application. I tried to use CPPUnit framework ,but i'm getting difficulties. Also CPPUNIT don't have TestCoverage facility. Hence kidly guide me how can i write test cases for pure MFC code. I mean the Unit testing code can handel MFC library & also the tool can able do the TestCoverage analysis.Any best & friendly Unit tesitng framework is avaialblle? Kindly help me out. Thanks in advance :)

      S Offline
      S Offline
      Stefan_Lang
      wrote on last edited by
      #2

      Since nobody answered so far... I've looked around some time ago, and found that almost all frameworks available for Windows require .NET, or at least managed C++. One of the few that doesn't is WinUnit: It requires some work for you (creating test classes for each class to test), but otherwise saves a lot of work by extracting the test cases directly from the binaries. I haven't yet tried it out myself because it wasn't really what I required, but it may be useful for your purposes. Should be easy enuogh to google for, and IIRC the documentation even contains references of alternate solutions.

      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