jacoco와 coveralls로 코드 커버리지를 눈에 볼수 있게 관리할 예정입니다.
[jacoco plugin 설정]
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<configuration>
<excludes>
<exclude>**/com/yaloostore/shop/*Application.class</exclude>
<exclude>**/Q*.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
[coveralls plugin]
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
<configuration>
<repoToken>내가 발급받은 토큰 ~</repoToken>
</configuration>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
</dependencies>
</plugin>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
mvn clean test jacoco:report -DskipTests=false - Dmaven.test.failure.ignore=true
mvn clean test jacoco:report coveralls:report -DskipTests=false -Dmaven.test.failure.ignore=true
TDD 중심 개발을 하자고 해도 기능구현 후에 테스트를 진행하니 이게 될 턱이 없다. 이를 조금 더 신경써서 어렵더라도 테스트 중심 개발을 진행해보자.