I've got a json file in my xcode project and I'm trying to read the file via:
let fileUrl = Bundle.main.url(forResource: "myfile", withExtension: "json")
and so on.
When I run this code from a file within the project target membership like a view controller file, the code runs and I'm able to read the json. However, when run it within my XCUITestCase file – it fails, unable to find the url.
How can I read the json file from within XCUItest?
I've taken a look at this post which hasn't helped Read local JSON file in XCUITest