New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EarlGrey 2.0 Helper Bundle (Swift) can't find XCTest.h #759
Comments
You should not link TestLib to the Helper Bundle. Only have a weak dependency on the AppFramework. Expose the Headers for the TestLib to that target. |
@tirodkar I don't link TestLib in Helper Bundle. My configuration at Build Phase is below.
How can i configure that? My Build Setting configuration for Helper Bundle is below. User Header Search Path ('EarlGrey' directory is downloaded git repository.) |
I'm surprised the XCTest import is failing here. Hmm, this is being copied correctly to only the tests right? |
I think I know what the issue is. I'm guessing that you're handling an alert in your Helper Bundle. The Helper Bundle is an app side component. There is no |
I'm having the same issue, the helper bundles could not fine XCTest/XCTest.h during build, even though the @loader_path/Frameworks is in the runtime path |
@jingyul Are you referring to any XCTest stuff in the bundle? Any System Handling / TestLib stuff? |
@tirodkar Not directly, the error is pointing to TestLib/AlertHandling as you mentioned. It's not from my source code. But I don't know how this dependency was created. |
Is it in the bridging header? Try removing it from there. |
No, this is what is in the bridging header: |
#import "AppFramework/Action/GREYAction.h" |
Remove |
I did. But still get the same error, but this time it is from TestLib/EarlGreyImp/EarlGrey.h |
Remove all TestLib imports from your Helper Bundle. |
Build Success! Thanks @tirodkar |
Clarification added #763. Feel free to comment if there's something that's unclear. |
Wait, more questions, now the individual build on the helper bundles is good. But when run a UITest test case, it says that BuildEarlGreyHelperBundles:Failed on top of the XCode window. There is no more details. No red dot. |
Can you ping me on Slack and we can continue this there? |
ok, thanks! |
Sorry have to go. Will be online later. |
@tirodkar my bridging header for helper bundle is below.
i close this issue. |
I set up EarlGrey 2.0 according to setup.md.
In Helper Bundle Section, I added Bridging-Header for Helper Bundle, then I got compile error.
Error message is
'XCTest/XCTest.h' file not found
in XCTestCase+GREYSystemAlertHandler.h.How can i resolve this issue.
I tried to find what is different to FunctionalTests HostDOCategoriesSwift with my bundle.
Yes
No
I fix these, but i can't resolve the issue...
The text was updated successfully, but these errors were encountered: