Unit testing on an existing iOS project

Completed

Hi, 

New user of appcode, I'm trying to use a suite of existing XCTests in an existing project. 

I've followed the instructions here: https://blog.jetbrains.com/objc/2013/06/unit-testing-with-appcode/

However, I get the following output when I try and run the tests.

  • Testing started at 11:29 ...
  • Process finished with exit code 0
  • Empty test suite.

Someone experienced a similar issue in the comments - https://blog.jetbrains.com/objc/2013/06/unit-testing-with-appcode/#comment-70901

I have tried the recommended steps and set the 'Host application' to none as recommended but I get the following errors instead. Error output below

/Users/NAME/Library/Caches/AppCode33/DerivedData/APP NAME-54f779f5/Build/Products/Debug-iphoneos/AppNameTest.xctest/AppNameTest
Error:Undefined symbol '_OBJC_CLASS_$_GetStructureRequest' referenced from:
Error: objc-class-ref in GetStructureRequestTest.o
Error:Undefined symbol '_OBJC_CLASS_$_DatabaseManager' referenced from:
Error: objc-class-ref in GetDataFromCSVTest.o
Error: objc-class-ref in FailedItemsQueueTest.o
Error: objc-class-ref in ShareQueueTest.o
Error:Undefined symbol '_OBJC_CLASS_$_XMLManager' referenced from:
Error: objc-class-ref in GetMediaResourceTest.o
Error:Undefined symbol '_OBJC_CLASS_$_GetMediaListSize' referenced from:
Error: objc-class-ref in GetMediaListSizeTest.o
Error:Undefined symbol '_OBJC_CLASS_$_GetMainXMLRequest' referenced from:
Error: objc-class-ref in GetMainXMLRequestTest.o
Error:Undefined symbol '_OBJC_CLASS_$_FailedItemsQueue' referenced from:
Error: objc-class-ref in FailedItemsQueueTest.o
Error:Undefined symbol '_OBJC_CLASS_$_GetDataFromCSV' referenced from:
Error: objc-class-ref in GetDataFromCSVTest.o
Error:Undefined symbol '_OBJC_CLASS_$_GetAppVersionRequest' referenced from:
Error: objc-class-ref in GetAppVersionRequestTest.o
Error:Undefined symbol '_OBJC_CLASS_$_GetMediaListRequest' referenced from:
Error: objc-class-ref in GetMediaListRequestTest.o
Error:Undefined symbol '_OBJC_CLASS_$_GetMediaResource' referenced from:
Error: objc-class-ref in GetMediaResourceTest.o
Error: objc-class-ref in FailedItemsQueueTest.o
Error:Undefined symbol '_OBJC_CLASS_$_GetLanguagesRequest' referenced from:
Error: objc-class-ref in GetLanguagesRequestTest.o
Error:Undefined symbol '_OBJC_CLASS_$_ShareRequest' referenced from:
Error: objc-class-ref in ShareRequestTest.o
Error:Undefined symbol '_OBJC_CLASS_$_FeedbackRequest' referenced from:
Error: objc-class-ref in FeedbackRequestTest.o
Error:Undefined symbol '_OBJC_CLASS_$_PingRequest' referenced from:
Error: objc-class-ref in PingRequestTest.o
Note:ld: symbol(s) not found for architecture arm64
clang
Error:linker command failed with exit code 1 (use -v to see invocation)

Any help would be appreciated, thanks.

0

Please sign in to leave a comment.