问题
I am currently building a mutationtest framework for .NET. I want to run the unit tests from a project on an in-memory assembly. This way the mutated assembly won't have to be writen to disk and my framework will be faster to use.
Using the Roslyn compiler in .Net Core 2.0 I mutate (change) the syntaxtree and compile it into an in-memory assembly like this:
Assembly assembly = AssemblyLoadContext.Default.LoadFromStream(ms);
Does anyone know of a way to unit test this assembly without writing it to a disk?
The current way I am doing it is writing it to disk and invoke the dotnet test command on the directory
来源:https://stackoverflow.com/questions/48930714/is-it-possible-to-run-tests-on-an-in-memory-assembly