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

Plan for Improved Testability of Helix Python Scripts #7107

Open
2 tasks
Tracked by #7377
missymessa opened this issue Mar 15, 2021 · 2 comments
Open
2 tasks
Tracked by #7377

Plan for Improved Testability of Helix Python Scripts #7107

missymessa opened this issue Mar 15, 2021 · 2 comments

Comments

@missymessa
Copy link
Member

Ensuring all our code is testable is a team principle. Therefore, we need to come up with a plan to improve our testing of our Helix Python scripts as we make changes to them to support test retries.

At a minimum, let's come up with plans for the following:

  • Unit testing: Preferably local unit testing, instructions for devs to be able to do it locally, be able to run these unit tests in PRs.
  • Scenario testing: Results should be discoverable, consolidated, meaningful.
@missymessa
Copy link
Member Author

Notes from our meeting regarding a better testing strategy:

  • Scenario testing

    • Stand up endpoints: Service Bus, Event Hub, Storage
    • Use Docker for running the tests so that the scripts don't mess up the state of your local computer
      • Be sure to use the "lowest" common version of Python
    • Mount your local scripts into the Docker container
    • May not need to build the WHL in order to locally test
    • Should be able to use this process for local tests, PR/CI tests
    • Use Server Core for testing Windows with Docker; should be able to use any flavor of Linux
    • (Can't do nested Docker containers)
    • Create some kind of thing like "Arcade Validation" to run bigger scenario tests (for the retry tests feature)
  • Unit testing

    • Too much module-level code that would require a greater re-write of the scripts in order to make unit testing feasible
  • Existing testability

    • If the scripts change, the tests break
    • Locally, leaky python executables
    • Validate stage in dotnet-helix-machines pipeline

@missymessa
Copy link
Member Author

Add this to a new epic for Helix scripts tech debt rewrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant