Disable mongodb log appear in xunit tests logs

Viewed 135

I have some test cases in my test project which are written using Mongo2Go and Xunit in dotnet core 2.2.

Test case work fine on my machine but when I run them on GitLab pipeline, the result is ok but in backend-test step log, the mongodb log added between the log of test cases.

I want to disable it from my log, please suggest some solution.

enter image description here

1 Answers
MongoDbRunner.Start(additionalMongodArguments: "--quiet --logpath /dev/null");

works on Linux/MacOS but in my case increases the test time

Related