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

Fails with "Instrumentation tests require a valid test-runner-class defined." after upgrading to v21.01.0 #1444

Closed
kubode opened this issue Jan 4, 2021 · 1 comment · Fixed by #1453
Assignees
Labels

Comments

@kubode
Copy link

kubode commented Jan 4, 2021

Describe the bug

A clear and concise description of what the bug is.

I got Instrumentation tests require a valid test-runner-class defined. error when I run flank run android after upgrading to v21.01.0:

The documentation says:

  ### Instrumentation Test Runner Class
  ## The fully-qualified Java class name of the instrumentation test runner
  ## (default: the last name extracted from the APK manifest).
  # test-runner-class: com.foo.TestRunner

test-runner-class is not required but, I got the error.
Is the documentation is wrong?

To Reproduce

Steps to reproduce the behavior:

  1. Set gcloud.type: instrumentation to your flank.yml.
  2. Run flank run android.
  3. Flank exits with Instrumentation tests require a valid test-runner-class defined. error.

Expected behavior

A clear and concise description of what you expected to happen.

No errors.

Details (please complete the following information):

Have you tested on the latest Flank snapshot?

Post the output of flank --version.

version: v21.01.0
revision: 66cff410ff585beffba5f150799b3f77b7065dfb

My flank.yml:

gcloud:
  type: instrumentation
  app: # [REDACTED]
  test: # [REDACTED]
  device:
    - model: walleye
      version: 28
      locale: en_US
      orientation: portrait
  environment-variables:
    timeout_msec: 20000
    coverage: true
    coverageFile: /sdcard/coverage.ec
    clearPackageData: true
  use-orchestrator: false
  directories-to-pull:
    - /sdcard/
  timeout: 10m

flank:
  max-test-shards: 8
  shard-time: 50
  smart-flank-gcs-path: # [REDACTED]
  test-targets-always-run:
    - class # [REDACTED]
  files-to-download:
    - .*/sdcard/[^/]+\.ec$

Additional context

Add any other context about the problem here.

This issue did not happen with v20.09.3.
Seems like this issue was included at #1230.

@kubode kubode added the Bug label Jan 4, 2021
@pawelpasterz
Copy link
Contributor

@kubode
Thanks for reporting it! Try without type: instrumentation (just remove/comment in config file). Yet, it's a workaround and needs to be fixed :)

@piotradamczyk5 piotradamczyk5 self-assigned this Jan 4, 2021
@mergify mergify bot closed this as completed in #1453 Jan 5, 2021
mergify bot pushed a commit that referenced this issue Jan 5, 2021
Fixes #1444

`test-runner-class` has a default value (the last name extracted from the APK manifest), so it is not needed to fast fail if this option is not specified

## Test Plan
> How do we know the code works?

1. Set `gcloud.type: instrumentation` to your `flank.yml`.
2. Run `flank run android`
3. Do not set `test-runner-class`
4. Tests do not fast fail

## Checklist

- [x] Unit tested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants