TestContainer not found

Sysprogs forums Forums VisualGDB TestContainer not found

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #23513
    Paul-A
    Participant

    Hello,

    I have created an embedded project for unit tests for STM32. I use the wizard, and the project compiles. But if I try to launch the tests I have the following result:

    [17/01/2019 14:36:09 Informational] ------ Run test started ------
    [17/01/2019 14:36:10 Informational] Running tests from C:\EmbeddedProject1\EmbeddedProject2\EmbeddedProject2-Release.vgdbsettings...
    [17/01/2019 14:36:15 Error] System.InvalidOperationException: The following TestContainer was not found 'C:\EmbeddedProject1\EmbeddedProject2\EmbeddedProject2-Release.vgdbsettings'
    at Microsoft.VisualStudio.TestWindow.Controller.TestContainerProvider.<GetTestContainerAsync>d__61.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.InMemory.InMemoryDataStorage.<AccumulateTestCaseInternal>d__23.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.InMemory.InMemoryUnitTestWriter.<WriteTestCaseInternal>d__13.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.InMemory.InMemoryUnitTestWriter.<WriteTestResultsInternal>d__19.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.UnitTestWriter.<WriteTestResults>d__46.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Controller.TestRunRequest.<TestRunStatsChange>d__49.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Controller.TestRunRequest.<>c__DisplayClass50_0.<<OnTestRunStatsChange>b__0>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.UnitTestStorage.<ExecuteWhileOpen>d__30.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Controller.Request.<ExecuteWhileStorageIsOpen>d__100.MoveNext()
    [17/01/2019 14:36:20 Informational] Test container loaded (lookup: 13 msec, fetch: 0 msec, symbol list: 55 msec)
    
    [17/01/2019 14:36:20 Informational] ========== Run test finished: 0 run (0:00:10,7576961) ==========

    I didn’t modify source code, so it should launch the 3 default tests.

    I use VisualGDB 5.4 with visual studio 2017 15.9.5

    • This topic was modified 5 years, 3 months ago by support. Reason: formatting
    #23520
    support
    Keymaster

    Hi,

    Could you have accidentally deleted the .vgdbsettings file mentioned in the error? Please try creating a new test project from scratch. Are you able to run the tests from it? Does switching the new project to the Release configuration (you would need to build the project after switching the configuration) result in an error again?

    #23526
    Paul-A
    Participant

    The files are not deleted, and I have the same problem in debug and release configuration. As I said, the project is already “from scratch” because I just created an embedded project with the wizard. The only thing which is not as default parameters is “shared files”, “ARM toolchain”, “Embedded BSPs” and “Test Framewaork” there are not saved in C:\[…]\AppData\Local\VisualGDB\

    Is it the problem ? I need to set another path, because I share these files through git.

    #23542
    support
    Keymaster

    The test framework location should not be related. It looks like something on the VS side fails to load the test container.

    Please try setting the following registry value (DWORD):

    HKCU\SOFTWARE\Sysprogs\VisualGDB\Settings\ExtraVerboseTestExecutorLogging = 1

    Then restart Visual Studio and try running the tests and then debugging the tests. Then share the Test Output and the output from View->Other Windows->VisualGDB Diagonstics Console.

    #23544
    Paul-A
    Participant

    Ok here is the log:

    VisualGDB build 5.4.100.2737
    Startup initialization took 563 msec
    RenameHighlightSmartTaggerProvider: creating tagger for BuildOutput...
    Project enumeration for test discovery failed: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
    ------------------ System.NotImplementedException ------------------
    System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
       at EnvDTE.Project.get_FullName()
       at zf.f5..ctor(zf b, Project a)
       at zf.z1.x2(Project a)
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at v51.get_TestContainers()
    RenameHighlightSmartTaggerProvider: creating tagger for TestsOutput...
    Project enumeration for test discovery failed: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
    ------------------ System.NotImplementedException ------------------
    System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
       at EnvDTE.Project.get_FullName()
       at zf.f5..ctor(zf b, Project a)
       at zf.z1.x2(Project a)
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at v51.get_TestContainers()
    Project enumeration for test discovery failed: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
    ------------------ System.NotImplementedException ------------------
    System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
       at EnvDTE.Project.get_FullName()
       at zf.f5..ctor(zf b, Project a)
       at zf.z1.x2(Project a)
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at v51.get_TestContainers()
    Project enumeration for test discovery failed: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
    ------------------ System.NotImplementedException ------------------
    System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
       at EnvDTE.Project.get_FullName()
       at zf.f5..ctor(zf b, Project a)
       at zf.z1.x2(Project a)
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at v51.get_TestContainers()
    • This reply was modified 5 years, 3 months ago by Paul-A.
    • This reply was modified 5 years, 3 months ago by Paul-A.
    #23550
    support
    Keymaster

    Thanks for the log. Looks like Visual Studio throws an error while VisualGDB tries to enumerate the test containers. It might not be related to the original problem, but either way we have added better handling for this here: http://sysprogs.com/files/tmp/VisualGDB-5.4.100.2757.msi

    Unfortunately, you did not include the updated log from the regular View->Output->Tests (the registry setting would increase its verbosity), so there might be other issues preventing the tests from starting. If the updated build doesn’t solve the problem, please attach both VisualGDB Diagnostics log and the regular test output log.

    Please also consider repairing your VS installation – the problem might be caused by missing components of the VS side.

    #23551
    Paul-A
    Participant

    I have repaired VS just in case, and I have installed the MSI file you gave, this is the output console:

    [22/01/2019 13:18:36 Informational] ========== Discover test finished: 3 found (0:00:02,5226614) ==========
    [22/01/2019 13:18:36 Informational] ------ Run test started ------
    [22/01/2019 13:18:37 Informational] RunTests() - entry
    [22/01/2019 13:18:37 Informational] Running tests from C:\EmbeddedProject1\EmbeddedProject3\EmbeddedProject3-Release.vgdbsettings...
    [22/01/2019 13:18:37 Informational] Initializing test container from C:\EmbeddedProject1\EmbeddedProject3\EmbeddedProject3-Release.vgdbsettings...
    [22/01/2019 13:18:38 Informational] Discovering tests...
    [22/01/2019 13:18:38 Informational] Running test discoverer...
    [22/01/2019 13:18:38 Informational] Discovered 0 tests using the advanced discoverer
    [22/01/2019 13:18:38 Informational] Discovered 3 tests using regular discoverers
    [22/01/2019 13:18:38 Informational] Discovered 3 tests.
    [22/01/2019 13:18:38 Informational] Remote communication pipe absent.
    [22/01/2019 13:18:38 Informational] Starting test result streaming....
    [22/01/2019 13:18:40 Informational] ReportTestResults(C:\EmbeddedProject1\EmbeddedProject3\EmbeddedProject3-Release.vgdbsettings)
    [22/01/2019 13:18:40 Informational] Waiting for test packet...
    [22/01/2019 13:18:41 Informational] Got VisualGDB.TestEngine.TestReportingProtocolReader+ReferenceAddressPacket
    [22/01/2019 13:18:41 Informational] Finished processing VisualGDB.TestEngine.TestReportingProtocolReader+ReferenceAddressPacket
    [22/01/2019 13:18:41 Informational] Waiting for test packet...
    [22/01/2019 13:18:41 Informational] Got VisualGDB.TestEngine.TestReportingProtocolReader+TestStartingPacket
    [22/01/2019 13:18:41 Informational] Processing test start packet...
    [22/01/2019 13:18:42 Informational] Reporting test start: e48f9a1d-958b-466d-ac7d-707af163d93b
    [22/01/2019 13:18:42 Informational] Finished processing VisualGDB.TestEngine.TestReportingProtocolReader+TestStartingPacket
    [22/01/2019 13:18:42 Informational] Waiting for test packet...
    [22/01/2019 13:18:42 Informational] Got VisualGDB.TestEngine.TestReportingProtocolReader+TestFailedPacket
    [22/01/2019 13:18:42 Informational] Finished processing VisualGDB.TestEngine.TestReportingProtocolReader+TestFailedPacket
    [22/01/2019 13:18:42 Informational] Waiting for test packet...
    [22/01/2019 13:18:42 Error] System.InvalidOperationException: The following TestContainer was not found 'C:\EmbeddedProject1\EmbeddedProject3\EmbeddedProject3-Release.vgdbsettings'
    at Microsoft.VisualStudio.TestWindow.Controller.TestContainerProvider.<GetTestContainerAsync>d__61.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.InMemory.InMemoryDataStorage.<AccumulateTestCaseInternal>d__23.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.InMemory.InMemoryUnitTestWriter.<WriteTestCaseInternal>d__13.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.InMemory.InMemoryUnitTestWriter.<WriteTestResultsInternal>d__19.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.UnitTestWriter.<WriteTestResults>d__46.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Controller.TestRunRequest.<TestRunStatsChange>d__49.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Controller.TestRunRequest.<>c__DisplayClass50_0.<<OnTestRunStatsChange>b__0>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Data.UnitTestStorage.<ExecuteWhileOpen>d__30.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.VisualStudio.TestWindow.Controller.Request.<ExecuteWhileStorageIsOpen>d__100.MoveNext()
    [22/01/2019 13:18:52 Warning] The request has taken more than 10 seconds to respond, aborting it.

    For information, I have created a new solution with a new project, and it works, I don’t know where the difference could be.

    • This reply was modified 5 years, 2 months ago by Paul-A.
    • This reply was modified 5 years, 2 months ago by Paul-A.
    #23554
    support
    Keymaster

    Based on the log file, the test session actually starts, so the “missing test container” error doesn’t make sense. If creating a new project after reinstalling VS helped, most likely some global setting was corrupt and it affected some other setting in the project. If a newly created project works, please consider making a backup of it in case you run into the same problem again.

    You could also try deleting the .vs folder in the broken project (also the Debug/Release, VisualGDBCache, etc) to see if that fixes the problem, but it may not be worth the effort if newly created projects work.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.