Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Tests need their own environment implementation #925
Comments
Thank you @Ivanidzo4ka .. if I agree with everything you say. To refine and make a best test, we have also spoken about having an abstract environment class capable of outputting to a user's preferred logging framework, it might be nice indeed if this thing followed that example -- if it cannot that might itself be a test that the leve of abtraction imagined is insufficient. |
Can I take a shot at this? What would I have to do? (If it's still an open issue) |
Feel free to. In terms of what you need to do, you need to implement class based on IHostEnviroment interface inside TestFramework project, which would consume channel messages and propagate them to IOutputHelper. |
Right now we use TlcEnvironment (or ConsoleEnvironment) which outputs everything to console.
And XUnit don't care about console, and if you want to look on output during test execution you need to do something like this:
machinelearning/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs
Line 31 in 4cb7dd9
We should have XUnitEnvironment or TestEnvironment and redirect all output to ITestOutputHelper.