Home > Back-end >  Is there an option to cleanup after ALL tests in class are complete?
Is there an option to cleanup after ALL tests in class are complete?

Time:04-28

I tried a deinit method in my test class, however it isn't called. Using Xcode 13.3

CodePudding user response:

XCTestCase has a class method tearDown() which is called when all tests in the class are finished:

override class func tearDown() {
   super.tearDown()
   // Cleanup
}
  • Related