我的很多测试突然失败,我认为这与这个控制台输出有关:
objc[46098]: Class GGLClearcutWriter is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGLClearcutAccountData is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGLClearcutRequest is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGLClearcutLogger is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGLConfiguration is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGLConfigurationV2 is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GMRConfiguration is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGLBundleUtil is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGLContext is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGLHash is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGL_CLEARCUTClientanalyticsRoot is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGL_CLEARCUTLuser_nameventKeyValues is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
objc[46098]: Class GGL_CLEARCUTActiveExperiments is implemented in both /Users/user_name/Library/Developer/CoreSimulator/Devices/0C0F9526-F930-43F6-AB6F-AADF1DB2C780/data/Containers/Bundle/Application/679F4B16-4677-43C8-B025-E582E2A8FF2A/AppName.app/AppName and /Users/user_name/Library/Developer/Xcode/DerivedData/AppName-edmnkgnmwezwfqcqnznlsuagoizc/Build/Intermediates/CodeCoverage/AppName/Products/Debug-iphonesimulator/AppNameTests.xctest/AppNameTests. One of the two will be used. Which one is undefined.
我认为 GGL_* 与 Google 有关,它来自通过 cocoapods 导入的 Google Analytics。
测试在新模拟器上第一次运行时通过,但在第二次或以后运行时失败。
应用程序运行良好。 知道可能是什么问题吗?
最佳答案
这表明应用程序和测试也链接在相同的类别中。 这是不必要的,并且可能不必要地增加测试目标的大小
但是由于两者在您的情况下是相同的,因此它是无害的,我不知道这会如何使测试失败
关于iOS 重复实现 --> 测试失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35507757/