Active build variant does not have a test artifact
Or Just switch to debuggable flavour/buildType. Solved issue for me :)
You can add this to your build.gradle file
android {
testBuildType "MycompanyBitrise" // or whatever build varient where you are getting
such error
}