Quickstart: running integration tests locally on Mac/Docker
See firecloud-automated-testing.
./render-local-env.sh
LOCAL_UI=true ./render-local-env.sh
Run ./render-local-env.sh
and then update the URIs in automation/src/test/resources/application.conf
to:
baseUrl = "https://firecloud.dsde-dev.broadinstitute.org/"
orchApiUrl = "https://firecloud-orchestration.dsde-dev.broadinstitute.org/"
rawlsApiUrl = "https://rawls.dsde-dev.broadinstitute.org/"
samApiUrl = "https://local.broadinstitute.org:50443/"
thurloeApiUrl = "https://thurloe.dsde-dev.broadinstitute.org/"
Then, you may need to run sbt clean compile test
to pick up the new config changes.
All test code lives in automation/src/test/scala
.
To run tests from IntelliJ, it is recommended to load the project from the automation
folder instead of the sam
root folder.
To do this, go to File
-> Open...
and navigate into the automation
folder, click Open
to accept, and then import from SBT.
You need to set some default VM parameters for ScalaTest run configurations. In IntelliJ, go to Run
> Edit Configurations...
, select ScalaTest
under 🔧Templates
, and add these VM parameters:
-Djsse.enableSNIExtension=false
Also make sure that there is a Build
task configured to run before launch.
Now, simply open the test spec, right-click on the class name or a specific test string, and select Run
or Debug
as needed. If you don't see that option, you may need to right-click the automation/src
folder, select Mark Directory As -> Test Sources Root
.
To run all tests:
sbt test
To run a single suite:
sbt "testOnly *SamApiSpec"
To run a single test within a suite:
# matches test via substring
sbt "testOnly *SamApiSpec -- -z \"have a search field\""
For more information see SBT's documentation.