0

I developed appium scripts for my Android app in Eclipse and using this IDE to execute. But I wonder there's any way to run appium scripts on other PC without installing Eclipse or any IDE. I also integrated TestNG and run by TestNG.xml

3

Convert your project to Maven project and use the surefire plugin. Inside the plugin mention the testng.xml file as the test suite. Now you can run your scripts in any environment using below commands.

  1. mvn install - This will install all the dependencies
  2. mvn test - This will run your scripts

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M4</version>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>testng.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>
    

Reference: https://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html

  • Tried your way but it display error: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? – phong tran Feb 19 at 10:05
  • you have to install maven first – PDHide Feb 19 at 10:48
  • Maven was installed! But error is still existing – phong tran Feb 19 at 12:09
  • Sorry you should install JDK in the target system. Java JRE is for running application and doesn't contains compiler . Please install JDK also (JDK contains JRE + compiler) – PDHide Feb 19 at 12:29
  • JDK 13 was installed but error still existing – phong tran Feb 20 at 6:21
0

@PDHide Tried your way but it display error enter image description here

I also changed the path to installed JDK on my PC enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.