Skip to content
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

Record/Verify Task isn't compatible when test functions have parmeters #13

Open
ben-gooding-sky opened this issue Mar 25, 2024 · 1 comment
Assignees

Comments

@ben-gooding-sky
Copy link

ben-gooding-sky commented Mar 25, 2024

In my paparazzi tests I use Google's TestParameterInjector (here) to inject different values into the tests

The problem is the plugin doesn't find the tests if I try run just a single test on it's own with these parameters

Not sure if this is fixable but still worth mentioning

Task output -

Execution failed for task ':snapshots:testDebugUnitTest'.
> No tests found for given includes: [my.namespace.snapshots.x.y.MyTestClass.myTestFunctionWithInjectedParams](--tests filter)

fun myTestFunctionWithInjectedParams(
        @TestParameter(value = ["1.0", "1.2", "1.5"]) fontScale: Float,
    ) {}
@thsaravana
Copy link
Member

Hi @ben-gooding-sky, which version of the IDE are you using?

I tested with:

@RunWith(TestParameterInjector::class)
class TestParameterInjectorTest(
  @TestParameter config: Config,
  @TestParameter(value = ["1.0", "1.2", "1.5"]) fontScale: Float,
) {

and I could run Record and Verify properly.

Screenshot 2024-09-23 at 20 48 47

@thsaravana thsaravana self-assigned this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants