Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for Xcode's TestNavigator caching the tests after the first run? #5

Open
ftrofin opened this issue Mar 22, 2016 · 0 comments

Comments

@ftrofin
Copy link

ftrofin commented Mar 22, 2016

First, this is a cool project, thanks for sharing it. (BTW, can you please add a license file so we know what the terms of usage are?)

I noticed a problem with Xcode in that after the first run of the tests (and discovering the Google tests which are added by runtime injection) it caches those suites and tests. If you add a second test to CounterTest.cpp:

TEST(Counter2, Decrement) {
Counter counter;
EXPECT_EQ(-1, counter.Decrement());
}

Now if you run GoogleTestCase again in TestNavigator it will only run the Counter test case with the initial tests (InitialState and Increment). The only workaround I found is to close the project and re-open it in XCode which causes XCode to lose all the dynamic XCTest information so when you run the GoogleTestCase if will discover (and cache) the new tests. Needless to say this is utterly annoying as I have to re-open the project any time I add/remove/disable a test.

Are you aware of this issue and if yes, do you know of a better workaround/fix?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant