Troubleshooting¶
Common issues and solutions when using FHIR Frog.
Server Connection Issues¶
Connection Refused¶
Problem:
Solutions:
-
Check server is running:
-
Verify URL:
-
Check Testcontainers:
Timeout¶
Problem:
Solutions:
-
Increase timeout:
-
Wait for server readiness:
TestScript Errors¶
Resource Not Found¶
Problem:
Solutions:
-
Check file location:
-
Verify classpath prefix:
Invalid TestScript¶
Problem:
Solution:
Variable Extraction Issues¶
Variable Not Found¶
Problem:
Solutions:
-
Extract before using:
-
Check sourceId:
Empty Variable¶
Problem:
Solutions:
-
Validate extraction:
-
Check FHIRPath:
Assertion Failures¶
Response Code Mismatch¶
Problem:
Solutions:
-
Check request body:
-
Validate resource:
FHIRPath Errors¶
Problem:
Solutions:
-
Use correct syntax:
-
Check resource type:
Fixture Issues¶
Fixture Not Found¶
Problem:
Solutions:
-
Define fixture:
-
Check file path:
Invalid Fixture¶
Problem:
Solution:
TestPlan Issues¶
Circular Dependency¶
Problem:
Solution:
Restructure TestPlans to avoid cycles:
# Before (circular)
PlanA depends on PlanB
PlanB depends on PlanA
# After (hierarchical)
PlanA depends on PlanC
PlanB depends on PlanC
TestPlan Not Found¶
Problem:
Solutions:
-
Check reference format:
-
Verify TestPlan exists:
Build Issues¶
Maven Plugin Not Found¶
Problem:
Solution:
Add plugin repository:
<pluginRepositories>
<pluginRepository>
<id>gitlab</id>
<url>https://gitlab.com/api/v4/projects/PROJECT_ID/packages/maven</url>
</pluginRepository>
</pluginRepositories>
Dependency Conflicts¶
Problem:
Solution:
Use dependency management:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-bom</artifactId>
<version>6.4.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Testcontainers Issues¶
Container Won't Start¶
Problem:
Solutions:
-
Check Docker:
-
Increase timeout:
-
Check logs:
Port Already in Use¶
Problem:
Solution:
Use dynamic ports:
@Container
static GenericContainer<?> server = new GenericContainer<>(...)
.withExposedPorts(8080); // Docker assigns random host port
@DynamicFhirServerUrl
static String getUrl() {
return "http://localhost:" + server.getMappedPort(8080) + "/fhir";
}
Performance Issues¶
Slow Tests¶
Solutions:
-
Reuse containers:
-
Use persistent server:
-
Parallel execution:
Memory Issues¶
Problem:
Solutions:
-
Increase heap:
-
Limit test scope:
Getting Help¶
Report Issues
Found a bug? Report it on GitLab Issues
Enable Debug Logging¶
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.14</version>
<scope>test</scope>
</dependency>
<!-- logback-test.xml -->
<configuration>
<logger name="org.fhirfrog.frog" level="DEBUG"/>
<logger name="ca.uhn.fhir" level="INFO"/>
</configuration>
Next Steps¶
- Best Practices - Avoid common pitfalls
- Examples - Working examples