@Mylovemhz's answer is correct, but incomplete. You need to specify the link:
Swift 3:
UIImage(named: "imageName", in: Bundle(for: MyTestClass.self), compatibleWith: nil)
Also make sure your asset is included in the same goal as your test class.
source share