Class FhirTestTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.fhirfrog.frog.ant.FhirTestTask
All Implemented Interfaces:
Cloneable

public class FhirTestTask extends org.apache.tools.ant.Task
Ant task for executing FHIR TestScripts and TestPlans.

Server resolution: specify either serverUrl (direct URL, backward compatible) or serverName (resolved via BackendRegistry from ~/.fhir-frog/backends.yaml and environment variables). If both are specified, serverUrl takes precedence.

  • Constructor Details

    • FhirTestTask

      public FhirTestTask()
  • Method Details

    • setTestScript

      public void setTestScript(String testScript)
    • setTestPlan

      public void setTestPlan(String testPlan)
    • setTestPackage

      public void setTestPackage(String testPackage)
      "<id>#<version>" of a Test IG package (e.g. fhirfrog.au-core-tests#0.1.0), resolved from ~/.fhir/packages and executed in full - mutually exclusive with setTestScript(java.lang.String)/setTestPlan(java.lang.String). setFixturesPath(java.lang.String) is ignored in this mode; the resolved package's own fixtures/ directory is always used instead.
    • setIgPackage

      public void setIgPackage(String igPackage)
      "<id>#<version>" to validate validateProfileId assertions against - only honoured in setTestPackage(java.lang.String) mode (matching fhir-frog-cli's --ig-package); the existing setTestScript(java.lang.String)/setTestPlan(java.lang.String) modes don't support this yet, a pre-existing gap this task doesn't otherwise address.
    • setTerminologyServer

      public void setTerminologyServer(String terminologyServer)
      External FHIR terminology server URL - same setTestPackage(java.lang.String)-only scope as setIgPackage(java.lang.String) above.
    • setServerUrl

      public void setServerUrl(String serverUrl)
    • setServerName

      public void setServerName(String serverName)
      Backend name to resolve via BackendRegistry. Mutually exclusive with serverUrl — if both are set, serverUrl takes precedence.
    • setFixturesPath

      public void setFixturesPath(String fixturesPath)
    • setReportDir

      public void setReportDir(String reportDir)
    • setReportServer

      public void setReportServer(String reportServer)
    • setReportFormat

      public void setReportFormat(String reportFormat)
    • setJunitXmlDir

      public void setJunitXmlDir(String junitXmlDir)
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Overrides:
      execute in class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException