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. BOOST C++ Library for MFC application

BOOST C++ Library for MFC application

Scheduled Pinned Locked Moved C / C++ / MFC
c++testingcombeta-testingtools
5 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 am very new to automation code Unit testing.I feel we can do Unit Testing using Boost Library for MFC code.So i tried for a sample example for its usage. I got a link from a link like - ''Designing Robust Objects with Boost[^] .Here he implimented for a DLL. But my application is a EXE(MDI application)and having lot of dependenies. Hence i'm looking for more sample which shows Unittesing for EXEs and Mocking activity for the dependency.And all using BOOST C++ library. Now i'm using its latestes version. OR else any suitable TOOL suggested for the same purpose. Kindly help me soon.

    _ 1 Reply Last reply
    0
    • P pk jain

      Hi, I am very new to automation code Unit testing.I feel we can do Unit Testing using Boost Library for MFC code.So i tried for a sample example for its usage. I got a link from a link like - ''Designing Robust Objects with Boost[^] .Here he implimented for a DLL. But my application is a EXE(MDI application)and having lot of dependenies. Hence i'm looking for more sample which shows Unittesing for EXEs and Mocking activity for the dependency.And all using BOOST C++ library. Now i'm using its latestes version. OR else any suitable TOOL suggested for the same purpose. Kindly help me soon.

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Unit testing is done for code such as C++ classes or functions. It will be the same for either a DLL or an EXE or however you package your code.

      «_Superman_»  _I love work. It gives me something to do between weekends.

      _Microsoft MVP (Visual C++) (October 2009 - September 2013)

      Polymorphism in C

      P 1 Reply Last reply
      0
      • _ _Superman_

        Unit testing is done for code such as C++ classes or functions. It will be the same for either a DLL or an EXE or however you package your code.

        «_Superman_»  _I love work. It gives me something to do between weekends.

        _Microsoft MVP (Visual C++) (October 2009 - September 2013)

        Polymorphism in C

        P Offline
        P Offline
        pk jain
        wrote on last edited by
        #3

        Thanks Superman for your suggestion. In my case, as it is a MFC application, there is lot of predefined classes which are being used in my application(MDI). Like - CString , CWinApp, CSerialization, ... etc. So how to handle those predefined class or class's methods. And some of the Dialog Boxes [Modal Dialog boxe] are there ,for them some input parameteres are there and some values are being returned from that dialog to the mail application. So for this we may have to create some Abstract class and some mocking lines need to handle the dependency. But i unable to implement the same. So i need some example implementation which may be easier to cath easily. Hence kindly help me .

        _ 1 Reply Last reply
        0
        • P pk jain

          Thanks Superman for your suggestion. In my case, as it is a MFC application, there is lot of predefined classes which are being used in my application(MDI). Like - CString , CWinApp, CSerialization, ... etc. So how to handle those predefined class or class's methods. And some of the Dialog Boxes [Modal Dialog boxe] are there ,for them some input parameteres are there and some values are being returned from that dialog to the mail application. So for this we may have to create some Abstract class and some mocking lines need to handle the dependency. But i unable to implement the same. So i need some example implementation which may be easier to cath easily. Hence kindly help me .

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          You will need to stub out the predefined classes and some APIs. You will also need to create other test harnesses to block out the UIs. All these will not be very straight forward to implement. I'm unable to show you code that I have since it is proprietary. You will need to search the web to see if you can find any examples. Since I learned them on the job, I'm not sure if there are any books available on this.

          «_Superman_»  _I love work. It gives me something to do between weekends.

          _Microsoft MVP (Visual C++) (October 2009 - September 2013)

          Polymorphism in C

          P 1 Reply Last reply
          0
          • _ _Superman_

            You will need to stub out the predefined classes and some APIs. You will also need to create other test harnesses to block out the UIs. All these will not be very straight forward to implement. I'm unable to show you code that I have since it is proprietary. You will need to search the web to see if you can find any examples. Since I learned them on the job, I'm not sure if there are any books available on this.

            «_Superman_»  _I love work. It gives me something to do between weekends.

            _Microsoft MVP (Visual C++) (October 2009 - September 2013)

            Polymorphism in C

            P Offline
            P Offline
            pk jain
            wrote on last edited by
            #5

            You are absolutely right. It seems this methodology defintely fulfill my requirement.Since last 2 weeks i'm struggling for the same. Similar type of methodology, some has adviced me also. Unfortunately i unable to contact him. Also i searched a lot from web,but faild to get any proper guidance. As i'm beginner to this area , iunable catch some of the web documents. I should not ask like this and also it is hard to find out time.But my kind reqest to you. If possible can you please create a small Dialog based/ SDI/ MDI application and use BOOST library/any good tool for its unit testing. I know,for you it'll take maximum 1- 1.5 Hrs to do.Really i'm feeling bad while asking you to work for me, but i am really in a big trouble. And i need to show some good progress by tomorow.So that i can give a confidence and i'll be able to implement for whole project .Hence kindly if you can able to prepare some protoype app(above), it'll be kind enough. So that i can able do some progres or it may enhance my confidence on further Unittesting work.Thats what my customer wants. Hence please try to help sooon. Additianlly i need to look at test coverage activity too. Thank you:)

            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