Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Issue#133 - Can't run Parameterized tests #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 16, 2020

  1. Issue#133 - Can't run Parameterized tests

    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.
    rtorsten committed Dec 16, 2020
    Configuration menu
    Copy the full SHA
    139d4a7 View commit details
    Browse the repository at this point in the history