Skip to content
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

Unable to run sample tests #1737

Open
Megubit opened this issue Apr 1, 2022 · 0 comments
Open

Unable to run sample tests #1737

Megubit opened this issue Apr 1, 2022 · 0 comments

Comments

@Megubit
Copy link

Megubit commented Apr 1, 2022

I'm trying to get the sample project tests running, but I'm encountering some issues. I'm still fairly new when it comes to UI tests, so I'm not sure if I'm doing something wrong.

I followed the Running the Functional Tests guide.
Now if I try to build and run the app on my device, it will run successfully, however, if I try to run any of the tests I get the following error:

FunctionalTests-Runner[32129:1238658] Running tests...
FunctionalTests-Runner[32129:1238658] The bundle “FunctionalTests.xctest” couldn’t be loaded. Try reinstalling the bundle.
FunctionalTests-Runner[32129:1238658] (dlopen(/var/containers/Bundle/Application/FunctionalTests-Runner.app/PlugIns/FunctionalTests.xctest/FunctionalTests, 0x0109): tried: '/var/containers/Bundle/Application/FunctionalTests-Runner.app/PlugIns/FunctionalTests.xctest/FunctionalTests' (code signature in <F9225F...> '/private/var/containers/Bundle/Application/FunctionalTests-Runner.app/PlugIns/FunctionalTests.xctest/FunctionalTests' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.),
'/private/var/containers/Bundle/Application/FunctionalTests-Runner.app/PlugIns/FunctionalTests.xctest/FunctionalTests' (code signature in <F9225F...> '/private/var/containers/Bundle/Application/FunctionalTests-Runner.app/PlugIns/FunctionalTests.xctest/FunctionalTests' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.))

Some suggest enabling Hardened Runtime to fix this kind of error. But this will cause the profile signing to fail, since the FunctionalTestRig.entitlements has a hardcoded application-identifier which doesn't change for my own profile. This can be fixed by manually changing the value to correspond with Xcode generated provisioning profile value. And the signing will work again. but... that also results in the same error, so no progress there.

I'm not sure if I'm making a beginner's mistake here, as I mentioned I'm new in this field, so if anyone could point me out what I'm doing wrong and how to fix this, I would really appreciate it.

I'm using Xcode Version 13.2.1
My device is on iOS 15.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant