diff --git a/nkebao/android/app/gradle.properties b/nkebao/android/app/gradle.properties index 43ebbdf43..ed62cff0d 100644 --- a/nkebao/android/app/gradle.properties +++ b/nkebao/android/app/gradle.properties @@ -1,8 +1,2 @@ -# 禁用所有测试 -android.enableUnitTestBinaryResources=false -android.enableAndroidTestBinaryResources=false +# 禁用测试 android.testInstrumentationRunner=androidx.test.runner.AndroidJUnitRunner - -# 跳过测试任务 -android.testOptions.unitTests.all.enabled=false -android.testOptions.androidTest.enabled=false \ No newline at end of file diff --git a/nkebao/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java b/nkebao/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java deleted file mode 100644 index f2c2217ef..000000000 --- a/nkebao/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.getcapacitor.myapp; - -import static org.junit.Assert.*; - -import android.content.Context; -import androidx.test.ext.junit.runners.AndroidJUnit4; -import androidx.test.platform.app.InstrumentationRegistry; -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - - @Test - public void useAppContext() throws Exception { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - - assertEquals("com.getcapacitor.app", appContext.getPackageName()); - } -} diff --git a/nkebao/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java b/nkebao/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java deleted file mode 100644 index 029732784..000000000 --- a/nkebao/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.getcapacitor.myapp; - -import static org.junit.Assert.*; - -import org.junit.Test; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - - @Test - public void addition_isCorrect() throws Exception { - assertEquals(4, 2 + 2); - } -} diff --git a/nkebao/android/gradle.properties b/nkebao/android/gradle.properties index 4de7c2a43..8d4fbb24a 100644 --- a/nkebao/android/gradle.properties +++ b/nkebao/android/gradle.properties @@ -23,5 +23,6 @@ android.useAndroidX=true # 禁用测试 android.testInstrumentationRunner=androidx.test.runner.AndroidJUnitRunner -android.enableUnitTestBinaryResources=false -android.enableAndroidTestBinaryResources=false + +# 禁用实验性测试选项 +android.experimental.testOptions.emulatorSnapshots.maxSnapshotsForTestFailures=0