question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Testing: Add a `LiveParallelizable` that runs Live tests in parallel

See original GitHub issue

We need to run tests sequentially when AZURE_TEST_MODE is Record or Playback. It would be nice to run tests in parallel when AZURE_TEST_MODE is Live but nUnit doesn’t allow that kind of flexibility out of the box. We should investigate adding a custom LiveParallelizable attribute at the assembly level.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pakrymcommented, Nov 12, 2020

Very good point Kamil. I think the parallelization of test classes is technically achieveable.

0reactions
kasobol-msftcommented, Nov 11, 2020

@pakrym We won’t be able to go as far as parallelization per single test. That is probably true for live tests (at least for Storage) due to limitation you mentioned.

However, there’s a way to apply NUnit Parallelizable attribute in such a way that test classes are executed in parallel but within class methods go serially (there are few ways to achieve that). I would take ability to go parallel per class any day instead of current situation.

In my experiment I applied [Parallelizable(ParallelScope.Self)] on StorageTestBase. The issue I was facing is somewhere in this code https://github.com/Azure/azure-sdk-for-net/blob/52fb9b7628732e70a41dd057625619dcbaf31479/sdk/core/Azure.Core.TestFramework/src/ClientTestFixtureAttribute.cs#L58-L67 . Somehow it makes recording/recordingtransport or something in that vicinity being shared between sync/async mode which I couldn’t pin point. When I hacked this to generate only one permutation per tests I got pretty good results, i.e. whole assembly ran per-class-parallel and tests were green (in playback mode).

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Parallel Testing and How Does it Work? - Semaphore CI
For instance, running static code tests first, then integration and end-to-end tests. Tests with similar setup steps: use a block to run tests...
Read more >
Running Tests in Parallel
These libraries are the ones that the unit tests themselves link against, and so those DLLs live along side the unit test code...
Read more >
What is Parallel Testing? Definition, Approach, Example
Parallel testing is defined as a software testing type, ... you can simply create several project that will test a different part of...
Read more >
Parallel Test Execution in Selenium : Tutorial
In this post, we explain how to run parallel tests by using Selenium with TestNG. Parallel Testing using TestNG and Selenium. TestNG is...
Read more >
TestNG Parallel Execution - How to run Selenium tests in ...
Introduction to Threads in TestNG; Performance comparison between serialized and parallelized test execution in TestNG; Running test Classes ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found