Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6091375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:19:13+00:00 2026-05-23T12:19:13+00:00

Using Visual Studio 2010 C++ with googletest. I’m new to unit testing and I’ve

  • 0

Using Visual Studio 2010 C++ with googletest. I’m new to unit testing and I’ve created a test solution to experiment with it. I have three projects in the solution:

HelloService (static lib)
HelloService.Tests (exe, a console app I think, linked with gmock_main.lib)
HelloApp (MFC exe, my main app)

I’ve got googletest (and googlemock) compiled linked and successfully working. My question is with the code test development cycle. I’m trying to understand the proper workflow with testing. Currently if I set HelloService.Tests as the “StartUp project” then when I hit F5 the tests run, but my HelloApp doesn’t. If I set my HelloApp as the startup project then when I hit F5 my app runs but my tests don’t.

I would think that I would want my “HelloApp” as the startup project but my tests to run when I build it and before I run it. Is that right? How do I set it up to do that?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:19:14+00:00Added an answer on May 23, 2026 at 12:19 pm

    The solution for me was to set the HelloApp as the StartUp project and then right click on the HelloApp project and choose “Project Dependencies…” and then check the HelloService.Tests project (the HelloService project was already checked). Now when I hit F5 the test project gets run (because HelloService.Tests already had a post-build event on it to run itself)

    My only concern is if creating a project dependency creates some kind of code dependency. My guess is it doesn’t but I’d like to know for sure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Visual Studio 2010, and I have a solution containing 2 C++ static
I'm using Visual Studio 2010 with the new website publish dialog. I have a
I'm currently using Visual Studio 2010 and have created a 'ASP.NET MVC 3 Web
Using Visual Studio 2010 I have created system service installer IndexingService (property ServiceName in
I'm using Visual Studio 2010 and created a bunch of unit tests. Here is
For reference, I'm using Visual Studio 2010. I have a custom build step defined
Using Visual Studio 2010 I created an Office 2010 Word add-in project that has
Using: Visual Studio 2010 Created: Console Application in C# Accessing: a Java created WSDL
I'm using Visual Studio 2010 / VB / dot net 4.0, and I have
Using Visual Studio 2010 SP1: #include <vector> //namespace XXX { struct Test { bool

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.