My Code:
namespace ClassLibrary2
{
[TestFixture]
public class Class1
{
[Test]
public void Test1(string browser)
{ MessageBox.Show(Browser );
}
}
}
My command line execution:
C:\Documents and Settings\>"C:\Program Files\NUnit 2.6.2\bin\nunit-console" "D:\Automation\ClassLibrary2\bin\Debug\ClassLibrary2.dll /run:ClassLibrary2.Class1.Test1(\"Firefox\")
if i modified my code as
namespace ClassLibrary2
{
[TestFixture]
[TestCase("firefox")]
public class Class1
{
[Test]
public void Test1(string browser)
{ MessageBox.Show(Browser );
}
}
}
its working fine and my test is executing, because, its but this wrong bc params frm TestCase not from commandline.
C:\Documents and Settings\>"C:\Program Files\NUnit 2.6.2\bin\nunit-console" "D:\Automation\ClassLibrary2\bin\Debug\ClassLibrary2.dll /run:ClassLibrary2.Class1.Test1(\"Chrome\")
i am having the same issue.
My Code:
MessageBox .Show(Browser );
namespace ClassLibrary2
{
[TestFixture]
public class Class1
{
[Test]
public void Test1(string browser)
{
}
}
}
My command line execution: >"C:\Program Files\NUnit 2.6.2\bin\ nunit-console" "D:\Automation\ ClassLibrary2\ bin\Debug\ ClassLibrary2. dll /run:ClassLibra ry2.Class1. Test1(\ "Firefox\ ")
C:\Documents and Settings\
Result:
Tests run: 0, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0 seconds
if i modified my code as "firefox" )]
MessageBox .Show(Browser );
namespace ClassLibrary2
{
[TestFixture]
[TestCase(
public class Class1
{
[Test]
public void Test1(string browser)
{
}
}
}
its working fine and my test is executing, because, its but this wrong bc params frm TestCase not from commandline.
C:\Documents and Settings\ >"C:\Program Files\NUnit 2.6.2\bin\ nunit-console" "D:\Automation\ ClassLibrary2\ bin\Debug\ ClassLibrary2. dll /run:ClassLibra ry2.Class1. Test1(\ "Chrome\ ")
i should get Chrome .
Please give me the solution .
Thansk in advance.