October 21, 2019

Dividing our test time by 10

Pierre de Wulf @Daolf

I know that this milestone is a pure "tech" one and not a "10k MRR" kind, but I wanted to share it with you. For the last month, I've been trying to reduce our testing time on Heroku. 🤓

I've optimized the code a lot but I've reached a point where I could not do better.

I am a huge fan of the Heroku platform but their doc on tests parallelization in Python was rather scarse. 🧐

I finally managed to find a way to parallelize my pytest tests and I talked extensively about this process in this blog post: https://www.freecodecamp.org/news/parallel-python-testing-in-heroku

This small step is an important one as it allows us to deploy a new version of the app much faster than before. 😎

  1. 1

    This is great! Reducing test time is super-important, it's one of the biggest things I think about in my day job.

    1. 1

      Yes you are right !
      Where do you work ? What do you use? Any tips ? I am curious :).

      1. 1

        I work as an SRE at Puppet. It's a bit of a different beast since our biggest product is delivered on-prem but we work on both optimizing the test-infrastructure, and auditing test coverage and efficiency. We've written some custom tooling to analyze Jenkins jobs(a single build can involve hundreds of Jenkins jobs, so we want to be able to quickly sort out which take the longest) . We're also looking at using a distributed tracing service like jaeger and honeycomb.io to really dig into what the jobs are doing.

  2. 1

    Did you try GitHub actions?

    1. 1

      I haven’t but I definitely want to try it out. Have you ?

      1. 1

        Yup im using it. It's nice to have the CI in the same page as the code repo, and it's easy to use / very composable. However, I feel that it's a bit slow.. maybe I did not set it up properly.

        I think SemaphoreCI does parallel builds too. And generous free tier

        1. 1

          Thank you for your feedback.
          I did not know SemaphoreCI, I'll take a look a it.
          But it really feels that the CI landascape is getting more and more crowned these days, I don't feel like trying everything ;)

          1. 1

            If u don't want to use any 3rd party... theres also option to use CodeBuild / CodePipeline right inside AWS. It's not that hard to set up once u do it one time.

  3. 1

    This comment was deleted 7 months ago.

    1. 1

      Thank you very much !