paw_les
paw_les

Reputation: 31

Is this possible to run test with TestNG in Android Studio?

I am using Android Studio 2.1.2 and I want to write some test using TestNG wrapper to test my app. I can't find any find any usefull stuff how to do it android studio or if it is possible at all?

Upvotes: 3

Views: 3161

Answers (2)

anuja jain
anuja jain

Reputation: 1387

Yest it is possible.You need to add below line of code in build.gradle -> Dependency section

 testCompile 'org.assertj:assertj-core:2.0.0'
    testCompile 'org.testng:testng:6.9.10'

Regards,

Anuja

Upvotes: 6

juherr
juherr

Reputation: 5740

Android Studio is more and less IntelliJ. Android Studio 2.1.2 is based on IntelliJ 15. Then, you should refer to the IntelliJ documentation when you want to do something not officially documented by Android Studio.

About TestNG, the IntelliJ documentation is https://www.jetbrains.com/help/idea/15.0/run-debug-configuration-testng.html

If you find the TestNG option in IntelliJ, you win. Otherwise, we can conclude it is not possible (but IntelliJ with Android plugin should be able to do it).

Upvotes: 3

Related Questions