For Unix based systems and Windows Powershell:
./gradlew test --tests="io.specmatic.inventory.ContractTests"After running the contract tests, you can view the test reports generated by Specmatic in the following location: build/reports/specmatic/html/index.html
For Windows Command Prompt:
gradlew test --tests="io.specmatic.inventory.ContractTests"For Unix based systems and Windows Powershell:
./gradlew test --tests="io.specmatic.inventory.ContractTestsUsingTestContainer"For Windows Command Prompt:
gradlew test --tests="io.specmatic.inventory.ContractTestsUsingTestContainer"For Unix based systems and Windows Powershell, execute the following commands in separate terminals:
# Start the backend service
./gradlew bootRun# Run contract tests
docker run --rm --network host -v "$(pwd):/usr/src/app" specmatic/specmatic test --port=8095For Windows Command Prompt, execute the following commands in separate terminals:
# Start the backend service
gradlew bootRun# Run contract tests
docker run --rm --network host -v "%cd%:/usr/src/app" specmatic/specmatic test --port=8095