Skip to content

Commit a11852b

Browse files
author
Daniel Rees
authored
Convert Unit Tests to use JUnit 5 (#60)
* Converted all tests to Junit5 * Adding Jacoco test coverage
1 parent a6ee05a commit a11852b

File tree

12 files changed

+1951
-1761
lines changed

12 files changed

+1951
-1761
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
language: java
2+
after_success:
3+
- bash <(curl -s https://codecov.io/bash)
24
jdk:
35
- oraclejdk8
46
sudo: false

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# JavaPhoenixClient
22

3-
[ ![Download](https://api.bintray.com/packages/drees/java-phoenix-client/JavaPhoenixClient/images/download.svg) ](https://bintray.com/drees/java-phoenix-client/JavaPhoenixClient/_latestVersion)
3+
[![Download](https://api.bintray.com/packages/drees/java-phoenix-client/JavaPhoenixClient/images/download.svg) ](https://bintray.com/drees/java-phoenix-client/JavaPhoenixClient/_latestVersion)
44
[![Build Status](https://travis-ci.com/dsrees/JavaPhoenixClient.svg?branch=master)](https://travis-ci.com/dsrees/JavaPhoenixClient)
5+
[![codecov](https://codecov.io/gh/dsrees/JavaPhoenixClient/branch/master/graph/badge.svg)](https://codecov.io/gh/dsrees/JavaPhoenixClient)
56

67

78
JavaPhoenixClient is a Kotlin implementation of the [phoenix.js](https://hexdocs.pm/phoenix/js/) client used to manage Phoenix channels.

build.gradle

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ repositories {
1818
}
1919

2020
test {
21+
// JUnit 5 Support
2122
useJUnitPlatform()
23+
24+
// This allows us see tests execution progress in the output on the CI.
25+
testLogging {
26+
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
27+
exceptionFormat 'full'
28+
}
29+
2230
}
2331

2432
dependencies {
@@ -29,14 +37,20 @@ dependencies {
2937
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
3038
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
3139

32-
testCompileOnly 'junit:junit:4.12'
33-
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.3.1'
34-
3540
testCompile group: 'com.google.truth', name: 'truth', version: '0.44'
3641
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.27.0'
3742
testCompile group: 'com.nhaarman.mockitokotlin2', name: 'mockito-kotlin', version: '2.1.0'
3843
}
3944

45+
jacocoTestReport {
46+
reports {
47+
xml.enabled true
48+
html.enabled false
49+
}
50+
}
51+
52+
53+
4054
compileKotlin {
4155
kotlinOptions.jvmTarget = "1.8"
4256
}

script/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
55
./gradlew bintrayUpload --stacktrace
66
else
77
echo -e '#### Build for Test => Branch ['$TRAVIS_BRANCH'] Pull Request ['$TRAVIS_PULL_REQUEST'] ####'
8-
./gradlew build
8+
./gradlew clean build jacocoTestReport
99
fi

0 commit comments

Comments
 (0)