Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

Commit

Permalink
Updated readme with mock diagrams.
Browse files Browse the repository at this point in the history
  • Loading branch information
Castyr committed Mar 15, 2019
1 parent b0decf0 commit 7847c7a
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 26 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ sh u-integration-test.sh

## Running Contract Tests
Start the domain services with internal mocks so that only the endpoints will be tested.
![Internally Mocked Services](./images/internal-mocks.png)
```bash
docker-compose -f docker-compose-internal-mocked.yml start
```
Expand All @@ -102,11 +103,18 @@ Stop the services with internal mocks.
docker-compose -f docker-compose-internal-mocked.yml down
```

## Running Service Readiness Tests
## Running Service Isolation Tests

### Running Externally Mocked Service Isolation Tests
![Externally Mocked Services](./images/external-mocks.png)
```bash
sh u-service-readiness-test.sh
```

### Running Service Isolation Tests
![Externally Mocked Services](./images/isolation-mocks.png)


## Running Edge API Tests
```bash
sh u-e2e-test.sh
Expand Down
6 changes: 1 addition & 5 deletions account-cmd/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
version "0.1"
mainClassName = "com.ultimatesoftware.banking.Application"


dependencies {
compile project(":api")
Expand All @@ -12,6 +10,4 @@ dependencies {
testCompile("org.axonframework:axon-test:${axonVersion}")
}

shadowJar {
mergeServiceFiles()
}
mainClassName = "com.ultimatesoftware.banking.account.cmd.Application"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ultimatesoftware.banking;
package com.ultimatesoftware.banking.account.cmd;

import io.micronaut.runtime.Micronaut;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
Expand Down
6 changes: 1 addition & 5 deletions account-query/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
version "0.1"
mainClassName = "com.ultimatesoftware.banking.Application"


dependencies {
compile project(":api")
Expand All @@ -10,6 +8,4 @@ dependencies {
testCompile("org.axonframework:axon-test:${axonVersion}")
}

shadowJar {
mergeServiceFiles()
}
mainClassName = "com.ultimatesoftware.banking.account.query.Application"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ultimatesoftware.banking;
package com.ultimatesoftware.banking.account.query;

import io.micronaut.runtime.Micronaut;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
Expand Down
6 changes: 2 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ subprojects { project ->
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
apply plugin: 'groovy'
apply plugin: 'net.saliman.cobertura'
apply plugin: 'com.github.kt3k.coveralls'

cobertura.coverageFormats = ['html', 'xml']
sourceCompatibility = 1.8
targetCompatibility = 1.8

if(project.name != 'api') {
apply plugin: "application"
Expand All @@ -44,7 +43,6 @@ subprojects { project ->

run.jvmArgs('-noverify', '-XX:TieredStopAtLevel=1')

mainClassName = "com.ultimatesoftware.banking.Application"
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs.add('-parameters')
Expand Down
4 changes: 2 additions & 2 deletions customers/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version "0.1"
mainClassName = "com.ultimatesoftware.banking.Application"


dependencies {
compile project(":api")
compile "io.micronaut.configuration:micronaut-mongo-reactive"
}

mainClassName = "com.ultimatesoftware.banking.customers.Application"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ultimatesoftware.banking;
package com.ultimatesoftware.banking.customers;

import groovy.lang.Singleton;
import io.micronaut.runtime.Micronaut;
Expand Down
Binary file added images/external-mocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/internal-mocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/isolation-mocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions scripts/generate-publish-pact-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
# store them in each projects directory, but then the publish location needs to be created for each
# provider.
./gradlew :account-cmd:test --tests "*.contract.consumer.*"
./gradlew clean
./gradlew :account-query:test --tests "*.contract.consumer.*"
./gradlew clean
./gradlew :customers:test --tests "*.contract.consumer.*"
./gradlew clean
./gradlew :transactions:test --tests "*.contract.consumer.*"

# Since the PACT plugin is global to all projects this will publish all provider pacts, not just
Expand Down
6 changes: 1 addition & 5 deletions transactions/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
version "0.1"
mainClassName = "com.ultimatesoftware.banking.Application"


dependencies {
compile project(":api")
Expand All @@ -12,6 +10,4 @@ dependencies {
testCompile 'io.rest-assured:rest-assured:3.3.0'
}

shadowJar {
mergeServiceFiles()
}
mainClassName = "com.ultimatesoftware.banking.transactions.Application"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ultimatesoftware.banking;
package com.ultimatesoftware.banking.transactions;

import io.micronaut.runtime.Micronaut;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
Expand Down

0 comments on commit 7847c7a

Please sign in to comment.