895 lines
28 KiB
HTML
895 lines
28 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
| Generated by Apache Maven Doxia Site Renderer 1.6 at 2017-08-21
|
|
| Rendered using Apache Maven Fluido Skin 1.5
|
|
-->
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="Date-Revision-yyyymmdd" content="20170821" />
|
|
<meta http-equiv="Content-Language" content="en" />
|
|
<title>Spring Cloud Contract Maven Plugin – spring-cloud-contract:generateTests</title>
|
|
<link rel="stylesheet" href="./css/apache-maven-fluido-1.5.min.css" />
|
|
<link rel="stylesheet" href="./css/site.css" />
|
|
<link rel="stylesheet" href="./css/print.css" media="print" />
|
|
|
|
|
|
<script type="text/javascript" src="./js/apache-maven-fluido-1.5.min.js"></script>
|
|
|
|
</head>
|
|
<body class="topBarEnabled">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://github.com/spring-cloud/spring-cloud-contract">
|
|
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
|
|
src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
|
|
alt="Fork me on GitHub">
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="topbar" class="navbar navbar-fixed-top ">
|
|
<div class="navbar-inner">
|
|
<div class="container-fluid">
|
|
<a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</a>
|
|
|
|
<ul class="nav">
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
|
|
<li> <a href="index.html" title="Introduction">Introduction</a>
|
|
</li>
|
|
|
|
<li> <a href="usage.html" title="Usage">Usage</a>
|
|
</li>
|
|
|
|
<li> <a href="plugin-info.html" title="Goals">Goals</a>
|
|
</li>
|
|
|
|
<li> <a href="junit.html" title="JUnit Configuration">JUnit Configuration</a>
|
|
</li>
|
|
|
|
<li> <a href="spock.html" title="Spock Configuration">Spock Configuration</a>
|
|
</li>
|
|
|
|
<li> <a href="complex.html" title="Complex Configuration">Complex Configuration</a>
|
|
</li>
|
|
|
|
<li> <a href="configs.html" title="Configuration snippets">Configuration snippets</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Related Projects <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
|
|
<li> <a href="https://github.com/spring-cloud/spring-cloud-contract" title="Spring Cloud Contract">Spring Cloud Contract</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Documentation <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
|
|
<li class="dropdown-submenu">
|
|
<a href="project-info.html" title="Project Information">Project Information</a>
|
|
<ul class="dropdown-menu">
|
|
<li> <a href="integration.html" title="CI Management">CI Management</a>
|
|
</li>
|
|
<li> <a href="index.html" title="About">About</a>
|
|
</li>
|
|
<li> <a href="issue-tracking.html" title="Issue Management">Issue Management</a>
|
|
</li>
|
|
<li> <a href="license.html" title="Licenses">Licenses</a>
|
|
</li>
|
|
<li> <a href="plugin-management.html" title="Plugin Management">Plugin Management</a>
|
|
</li>
|
|
<li> <a href="plugins.html" title="Plugins">Plugins</a>
|
|
</li>
|
|
<li> <a href="team-list.html" title="Team">Team</a>
|
|
</li>
|
|
<li> <a href="source-repository.html" title="Source Code Management">Source Code Management</a>
|
|
</li>
|
|
<li> <a href="project-summary.html" title="Summary">Summary</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown-submenu">
|
|
<a href="project-reports.html" title="Project Reports">Project Reports</a>
|
|
<ul class="dropdown-menu">
|
|
<li> <a href="checkstyle.html" title="Checkstyle">Checkstyle</a>
|
|
</li>
|
|
<li> <a href="plugin-info.html" title="Plugin Documentation">Plugin Documentation</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container-fluid">
|
|
<div id="banner">
|
|
<div class="pull-left">
|
|
<div id="bannerLeft">
|
|
<h2>Spring Cloud Contract Maven Plugin</h2>
|
|
</div>
|
|
</div>
|
|
<div class="pull-right"> <div id="bannerRight">
|
|
<img src="" />
|
|
</div>
|
|
</div>
|
|
<div class="clear"><hr/></div>
|
|
</div>
|
|
|
|
<div id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
|
|
<li id="publishDate">Last Published: 2017-08-21
|
|
<span class="divider">|</span>
|
|
</li>
|
|
<li id="projectVersion">Version: 1.2.0.BUILD-SNAPSHOT
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div class="row-fluid">
|
|
<div id="leftColumn" class="span2">
|
|
<div class="well sidebar-nav">
|
|
|
|
<ul class="nav nav-list">
|
|
<li class="nav-header">Overview</li>
|
|
|
|
<li>
|
|
|
|
<a href="index.html" title="Introduction">
|
|
<span class="none"></span>
|
|
Introduction</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="usage.html" title="Usage">
|
|
<span class="none"></span>
|
|
Usage</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="plugin-info.html" title="Goals">
|
|
<span class="none"></span>
|
|
Goals</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="junit.html" title="JUnit Configuration">
|
|
<span class="none"></span>
|
|
JUnit Configuration</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="spock.html" title="Spock Configuration">
|
|
<span class="none"></span>
|
|
Spock Configuration</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="complex.html" title="Complex Configuration">
|
|
<span class="none"></span>
|
|
Complex Configuration</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="configs.html" title="Configuration snippets">
|
|
<span class="none"></span>
|
|
Configuration snippets</a>
|
|
</li>
|
|
<li class="nav-header">Related Projects</li>
|
|
|
|
<li>
|
|
|
|
<a href="https://github.com/spring-cloud/spring-cloud-contract" title="Spring Cloud Contract">
|
|
<span class="none"></span>
|
|
Spring Cloud Contract</a>
|
|
</li>
|
|
<li class="nav-header">Project Documentation</li>
|
|
|
|
<li>
|
|
|
|
<a href="project-info.html" title="Project Information">
|
|
<span class="icon-chevron-right"></span>
|
|
Project Information</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="project-reports.html" title="Project Reports">
|
|
<span class="icon-chevron-right"></span>
|
|
Project Reports</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<hr />
|
|
|
|
<div id="poweredBy">
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
|
|
<img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="bodyColumn" class="span10" >
|
|
|
|
|
|
|
|
<div class="section">
|
|
<h2><a name="spring-cloud-contract:generateTests"></a>spring-cloud-contract:generateTests</h2>
|
|
|
|
<p><b>Full name</b>:</p>
|
|
|
|
<p>org.springframework.cloud:spring-cloud-contract-maven-plugin:1.2.0.BUILD-SNAPSHOT:generateTests</p>
|
|
|
|
<p><b>Description</b>:</p>
|
|
|
|
<div>From the provided directory with contracts generates the acceptance
|
|
tests on the producer side</div>
|
|
|
|
<p><b>Attributes</b>:</p>
|
|
|
|
<ul>
|
|
|
|
<li>Requires a Maven project to be executed.</li>
|
|
|
|
<li>Requires dependency resolution of artifacts in scope: <tt>test</tt>.</li>
|
|
|
|
<li>Binds by default to the <a class="externalLink" href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">lifecycle phase</a>: <tt>generate-test-sources</tt>.</li>
|
|
</ul>
|
|
|
|
<div class="section">
|
|
<h3><a name="Optional_Parameters"></a>Optional Parameters</h3>
|
|
|
|
<table class="table table-striped" border="0">
|
|
|
|
<tr class="a">
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Since</th>
|
|
|
|
<th>Description</th>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#assertJsonSize">assertJsonSize</a></b></td>
|
|
|
|
<td><tt>boolean</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>Incubating feature. You can check the size of JSON arrays. If not
|
|
turned on explicitly will be disabled.<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>spring.cloud.contract.verifier.assert.size</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#baseClassForTests">baseClassForTests</a></b></td>
|
|
|
|
<td><tt>String</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /></td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#baseClassMappings">baseClassMappings</a></b></td>
|
|
|
|
<td><tt>List</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>A way to override any base class mappings. The keys are regular
|
|
expressions on the package name of the contract and the values FQN
|
|
to a base class for that given expression. <br />
|
|
<br />
|
|
Example of a mapping <br />
|
|
<br />
|
|
<tt>.*.com.example.v1..*</tt> ->
|
|
<tt>com.example.SomeBaseClass</tt> <br />
|
|
<br />
|
|
When a contract's package matches the provided regular expression
|
|
then extending class will be the one provided in the map - in this
|
|
case <tt>com.example.SomeBaseClass</tt><br /><b>User property is</b>: <tt>baseClassMappings</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#basePackageForTests">basePackageForTests</a></b></td>
|
|
|
|
<td><tt>String</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>Default value is</b>: <tt>org.springframework.cloud.contract.verifier.tests</tt>.<br /></td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#contractDependency">contractDependency</a></b></td>
|
|
|
|
<td><tt>Dependency</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>User property is</b>: <tt>contractDependency</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#contractsDirectory">contractsDirectory</a></b></td>
|
|
|
|
<td><tt>File</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>Default value is</b>: <tt>${project.basedir}/src/test/resources/contracts</tt>.<br /><b>User property is</b>: <tt>spring.cloud.contract.verifier.contractsDirectory</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#contractsPath">contractsPath</a></b></td>
|
|
|
|
<td><tt>String</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>The path in the JAR with all the contracts where contracts for this
|
|
particular service lay. If not provided will be resolved to
|
|
<tt>groupid/artifactid</tt>. Example: <br />
|
|
<br />
|
|
If <tt>groupid</tt> is <tt>com.example</tt> and
|
|
<tt>artifactid</tt> is <tt>service</tt> then the resolved
|
|
path will be <tt>/com/example/artifactid</tt><br /><b>User property is</b>: <tt>contractsPath</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#contractsRepositoryUrl">contractsRepositoryUrl</a></b></td>
|
|
|
|
<td><tt>String</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>The URL from which a JAR containing the contracts should get
|
|
downloaded. If not provided but artifactid / coordinates notation
|
|
was provided then the current Maven's build repositories will be
|
|
taken into consideration<br /><b>User property is</b>: <tt>contractsRepositoryUrl</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#contractsWorkOffline">contractsWorkOffline</a></b></td>
|
|
|
|
<td><tt>boolean</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>If <tt>true</tt> then JAR with contracts will be taken from
|
|
local maven repository<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>contractsWorkOffline</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#excludedFiles">excludedFiles</a></b></td>
|
|
|
|
<td><tt>List</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>Patterns that should not be taken into account for processing<br /></td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#generatedTestSourcesDir">generatedTestSourcesDir</a></b></td>
|
|
|
|
<td><tt>File</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>Default value is</b>: <tt>${project.build.directory}/generated-test-sources/contracts</tt>.<br /></td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#ignoredFiles">ignoredFiles</a></b></td>
|
|
|
|
<td><tt>List</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>Patterns for which Spring Cloud Contract Verifier should generate
|
|
@Ignored tests<br /></td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#imports">imports</a></b></td>
|
|
|
|
<td><tt>String[]</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>Imports that should be added to generated tests<br /></td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#mavenTestSkip">mavenTestSkip</a></b></td>
|
|
|
|
<td><tt>boolean</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>maven.test.skip</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#nameSuffixForTests">nameSuffixForTests</a></b></td>
|
|
|
|
<td><tt>String</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /></td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#packageWithBaseClasses">packageWithBaseClasses</a></b></td>
|
|
|
|
<td><tt>String</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>A package that contains all the base clases for generated tests. If
|
|
your contract resides in a location
|
|
<tt>src/test/resources/contracts/com/example/v1/</tt> and you
|
|
provide the <tt>packageWithBaseClasses</tt> value to
|
|
<tt>com.example.contracts.base</tt> then we will search for a
|
|
test source file that will have the package
|
|
<tt>com.example.contracts.base</tt> and name
|
|
<tt>ExampleV1Base</tt>. As you can see it will take the two
|
|
last folders to and attach <tt>Base</tt> to its name.<br /><b>User property is</b>: <tt>packageWithBaseClasses</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#ruleClassForTests">ruleClassForTests</a></b></td>
|
|
|
|
<td><tt>String</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /></td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#skip">skip</a></b></td>
|
|
|
|
<td><tt>boolean</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>spring.cloud.contract.verifier.skip</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#skipTests">skipTests</a></b></td>
|
|
|
|
<td><tt>boolean</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>Default value is</b>: <tt>false</tt>.<br /><b>User property is</b>: <tt>skipTests</tt>.</td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#staticImports">staticImports</a></b></td>
|
|
|
|
<td><tt>String[]</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>Static imports that should be added to generated tests<br /></td>
|
|
</tr>
|
|
|
|
<tr class="b">
|
|
|
|
<td><b><a href="#testFramework">testFramework</a></b></td>
|
|
|
|
<td><tt>TestFramework</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>Default value is</b>: <tt>JUNIT</tt>.<br /></td>
|
|
</tr>
|
|
|
|
<tr class="a">
|
|
|
|
<td><b><a href="#testMode">testMode</a></b></td>
|
|
|
|
<td><tt>TestMode</tt></td>
|
|
|
|
<td><tt>-</tt></td>
|
|
|
|
<td>(no description)<br /><b>Default value is</b>: <tt>MOCKMVC</tt>.<br /></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<h3><a name="Parameter_Details"></a>Parameter Details</h3>
|
|
|
|
<p><b><a name="assertJsonSize">assertJsonSize</a>:</b></p>
|
|
|
|
<div>Incubating feature. You can check the size of JSON arrays. If not
|
|
turned on explicitly will be disabled.</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>boolean</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>spring.cloud.contract.verifier.assert.size</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>false</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="baseClassForTests">baseClassForTests</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="baseClassMappings">baseClassMappings</a>:</b></p>
|
|
|
|
<div>A way to override any base class mappings. The keys are regular
|
|
expressions on the package name of the contract and the values FQN
|
|
to a base class for that given expression. <br />
|
|
<br />
|
|
Example of a mapping <br />
|
|
<br />
|
|
<tt>.*.com.example.v1..*</tt> ->
|
|
<tt>com.example.SomeBaseClass</tt> <br />
|
|
<br />
|
|
When a contract's package matches the provided regular expression
|
|
then extending class will be the one provided in the map - in this
|
|
case <tt>com.example.SomeBaseClass</tt></div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.util.List</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>baseClassMappings</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="basePackageForTests">basePackageForTests</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>org.springframework.cloud.contract.verifier.tests</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="contractDependency">contractDependency</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>org.apache.maven.model.Dependency</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>contractDependency</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="contractsDirectory">contractsDirectory</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.io.File</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>spring.cloud.contract.verifier.contractsDirectory</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>${project.basedir}/src/test/resources/contracts</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="contractsPath">contractsPath</a>:</b></p>
|
|
|
|
<div>The path in the JAR with all the contracts where contracts for this
|
|
particular service lay. If not provided will be resolved to
|
|
<tt>groupid/artifactid</tt>. Example: <br />
|
|
<br />
|
|
If <tt>groupid</tt> is <tt>com.example</tt> and
|
|
<tt>artifactid</tt> is <tt>service</tt> then the resolved
|
|
path will be <tt>/com/example/artifactid</tt></div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>contractsPath</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="contractsRepositoryUrl">contractsRepositoryUrl</a>:</b></p>
|
|
|
|
<div>The URL from which a JAR containing the contracts should get
|
|
downloaded. If not provided but artifactid / coordinates notation
|
|
was provided then the current Maven's build repositories will be
|
|
taken into consideration</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>contractsRepositoryUrl</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="contractsWorkOffline">contractsWorkOffline</a>:</b></p>
|
|
|
|
<div>If <tt>true</tt> then JAR with contracts will be taken from
|
|
local maven repository</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>boolean</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>contractsWorkOffline</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>false</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="excludedFiles">excludedFiles</a>:</b></p>
|
|
|
|
<div>Patterns that should not be taken into account for processing</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.util.List</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="generatedTestSourcesDir">generatedTestSourcesDir</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.io.File</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>${project.build.directory}/generated-test-sources/contracts</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="ignoredFiles">ignoredFiles</a>:</b></p>
|
|
|
|
<div>Patterns for which Spring Cloud Contract Verifier should generate
|
|
@Ignored tests</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.util.List</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="imports">imports</a>:</b></p>
|
|
|
|
<div>Imports that should be added to generated tests</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String[]</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="mavenTestSkip">mavenTestSkip</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>boolean</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>maven.test.skip</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>false</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="nameSuffixForTests">nameSuffixForTests</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="packageWithBaseClasses">packageWithBaseClasses</a>:</b></p>
|
|
|
|
<div>A package that contains all the base clases for generated tests. If
|
|
your contract resides in a location
|
|
<tt>src/test/resources/contracts/com/example/v1/</tt> and you
|
|
provide the <tt>packageWithBaseClasses</tt> value to
|
|
<tt>com.example.contracts.base</tt> then we will search for a
|
|
test source file that will have the package
|
|
<tt>com.example.contracts.base</tt> and name
|
|
<tt>ExampleV1Base</tt>. As you can see it will take the two
|
|
last folders to and attach <tt>Base</tt> to its name.</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>packageWithBaseClasses</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="ruleClassForTests">ruleClassForTests</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="skip">skip</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>boolean</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>spring.cloud.contract.verifier.skip</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>false</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="skipTests">skipTests</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>boolean</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>User Property</b>: <tt>skipTests</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>false</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="staticImports">staticImports</a>:</b></p>
|
|
|
|
<div>Static imports that should be added to generated tests</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>java.lang.String[]</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="testFramework">testFramework</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>org.springframework.cloud.contract.verifier.config.TestFramework</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>JUNIT</tt></li>
|
|
</ul><hr />
|
|
<p><b><a name="testMode">testMode</a>:</b></p>
|
|
|
|
<div>(no description)</div>
|
|
|
|
<ul>
|
|
|
|
<li><b>Type</b>: <tt>org.springframework.cloud.contract.verifier.config.TestMode</tt></li>
|
|
|
|
<li><b>Required</b>: <tt>No</tt></li>
|
|
|
|
<li><b>Default</b>: <tt>MOCKMVC</tt></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<footer>
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<p >Copyright © 2016–2017
|
|
<a href="https://spring.io/">Spring</a>.
|
|
All rights reserved.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|