2

I am trying to migrate my existing selenium tests with Nunit to MBunit so that I can run the tests in parallel using selenium grid. I've added the attributes

[assembly: DegreeOfParallelism(8)]
[assembly: Parallelizable(TestScope.All)]

to assemblyinfo.cs and added references to Gallio.dll and MBUnit.dll to the C# project. The problem is that when I run the tests using gallio, the tests fail citing "ERROR: No sessionId provided. Most likely your original newBrowserSession command failed."
Can anybody help me with this error.

Thanks,
Vamyip

vamyip
  • 1,161
  • 1
  • 10
  • 35
  • how are you starting the browser? – AutomatedTester Oct 05 '10 at 13:20
  • I have kept the setup function in a separate project inside the same solution. This function reads configuration from and xml file and then creates an instance of ISelenium using the configuration read from xml. Then, selenium.start() command is given(in the same function itself). This function is called in the setup() function of the class containing test cases. I am ready to modify my code if needed. Thanks for your reply - – vamyip Oct 06 '10 at 05:43

1 Answers1

3

Most likely the problem is that you're having stateful tests. When parallelizing tests, try to isolate them so that they don't depend on instance variables that are set on each SetUp.

See these questions about parallelizing Selenium tests:

Community
  • 1
  • 1
Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275