This is a migrated thread and some comments may be shown as answers.

Problem with the test runner (mstest)

7 Answers 174 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Morten Nilsen
Top achievements
Rank 1
Morten Nilsen asked on 28 Oct 2011, 10:08 AM
Hello,

I am running the latest internal build of JustCode on VS2010 Ultimate edition.

I have some problems with the test runner..
On a couple projects, it works perfectly fine, but on my largest project, it does not want to run any tests.

My test project was added in visual studio as a test project, and I have added a test class to it.
The test class contains two tests, and right clicking inside the file and selecting "Run Tests" shows the built-in test results window, and both tests are completed successfully.

If I hit ctrl+shift+t or right click and use the "Just Test" menu, I am shown the Unit Test Window, listing 2 tests. passed: 0 failed: 0 ignored: 0
Upon clicking the "run all tests" button, the text "Initialzing..." shows up for a few seconds to the right of the number of ignored tests, and disappears. All three counts remain as 0.

When I expand the tests in the treeview, they both have a red circle icon with the tooltip "Not Executed"
clicking one shows nothing in either of the three tabs "details", "console output" or "console errors"

The visual studio output and error list windows show nothing.

As an aside, the justcode box on the bottom of my visual studio window is showing a rotating arrow permanently.

Regards, Morten

7 Answers, 1 is accepted

Sort by
0
Blagoev
Telerik team
answered on 02 Nov 2011, 04:08 PM
Hi Morten Nilsen,

 Thanks for sending the issue. Can you send us the logs in %USERPROFILE%\AppData\Local\JustCode\Logs when this happens. Ideally you will clear this folder just before reproducing this so we know that we are looking into the exact log file. If its not easily reproducible send us all the log files in there so we can investigate further.

For the rotating arrow its already fixed and we are planing another internal build with this and more other fixes. Stay tuned and install it when available.


Best wishes,
Blagoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Morten Nilsen
Top achievements
Rank 1
answered on 03 Nov 2011, 05:06 PM
Hi,
Looking at the logs folder, I found this in a log when I tried running the tests just now:

ERROR 2011-11-03 17:02:38.633 : TestExecutor (4228): Unhandled Exception [HResult: 80070002]
System.IO.FileNotFoundException: Could not find file 'C:\hapro\tfs\Hapro\HQAS\localtestrun.testrunconfig'.
File name: 'C:\hapro\tfs\Hapro\HQAS\localtestrun.testrunconfig'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
   at System.Threading.CompressedStack.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
   at System.Xml.XmlTextReaderImpl.OpenUrl()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at Telerik.JustCode.UnitTesting.MsTest.Runner.MsTestRunner.#VTh(MsTestTestAssemblyTask task) in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.MsTest.Runner\MsTestRunner.cs:line 338
   at Telerik.JustCode.UnitTesting.MsTest.Runner.MsTestRunner.#Xwf(MsTestTestAssemblyTask task) in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.MsTest.Runner\MsTestRunner.cs:line 203
   at Telerik.JustCode.UnitTesting.MsTest.Runner.MsTestRunner.ExecuteRecursive(MsTestTestAssemblyTask assemblyTask) in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.MsTest.Runner\MsTestRunner.cs:line 84
   at Telerik.JustCode.UnitTesting.MsTest.Runner.MsTestRunner.RunTestTask(MsTestTestAssemblyTask testRunTask) in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.MsTest.Runner\MsTestRunner.cs:line 390
   at Telerik.JustCode.UnitTesting.MsTest.Runner.MsTestRunner.RunTestTask(UnitTestRunTask testRunTask) in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.MsTest.Runner\MsTestRunner.cs:line 461
   at Telerik.JustCode.UnitTesting.TestExecutor.CurrentAppDomainHost.Execute(UnitTestRunTask task) in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.TestExecutor\CurrentAppDomainHost.cs:line 30
   at Telerik.JustCode.UnitTesting.TestExecutor.CurrentAppDomainHost.Execute(UnitTestRunTask task)
   at Telerik.JustCode.UnitTesting.TestExecutor.IsolatedAppDomainHost.ExecuteTask() in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.TestExecutor\IsolatedAppDomainHost.cs:line 68
   at Telerik.JustCode.UnitTesting.TestExecutor.Executor.<>c__DisplayClass1.<Main>b__0() in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.TestExecutor\Executor.cs:line 70
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
Log Site Stacktrace:
   at Telerik.JustCode.Common.Logging.ExceptionInfo.GetExceptionString(Exception ex) in c:\B10\Manticore\Production2010_Release\Sources\Logging\ExceptionInfo.cs:line 91
   at Telerik.JustCode.Common.Logging.LogService.LogException(Exception ex, String message) in c:\B10\Manticore\Production2010_Release\Sources\Logging\LogService.cs:line 108
   at Telerik.JustCode.Common.Logger.LogException(Exception ex, String message) in c:\B10\Manticore\Production2010_Release\Sources\Logging\Logger.cs:line 117
   at Telerik.JustCode.UnitTesting.TestExecutor.Executor.CurrentDomain_UnhandledException(Object sender, UnhandledExceptionEventArgs e) in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.TestExecutor\Executor.cs:line 88
   at Telerik.JustCode.UnitTesting.TestExecutor.CurrentAppDomainHost.Execute(UnitTestRunTask task)
   at Telerik.JustCode.UnitTesting.TestExecutor.IsolatedAppDomainHost.ExecuteTask() in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.TestExecutor\IsolatedAppDomainHost.cs:line 69
   at Telerik.JustCode.UnitTesting.TestExecutor.Executor.<>c__DisplayClass1.<Main>b__0() in c:\B10\Manticore\Production2010_Release\Sources\UnitTesting.TestExecutor\Executor.cs:line 70
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

I do indeed not have such a file, just a local.testsettings file.
the mstest test runner must consider that file optional..

  -- Regards, Morten
0
Blagoev
Telerik team
answered on 22 Nov 2011, 09:58 AM
Hi Morten Nilsen,
I suspect this project got converted from VS2008 to VS2010 and somehow project test configuration got messed up. Indeed in VS2010 they changed the file to be local.testsettings. Some of mstests files is pointing to the wrong name you can try searching in Solution Items folder in VS to see which file is responsible.

Kind regards,
Blagoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Morten Nilsen
Top achievements
Rank 1
answered on 22 Nov 2011, 10:34 AM
Hi,
Yes, the project was converted from VS2008, but I do believe I manually deleted that file at some point..
Searching through the solution and opening the test project csproj file as well as the solution file in a text editor, I am unable to find any references to "localtestrun.testrunconfig"..

Cheers, Morten
0
Accepted
Blagoev
Telerik team
answered on 23 Nov 2011, 03:58 PM
Hello Morten Nilsen,

 The reference to "localtestrun.testrunconfig" is in the vsmdi file. There should be a storage attribute like try
storage="localtestrun.testrunconfig". In order to make it work you can remove this file from your solution.

Kind regards,
Blagoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Morten Nilsen
Top achievements
Rank 1
answered on 23 Nov 2011, 05:13 PM
Yes, removing the vsmdi file fixed it.
Just a note on that, though: removing the file from the solution and checking in pending changes is not enough, I had to find the file on the disk and manually delete it before it would run.

I hope you will be able to make the test runner not fail on this particular error in the future, it was quite frustrating.

  -- Cheers, Morten
0
Blagoev
Telerik team
answered on 24 Nov 2011, 09:58 AM
Hi Morten Nilsen,

 Glad its working for you. In fact the issue is not in JustCode test runner but in mstest framework. We will try handle this situation more correctly in our future versions

Best wishes,
Blagoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
General Discussions
Asked by
Morten Nilsen
Top achievements
Rank 1
Answers by
Blagoev
Telerik team
Morten Nilsen
Top achievements
Rank 1
Share this question
or