1

To preface the back story one day i just booted my VM and i couldn't run the test. We had it set up to run prior and everything was fine.

The setup we have currently is that i am running my local instance, SQL Server DB on my host machine and have the selenium architect project running through the VM along with NUnit. We utilize visual studio as our IDE and C# programming language.

Now when i go to boot up a test using the NUnit GUI Runner the browser opens the browser opens and the test fails right away stating

ActivitySummaryReportTestFixture.GenerateActivitySummaryReport_EvalPosted_TotalVisitsEqualOne:
SetUp : System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
  ----> System.ComponentModel.Win32Exception : The network path was not found

With some troubleshooting I tried pinging the host server from the VM but it said it was not found. So at this point i have to assume there is an issue with my VM and Host Machine being able to speak to each other. If anyone could help or need additional info please let me know thank you.

In case anyone asks i am running Windows10 Pro and using Hyper-V

Matthew Land
  • 13
  • 1
  • 5

1 Answers1

1

A Hyper-V VM and host appear to each other as completely independent machines. Debug this as any two machines being unable to talk to each other over a network.

The error indicates you are attempting to connect to an SQL instance. Ensure that the SQL Server is configured to allow remote connections.

  1. Open SQL Server Management Studio
  2. Connect to the SQL Server instance
  3. Right click the instance in the Object Explorer and select Properties
  4. Select Connections
  5. Check 'Allow Remote Connections'

Also ensure port 1433 is open on your firewall as this is the default port used by SQL Server.

tQuarella
  • 140
  • 6