/juice-webclient

This is a library that shows how to test a third-party service using webclient

Primary LanguageJava

Juice WebClient

Build Status Quality Gate Status

This project shows how to test an API as library using WebClient with Junit Jupiter

To test the project with Gradle

gradle test

To test the project with Maven

mvn test

To run a single test with Gradle

gradle test --tests ${testName}

To run a single test with Maven

mvn test -Dtest=${testName}

where:

  • ${testName} is the test name you want to execute

To publish library to artifactory using Gradle

export ARTIFACTORY_USER=${username}
export ARTIFACTORY_PASSWORD=${password}
gradle publish

where:

  • ${username} Is artifactory username
  • ${password} Is artifactory password

To run tests with Jacoco and Sonarqube

gradle jacocoTestReport sonarqube test

To publish library to artifactory using Maven

mvn deploy

Make sure you setup your artifactory credentials in ${USER_HOME}/.m2/settings.xml

<settings>
  <servers>
    <server>
      <id>artifactory</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
</settings>

Note: If you want to learn more and publish your own library, feel free to drop me a message on my home page website and ask for a Jfrog credentials.

For more information:

Visit our wiki page: Wiki page

Read this as reference: