macro187 / testrunner Goto Github PK
View Code? Open in Web Editor NEWA console MSTest runner
License: MIT License
A console MSTest runner
License: MIT License
For use by output format event handlers.
Refactor TestRunner to support different output formats, with an initial "default" format producing the current format.
Is there any reason for the Results
classes to exist separately from their respective End
events, or can they just be folded into them?
Hi,
I don't have the TestContext available in my Tests (e.g. in a [AssemblyInitialize] method) if I run the test with the testrunner.exe.
Is it possible to get the TestContext in another way or do you know how to fix the problem?
Many thanks!
This is probably because TestRunner needs to be taught how to re-invoke itself using the dotnet
command on .NET Core.
=================================
testrunner v1.0.0
Copyright (c) 2012-2018
Ron MacNeil, Rickenberg, JDeltorp
=================================
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Originally thought this was impossible due to...
mono/mono#10584
...but there may be hope...
https://stackoverflow.com/a/39394998/2167919
Don't depend on test framework assemblies (UnitTestFramework.dll
, nunit.dll
, etc.)
To run only particular test method(s).
For some reason, .NET Core will not accept the dynamically generated TestContext
overrides. .NET Framework seems to accept them.
=============================================================================================
Assembly: testrunner.Tests.MSTest/bin/Debug/netcoreapp2.0/publish/testrunner.Tests.MSTest.dll
=============================================================================================
Test Assembly:
C:\p\testrunner\testrunner.Tests.MSTest\bin\Debug\netcoreapp2.0\publish\testrunner.Tests.MSTest.dll
[AssemblyInitialize] AssemblyInitialize()
An internal error occurred in testrunner.dll:
Method 'get_Properties' in type 'TestContextProxy' from assembly 'TestContextProxyAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Type: System.TypeLoadException
Source: System.Private.CoreLib
StackTrace:
at System.Reflection.Emit.TypeBuilder.TermCreateClass(RuntimeModule module, Int32 tk, ObjectHandleOnStack type)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateTypeInfo()
at TestRunner.Domain.TestContextProxy.GetTypeFromTypeBuilder(TypeBuilder typeBuilder)
in C:\p\testrunner\testrunner\Domain\TestContextProxy.cs:line 189
at TestRunner.Domain.TestContextProxy.BuildProxy()
in C:\p\testrunner\testrunner\Domain\TestContextProxy.cs:line 59
at TestRunner.Domain.TestContextProxy.get_Proxy()
in C:\p\testrunner\testrunner\Domain\TestContextProxy.cs:line 26
at TestRunner.Program.Program.RunMethod(MethodInfo method, Object instance, Boolean takesTestContext, Type expectedException, Boolean expectedExceptionAllowDerived, String prefix)
in C:\p\testrunner\testrunner\Program\Program.cs:line 509
at TestRunner.Program.Program.RunTestAssembly(String assemblyPath)
in C:\p\testrunner\testrunner\Program\Program.cs:line 198
at TestRunner.Program.Program.Main2(String[] args)
in C:\p\testrunner\testrunner\Program\Program.cs:line 59
To run only particular test class(es).
Original request:
Could you add some arguments to the command line to limit the run to any/some testclass or any/some testmethod
ex:
testrunner.exe C:\Path\To\TestAssembly.dll C:\Path\To\AnotherTestAssembly.dll -c "xxxns.yyyyns.MyTestClass1,xxxns.zzzns.MyTestClass2" -m "xxxns.zzzns.MyTestClass3.TestingMethod1,......"
If not, can it be improved?
Find out what MS runner behaviour is, add tests for it, and adjust TestRunner's behaviour if necessary.
Figure out how this normally works in MSTest, then implement it and surface appropriate information in TestContext.
For building event handlers that need to remember all the results from a test run.
All tests currently fail with the following exception, likely due to how per-test-assembly child processes are being run. Does not occur on Windows.
Could not resolve type with token 01000008
Type: System.TypeLoadException
StackTrace:
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038]
in <f712f98eb8e445c8918edaf595bbe465>:0
Hi,
do you plan to support testing multiple assemblies at once (either by wildcard or multiple parameters)?
Thanks.
Runners are still doing too much, e.g. results tabulation, "success" decision logic, and maybe more.
Reify method, test, class, and assembly result information as types in a new Results
namespace.
Teach *End
events to carry results using those types.
Shift logic that aggregates finer-grained event(s) into *End
results into a new ResultBuilderEventHandler
or similar.
???
If no test DLL's specified on command line, auto-discover them in some reasonable way
Test Runner gives exception when used with System.Reactive.Interfaces, Version=3.1.1. The exception stack trace gives information that it is looking for 'System.Reactive.Interfaces, Version=3.0.0.0".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.