Nunit3-console.exe - Cannot find connection string

Tests are working fine from Visual Studio level. I need to run them from console to get xml file with results.

For some reason I'm getting error from console.

Cannot find connection string.  Looked in EnvironmentVariables ('DefaultConnectionString'), TestContext ('DefaultConnectionString' property) and appsettings.json ('DefaultConnectionString' connection string)

My appsettings.json

{
  "ConnectionStrings": {
    "DefaultConnectionString": "SERVER=MYServername;DATABASE=MydbName;Integrated Security=true;"
  }
}

Test example

using DBConfirm.Core.Data;
using DBConfirm.Core.DataResults;
using DBConfirm.Packages.SQLServer.NUnit;
using NUnit.Framework;
using System.Threading.Tasks;



namespace TestsSanity
{

    [TestFixture]
    
    public class DefaultRules : NUnitBase
    {



        public async Task Sanity()
        {

            QueryResult data1 = await TestRunner.ExecuteCommandAsync(@"My Query", new DataSetRow
            {
            })
                ;


            data1
                .AssertColumnCount(3) // Asserts that there are 3 columns

        ;
        }



    }
}
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum