Misleading usage of "test case" in XCTest.framework header documentation

Originator:brian.s.croom
Number:rdar://26002223 Date Originated:29-Apr-2016 08:44 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7.3
Classification: Reproducible:
 
Summary:
The term “test case” refers to a single executable test, consisting of a test method which is contained in an `XCTestCase` subclass. However there are a couple of instances in the header documentation for the XCTest framework where the term “test case” is instead used to refer to an entire class of test cases, which could lead to confusion, especially for a new user attempting to understand how the different pieces of the framework fit together.

I observed this in two specific locations.

The header documentation for the `XCTestCase` class includes this section:
```
 * To define a test case:
 *
 * • Create a subclass of XCTestCase.
 * • Implement -test methods.
 * • Optionally define instance variables or properties that store the state of the test.
 * • Optionally initialize state by overriding -setUp
 * • Optionally clean-up after a test by overriding -tearDown.
```
The introductory phrase should probably read: "To define a set of test cases:" or similar

The header documentation for the `+[XCTestCase testInvocations]` method reads:
```
/*!
 * @method +testInvocations
 * Invocations for each test method in the test case.
 */
 ```
 This should probably read: "Invocations for each test method in the test case class." or similar


Notes:
See this pull request on swift-corelibs-xctest for additional context: https://github.com/apple/swift-corelibs-xctest/pull/101

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!