Parallel execution on Polarion web services

44 views Asked by At

I want to achieve parallel execution on Polarion testmanagement web services using c#. Can anyone help me in achieving this.

I have tried the below, but getting different exception while running each time. Sometimes it executes successfully without errors but sometime with error.

var parallelOptions = new ParallelOptions 
{ 
    MaxDegreeOfParallelism = 3 
};

UploadDataTask task = new UploadDataTask();

Parallel.For(0, testRecordsAfterAdding.Length, parallelOptions, i =>
{
    var test = testRecordsAfterAdding[i];
    task.UploadData(test, i, con, idTestCase, ruUri, testRun, textTestRun, userUriExecuted);
    Console.WriteLine("Thread" + Thread.CurrentThread.ManagedThreadId);
});
0

There are 0 answers