C# OpenSDK NUnit Parallel Tests

Hi, I’m trying to get parallel testing working with NUnit in C# with the OpenSDK.

However, every time I try to create more than one driver instance and execute commands at the same time, all but one test will fail with the following error.

    System.InvalidOperationException : The collection has been marked as complete with regards to additions.

  Stack Trace: 
    BlockingCollection`1.TryAddWithNoTimeValidation(T item, Int32 millisecondsTimeout, CancellationToken cancellationToken)
    BlockingCollection`1.Add(T item)
    ReportsQueue.Submit(RestRequest request, Report report) line 94
    AgentClient.ReportDriverCommand(DriverCommandReport driverCommandReport) line 314
    ReportingCommandExecutor.SendCommandToAgent(Command command, Object result, Boolean passed) line 250
    ReportingCommandExecutor.ReportCommand(Command command, Response response) line 135
    CustomHttpCommandExecutor.Execute(Command commandToExecute, Boolean skipReporting) line 137
    CustomHttpCommandExecutor.Execute(Command commandToExecute) line 86
    BaseDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) line 227

I’m not sure if I’m doing something wrong or if the OpenSDK doesn’t actually support parallel test running. I can’t find a single thing one way or the other except that both the agent and Selenium support it.

Any help or info would be appreciated. Thanks!

Hello @tporadun
Currently parallel testing is not supported when using OpenSDK for testing.

Any idea on when or if support will be added? This is kind of an important feature that appears to be supported in Selenium that I also figured would be supported in TestProject.

If there is no planned support for this, what is a good alternative?

Yes this is on our road map for 2022, I have added your request to our ticket TP-15449
We will update you here once it’s resolved.