Can android support testng framework

Hi

I am using appium for mobile automation and editor is android studio.

Is it possible to use test ng frame work with android.

@anubhagupta There will be no issue if you will use TestNG framework

Ok thanks for reply

I have added testng jar into lib folder
and wrote code
but it does not show runas testng option
do i need to install testng in android studio

Tutorial for using Testng in AndroidStudio:

Found using ‘testng androidstudio’ in a google search.

Hi

I have configured testng

and run following code

package com.example.admin.myapplication2;

    import org.testng.annotations.Test;

public class Testng {

@Test()
public void testEmailGenerator() {

    System.out.println("hello");

}

}

but while executing code graddle build keep running for infinite and showing this…

Information:Gradle: Executing tasks: [:app:assembleDebug, :app:assembleDebugUnitTest]

After long time it’s showing error

Error:Gradle: Execution failed for task ‘:app:transformResourcesWithMergeJavaResForDebug’.

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK org/openqa/selenium/remote/isDisplayed.js
File1: C:\Users\Admin\AndroidStudioProjects\MyApplication23\app\libs\client-combined-3.5.3-nodeps.jar
File2: C:\Users\Admin\AndroidStudioProjects\MyApplication23\app\libs\selenium-server-standalone-3.4.0.jar

Do you ever use google? It has answers for gradle problems. You should read through all of these and fix the problem. From my preliminary readings, it’s likely that you’ve got 2 references to the .jar file:

https://www.google.com/search?q=Error%3AGradle%3A+Execution+failed+for+task+‘%3Aapp%3AtransformResourcesWithMergeJavaResForDebug’&oq=Error%3AGradle%3A+Execution+failed+for+task+‘%3Aapp%3AtransformResourcesWithMergeJavaResForDebug’&aqs=chrome..69i57j69i58j69i60.144j0j7&sourceid=chrome&ie=UTF-8

Regardless, this is not an Appium problem. If you can’t solve this from the above resources I suggest you look for an answer on a Gradle messageboard like this one:

When you get through this, I’m sure you’ll have other problems. Come back with those and try to ask questions that actually have to do with Appium.