How can I speed up my non-default test scenario executions? #3425
Replies: 1 comment
-
I'm no expert. My understanding is the default scenario is not "special", it's just there to get you going and some other conveniences, like not having to specify anything when doing I think your best bet would be to create your own Docker file with Python and other slow stuff pre-installed. Understandably, the whole point of your script may be to test that - but perhaps you could have a slow test (from scratch) and then leg-up the other tests by using a different docker image for those. Lastly, I believe there is this: |
Beta Was this translation helpful? Give feedback.
-
Hey!
I built a role that (among other things) installs Python and a bunch of build dependencies on CentOS and I have been successfully using Molecule and Docker to test my role. In my default scenario, I verify that Python is installed correctly. In addition, I have five non-default scenarios which deal with different edge cases. Each of these scenarios is currently starting "from scratch" with an empty CentOS Docker container. Therefore, Python and the build dependencies have to be installed again, resulting in an execution time of 38 minutes for
molecule test --all
.Given that my default scenario validates the installation of Python, I was wondering if I could start my non-default scenarios with Docker containers that come with Python already installed. Can I somehow piggy-back on the results of the default scenario?
Are there other means to speed up executions of non-default test scenarios?
Thanks in advance for any kind of advice!
Beta Was this translation helpful? Give feedback.
All reactions