Skip to content

Standardize usage of the term "test case" in the code and documentation #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2016

Conversation

briancroom
Copy link
Contributor

While thinking about the terminology we've been using to talk about tests for this framework, I realized that the term "test case" is being used to mean two distinct things:

  1. A single test to be executed by the framework (i.e. an XCTestCase instance)
  2. An XCTestCase subclass, including all of its test methods

After thinking about it more carefully and looking through the Apple XCTest header comments*, I've come to the conclusion that #1 is the correct usage. This PR is an attempt to improve our consistency around this.

Looking for feedback on both the underlying assumptions and the specific changes I'm proposing here!

* Note: Assuming folks agree with this usage suggestion, I'll be opening a Radar also, as there are a couple of points where the same confusion can be detected in the Apple XCTest headers.

A test case consists of a single test method which is executed in the
context of a test case subclass. Previously, "test case" was sometimes
confusingly used to refer to the entire set of test methods on a test
case subclass.
@modocache
Copy link
Contributor

Good idea! The changes also look good to me. @mike-ferris-apple, could you ask @swift-ci to please test?

Just spitballing, but maybe we could also one day add a "glossary" or something. It took me a while to understand what the following referred to:

  • Test case
  • Test run
  • Test suite
  • Test expectation (as opposed to assertion)

@ddunbar
Copy link
Contributor

ddunbar commented Apr 27, 2016

@swift-ci please test

@mike-ferris
Copy link

Thanks, Daniel. I would definitely be in support of pushing for clarity in the Xcode docs as well, so definitely don't shy away from filing radars on that!

@briancroom
Copy link
Contributor Author

One followup Radar posted: rdar://26002223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants