Skip to content

Commit

Permalink
Add TestButler
Browse files Browse the repository at this point in the history
  • Loading branch information
ligi committed Apr 12, 2024
1 parent 6dea86b commit 6667767
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
6 changes: 5 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
vectorDrawables.useSupportLibrary = true
archivesBaseName = "SurvivalManual-$versionName"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "org.ligi.survivalmanual.runner.TestButlerJunitRunner"
}

buildFeatures {
Expand Down Expand Up @@ -77,4 +77,8 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.5.1'
androidTestImplementation "androidx.test:core:1.5.0"
androidTestImplementation "androidx.test:rules:1.5.0"

androidTestImplementation 'com.linkedin.testbutler:test-butler-library:2.2.1'
androidTestUtil 'com.linkedin.testbutler:test-butler-app:2.2.1'

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.ligi.survivalmanual.runner;

import android.os.Bundle;
import androidx.test.runner.AndroidJUnitRunner;
import com.linkedin.android.testbutler.TestButler;

public class TestButlerJunitRunner extends AndroidJUnitRunner {
@Override
public void onStart() {
TestButler.setup(getTargetContext());
super.onStart();
}

@Override
public void finish(int resultCode, Bundle results) {
TestButler.teardown(getTargetContext());
super.finish(resultCode, results);
}
}
2 changes: 1 addition & 1 deletion android/src/main/assets/md
Submodule md updated from 341ad1 to a8fe98

0 comments on commit 6667767

Please sign in to comment.