Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Recently, I've been using Selenium to record a few simple tests. Although Selenium tests are initially stored as html files, the program allows you to export the test cases in a variety of languages (in this case, I'm using C#).

I downloaded NUnit to use as my testing framework -- I can then load a particular exported C# file into NUnit as a project.

I also created a simple web app where I can click a button to launch NUnit and run a few tests. The problem is, I keep getting this error message:

System.IO.FileNotFoundException : File or assembly name nunit.core, or one of its dependencies, was not found.

Once I exit out of this popup, NUnit opens as desired, however, the tests don't load. The source code behind the web app looks like this:
public void ButtonClick1(object sender, System.EventArgs e)
{
   ProcessStartInfo proc1 = new ProcessStartInfo("C:\\selenium-remote-control
1.0.3\\selenium-dotnet-client-driver-1.0.1\\source\\tools\\nunit\\nunit-gui", "TestProject14.dll");

   System.Diagnostics.Process.Start(proc1);
}


Basically I'm just trying to create a new process which launches the NUnit gui and runs the test. I'm not sure if it can't find the .dll or if it's some other issue.

Any help would be appreciated -- this is my first post, so if I'm missing something completely obvious, I apologize in advance. Thanks!
Posted

1 solution

try this:

C#
public void ButtonClick1(object sender, System.EventArgs e)
{
   ProcessStartInfo proc1 = new ProcessStartInfo(@"C:\\selenium-remote-control
1.0.3\\selenium-dotnet-client-driver-1.0.1\\source\\tools\\nunit\\nunit-gui", "TestProject14.dll");
   System.Diagnostics.Process.Start(proc1);
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900