0

I added a shell script in android studio project. I'm using this command in command line

./gradlew testDebugUnitTest --stackTrace org.package.package.controller.StudentGoToTheFAQActivityTest

Note: org. Package. Package. Controller is not a real package name

serkanmalagic
  • 71
  • 2
  • 8
  • Duplicate! Question is already answered here https://stackoverflow.com/questions/22505533/how-to-run-only-one-unit-test-class-using-gradle – Shivam Pokhriyal Jun 17 '21 at 10:14
  • Does this answer your question? [How to run only one unit test class using Gradle](https://stackoverflow.com/questions/22505533/how-to-run-only-one-unit-test-class-using-gradle) – Shivam Pokhriyal Jun 17 '21 at 10:14
  • I tried many ways but I didnt find any solution. It run from the other mac OS device. I think my system cannot compile test classes. Don't know why – serkanmalagic Jun 18 '21 at 07:56

1 Answers1

-1

I found a solution. I just run one test class from android studio using "blue play button" and check the stack that is running and i found this command

/Users/$macosUsername/Library/Android/sdk/platform-tools/adb shell am instrument -w -m    -e debug false -e class '$packageName.StudentGoToTheFAQActivityTest#studentGoToTheFAQActivityTest' $comBundleName.test/androidx.test.runner.AndroidJUnitRunner

$username = Macos home directory

$packageName = package name you can find it top of the test class

serkanmalagic
  • 71
  • 2
  • 8