This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#133
Workaround to be able run parameterized tests.
Root cause:
Need to identify count of parameters and generate test name (with support custom name) before run them. It is not available from APK (we can't use reflection in APK to invoke method like junit does for regular unit tests).
Solution:
Pass whole class to android runner without method name and it will run all parameterized tests there.
Parser will correctly got tests result and display them in report. It also will correctly rerun specified parameterized tests if rerun enabled.
For proper work also exclude such tests from fatal crashed tests logic because such test never run with such name (by class name only). It will be executed with custom name based on index or custom name provided in Parameters annotation.
Also, in test suite loader we put such tests at begin of queue because they can consume a lot of time due to count of tests in class. So running them at first give us benefits in case of use multiple devices.
Also, adding support for Allure parameterized tests - same logic just different annotation for discover test classes.
Side-effect: Overall progress printer will display incorrect percent of finished tests because at start we have 1 parameterized test but can't detect how much exactly parameterized tests inside.
Limitation: Can't filter parameterized tests by methods because we invoke whole class and all tests inside, not methods.