-
Notifications
You must be signed in to change notification settings - Fork 149
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
Exception before running instrumentation tests on Android 19 and below #134
Comments
I've created a PR #139 to fix this issue by replacing the offending RegEx with a simple state machine. The issue occurs because older versions of Android don't support look-behind properly. |
@aaalaniz thanks for reporting issue. @mattmook thank you for your PR. I merged you PR to my local branch, build JUnitParams from this version and then I use this snapshot version in repository mentioned earlier. Unfortunately when I now run android instrumentation tests I get following error:
This problem even occurs on Android version bigger than 19. So problem needs to be investigated further. If I miss something please let me know. Any help is appreciated. |
The bug with the regexp existed in v1.0.6 however it seemed v1.1.0 introduced this ArrayIndexOutOfBoundsException regardless of the regexp fix. As such, I was considering it a separate issue as it exists independently. I don't know enough about the internals to know what ParameterisedTestMethodRunner does with currentTestDescription, however locally I had patched it with the following:
Clearly, this just masks the issue rather than resolves it. As count starts at 0 it is implying that currentParamsFromAnnotation has not been called to ensure it is incremented to 1 before currentTestDescription is called. |
Fix for #134 - Mattmook master with some fixes
Description
I am seeing an exception when using the JunitParams runner on Android 19 and below.
Steps to Reproduce
Code
The following test suite will reproduce the issue
Expected Behavior
Tests should execute and pass. (Android Studio screenshot below)
Actual Behavior
Tests are not run because "no tests are found" (Android Studio screenshot below)
Logs
I checked the logs and I see the following exception occurring.
Versions
Here is a snippet from my
build.gradle
file.The text was updated successfully, but these errors were encountered: