-
Notifications
You must be signed in to change notification settings - Fork 119
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
Improve sharding of parameterized tests #1720
Comments
I have also ran into something similar. One of our parameterized test class took 10 minutes more than any other shard. While I understand the limitations of sharding parameterized classes, it took a long time to figure out what was happening at test level. Neither FTL nor Flank show class-level durations, so it wasn't until I wrote a small JUnit XML parser did I realize that one class is taking 10mins+. While a longer term fix to parameterized classes may be harder to implement, printing some warning about parameterized classes taking a long time (compared to other shards etc.) would help narrow things down. Thoughts @bootstraponline @jan-gogo? |
I agree some type of warning or reporting would be good. Maybe adding a report that includes test time by class, and note the parameterized classes? In the long term I think we'll likely move to runtime discovery of tests in the new corellium backend. That should enable us to get a complete picture of what tests exist. Parsing out the info from bytecode has limitations. The output of this task should be a few proof of concepts of different approaches and a doc which summarizes the tradeoffs. |
Improve Sharding of Parameterized testsFlank users want flank to make use of parameterized tests in the correct manner and provide more information about the use of parameterized tests. ReferencesMotivationBased on the discussion found in 1720. Flank needs to improve its handling of parameterized tests as making use of them can significantly increase test execution time. GoalsImproving support for parameterized tests by investigating/implementing the following:
Finally a recommendation as to what path to take regarding the above goals. DesignFlank already partially supports Parameterized tests and as per discussion it adds all the iterations for the test into one single shard, which can dramatically increase the time for that particular shard.
ImplementationImplementation will be broken up into the viability of whether it can be easily implemented or not.
The addition of the options will be split into another ticket for investigation as it is a fairly complex task.
DependenciesThere are no changes TestingThe solution should be unit tested and integration tested accordingly as it adds new features to flank. Conclustion/ RecommendationThe recommended course of action is to tackle the tasks as follows:
|
As a flank setup maintainer at Slack, I would like flank to improve its handing of parameterized tests (on Android), so that we can avoid unexpected increases in test suite execution time.
This came up recently because, in our weekly metrics meeting, we noticed a significant increase in the execution time of the CI job that runs instrumentation tests. Upon, closer examination, we noticed that the PR when it started included a new Parameterized test. Flank currently treats parameterized tests as any other test methods, so it got included in a shard as if it were 1 test class with multiple test methods. At runtime, this expanded to many more tests, causing this one shard to execute for much longer (i.e. we had an imbalance in sharding). Ideally, flank would "know" how many test a parameterized test expands to and accouts for that in its sharding.
Describe the solution
@bootstraponline has suggested: "some intelligent preprocessing of the AST and figure out what the parameterized tests will expand to."
Describe alternatives considered
The text was updated successfully, but these errors were encountered: