SKTestSession.buyProduct(identifier: options:) doesn't work in swift package

We are doing a Swift Package to manage our iap with storekit 2. This packages also contains the unit tests for the code. (as well as all the required files .storekit, certificate, ...) when calling SKTestSession.buyProduct(identifier: options:) we catch an error : Error Domain=SKErrorDomain Code=0 "(null)" Note when trying exactly the same code but in a project instead of a package that works perfectly.

Any idea what could it be?

The code is really simple :

    var testSession: SKTestSession!
    
    override func setUpWithError() throws {
        testSession = try SKTestSession(configurationFileNamed: "Products")
    }

    func testExample() async throws {
        do {
            let productID = "nonConsumable.crystal.tier1"
            
            try await testSession.buyProduct(identifier: productID)
        } catch {
            XCTFail("An error occured during purchase : \(error)")
        }
    }
}
SKTestSession.buyProduct(identifier: options:) doesn't work in swift package
 
 
Q