钱多重写的一版

MMProjectUITests.m 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // MMProjectUITests.m
  3. // MMProjectUITests
  4. //
  5. // Created by admin on 2019/11/21.
  6. // Copyright © 2019 kuxuan. All rights reserved.
  7. //
  8. #import <XCTest/XCTest.h>
  9. @interface MMProjectUITests : XCTestCase
  10. @end
  11. @implementation MMProjectUITests
  12. - (void)setUp {
  13. // Put setup code here. This method is called before the invocation of each test method in the class.
  14. // In UI tests it is usually best to stop immediately when a failure occurs.
  15. self.continueAfterFailure = NO;
  16. // 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.
  17. }
  18. - (void)tearDown {
  19. // Put teardown code here. This method is called after the invocation of each test method in the class.
  20. }
  21. - (void)testExample {
  22. // UI tests must launch the application that they test.
  23. XCUIApplication *app = [[XCUIApplication alloc] init];
  24. [app launch];
  25. // Use recording to get started writing UI tests.
  26. // Use XCTAssert and related functions to verify your tests produce the correct results.
  27. }
  28. - (void)testLaunchPerformance {
  29. if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) {
  30. // This measures how long it takes to launch your application.
  31. [self measureWithMetrics:@[XCTOSSignpostMetric.applicationLaunchMetric] block:^{
  32. [[[XCUIApplication alloc] init] launch];
  33. }];
  34. }
  35. }
  36. @end