Skip to content
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

Bucket list of various things that could be done better/differently #1918

Open
bartekpacia opened this issue Aug 16, 2024 · 0 comments
Open
Labels
maestro cli Related to the command-line Maestro tool P3 Issues that are less important tech debt Corners cut, candidates for refactoring, etc.

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Aug 16, 2024

This issue is somewhat inspired by flutter/flutter#24722. Subtasks might be broken into individual issues later on.

Orchestra

  • There's no clear system for commands that generate output (as in: artifacts, e.g. files, screen recordings)
  • Orchestra should not be concerned with filesystem operations (such as creating files taken with takeScreenshot or startRecording). Instead it should write to okio.Sinks.
    • Whenever Orchestra wants to write to such a sink, it should request it by calling commandWillGenerateOutput: (subpath, commandType) -> Sink.
    • additionally, I think its output should land in ~/.maestro/tests/<id>, not in the project repo root (which is not even Maestro workspace).
    • well akshually, it shouldn't even know what a file system is, this seems like too much responsibility. It should write output to Sinks.
  • There's code duplication between MaestroCommandRunner and TestSuiteInteractor:
    • takeDebugScreenshot()
    • Orchestra instance creation and callbacks setup

Permeating whole codebase

  • Lack of clear definitions of some terms across the codebase
    • test vs flow? "Flow run", "test suite run" but TestSuiteInteractor?
    • FlowStatus, TestExecutionSummary
    • what actually is a driver?
      • Is this a thing that runs on the device or on the host?
      • On iOS side of things, I feel like terms "XCTest driver" and "XCTest Runner" are used interchangeably and it confuses me
  • We should use Okio's FileSystem instead of stuff from Java, to allow for mocking/testing and no dependency on JVM.
  • TestExecutionSummary is only created when running in two different ways:
  • HtmlTestSuiteReporter is hard to test and iterate on. action item: create a dummy TestExecutionSummary so that HTML can be easily generated with Gradle

config

  • MaestroConfig should be renamed to FlowConfig

One-offs


Action items

  • Introduce terms for Maestro CLI running modes: single mode, multi mode (aka single test mode, multi test mode)
    • in the longer term, strive to de-duplicate code paths for them
  • Decide on either "test" or "flow" name and use it consistently
@bartekpacia bartekpacia added maestro cli Related to the command-line Maestro tool tech debt Corners cut, candidates for refactoring, etc. labels Aug 16, 2024
@bartekpacia bartekpacia changed the title List of various tech debt List of various things that could be done better Aug 16, 2024
@bartekpacia bartekpacia added the P3 Issues that are less important label Aug 16, 2024
@bartekpacia bartekpacia changed the title List of various things that could be done better Bucket list of various things that could be done better/differently Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maestro cli Related to the command-line Maestro tool P3 Issues that are less important tech debt Corners cut, candidates for refactoring, etc.
Projects
None yet
Development

No branches or pull requests

1 participant