This is a migrated thread and some comments may be shown as answers.
Possible to make test run in parallel on same machine
1 Answer 30 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Martin asked on 01 Jun 2012, 10:40 AM

Does the Telerik test framework support running tests in parallel or is that a path with a road block in the end? :)

So far I've come up with this, but it doesn't really work and i can't figure out if it's just not going to work with Telerik or if I'm doing something wrong.

The last test can just be repeated a couple of times and i have DegreeOfParalallism = 2 in AssemblyInfo.cs

I'm in the process of investigating different ways of making our suite run faster, looking forward to your response.

    public class TelerikMbUnit1 : BaseTest
        ConcurrentDictionary<string, Browser> browserDict = new ConcurrentDictionary<string, Browser>();
        #region [ Setup / TearDown ]
        public void MyTestInitialize()
            // Launch new browser
            Manager.LaunchNewBrowser(BrowserType.FireFox, true);
            Browser browser = Manager.ActiveBrowser;
            browserDict.TryAdd(TestContext.CurrentContext.TestStep.ToString(), browser);
        public void MyTestCleanUp()
    //      this.CleanUp();
            Browser browser;
            browserDict.TryRemove(TestContext.CurrentContext.TestStep.ToString(), out browser);
        public void FixtureCleanup()
            // This will shut down all browsers if
            // recycleBrowser is turned on. Else
            // will do nothing.
        public void SampleWebAiiTest0()
            Browser browser = browserDict.Where(d => d.Key == TestContext.CurrentContext.TestStep.ToString()).Single().Value;
            // The active browser
            // Find the google search box and set it to "Telerik";
            browser.Find.ByName<HtmlInputText>("q").Text = "Telerik";
            // Click the Search button
            // Validate the search contain the 'Telerik' text

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 01 Jun 2012, 04:19 PM
Hello Martin,

The framework doesn't include a test runner; you are essentially creating Microsoft Coded Unit Tests that can only be run by a Microsoft tool (MSTest, Visual Studio, Microsoft Test Manager, etc.).

Your suggested approach is a big challenge for any functional test written to interact with the browser's UI (not just the framework or Test Studio). What if each test needs access to the keyboard or mouse at the same time? This functionality is simply not a built-in feature in either the framework or the full version of Test Studio.

I'm sure there are complicated work-arounds out there, however we don't have a ready-made solution to offer you. My colleague mentioned a high level approach where you hold and release desktop access with code that surrounds other code that requires it.

the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question