Importing Axe DevTools into iOS Unit Tests and UITests

114 Views Asked by At

When I import DevTools the app builds fine, but the unit tests give an error when building:

Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2.4 compiler: 
....../Carthage/Build/iOS/Attest.framework/Modules/Attest.swiftmodule/x86_64-apple-ios-simulator.swiftmodule

If I only import it in our unit tests, then the unit tests build fine, but the app gives an error:

Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2.4 compiler: 
......./Carthage/Build/iOS/Attest.framework/Modules/Attest.swiftmodule/x86_64-apple-ios-simulator.swiftmodule

Is manual testing and unit testing in the same build possible?

1

There are 1 best solutions below

0
On BEST ANSWER

This is strange to me. Axe DevTools supports manual and automated testing in the same build. The errors described implies to me that there are multiple versions of Axe DevTools somewhere in your project files, and Xcode is doing some weird things to try to import the wrong version. I would recommend first ensuring that there is only one Axe DevTools framework in your project files. You should be able to use the same framework for both manual and unit testing.

If you do in fact only have one framework, then I would recommend looking through Build Settings for the app and unit tests and ensuring that Framework Search Paths is correct.