Android project is trying to run test from different branch

Android project is trying to run test from different branch

Description of the issue

Our Android CI is failing with the log

        java.lang.ClassNotFoundException:<TestClassName>```

due to bitrise trying to run unit test that exists in a separate branch but not  in the branch that our PR is targeting to.

What could be the issue here? Is anyone else facing the same issue?

Hi @kai91,

Thanks for reporting this here! :wink:

Can you please try to follow this local debugging guide How to debug your build locally / "It works on my Mac/PC but not on bitrise.io" and let us know how it goes?

bitrise clones the branch you specify / triggered by the git event (e.g. git push to a branch).

If you clone the same branch you had this issue on, can you run the tests (locally on your Mac/PC)?

Asking because unless this is a PR build there’s absolutely no magic going on here. The environment is clean, no previous code (we don’t store your code unless you configure a build cache or something custom to do that), it’s simply a git checkout then a gradle … command.

I’m going to try using bitrise cli and will update here. thanks.

1 Like