Closed MichaSommerWebDe closed 6 years ago
Please try to enable GTA's Debug mode through its options. It will tell which executables are considered for test discovery. If your executable is listed, but not recognized as a gtest executable, have a look at the trouble shooting section. Otherwise, this is a VS issue, since GTA relies on VS to report the executables to it. Hope this helps...
Hi,
runsettings are were loaded directly via Test->Test Settings File->Select Test Settings File Architecture was set to x64
I ran the project in GTA's Debug Mode and got in normal case (don't care about the name BoostTests ;) it works with Google Tests)
Directory is K:\Test
Test output is: see attached file Test_Output_ok.txt calling direct from PowerShell output is: see attached file PowerShell_Ok.txt
everything works fine…
Now I copied the same!!! project to K:\Test# (the only difference is the # in the name!)
Test Output is: [14.06.2018 20:53:53 Informational] No tests found to run.
but calling directly from PS shows: attached file PowerShell_nok.txt (test works fine)
using the BoostTest.TestApplication.exe.is_google_test file will also not show the tests in Test Explorer.
Resharper finds and runs the tests in both Directories.
If you need further information, please contact me! (in german would be fine ;))
Have a nice evening…
Best regards!
Michael
-----Ursprüngliche Nachricht----- Von: "Christian Soltenborn" notifications@github.com Gesendet: Donnerstag, 14. Juni 2018 17:43 An: csoltenborn/GoogleTestAdapter GoogleTestAdapter@noreply.github.com Cc: MichaSommerWebDe micha.sommer@web.de; Author author@noreply.github.com Betreff: Re: [csoltenborn/GoogleTestAdapter] Test will not be shown in VS-Test Explorer if a '#' is in ProjectDir (#221)
Please try to enable GTA's Debug mode through ist options. It will tell which executables are considered for test discovery. If your executable is listed, baut Not recognized as a gtest executable, have a look at the trouble shooting section
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/csoltenborn/GoogleTestAdapter/issues/221#issuecomment-397342028 PS K:\Test#\x64\Debug> .\BoostTest.TestApplication.exe [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from testfixture [ RUN ] testfixture.test1 [ OK ] testfixture.test1 (0 ms) [----------] 1 test from testfixture (1 ms total)
[----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (5 ms total) [ PASSED ] 1 test. PS K:\Test#\x64\Debug>
PS K:\test\x64\Debug> .\BoostTest.TestApplication.exe [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from testfixture [ RUN ] testfixture.test1 [ OK ] testfixture.test1 (0 ms) [----------] 1 test from testfixture (1 ms total)
[----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (6 ms total) [ PASSED ] 1 test. PS K:\test\x64\Debug>
[14.06.2018 20:53:53 Informational] No tests found to run.
[14.06.2018 20:48:09 Informational] ------ Run test started ------ [14.06.2018 20:48:11 Informational] Visual Studio Version: VS2017 [14.06.2018 20:48:11 Informational] Google Test Adapter: Test execution starting... [14.06.2018 20:48:11 Informational] Solution settings: AdditionalTestExecutionParam: '', BatchForTestSetup: '', BatchForTestTeardown: '', BreakOnFailure: False, CatchExceptions: True, DebugMode: True, KillProcessesOnCancel: False, MaxNrOfThreads: 4, NrOfTestRepetitions: 1, ParallelTestExecution: True, ParseSymbolInformation: True, PathExtension: '', PrintTestOutput: True, RunDisabledTests: True, ShowReleaseNotes: True, ShuffleTests: False, ShuffleTestsSeed: 0, TestDiscoveryRegex: '', TestDiscoveryTimeoutInSeconds: 30, TestNameSeparator: '', TimestampOutput: False, TraitsRegexesAfter: {}, TraitsRegexesBefore: {}, UseNewTestExecutionFramework: True, WorkingDir: '$(ExecutableDir)' [14.06.2018 20:48:11 Informational] No settings configured for test executable 'K:\Test\x64\Debug\BoostTest.TestApplication.exe'; running with solution settings: AdditionalTestExecutionParam: '', BatchForTestSetup: '', BatchForTestTeardown: '', BreakOnFailure: False, CatchExceptions: True, DebugMode: True, KillProcessesOnCancel: False, MaxNrOfThreads: 4, NrOfTestRepetitions: 1, ParallelTestExecution: True, ParseSymbolInformation: True, PathExtension: '', PrintTestOutput: True, RunDisabledTests: True, ShowReleaseNotes: True, ShuffleTests: False, ShuffleTestsSeed: 0, TestDiscoveryRegex: '', TestDiscoveryTimeoutInSeconds: 30, TestNameSeparator: '', TimestampOutput: False, TraitsRegexesAfter: {}, TraitsRegexesBefore: {}, UseNewTestExecutionFramework: True, WorkingDir: '$(ExecutableDir)' [14.06.2018 20:48:11 Informational] Parsing pdb file "K:\Test\x64\Debug\BoostTest.TestApplication.pdb" [14.06.2018 20:48:11 Informational] Found 1 test method symbols and 0 trait symbols in binary K:\Test\x64\Debug\BoostTest.TestApplication.exe [14.06.2018 20:48:11 Informational] Added testcase testfixture.test1 [14.06.2018 20:48:11 Informational] Found 1 tests in executable K:\Test\x64\Debug\BoostTest.TestApplication.exe [14.06.2018 20:48:11 Informational] No test case filter provided [14.06.2018 20:48:12 Informational] Running 1 tests... [14.06.2018 20:48:12 Informational] Using splitter based on test durations [14.06.2018 20:48:12 Informational] Executing tests on 1 threads [14.06.2018 20:48:12 Informational] Note that no test output will be shown on the test console when executing tests concurrently! [14.06.2018 20:48:12 Informational] No settings configured for test executable 'K:\Test\x64\Debug\BoostTest.TestApplication.exe'; running with solution settings: AdditionalTestExecutionParam: '', BatchForTestSetup: '', BatchForTestTeardown: '', BreakOnFailure: False, CatchExceptions: True, DebugMode: True, KillProcessesOnCancel: False, MaxNrOfThreads: 4, NrOfTestRepetitions: 1, ParallelTestExecution: True, ParseSymbolInformation: True, PathExtension: '', PrintTestOutput: True, RunDisabledTests: True, ShowReleaseNotes: True, ShuffleTests: False, ShuffleTestsSeed: 0, TestDiscoveryRegex: '', TestDiscoveryTimeoutInSeconds: 30, TestNameSeparator: '', TimestampOutput: False, TraitsRegexesAfter: {}, TraitsRegexesBefore: {}, UseNewTestExecutionFramework: True, WorkingDir: '$(ExecutableDir)' [14.06.2018 20:48:12 Informational] [T0] Reported 1 test results to VS during test execution, executable: 'K:\Test\x64\Debug\BoostTest.TestApplication.exe' [14.06.2018 20:48:12 Informational] [T0] Execution took 00:00:00.0601990 [14.06.2018 20:48:12 Informational] >>> Scheduling statistics <<< [14.06.2018 20:48:12 Informational] # of expected test case durations: 1 [14.06.2018 20:48:12 Informational] # of actual test case durations: 1 [14.06.2018 20:48:12 Informational] 1 expected durations have been found in actual durations [14.06.2018 20:48:12 Informational] Avg difference between expected and actual duration: 1.0ms [14.06.2018 20:48:12 Informational] Standard deviation: 0.0ms [14.06.2018 20:48:12 Informational] 1 worst differences: [14.06.2018 20:48:12 Informational] Test testfixture.test1: Expected 1ms, actual 0ms [14.06.2018 20:48:12 Informational] Google Test execution completed, overall duration: 00:00:00.3433021. [14.06.2018 20:48:12 Informational] ========== Run test finished: 1 run (0:00:02,4133621) ==========
If I see correctly, there is no output at all before the "No tests to run" line. That means that your executable is not reported to GTA by the VS test framework (which provides the executables which have just been compiled to GTA by invoking this method). Thus, VS does not recognize your executable as one to be reported to the installed test adapters (this is not about GTA being unable to handle your executable, it is about not even knowing about your executable). Btw: The string "No tests found to run" is not contained in my repository afaik, so this is already a message by VS.
From my quick glance, I fear there's nothing I can do about this... Your best option appears to be to contact MS about that issue.
Closed due to inactivity - feel free to re-open if you still have any questions!
Hi,
if my project lies in e.g. k:\Test\GoogleTest.App\GoogleTest.App.sln everything works fine... The same project in k:\Test#\GoogleTest.App\GoogleTest.App.sln and the test are not visible in Visual Studio Test Explorer.
Output-Tests [14.06.2018 12:31:21 Informational] No tests found to run.
In both cases I can run the tests successfully via command line. If you need further information dont hesitate to contact me.
Thanks Michael