Skip to content

Conversation

benlaverriere
Copy link
Contributor

@benlaverriere benlaverriere commented Nov 6, 2024

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

I hadn't used these scan options before, nor was I familiar with their xcodebuild equivalents. When I read the docs, I interpreted the slashes as meaning "or", rather than specifying a string format. That is, I thought I could provide just --only-testing:"someTestFunctionName" or --only-testing:"TestSuiteName/testFunctionName".

Eventually https://stackoverflow.com/a/40558173 set me aright. I figured others might be similarly confused.

Description

I've tried to keep things concise here while also explaining the format a bit more clearly. Definitely open to edits and feedback!

@benlaverriere benlaverriere marked this pull request as ready for review November 6, 2024 20:35
@benlaverriere benlaverriere changed the title Clarify only-testing/skip-testing format [docs] Clarify only-testing/skip-testing format Nov 6, 2024
@@ -125,15 +125,15 @@ def self.available_options
# tests to run
FastlaneCore::ConfigItem.new(key: :only_testing,
env_name: "SCAN_ONLY_TESTING",
description: "Array of strings matching Test Bundle/Test Suite/Test Cases to run",
description: "Array of test identifiers to run, using the `xcodebuild` test identifier format: `Test Target`, `Test Target/Test Suite`, or `Test Target/Test Suite/Test Case`",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes!

Just wanted to share another idea how we could improve this:

Array of test identifiers to run. Expected format is TestTarget[/TestClass[/TestMethod]]

This kind of bracket notation is pretty common in CLI tools and technical docs, though it’s not a universal standard. It just visually indicates that some segments can be omitted, as long as the order and hierarchy are respected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good idea! That's more compact than my version and seems pretty clear, at least to my eyes. How would you feel about:

Suggested change
description: "Array of test identifiers to run, using the `xcodebuild` test identifier format: `Test Target`, `Test Target/Test Suite`, or `Test Target/Test Suite/Test Case`",
description: "Array of `xcodebuild` test identifiers to run. Expected format: Test Target[/Test Suite[/Test Case]]",

I don't feel strongly about that version or the one you suggested — happy to make either change, or for someone else to edit + merge the change. Thanks for reviewing!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! I’d consider simplifying the message a bit by omitting xcodebuild, since it’s already implied by the context. Maybe we could merge our ideas into something like:

Array of test identifiers to run. Expected format: TestTarget[/TestSuite[/TestCase]]

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for me! Anecdotally, it wasn't obvious to me from the context that this format came from xcodebuild, but I have no idea how common or unusual that is for other users 😂 I'll update to that latest version and we should be good to go. Thanks for workshopping this with me!

@mollyIV mollyIV merged commit 546a2f9 into fastlane:master Apr 17, 2025
2 checks passed
@benlaverriere benlaverriere deleted the patch-2 branch April 17, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants