GithubHelp home page GithubHelp logo

aspnet / testing Goto Github PK

View Code? Open in Web Editor NEW
66.0 55.0 41.0 754 KB

[Archived] Testing infrastructure, including support for xUnit.net and StyleCop. Project moved to https://github.com/aspnet/Extensions

aspnet-product

testing's Introduction

testing's People

Contributors

ajaybhargavb avatar analogrelay avatar anpete avatar aspnetci avatar brennanconroy avatar bricelam avatar chengtian avatar davidfowl avatar dougbu avatar eilon avatar glennc avatar grabyourpitchforks avatar halter73 avatar haok avatar henkmollema avatar hishamco avatar jbagga avatar jkotalik avatar juntaoluo avatar kichalla avatar kirthik avatar loudej avatar natemcmaster avatar ntaylormullen avatar pakrym avatar pranavkm avatar ryanbrandenburg avatar rynowak avatar tratcher avatar troydai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

testing's Issues

Hang inside of Assembly.Load when running all tests in Mvc

Repro:
Runall Tests in Mvc sometimes hangs.

Possible deadlock issue.

Stack:

    mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout, bool exitContext)   Unknown
    mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout) Unknown
    mscorlib.dll!System.Threading.ManualResetEventSlim.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken)  Unknown
    mscorlib.dll!System.Threading.Tasks.Task.SpinThenBlockingWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.InternalWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task<Microsoft.Framework.Runtime.CompileResponse>.GetResultCore(bool waitCompletionNotification)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.Result.get()   Unknown
    Microsoft.Framework.Runtime.Compilation.DesignTime.dll!Microsoft.Framework.Runtime.DesignTimeHostProjectCompiler.CompileProject(Microsoft.Framework.Runtime.Compilation.ICompilationProject project, Microsoft.Framework.Runtime.ILibraryKey target, System.Func<Microsoft.Framework.Runtime.Compilation.ILibraryExport> referenceResolver, System.Func<System.Collections.Generic.IList<Microsoft.Framework.Runtime.Compilation.ResourceDescriptor>> resourcesResolver)    Unknown
    Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.ProjectLibraryExportProvider.GetLibraryExport.AnonymousMethod__0(Microsoft.Framework.Runtime.Caching.CacheContext ctx)  Unknown
    Microsoft.Framework.Runtime.Interfaces.dll!Microsoft.Framework.Runtime.Caching.CacheExtensions.Get.AnonymousMethod__0(Microsoft.Framework.Runtime.Caching.CacheContext ctx) Unknown
    Microsoft.Framework.Runtime.Caching.dll!Microsoft.Framework.Runtime.Caching.Cache.CreateEntry(object k, System.Func<Microsoft.Framework.Runtime.Caching.CacheContext, object> acquire)  Unknown
    Microsoft.Framework.Runtime.Caching.dll!Microsoft.Framework.Runtime.Caching.Cache.AddEntry.AnonymousMethod__0() Unknown
    mscorlib.dll!System.Lazy<Microsoft.Framework.Runtime.Caching.Cache.CacheEntry>.CreateValue()    Unknown
    mscorlib.dll!System.Lazy<Microsoft.Framework.Runtime.Caching.Cache.CacheEntry>.LazyInitValue()  Unknown
    mscorlib.dll!System.Lazy<Microsoft.Framework.Runtime.Caching.Cache.CacheEntry>.Value.get()  Unknown
    Microsoft.Framework.Runtime.Caching.dll!Microsoft.Framework.Runtime.Caching.Cache.Get(object key, System.Func<Microsoft.Framework.Runtime.Caching.CacheContext, object> factory)    Unknown
    Microsoft.Framework.Runtime.Interfaces.dll!Microsoft.Framework.Runtime.Caching.CacheExtensions.Get<Microsoft.Framework.Runtime.Compilation.ILibraryExport>(Microsoft.Framework.Runtime.Caching.ICache cache, object key, System.Func<Microsoft.Framework.Runtime.Caching.CacheContext, Microsoft.Framework.Runtime.Compilation.ILibraryExport> factory) Unknown
    Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.ProjectLibraryExportProvider.GetLibraryExport(Microsoft.Framework.Runtime.ILibraryKey target)   Unknown
    Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.CompositeLibraryExportProvider.GetLibraryExport.AnonymousMethod__0(Microsoft.Framework.Runtime.Compilation.ILibraryExportProvider r)    Unknown
    System.Core.dll!System.Linq.Enumerable.WhereSelectArrayIterator<System.__Canon, System.__Canon>.MoveNext()  Unknown
    System.Core.dll!System.Linq.Enumerable.FirstOrDefault<Microsoft.Framework.Runtime.Compilation.ILibraryExport>(System.Collections.Generic.IEnumerable<Microsoft.Framework.Runtime.Compilation.ILibraryExport> source, System.Func<Microsoft.Framework.Runtime.Compilation.ILibraryExport, bool> predicate)   Unknown
    Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.CompositeLibraryExportProvider.GetLibraryExport(Microsoft.Framework.Runtime.ILibraryKey target) Unknown
    Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.LibraryManager.GetLibraryExport(string name, string aspect) Unknown
    Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.Loader.ProjectAssemblyLoader.Load(string name, Microsoft.Framework.Runtime.IAssemblyLoadContext loadContext)    Unknown
    Microsoft.Framework.Runtime.dll!Microsoft.Framework.Runtime.Loader.ProjectAssemblyLoader.Load(string name)  Unknown
    dnx.host.dll!dnx.host.LoaderContainer.Load(string name) Unknown
    dnx.host.dll!dnx.host.DefaultLoadContext.LoadAssembly(string name)  Unknown
    Microsoft.Framework.Runtime.Loader.dll!Microsoft.Framework.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(string name, System.Func<string, System.Reflection.Assembly> factory)    Unknown
    Microsoft.Framework.Runtime.Loader.dll!Microsoft.Framework.Runtime.Loader.LoadContext.LoadAssemblyImpl(string name) Unknown
>   Microsoft.Framework.Runtime.Loader.dll!Microsoft.Framework.Runtime.Loader.LoadContext.ResolveAssembly(object sender, System.ResolveEventArgs args)  Unknown
    mscorlib.dll!System.AppDomain.OnAssemblyResolveEvent(System.Reflection.RuntimeAssembly assembly, string assemblyFullName)   Unknown
    [Native to Managed Transition]  
    [Managed to Native Transition]  
    mscorlib.dll!System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName fileName, string codeBase, System.Security.Policy.Evidence assemblySecurity, System.Reflection.RuntimeAssembly locationHint, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks)    Unknown
    mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity, System.Reflection.RuntimeAssembly reqAssembly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks)    Unknown
    mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoad(string assemblyString, System.Security.Policy.Evidence assemblySecurity, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool forIntrospection)   Unknown
    mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoad(string assemblyString, System.Security.Policy.Evidence assemblySecurity, ref System.Threading.StackCrawlMark stackMark, bool forIntrospection)  Unknown
    mscorlib.dll!System.Reflection.Assembly.Load(string assemblyString) Unknown
    Microsoft.Framework.Runtime.Loader.dll!Microsoft.Framework.Runtime.Loader.LoadContext.Load(string name) Unknown
    Microsoft.Framework.Runtime.Loader.dll!Microsoft.Framework.Runtime.Loader.LoadContext.ResolveAssembly(object sender, System.ResolveEventArgs args)  Unknown
    mscorlib.dll!System.AppDomain.OnAssemblyResolveEvent(System.Reflection.RuntimeAssembly assembly, string assemblyFullName)   Unknown
    [Native to Managed Transition]  
    [Managed to Native Transition]  
    [Native to Managed Transition]  
    mscorlib.dll!System.RuntimeType.CreateInstanceSlow(bool publicOnly, bool skipCheckThis, bool fillCache, ref System.Threading.StackCrawlMark stackMark)  Unknown
    mscorlib.dll!System.Activator.CreateInstance(System.Type type, bool nonPublic)  Unknown
    mscorlib.dll!System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes, ref System.Threading.StackCrawlMark stackMark)  Unknown
    mscorlib.dll!System.Activator.CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) Unknown
    mscorlib.dll!System.Activator.CreateInstance(System.Type type, object[] args)   Unknown
    xunit.execution.AspNet.dll!ReflectionAbstractionExtensions.CreateTestClass.AnonymousMethod__0() Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.ExecutionTimer.Aggregate(System.Action action) Unknown
    xunit.execution.AspNet.dll!ReflectionAbstractionExtensions.CreateTestClass(Xunit.Abstractions.ITest test, System.Type testClassType, object[] constructorArguments, Xunit.Sdk.IMessageBus messageBus, Xunit.Sdk.ExecutionTimer timer, System.Threading.CancellationTokenSource cancellationTokenSource) Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestInvoker<System.__Canon>.CreateTestClass()  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestInvoker<Xunit.Sdk.IXunitTestCase>.RunAsync.AnonymousMethod__44_0() Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<decimal>.Start<Xunit.Sdk.TestInvoker<Xunit.Sdk.IXunitTestCase>.<<RunAsync>b__44_0>d>(ref Xunit.Sdk.TestInvoker<Xunit.Sdk.IXunitTestCase>.<<RunAsync>b__44_0>d stateMachine) Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestInvoker<Xunit.Sdk.IXunitTestCase>.RunAsync.AnonymousMethod__44_0() Unknown
    xunit.core.dll!Xunit.Sdk.ExceptionAggregator.RunAsync<decimal>(System.Func<System.Threading.Tasks.Task<decimal>> code) Line 107 C#
    xunit.execution.AspNet.dll!Xunit.Sdk.TestInvoker<System.__Canon>.RunAsync() Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestRunner.InvokeTestMethodAsync(Xunit.Sdk.ExceptionAggregator aggregator)    Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<decimal>.Start<Xunit.Sdk.XunitTestRunner.<InvokeTestMethodAsync>d__5>(ref Xunit.Sdk.XunitTestRunner.<InvokeTestMethodAsync>d__5 stateMachine)   Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestRunner.InvokeTestMethodAsync(Xunit.Sdk.ExceptionAggregator aggregator)    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestRunner.InvokeTestAsync(Xunit.Sdk.ExceptionAggregator aggregator)  Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.__Canon>.Start<Xunit.Sdk.XunitTestRunner.<InvokeTestAsync>d__4>(ref Xunit.Sdk.XunitTestRunner.<InvokeTestAsync>d__4 stateMachine)    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestRunner.InvokeTestAsync(Xunit.Sdk.ExceptionAggregator aggregator)  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestRunner<System.__Canon>.RunAsync.AnonymousMethod__0()   Unknown
    xunit.core.dll!Xunit.Sdk.ExceptionAggregator.RunAsync<System.Tuple<decimal, string>>(System.Func<System.Threading.Tasks.Task<System.Tuple<decimal, string>>> code)  C#
    xunit.execution.AspNet.dll!Xunit.Sdk.TestRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()    Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Xunit.Sdk.RunSummary>.Start<Xunit.Sdk.TestRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__43>(ref Xunit.Sdk.TestRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__43 stateMachine)    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestCaseRunner.RunTestAsync() Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestCaseRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()    Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Xunit.Sdk.RunSummary>.Start<Xunit.Sdk.TestCaseRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__19>(ref Xunit.Sdk.TestCaseRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__19 stateMachine)    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestCaseRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestCase.RunAsync(Xunit.Abstractions.IMessageSink diagnosticMessageSink, Xunit.Sdk.IMessageBus messageBus, object[] constructorArguments, Xunit.Sdk.ExceptionAggregator aggregator, System.Threading.CancellationTokenSource cancellationTokenSource) Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestMethodRunner.RunTestCaseAsync(Xunit.Sdk.IXunitTestCase testCase)  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestMethodRunner<Xunit.Sdk.IXunitTestCase>.RunTestCasesAsync() Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Xunit.Sdk.RunSummary>.Start<Xunit.Sdk.TestMethodRunner<Xunit.Sdk.IXunitTestCase>.<RunTestCasesAsync>d__32>(ref Xunit.Sdk.TestMethodRunner<Xunit.Sdk.IXunitTestCase>.<RunTestCasesAsync>d__32 stateMachine)  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestMethodRunner<Xunit.Sdk.IXunitTestCase>.RunTestCasesAsync() Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestMethodRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()  Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Xunit.Sdk.RunSummary>.Start<Xunit.Sdk.TestMethodRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__31>(ref Xunit.Sdk.TestMethodRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__31 stateMachine)    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestMethodRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestClassRunner.RunTestMethodAsync(Xunit.Abstractions.ITestMethod testMethod, Xunit.Abstractions.IReflectionMethodInfo method, System.Collections.Generic.IEnumerable<Xunit.Sdk.IXunitTestCase> testCases, object[] constructorArguments) Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestClassRunner<Xunit.Sdk.IXunitTestCase>.RunTestMethodsAsync()    Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Xunit.Sdk.RunSummary>.Start<Xunit.Sdk.TestClassRunner<Xunit.Sdk.IXunitTestCase>.<RunTestMethodsAsync>d__34>(ref Xunit.Sdk.TestClassRunner<Xunit.Sdk.IXunitTestCase>.<RunTestMethodsAsync>d__34 stateMachine)    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestClassRunner<Xunit.Sdk.IXunitTestCase>.RunTestMethodsAsync()    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestClassRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()   Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Xunit.Sdk.RunSummary>.Start<Xunit.Sdk.TestClassRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__33>(ref Xunit.Sdk.TestClassRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__33 stateMachine)  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestClassRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()   Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestCollectionRunner.RunTestClassAsync(Xunit.Abstractions.ITestClass testClass, Xunit.Abstractions.IReflectionTypeInfo class, System.Collections.Generic.IEnumerable<Xunit.Sdk.IXunitTestCase> testCases) Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestCollectionRunner<Xunit.Sdk.IXunitTestCase>.RunTestClassesAsync()   Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Xunit.Sdk.RunSummary>.Start<Xunit.Sdk.TestCollectionRunner<Xunit.Sdk.IXunitTestCase>.<RunTestClassesAsync>d__28>(ref Xunit.Sdk.TestCollectionRunner<Xunit.Sdk.IXunitTestCase>.<RunTestClassesAsync>d__28 stateMachine)  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestCollectionRunner<Xunit.Sdk.IXunitTestCase>.RunTestClassesAsync()   Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestCollectionRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()  Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Xunit.Sdk.RunSummary>.Start<Xunit.Sdk.TestCollectionRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__27>(ref Xunit.Sdk.TestCollectionRunner<Xunit.Sdk.IXunitTestCase>.<RunAsync>d__27 stateMachine)    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.TestCollectionRunner<Xunit.Sdk.IXunitTestCase>.RunAsync()  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionAsync(Xunit.Sdk.IMessageBus messageBus, Xunit.Abstractions.ITestCollection testCollection, System.Collections.Generic.IEnumerable<Xunit.Sdk.IXunitTestCase> testCases, System.Threading.CancellationTokenSource cancellationTokenSource)  Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionsAsync.AnonymousMethod__1()   Unknown
    mscorlib.dll!System.Threading.Tasks.Task<System.Threading.Tasks.Task<Xunit.Sdk.RunSummary>>.InnerInvoke()   Unknown
    mscorlib.dll!System.Threading.Tasks.Task.Execute()  Unknown
    mscorlib.dll!System.Threading.Tasks.Task.ExecutionContextCallback(object obj)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Unknown
    mscorlib.dll!System.Threading.Tasks.SynchronizationContextTaskScheduler.PostCallback(object obj)    Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc.AnonymousMethod__0(object _)    Unknown
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc()   Unknown
    xunit.execution.AspNet.dll!Xunit.Sdk.XunitWorkerThread..ctor.AnonymousMethod__0()   Unknown
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)    Unknown
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()    Unknown

Provide --nologo or --quiet command-line option for xUnit.Net test runner

Currently cannot reduce the noise from the xUnit.Net test runner. Example output is:

xUnit.net Project K test runner (32-bit Asp.Net,Version=v5.0)
Copyright (C) 2014 Outercurve Foundation, Microsoft Open Technologies, Inc.

Starting: Microsoft.AspNet.Mvc.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Finished: Microsoft.AspNet.Mvc.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

=== TEST EXECUTION SUMMARY ===
   Microsoft.AspNet.Mvc.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null  Total: 8, Failed: 0, Skipped: 0, Time: 2.320s

Would be nice to have an option (--nologo) to at least remove the first three lines. Better to have an option (--quiet) for output similar to that from kpm build --quiet e.g.

Testing Microsoft.AspNet.Mvc.Test for 32-bit Asp.Net,Version=v5.0

Tests succeeded.
    8 Test(s)
    0 Failure(s)
    0 Skip(s)

Best if the above were in multiple colours 😈

Test Microsoft.Framework.TestHost.TestHostTest.ListTest failed on AppVeyor because it fails to initalize DIA DataSource

The test expects 8 lines of output, but it returns 9 when is run on AppVeyor. The extra line indicate it fails to initialize the DIA DataSource.

   Microsoft.Framework.TestHost.TestHostTest.ListTest [FAIL]
      Output is not 8 lines: [(Log) -> {
        "Name": "Microsoft.Framework.TestHost.TestAdapter.SourceInformationProvider",
        "EventId": 0,
        "Level": "Warning",
        "Message": "Failed to create DIA DataSource. No source information will be available.\r\nSystem.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {E6756135-1E65-4D17-8576-610761398C3C} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).\r\n   at Microsoft.Framework.TestHost.TestAdapter.SourceInformationProvider.EnsureInitialized() in C:\\projects\\testing\\src\\Microsoft.Framework.TestHost\\TestAdapter\\SourceInformationProvider.cs:line 155"
      };(TestDiscovery.TestFound) -> {
        "CodeFilePath": null,
        "DisplayName": "SampleTest.True_is_true",
        "FullyQualifiedName": "Sample.Tests.SampleTest.True_is_true",
        "Id": "aff12a4f-a508-2f73-ec7f-5fc8db5b9664",
        "LineNumber": null,
        "Properties": {}
      };(TestDiscovery.TestFound) -> {
        "CodeFilePath": null,
        "DisplayName": "SampleTest.TheoryTest1(x: 1)",
        "FullyQualifiedName": "Sample.Tests.SampleTest.TheoryTest1(59aa4e764883ee83fff87a6781c1c0b8f53afc9c)",
        "Id": "ca59256b-00d1-5304-567b-d8d451a60193",
        "LineNumber": null,
        "Properties": {}
      };(TestDiscovery.TestFound) -> {
        "CodeFilePath": null,
        "DisplayName": "SampleTest.TheoryTest1(x: 2)",
        "FullyQualifiedName": "Sample.Tests.SampleTest.TheoryTest1(0ba594fd0db39798c70de5305d472967a4c7b338)",
        "Id": "017433d5-b59f-5ac5-89a5-b9749609d946",
        "LineNumber": null,
        "Properties": {}
      };(TestDiscovery.TestFound) -> {
        "CodeFilePath": null,
        "DisplayName": "SampleTest.TheoryTest1(x: 3)",
        "FullyQualifiedName": "Sample.Tests.SampleTest.TheoryTest1(0ecf2995668df64760d3531efb89bc4b4d34b36e)",
        "Id": "936079c7-26b5-a1f4-ec4a-427c1971cab7",
        "LineNumber": null,
        "Properties": {}
      };(TestDiscovery.TestFound) -> {
        "CodeFilePath": null,
        "DisplayName": "SampleTest.TheoryTest2(x: 1, s: \"Hi\")",
        "FullyQualifiedName": "Sample.Tests.SampleTest.TheoryTest2(42c42d4a10ab38fc9de2aea361f4f43dd8e56d59)",
        "Id": "3a95a691-3f50-af4d-e35b-3ce9392fe5a8",
        "LineNumber": null,
        "Properties": {}
      };(TestDiscovery.TestFound) -> {
        "CodeFilePath": null,
        "DisplayName": "SampleTest.TheoryTest2(x: 2, s: \"Hi\")",
        "FullyQualifiedName": "Sample.Tests.SampleTest.TheoryTest2(af8bc6dd76b16ffd19a4f2f6046f5ec97723e5da)",
        "Id": "cb2041af-e504-c9bb-bc85-3a46086d0dc4",
        "LineNumber": null,
        "Properties": {}
      };(TestDiscovery.TestFound) -> {
        "CodeFilePath": null,
        "DisplayName": "SampleTest.TheoryTest2(x: 3, s: \"Hi\")",
        "FullyQualifiedName": "Sample.Tests.SampleTest.TheoryTest2(1815f6eb5166a4bee27340d5caf1838077932d3d)",
        "Id": "97d74947-1db7-990e-2d79-b3ceb6934a10",
        "LineNumber": null,
        "Properties": {}
      };(TestDiscovery.Response) -> null]
      Expected: True
      Actual:   False
      Stack Trace:
         TestHostTest.cs(43,0): at Microsoft.Framework.TestHost.TestHostTest.<ListTest>d__2.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)
         --- 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)
         --- 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)
Finished:    Microsoft.Framework.TestHost.Tests

=== TEST EXECUTION SUMMARY ===
   Microsoft.Framework.TestHost.Tests  Total: 6, Errors: 0, Failed: 1, Skip

Test discovery doesn't return any tests when running on coreclr

Repro:

  1. Create a new ASP.Net 5 Console Application
  2. update project.json to include xunit -
{
    "dependencies": {
        "Xunit.KRunner": "1.0.0-beta-*"

    },
    "commands": {
        "test": "Xunit.KRunner"
    },

    "frameworks": {
        "aspnet50": {
            "dependencies": {
            }
        },
        "aspnetcore50": {
            "dependencies": {
                "System.Runtime": "4.0.20-beta-*"
            }

        }
    }
}
  1. Add the following tests:
using Xunit;

namespace MyTests
{
    public class UnitTests
    {
        [Fact]
        public void UnitTest1()
        {
            Assert.True(true);
        }

        [Fact]
        public void UnitTest2()
        {
            Assert.True(true);
        }
    }
}
  1. Open Test Explorer
  2. Build project

Tests above show up in test explorer
6. Go to project properties and change CLR to CoreCLR-x86 instead
7. Build project again

No tests will show up in test explorer

I debugged into the VS code and it appears runtime is not returning any tests so seems like a runtime issue.

VS integration unable to run tests with more than one parameter

After running Run All in the Test Explorer window, I was surprised to see 1039 Passed tests (yah!) and 319 Not Run tests (boo!). The Not run tests consistently have more complicated parameters -- more than one parameter and (in a few cases) a parameter of an array type. These tests can't be executed even if specifically selected.

K standard goals runs unit tests

Every project.json in the test folder is executed through the xUnit program entry point from Build.cmd, both locally and on CI server.

Support AppVeyor

I'm just playing around with ASP.NET vNext to see how things work, and I uploaded a project to AppVeyor at https://ci.appveyor.com/project/Alxandr/appvisum-next. The result was almost "JustWorks(TM)", with the exception that tests aren't being reported to AppVeyor.

According to their docs, in order to run xunit-tests one should do:

xunit.console <assembly> /appveyor

However, does the KRunner support such arguments? And where would I supply them?

NUnit test runner for KRuntime

Will there be a test runner for NUnit?

There is no fork of NUnit in ASP.NET repositories. How should I start if I wanted to write one myself?

No xunit.runner.kre compatible with Beta2 and VS 2015 CTP 5

On the aspnetmaster feed xunit.runner.kre does not exist. If you use the aspnetvnext and allow for "xunit.runner.kre": "1.0.0-*" on your package.json as described on the wiki in this repo (this page) you will get today version 1.0.0-beta4-1041. If you let that happen, this is what happens to Visual Studio:
image
Nothing works on VS 2015 CTP 5.
If you install k, upgrade to beta2, you can cd into the project dir, and then you can kpm compile, and even k test, and it will all work. It is VS that is completely lost.

Test discovery also does not work, so this is definitely linked to issue #64.

I am not sure if we are supposed to keep using xunit.kunner with beta2, but I tried and it also does not work. It does not even install.

Until beta1 and VS 2015 Preview I was able to use a rc1 package. But they have all been taken down from myget, and now no package works.

I need some workaround to use xunit.runner.kre and VS. I know this is still early beta stages, but I am already working on it.

To repro: create a VM on azure using the latest VS 2015 template, create a ASPNET class library, try to add xunit.runner.kre, it won't find the pkg. Add the aspnetmaster feed to VS, it will not find the pacakge. Add the aspnetvnext feed, it will find a beta4 package and restore it. Edit the Class1.cs file, you will see that you don't get intellisense for Xunit. Add using Xunit and create a method with a Fact attribute. Close VS, open it again, you will see the above errors. VS can't find System, can't find anything.
Oddly enough, you are able to debug if you add the script to package.json. But VS just became notepad until this is fixed.

Background test runner

While brainstorming, it was mentioned that we should create a background test runner. This runner would watch for file changes and continually run the tests in the background. If tests failed then you would be notified with a toast or tray notification.

Xunit test execution is failing on aspnetcore50 with MethodAccessException

Xunit test execution fails on aspnetcore50 when run from VS.

------ Run test started ------
Running tests in 'C:\Users\anandjp\Documents\Visual Studio 14\Projects\WebApplication4\test\WebApplication4.Tests\project.json'
Error running tests in 'C:\Users\anandjp\Documents\Visual Studio 14\Projects\WebApplication4\test\WebApplication4.Tests\project.json'
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: System.MethodAccessException: Attempt by security transparent method 'DynamicClass.lambda_method(System.Runtime.CompilerServices.Closure, System.Object[])' to access security critical method 'Newtonsoft.Json.Utilities.CollectionWrapper`1..ctor(System.Collections.Generic.ICollection`1)' failed.
lambda_method(Closure , Object[] )
Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(Object list)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList(JsonReader reader, JsonArrayContract contract, Boolean& createdFromNonDefaultCreator)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
Newtonsoft.Json.Linq.JToken.ToObject[T]()
Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessMessage()
Microsoft.Framework.DesignTimeHost.ApplicationContext.DoProcessLoop()
Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessLoop(Object state) --- End of inner exception stack trace ---
System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
Microsoft.VisualStudio.Web.KUnit.TestAdapter.Execution.HostExtensions.ExecuteTests(IHost host, IFrameworkHandle framework, IEnumerable`1 tests, KUnitTestConfiguration testConfiguration)
Microsoft.VisualStudio.Web.KUnit.TestAdapter.KUnitTestExecutor.RunTests(IEnumerable`1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle) ---> (Inner Exception #0) System.InvalidOperationException: System.MethodAccessException:  Attempt by security transparent method 'DynamicClass.lambda_method(System.Runtime.CompilerServices.Closure, System.Object[])' to access security critical method 'Newtonsoft.Json.Utilities.CollectionWrapper`1..ctor(System.Collections.Generic.ICollection`1)' failed.
lambda_method(Closure , Object[] )
Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(Object list)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList(JsonReader reader, JsonArrayContract contract, Boolean& createdFromNonDefaultCreator)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
Newtonsoft.Json.Linq.JToken.ToObject[T]()
Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessMessage()
Microsoft.Framework.DesignTimeHost.ApplicationContext.DoProcessLoop()
Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessLoop(Object state)..ctor(System.Collections.Generic.ICollection`1)' failed.
lambda_method(Closure , Object[] )
Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(Object list)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList(JsonReader reader, JsonArrayContract contract, Boolean& createdFromNonDefaultCreator)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
Newtonsoft.Json.Linq.JToken.ToObject[T]()
Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessMessage()
Microsoft.Framework.DesignTimeHost.ApplicationContext.DoProcessLoop()
Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessLoop(Object state)

Visual Studio fails to run some tests

"Run All" in the Razor repository does not execute all of the tests. This command leaves 50 to 150 tests in the "Not Run Tests" bucket. An "Unexpected error detected. Check the Tests Output pane for details." message displays in the VS status bar.
Not sure what distinguishes the "Not Tun" tests but hit this consistently (assuming tests show up in Text Explorer at all 😦 ). Repeated "Run All" invocations can be better or worse but never run everything.
The mentioned Output pane shows:

Test adapter sent back a result for an unknown test case. Ignoring result for 'Microsoft.AspNet.Razor.Runtime.TagHelpers.TagHelperExecutionContextTest.Add_MaintainsTagHelpers'.
Test adapter sent back a result for an unknown test case. Ignoring result for 'Microsoft.AspNet.Razor.Runtime.Test.TagHelpers.TagHelperScopeManagerTest.End_ThrowsIfNoScope'.
Test adapter sent back a result for an unknown test case. Ignoring result for 'Microsoft.AspNet.Razor.Runtime.TagHelpers.TagHelperDescriptorResolverTest.TypeResolver_OnlyReturnsValidTagHelpersForAssemblyLookup'.
...

Suspect there should be as many lines in that block as not run tests.
Note selecting the "Not run tests" successfully executes the problematic tests. Haven't seen any errors reported when executing tests from the command line.

AppDomain isolation support for dnx451 CLR in xunit

It seems desirable that support for isolated AppDomains be available when running on a platform that supports it. Currently xunit's aspnet execution environment uses a single code path for both aspnetcore50 and dnx451 that excludes AppDomain isolation.
I've discussed the issue with @bradwilson on the xunit project and isn't convinced of the idea of using conditional compilation to support this scenario.
As far as I understand, the "desktop" runner will not operate inside of a .xproj environment because it doesn't know how to load the assemblies from these projects.
I believe it would be very simple to use different frameworks.<frameworkName>.complationOptions.define options to provide this.
Does anybody here have any opinion on this?
I understand that the whole new aspnet stack is designed to minimize the need to have isolation like this by having much less global state, but many of us are still stick with 3rd party libraries that cause testing to be a pain.

Merge `CultureReplacer` and `ReplaceCulture` from WebFx into Microsoft.AspNet.Testing

We're not using Microsoft.AspNet.Testing in WebFx yet. Part of the reason is a few gaps in that common assembly.

Should move CultureReplacer and its use in ExceptionAssert into Microsoft.AspNet.Testing. This will better-handle localization in our unit tests.

WebFx's [ReplaceCulture] is also a candidate for the common test assembly. And Microsoft.AspNet.Testing.ExceptionAssert lacks some of the async support found in the WebFx version.

Tried to run all tests in Hosting and it hung

------ Run test started ------
Starting Microsoft.Framework.TestHost: C:\Users\davifowl\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta5-11447\bin\dnx.exe --appbase "C:\dev\git\ProjectK\Universe\Hosting\test\Microsoft.AspNet.Hosting.Tests" Microsoft.Framework.ApplicationHost --port 5492 Microsoft.Framework.TestHost --port 48391 run --test Microsoft.AspNet.Hosting.HostingEngineTests.HostingEngineThrowsWithNoServer --test Microsoft.AspNet.Hosting.HostingEngineTests.HostingEngineCanBeStarted --test Microsoft.AspNet.Hosting.HostingEngineTests.HostingEngineInjectsHostingEnvironment --test Microsoft.AspNet.Hosting.HostingEngineTests.CanReplaceHostingFactory --test Microsoft.AspNet.Hosting.HostingEngineTests.CanReplaceStartupLoader --test Microsoft.AspNet.Hosting.HostingEngineTests.CanCreateApplicationServicesWithAddedServices --test Microsoft.AspNet.Hosting.HostingEngineTests.EnvDefaultsToDevelopmentIfNoConfig --test Microsoft.AspNet.Hosting.HostingEngineTests.EnvDefaultsToDevelopmentConfigValueIfSpecified --test Microsoft.AspNet.Hosting.HostingEngineTests.WebRootCanBeResolvedFromTheProjectJson --test Microsoft.AspNet.Hosting.HostingEngineTests.IsEnvironment_Extension_Is_Case_Insensitive --test Microsoft.AspNet.Hosting.HostingEngineTests.MapPath_Facts(621093f7a14b4c05fa9845a6f6a24d5cfbe0a3d2) --test Microsoft.AspNet.Hosting.HostingEngineTests.MapPath_Facts(b21907cc32cc2e56141b15acaa112e7c5f209b5c) --test Microsoft.AspNet.Hosting.HostingEngineTests.MapPath_Facts(a5b05a1a7e3e14f5fba07d6c7503b3416f56bcbf) --test Microsoft.AspNet.Hosting.HostingEngineTests.MapPath_Facts(79516603f4e328b1f491bd4047d739afb95daea8) --test Microsoft.AspNet.Hosting.HostingEngineTests.MapPath_Facts(c1b2d200eae137649531fcff833772987d091cde) --test Microsoft.AspNet.Hosting.HostingEngineTests.MapPath_Facts(028c12289cfb0a9157d8d98fdcde56fa50e43fcf) --test Microsoft.AspNet.Hosting.HostingEngineTests.MapPath_Facts(8516a168ad4c1f39eed84270d9bd86488a8a8b86) --test Microsoft.AspNet.Hosting.Tests.HostingUtilitiesTests.ReadWebRootFromProjectJson --test Microsoft.AspNet.Hosting.Tests.HttpContextFactoryFacts.Mutable_FeatureCollection_Wrapped_For_OwinFeatureCollection --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassMayHaveHostingServicesInjected --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassAddsConfigureServicesToApplicationServices(ae8753da43e5ee3518b76fa7f0e6f5253d2abf29) --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassAddsConfigureServicesToApplicationServices(f3c009027fbd58e119e14f70b5afd266e3beb8d8) --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassAddsConfigureServicesToApplicationServices(7b6e60ef677507e8df566cd626841b38336f1e11) --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassAddsConfigureServicesToApplicationServices(c0d873c89633b7b7d440b619d249ba2a5fed4067) --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassAddsConfigureServicesToApplicationServices(ae22137ca7ebdffd0778039f751fd8e8121fceb3) --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassAddsConfigureServicesToApplicationServices(ee1eecce287c0519b2afee33cb61fb1931ef9ccd) --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassAddsConfigureServicesToApplicationServices(82c6181ef707a09303484b8c787184d00ac91d85) --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassAddsConfigureServicesToApplicationServices(be653e50d3084efd64211d467a1a7abf39fc6f42) --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupWithNoConfigureThrows --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassCanHandleConfigureServicesThatReturnsNull --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupClassWithConfigureServicesShouldMakeServiceAvailableInConfigure --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupLoaderCanLoadByType --test Microsoft.AspNet.Hosting.Tests.StartupManagerTests.StartupLoaderCanLoadByTypeWithEnvironment
Running tests in 'C:\dev\git\ProjectK\Universe\Hosting\test\Microsoft.AspNet.Hosting.Tests\project.json'

/cc @rynowak @vijayrkn

System.NullReferenceException when run dnx . test

Version: xunit.runner.aspnet(2.0.0-aspnet-beta5-10345)

tests can be executed in VS2015RC successfully,
but when run in cmd, it displays:

System.NullReferenceException: 未将对象引用设置到对象的实例。
在 Xunit.Runner.AspNet.Program.Main(String[] args)
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceP rovider serviceProvider)
在 Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[ ] args)
在 Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceP rovider serviceProvider)
在 dnx.host.Bootstrapper.RunAsync(List`1 args)
在 dnx.host.RuntimeBootstrapper.ExecuteAsync(String[] args)
在 dnx.host.RuntimeBootstrapper.Execute(String[] args)

k test freezes in certain Powershell scripts

I am executing k test inside a complex Powershell script that is using a PS function pointer. k test freezes after running many unit tests (I suspect it might be when one fails, or it might just be a large number, I have over 1500 tests) but the place it freezes isn't always the same. I don't know if it is important but my tests use Console.WriteLine a lot.

When k test freezes I am unable to even CTRL-C to cancel the script and have to close and reopen cmd.

# k test is run inside CoreTests function
# Arguments: k --configuration Release test -parallel none

# this freezes:
$TestsFunction = ${function:CoreTests}
$TestsFunction.Invoke($build)

# this works:
CoreTests($build)

# this works:
&"CoreTests" $build

I am using PS 2.0, Windows 7 and CoreCLR 10580.

Self terminating the TestHost when the VS process goes away.

We need to kill all DNX instances when the VS process goes away. This is how it is currently done for DTH. We need to do something similar for TestHost as well.

            // Add a watch to the host PID. If it goes away we will self terminate.
            var hostProcess = Process.GetProcessById(hostPID);
            hostProcess.EnableRaisingEvents = true;
            hostProcess.Exited += (s, e) =>
            {
                Process.GetCurrentProcess().Kill();
            };

Inject IServiceProvider to test case

Right now there is no obvious way for test class to consume a IServiceProvider instance. That breaks the scenario which a test case needs to start a self-host web service. The KRunner does have change to obtain a IServiceProvider instance, we needs a mean to inject it to the test case.

Make it easier to run tests without changing the application base

I am setting the env viarable K_APPBASE to execute tests in another directory. k test runs and finds the project.json in the specified directory, but the working directory of when xunit executes it is still the working directory of the script, not K_APPBASE, meaning any relative file paths to load content in tests fail.

This is a separate issue but I think the k command in general needs a way to specify the directory it should run against using a command line argument. Setting an env variable and then clearing it afterwards is a pain.

try
{
    $env:K_APPBASE = "$sourceDir\Newtonsoft.Json.Tests"
    exec { k --configuration Release test -parallel none | Out-Default }
}
finally
{
    Remove-Item Env:\K_APPBASE
}

XUnit.KRunner throws TypeLoadException

I'm getting a typeload exception trying to run tests with the XUnit.KRunner (tried on the Mvc repo too just to check it wasn't my code). It can't load XUnit.Sdk.TestFramework.

Error-message:
image

Kvm list:
image

TestHost returns the same message (testresult) multiple times for some of the tests.

TestHost returns the same message multiple times for some of the tests.

Example from MVC solution:

Original Message:

{
  "Test": {
    "CodeFilePath": null,
    "DisplayName": "ViewDataDictionaryTest.Eval_EvaluatesExpressions",
    "FullyQualifiedName": "Microsoft.AspNet.Mvc.Core.ViewDataDictionaryTest.Eval_EvaluatesExpressions",
    "Id": "0f40f8e2-80d0-30d2-bc26-970a13d6fb90",
    "LineNumber": null,
    "Properties": {}
  },
  "Outcome": 1,
  "ErrorMessage": null,
  "ErrorStackTrace": null,
  "DisplayName": null,
  "Messages": [],
  "ComputerName": null,
  "Duration": "00:00:00.0110000",
  "StartTime": "0001-01-01T00:00:00-08:00",
  "EndTime": "0001-01-01T00:00:00-08:00"
}
Duplicate Message : {
  "Test": {
    "CodeFilePath": null,
    "DisplayName": "ViewDataDictionaryTest.Eval_EvaluatesExpressions",
    "FullyQualifiedName": "Microsoft.AspNet.Mvc.Core.ViewDataDictionaryTest.Eval_EvaluatesExpressions",
    "Id": "0f40f8e2-80d0-30d2-bc26-970a13d6fb90",
    "LineNumber": null,
    "Properties": {}
  },
  "Outcome": 1,
  "ErrorMessage": null,
  "ErrorStackTrace": null,
  "DisplayName": null,
  "Messages": [],
  "ComputerName": null,
  "Duration": "00:00:00",
  "StartTime": "0001-01-01T00:00:00-08:00",
  "EndTime": "0001-01-01T00:00:00-08:00"
}
Duplicate Message : {
  "Test": {
    "CodeFilePath": null,
    "DisplayName": "ViewDataDictionaryTest.Eval_EvaluatesExpressions",
    "FullyQualifiedName": "Microsoft.AspNet.Mvc.Core.ViewDataDictionaryTest.Eval_EvaluatesExpressions",
    "Id": "0f40f8e2-80d0-30d2-bc26-970a13d6fb90",
    "LineNumber": null,
    "Properties": {}
  },
  "Outcome": 1,
  "ErrorMessage": null,
  "ErrorStackTrace": null,
  "DisplayName": null,
  "Messages": [],
  "ComputerName": null,
  "Duration": "00:00:00.0010000",
  "StartTime": "0001-01-01T00:00:00-08:00",
  "EndTime": "0001-01-01T00:00:00-08:00"
}

Add package description for packages

Testing\src\Microsoft.AspNet.Testing
Testing\src\Microsoft.Framework.Logging.Testing
Testing\src\Microsoft.Framework.TestAdapter
Testing\src\Microsoft.Framework.TestHost
Testing\src\Microsoft.Framework.TestHost\bin\Debug\app
Testing\src\StyleCop.KRules

Write new VS test runner

We're getting a new project system and it would be great if there was an easy to way integrate it with the current (or a fork of the current) xunit runner.

Klr.exe process fails with path too long exceptions when we pass a lot of tests to -- test flag

"C:\\Users\\vramak\\.kre\\packages\\kre-clr-x86.1.0.0-beta1-10505\\bin\\klr.exe" --appbase "D:\git\Mvc\test\Microsoft.AspNet.Mvc.Core.Test" Microsoft.Framework.ApplicationHost --port 33971 Microsoft.Framework.TestHost --port 34221 run --test 0ff65e3948a2cabfaf4d6662f110d999f70598ee --test c8d701806c04a1306d1e41ea1191cae939f4178f --test 8767932af222643231c2b1e6238ffab99f7b34c7 --test 290c4e7241044bb3f5c0438c9077200fbd068eed --test a890979c35f78e0c2200f145713d6911844ca12f --test ...........................................

fails when we pass lot of tests. Need to change this to a message.

`[ReplaceCulture]` uses incorrect default UI culture

Initialization of the ReplaceCultureAttribute.UICulture property does not match its documentation (specifically "Defaults to en-US") or the MVC 5 code it was copied from. The property defaults to the en-GB culture, not en-US. This breaks compatibility with the same class in MVC 5 and may lead to inconsistent unit test results, especially as we port MVC 5 unit tests over.

Only need to change one line in the ReplaceCultureAttribute to fix this bug.

Shared VerifyFrameworkServicesTest helper

So I think we can now have a shared test method which validates AddXyz setups ApplicationServices properly now that we can do this in a standard way for all of the AddFramework() methods...

cc @davidfowl @divega Thoughts?

public void VerifyAddFrameworkServices(Action<IServiceCollection> addServices, IEnumerable<Type> requiredServices>) {
    var context = new HostingContext();
    addServices(context.Services);
    var appServices = HostingEngine.CreateApplicationServices(context);
    foreach (var serviceType in requiredServices) {
        Assert.NotNull(appServices.GetRequiredService(serviceType));
    }    
}

[Fact]
void VerifyAddIdentity() {
    VerifyAddFrameworkServices(services => services.AddIdentity<TUser, TRole>(), 
          new Type[] { typeof(UserManager<TUser, TRole>), typeof(RoleManager<TRole>));
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.