'XCTests are not working properly on M1 MacBook

I purchased M1 MacBook recently and I am not able to run XC UI tests. The app constantly hanging, best case scenario it is able to run 2-3 tests out of 50.

I've tried multiple combinations of excluding arm64 architecture, running simulator/Xcode on Rosetta, nothing works.

Same project works just fine on my older intel Mac 100% of the time.

Does anyone have any suggestions? Any kind of help is highly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source