TimiUITests.m 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // TimiUITests.m
  3. // TimiUITests
  4. //
  5. // Created by 翟玉磊 on 2020/12/14.
  6. //
  7. #import <XCTest/XCTest.h>
  8. @interface TimiUITests : XCTestCase
  9. @end
  10. @implementation TimiUITests
  11. - (void)setUp {
  12. // Put setup code here. This method is called before the invocation of each test method in the class.
  13. // In UI tests it is usually best to stop immediately when a failure occurs.
  14. self.continueAfterFailure = NO;
  15. // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
  16. }
  17. - (void)tearDown {
  18. // Put teardown code here. This method is called after the invocation of each test method in the class.
  19. }
  20. - (void)testExample {
  21. // UI tests must launch the application that they test.
  22. XCUIApplication *app = [[XCUIApplication alloc] init];
  23. [app launch];
  24. // Use recording to get started writing UI tests.
  25. // Use XCTAssert and related functions to verify your tests produce the correct results.
  26. }
  27. - (void)testLaunchPerformance {
  28. if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) {
  29. // This measures how long it takes to launch your application.
  30. [self measureWithMetrics:@[[[XCTApplicationLaunchMetric alloc] init]] block:^{
  31. [[[XCUIApplication alloc] init] launch];
  32. }];
  33. }
  34. }
  35. @end