CLI Usage¶
Standalone executable for running FHIR tests without build tools.
Perfect for DevOps and CI/CD
The CLI is designed to make DevOps teams happy. Run FHIR tests in any CI/CD pipeline without Java build tool dependencies. Simple, fast, and automation-friendly.
Installation¶
Download the JAR:
Or build from source:
Basic Usage¶
Execute TestScript¶
Execute TestPlan¶
java -jar fhir-frog-cli.jar \
--test-plan TestPlan/au-core-suite \
--server http://localhost:8080/fhir
Options¶
Server URL¶
TestScript¶
TestPlan¶
Report Output¶
--report-dir <path> Report output directory
-r <path> Short form
--report-format <format> Format: json, xml, both
-f <format> Short form
Verbosity¶
Examples¶
Simple Test¶
With Reports¶
java -jar fhir-frog-cli.jar \
-t patient-crud.json \
-s http://localhost:8080/fhir \
-r ./reports \
-f json
TestPlan Suite¶
java -jar fhir-frog-cli.jar \
-p TestPlan/au-core-complete \
-s http://localhost:8080/fhir \
-r ./reports \
-f both \
-v
TSH File¶
Exit Codes¶
0- All tests passed1- Test failures2- Configuration error3- Server connection error
CI/CD Integration¶
GitLab CI¶
test:fhir:
stage: test
image: openjdk:17
services:
- name: hapiproject/hapi:latest
alias: fhir-server
script:
- wget https://gitlab.com/aehrc/fhir-frog/-/releases/latest/downloads/fhir-frog-cli.jar
- java -jar fhir-frog-cli.jar -p TestPlan/suite -s http://fhir-server:8080/fhir -r reports
artifacts:
reports:
junit: reports/*.xml
GitHub Actions¶
- name: Run FHIR Tests
run: |
wget https://gitlab.com/aehrc/fhir-frog/-/releases/latest/downloads/fhir-frog-cli.jar
java -jar fhir-frog-cli.jar \
-p TestPlan/suite \
-s http://localhost:8080/fhir \
-r reports
Docker¶
FROM openjdk:17-slim
COPY fhir-frog-cli.jar /app/
COPY tests/ /app/tests/
WORKDIR /app
ENTRYPOINT ["java", "-jar", "fhir-frog-cli.jar"]
Run:
Configuration File¶
Create fhir-frog.properties:
Use:
Next Steps¶
- JUnit - JUnit integration
- Maven - Maven plugin
- Best Practices - Testing patterns