Hive Hive
Sign in

tuist test –generate-only will generate all schemes

GitHub issue · Open

Metadata
Source
tuist/tuist #8042
Updated
Jun 11, 2026
Domains
CLI
Details

What happened?

running the tuist test <scheme> --generate-only seems to generate all of the available schemes, not just the one specified.

How do we reproduce it?

1.run tuist test <scheme> --generate-only. I’d expect only the scheme specified to show up in Xcode, but all of them do.

Error log

N/A no error

macOS version

15.6

Tuist version

4.63.2

Xcode version

26 Beta 5

Comments
P
pepicrft Aug 18, 2025

@lilidotshi --generate-only is for generating the project for testing without running the tests. What’s the use case for not generating other schemes in the project?

D
dosubot[bot] Aug 18, 2025

This is expected behavior: when you run tuist test <scheme> --generate-only, Tuist generates the Xcode project with all available schemes, not just the one you specify. The --generate-only flag only skips running tests—it does not limit which schemes are included in the generated project. Scheme filtering only applies to test execution, not project generation. You can see this reflected in both the documentation and the implementation.

If you need to generate a project with only a specific scheme, that isn’t currently supported by this command. Let me know if you want to discuss possible workarounds!

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about tuist Share Dosu with your team

L
lilidotshi Aug 18, 2025

@lilidotshi --generate-only is for generating the project for testing without running the tests. What’s the use case for not generating other schemes in the project?

I’d expect that if I supply a schema for tuist test <schema> that tuist test would only test that scheme, which is true. So why would adding –generate-only not only generate the test target?

F
fortmarek Aug 19, 2025

I’d expect that if I supply a schema for tuist test that tuist test would only test that scheme, which is true. So why would adding –generate-only not only generate the test target?

--generate-only is really primarily meant for debugging or subsequent automation. While we could certainly remove other schemes, I’m not sure what use case we would make better by that? Would you mind describing a bit further what you’re trying to do with --generate-only?

L
lilidotshi Aug 19, 2025

I think this is more of a preference/consistency thing for me than a real issue if this is how it’s meant to work. From a logical standpoint, if tuist test <scheme> only builds and tests one scheme, then I would expect that tuist test <scheme> --generate-only would ONLY generate that scheme, otherwise I’d just run tuist test --generate-only. As it stands, the only way to generate only the scheme I want is tuist generate <scheme> which, again, is mostly a preference and efficiency thing.

For instance:

  1. I run tuist test Demo
  2. The test fails and I want to look at why
  3. It’s going to be much faster for me to press the up key in my terminal to bring up tuist test Demo and tack on --generate-only to the previously run command. Instead, I have to now type out tuist generate DemoTests
P
pepicrft Aug 19, 2025

Thanks @lilidotshi for clarifying it. I think what’s confusing is the naming. --generate-only doesn’t mean generate only the passed scheme, but more like generate but not run the action.

If you run tuist test Demo, I assume the next step that you’ll want to take is open the Xcode workspace and debug code code there. Why not just do xed . instead?

L
lilidotshi Aug 19, 2025

@pepicrft xed . will open everything, and if I have a very modular project, having a focused look like what tuist generate Demo provides is invaluable.