Sunday, 3 May 2015

Appium : Getting started : Setup part 2



Create MAVEN project from command line



·         Open CMD and navigate to directory where you want to create project
·         Run command
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

                  Note: Group id = package name
                            Artifact name: project name
·         After successfully run you will see “Build success” massge at end of CMD result
·         Now navigate in newly created project folder “cd <project name>
·         Run command  mvn eclipse:eclipse
·         Open eclipse and import >> maven >>existing maven project >>project directory path
·         Open POM.xml and add following dependency and build path

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.44.0</version>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.1.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>2.2.0</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>

·         Build project it will install all jar files inside maven dependency folder

No comments:

Post a Comment