Mockk performance while running large test suites #1294
notsatyarth
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Mockk Devs and Users!
I wanted to start a discussion around mockk performance and what can be done (as a consumer of the library to tweak it).
I'll go first with some stats. So we run a large number(~15k) of tests quite regularly. These tests are a combination of Unit and Integration (flow) tests. In this setup I've noticed that the test execution duration can vary largely based on available resources for the same invocation. I was wondering what would be the best way to dig into this?
For example;
I have a single unit test that takes about 10 seconds when I run this on the local system , (it takes about 1.5s to create one mock). I've verified this by enabling trace logs from mockk
On CI this same test can take between 60 to 100 seconds to run. Based on my analysis this is not the test execution time but instead the time taken to setup the test itself.
I was wondering if others face such issues too and how do you folks handle this?
Beta Was this translation helpful? Give feedback.
All reactions