Unfortunately, Xcode does not yet support the ability to assign a Host Application for test cases in Swift Package Manager packages.
The test case requires a Host Application, because writing to the Keychain requires an entitlement. Only apps can have entitlements — not libraries, frameworks, packages, etc …
Without a Host Application, the test will fail with the following error:
Credential Cache
Stores and retrieves a credential for a particular host in the user’s Keychain.
Credential Cache UI
Provides a convenient prompt for credentials.
If appropriate for your application, you can disable the obscuring of the password:
Testing
Unfortunately, Xcode does not yet support the ability to assign a Host Application for test cases in Swift Package Manager packages.
The test case requires a Host Application, because writing to the Keychain requires an entitlement. Only apps can have entitlements — not libraries, frameworks, packages, etc …
Without a Host Application, the test will fail with the following error:
To run the test case: