Running local package's tests in main app's test plan

Hi,

I work on a iOS application which includes several local swift packages containing modularised code. Each of those local swift packages has a test target defined in their respective Package.swift, and when opening a local package folder standalone in Xcode, then the tests run without issues.

However I would like in the main app's test plan to add the local package test targets and have them all run together when the main app's default test plan is run. Xcode allows me to select local package test targets within the main app's test plan (also within Test portion of the main app's scheme), however attempting to build for testing throws a "Module '…' was not compiled for testing".

Any ideas on how to achieve this goal (run local package tests in conjunction with main app's tests) and avoid that error?

Thanks Peter

Did you ever found a solution for this ? I'm running into the main problem and the Xcode (v16.10) doesn't even see the test target of the local package in the test plan.

Running local package's tests in main app's test plan
 
 
Q