Is code coverage already working for Swift?

前端 未结 3 1803
臣服心动
臣服心动 2021-02-12 09:55

I am trying to setup test code coverage for a Swift application on Xcode 6 Beta 4.
I was able to do so in the past using ObjectiveC with Xcode 5, however I think I had to ca

相关标签:
3条回答
  • 2021-02-12 10:21

    Xcode 6 Beta 4 does not have code coverage for Swift working. There is an open Apple issue with id: 17450338 against it.

    0 讨论(0)
  • 2021-02-12 10:24

    Code coverage for Swift is available in Xcode 7. You can turn it on in the test settings for your scheme, by ticking the checkbox labeled "Gather coverage data."

    Note that Apple has introduced a new format for the coverage data, profdata files.

    Links:

    • Xcode Overview: Using Code Coverage (Mac) (Apple docs)
    • Xcode Overview: Using Code Coverage (iOS) (Apple docs)
    • Leveraging Swift Code Coverage with Xcode 7 (blog post, not mine)
    0 讨论(0)
  • 2021-02-12 10:27

    It does not fixed in Xcode 6.3, see http://openradar.appspot.com/radar?id=6457429508227072

    0 讨论(0)
提交回复
热议问题