boxblinkracer / xcode-testrail

A decoupled TestRail integration for your Xcode project to easily send results to TestRail.
MIT License
4 stars 3 forks source link

Unable to read testrail.conf file #3

Open adku opened 4 days ago

adku commented 4 days ago

Hello,

I started working with this library and in some areas, it seems to be working. Unfortunately, I'm not able to read my data from testrail.conf file.

This line is not working: guard let path: String = Bundle(for: Resource.self).path(forResource: name, ofType: type) else { let filename: String = type.isEmpty ? name : "\(name).\(type)" return "\(Resource.resourcePath)/\(filename)" }

Path is nil. Anyone experienced similar issue?

adku commented 4 days ago

I was able to fix it in a little bit hacky way like this:

var xcTestPath: URL { Bundle(for: Swift.type(of: self)).bundleURL .deletingLastPathComponent() .deletingLastPathComponent() } var path: String { xcTestPath.appendingPathComponent("\(name).\(type)").path }