Friday, April 24, 2026
HomeiOS Developmentios - repeat a XCTestCase technique n occasions?

ios – repeat a XCTestCase technique n occasions?

[ad_1]

I’ve discovered this query Can I run an XCTest suite a number of occasions?
Which mainly ask the way to run XCTestCase suite a number of occasions. Nevertheless, I wish to run just one technique a number of occasions. How can I run as an example

remaining class MyTests: XCTestCase {
  var topic: Topic!

  override func setUp() {
    tremendous.setUp()
    self.topic = Topic()
  }

  func testSujectDoesStuff() async {
      topic.stuff()
  }

Then, I need to run testSujectDoesStuff 10 occasions and fail quick. Xcode itself permits you to do that with

enter image description here

Nevertheless, I wish to do it programatically as a substitute of counting on the IDE.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments