Test Automation을 위한 pom.xml 설정

다음은 Test Automation을 사용하기 위한 pom.xml의 전체 설정 샘플이다.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
	<modelVersion>4.0.0</modelVersion>
	<groupId>egovframework.guideprogram</groupId>
	<artifactId>egovframework.guideprogram.testcase</artifactId>
	<packaging>war</packaging>
	<name>egovframework.guideprogram.testcase</name>
	<version>0.0.1-SNAPSHOT</version>
 
	<properties>
		<spring.maven.artifact.version>2.5.6</spring.maven.artifact.version>
		<compileSource>1.5</compileSource>
		<encoding>UTF-8</encoding>
	</properties>
 
	<dependencies>
            . . . 중략 . . .
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<version>2.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymockclassextension</artifactId>
			<version>2.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.dbunit</groupId>
			<artifactId>dbunit</artifactId>
			<version>2.4.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.unitils</groupId>
			<artifactId>unitils</artifactId>
			<version>2.2</version>
			<scope>test</scope>
		</dependency>
            . . . 중략 . . .
	</dependencies>
 
	<build>
		<plugins>
			<!-- test -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skipTests>false</skipTests>
					<forkMode>always</forkMode>
					<reportFormat>xml</reportFormat>
					<excludes>
						<exclude>**/Abstract*.java</exclude>
					</excludes>
					<includes>
						<include>**/*Test.java</include>
					</includes>
				</configuration>
			</plugin>
			<!-- Egovframework JUnit Excel Reporting -->
			<plugin>
				<groupId>egovframework.dev</groupId>
				<artifactId>egovtest-maven-plugin</artifactId>
				<version>1.0.0-SNAPSHOT</version>
			</plugin>
		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>2.4.2</version>
			</plugin>
		</plugins>
	</reporting>
 
</project>