testfx icon indicating copy to clipboard operation
testfx copied to clipboard

Allow custom --help output

Open MarcoRossignoli opened this issue 1 year ago • 2 comments

It could be useful give a way to the users to customize the UX for the --help command. We already allow to have

  • custom banner
  • custom output device

cc: @Evangelink @bradwilson

MarcoRossignoli avatar Aug 07 '24 06:08 MarcoRossignoli

@MarcoRossignoli I didn't know we could do a custom banner. Is there docs on that?

thomhurst avatar Aug 07 '24 08:08 thomhurst

@thomhurst please look at https://github.com/microsoft/testfx/blob/main/docs/testingplatform/ibannermessageownercapability.md and here is the PR where we use this custom feature on MSTest: https://github.com/microsoft/testfx/pull/3235

Evangelink avatar Aug 07 '24 11:08 Evangelink

FWIW, I don't think xUnit.net would use this.

One of the things that I think sells people on enabling Microsoft Testing Platform command line UX for xUnit.net v3 projects is that it will now behave similarly to other MTP-enabled test frameworks. I don't think people choose a test framework based on the --help output. 😉

I do think that you need to make sure all the information about every command line switch is available to whoever implements this, since they'll need to be able to show command line switches for any installed extensions. The documentation (right now) doesn't discuss this, so the sample should probably make it clear exactly how developers are expected to correctly implement this in the face of installed extensions.

bradwilson avatar Jul 15 '25 18:07 bradwilson

@bradwilson oh thanks for the comment! The customization was done for you as in past you were discussing the "need" to change the output but if you are not going to use it then I'll just go ahead and close this.

Evangelink avatar Jul 16 '25 10:07 Evangelink

No, I'm happy with where we landed over time. 👍🏼

bradwilson avatar Jul 16 '25 11:07 bradwilson