Quick Start¶
I want to test a client using Java and Maven¶
Include our contract-server dependency in your project.
<dependency>
<groupId>org.seekay</groupId>
<artifactId>contract-server</artifactId>
<version>0.0.7</version>
<scope>test</scope>
</dependency>
See the client facing example for contracts and code samples.
I want to test a server using Java and Maven¶
Include our contract-client dependency in your project.
<dependency>
<groupId>org.seekay</groupId>
<artifactId>contract-client</artifactId>
<version>0.0.7</version>
<scope>test</scope>
</dependency>
See the server facing example for contracts and code samples.
I’m using Maven with another programming language¶
Both our client and server are available as maven plugins
To run the server:
mvn org.seekay:contract-maven-plugin:0.0.7:run-server -Dport=8091 -DgitSource=https://github.com/harmingcola/kvServerContracts.git -Dusername=seekay_test -Dpassword=seekay_test_password
To run the client
mvn org.seekay:contract-maven-plugin:0.0.7:run-client -Dtarget=http://localhost:8091 -DgitSource=https://github.com/harmingcola/kvServerContracts.git -Dusername=seekay_test -Dpassword=seekay_test_password
I want to start a client / server from the command line¶
We provide a fat and runnable jar that contains both the client and server. This option servers practically all client / servers across a variety of languages and platforms. The jar is available from maven central
To run a server:
java -jar contract-all-0.0.7.jar run-server 8091 https://bitbucket.org/harmingcola/contract-test-private.git seekay_test seekay_test_password
java -jar contract-all-0.0.7.jar run-server <port> <local or git repo URI> <git username, optional> <git password, optional>
To run a client:
java -jar contract-all-0.0.7.jar run-client http://localhost:8091 https://bitbucket.org/harmingcola/contract-test-private.git seekay_test seekay_test_password
java -jar contract-all-0.0.7.jar run-client <target url> <local or git repo URI> <git username, optional> <git password, optional>
Usernames / passwords can be omitted for publicly accessible repositories