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

Test executable and test method method symbols detected but no tests found #149

Closed
vrogier opened this issue Jul 11, 2017 · 7 comments
Closed
Assignees
Labels

Comments

@vrogier
Copy link

vrogier commented Jul 11, 2017

Hi,

Until now, we were using resharper to run locally our unit tests but we would like to switch to GTA to enable it in our build process with vstest.

But I cannot make GTA to detect our gtests suite.

Here is the output of GTA:

No settings configured for test executable '[...]UnitTests.exe'; running with solution settings: AdditionalTestExecutionParam: '', BatchForTestSetup: '', BatchForTestTeardown: '', BreakOnFailure: False, CatchExceptions: True, DebugMode: True, KillProcessesOnCancel: False, MaxNrOfThreads: 8, NrOfTestRepetitions: 1, ParallelTestExecution: False, ParseSymbolInformation: False, PathExtension: '', PrintTestOutput: True, RunDisabledTests: False, ShowReleaseNotes: True, ShuffleTests: False, ShuffleTestsSeed: 0, TestDiscoveryRegex: '', TestDiscoveryTimeoutInSeconds: 60, TestNameSeparator: '', TimestampOutput: False, TraitsRegexesAfter: {}, TraitsRegexesBefore: {}, UseNewTestExecutionFramework: False, WorkingDir: '$(ExecutableDir)'
No Google Test indicator file found for executable [...]UnitTests.exe
'[...]UnitTests.exe' matches default regex '[Tt]est[s]?\.exe'
No settings configured for test executable '[...]UnitTests.exe'; running with solution settings: AdditionalTestExecutionParam: '', BatchForTestSetup: '', BatchForTestTeardown: '', BreakOnFailure: False, CatchExceptions: True, DebugMode: True, KillProcessesOnCancel: False, MaxNrOfThreads: 8, NrOfTestRepetitions: 1, ParallelTestExecution: False, ParseSymbolInformation: False, PathExtension: '', PrintTestOutput: True, RunDisabledTests: False, ShowReleaseNotes: True, ShuffleTests: False, ShuffleTestsSeed: 0, TestDiscoveryRegex: '', TestDiscoveryTimeoutInSeconds: 60, TestNameSeparator: '', TimestampOutput: False, TraitsRegexesAfter: {}, TraitsRegexesBefore: {}, UseNewTestExecutionFramework: False, WorkingDir: '$(ExecutableDir)'
Parsing pdb file "[...]UnitTests.pdb"
Found 149 test method symbols and 0 trait symbols in binary [...]UnitTests.exe
Found 0 tests in executable [...]UnitTests.exe

We are using latest GTA release using VS2017.
I've been trough the troublesoohting section without any luck.

The binary can be run with or without the list test command line option from any folder (no dependencies), resulting expected output.

But no tests detected from GTA :(
I've tried to play with the GTA options still with no luck.

I may have missed something trivial but I cannot see what.
Any ideas ?

Regards,

Vincent

@csoltenborn
Copy link
Owner

Hm, I do not see anything obvious, too. Can you provide the list of tests as produced by the test executable (e.g., the result of something like UnitTests.exe --gtest_list_tests >tests.txt and append that file)?

@vrogier
Copy link
Author

vrogier commented Jul 14, 2017

Hi,

Here is it
UnitTests.txt

Regards,

Vincent

@csoltenborn
Copy link
Owner

This is the output of the test run itself - we need the output with option --gtest_list_tests to check why our parser would not recognize your tests (this is my best guess so far)... glad to see that all your tests are green, though ;-)

@vrogier
Copy link
Author

vrogier commented Jul 16, 2017

Hi,

The unit test binary was run with the list test option.
The main function is passing arguments to the init Google test method.
But now I understand why no tests can be parsed from the output as it is not the expected one.
I will dive into Google test code to check why it is not only listing test despite it seems we provide the right argument.
Sorry for the inconvenience,
Regards

Vincent

@vrogier vrogier closed this as completed Jul 16, 2017
@csoltenborn csoltenborn self-assigned this Jul 17, 2017
@csoltenborn
Copy link
Owner

No problem! If you find out the cause, please share it here if your time allows...

@vrogier
Copy link
Author

vrogier commented Jul 17, 2017

Hi,

Found the issue. Quite raging...
The unit test binary project file was faulty.
It was defined as using Unicode and the code was using a wchar_t version of main()
But when running, the command argv contained ansi strings and not unicode strings despite being wchar_t* [] argument.
Thus google test did not see any argument and was running unit test whatever command line was.
We messed up when updating the existing unit test dll project used with MS framework to a google test
console app.
Now, arguments are correctly taken into account and GTA sees our tests :)

Once again, sorry for the inconvience.

Vincent

@vrogier vrogier reopened this Jul 17, 2017
@csoltenborn
Copy link
Owner

Thanks for letting us know! I might even add this to the trouble shooting section ;-)

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

No branches or pull requests

2 participants