maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Make flow execution output work with JUNIT output format

Open NyCodeGHG opened this issue 10 months ago • 8 comments

Proposed Changes

This PR allows the flow execution output to work while choosing the JUnit output format. It also adds a new flag --hide-execution, which allows hiding of the execution output.

Testing

Ran the android advanced example flow, as well as an internal test suite, using with and without the --output=junit flag.

NyCodeGHG avatar Apr 19 '24 10:04 NyCodeGHG

@NyCodeGHG could you share some more examples on what this change does? Some console output with and without the --hide-execution would be appreciated, thanks!

axelniklasson avatar May 28 '24 11:05 axelniklasson

@axelniklasson sure! Previously maestro didn't show the output of a flow when running a single flow using the junit output format, with this change this does work. I added --hide-execution as a feature to get a similar experience to the previous behaviour.

maestro-pr-1721-recording-ffmpeged.webm

NyCodeGHG avatar Jun 04 '24 10:06 NyCodeGHG

@axelniklasson sure! Previously maestro didn't show the output of a flow when running a single flow using the junit output format, with this change this does work. I added --hide-execution as a feature to get a similar experience to the previous behaviour.

maestro-pr-1721-recording-ffmpeged.webm

@NyCodeGHG Nice, this explains the changes very well - thanks! Before we do an in-depth review of this PR, let's invert the behavior of the flag making this an opt-in change instead of an opt-out to keep the current behavior. We can call the flag --show-execution-output and when set enables the output and it defaults to false.

axelniklasson avatar Jun 04 '24 11:06 axelniklasson

@lucaswiechmann will help get this merged as I'll be OOO starting next week. Please let him know when you've updated the PR @NyCodeGHG!

axelniklasson avatar Jun 05 '24 12:06 axelniklasson

@axelniklasson / @lucaswiechmann are you sure changing this behaviour is a good idea? with this pr it's still different as it would show nothing at all, instead of the output that a flow is running. So the default user experience would be worse

NyCodeGHG avatar Jun 07 '24 12:06 NyCodeGHG

@axelniklasson / @lucaswiechmann are you sure changing this behaviour is a good idea? with this pr it's still different as it would show nothing at all, instead of the output that a flow is running. So the default user experience would be worse

Hey @NyCodeGHG

let's keep the current output/behavior that we have today image

And then add two flags:

  • one to show extended output like this image

  • Another (we could keep the hide-execution) to not show any output at all

lucaswiechmann avatar Jun 07 '24 14:06 lucaswiechmann

@lucaswiechmann I like your suggestion, but I'm not sure if thats easily possible, as the current behaviour/output is an entirely different codepath.

NyCodeGHG avatar Jun 25 '24 07:06 NyCodeGHG

is it possible to add the flow execution results to the output junit xml file?

chrisaydat avatar Jul 08 '24 15:07 chrisaydat

@chrisaydat Could you clarify what you mean?

bartekpacia avatar Aug 16 '24 09:08 bartekpacia

I'm not interested in this anymore as we moved away from maestro. If someone else wants to pick this up, feel free to create a follow up PR.

NyCodeGHG avatar Aug 16 '24 10:08 NyCodeGHG

I see. Thank you for all the contributions you made to Maestro.

I'll re-open the PR, it's good work and I really want to merge it.

bartekpacia avatar Aug 16 '24 11:08 bartekpacia

Screenshot 2024-08-19 at 11 46 59 AM @bartekpacia I mean something like this, whether it is the labels or the results as is on both HTML and Junit reports

chrisaydat avatar Aug 19 '24 18:08 chrisaydat

Thanks for clarifying @chrisaydat. I think it warrants a new issue, it's not related to this PR.

bartekpacia avatar Aug 19 '24 18:08 bartekpacia

Review note:

  • I very much like the reduced code duplication across TestRunner and TestSuiteInteractor. Related: #1918
  • I don't agree with adding a new NoopResultsView

bartekpacia avatar Aug 23 '24 13:08 bartekpacia

My reasoning: specifying --format (whether JUnit or HTML) should have no impact on Maestro CLI output. It's an unrelated option.

Therefore, I don't think the --hide-execution is needed.

bartekpacia avatar Aug 23 '24 16:08 bartekpacia

Ahh, there's a big merge conflict in TestCommand, because of #1732

bartekpacia avatar Aug 23 '24 16:08 bartekpacia