Skip to content

Commit

Permalink
individual scalatest in bazel md (digital-asset#3494)
Browse files Browse the repository at this point in the history
* individual scalatest in bazel md

Include instructions to run specific test in bazel

* second test_arg needed

* fix typo

* rewording and formatting
  • Loading branch information
dasormeter authored and mergify[bot] committed Nov 18, 2019
1 parent 3f2f692 commit 9297555
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions BAZEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,17 +361,25 @@ detailed information.
bazel test //ledger-client/ods:tests --nocache_test_results
```
- Execute an individual test case in a Scala test-suite
- Execute a specific Scala test-suite class
```
bazel test //ledger-client/ods:tests_test_suite_src_test_scala_com_digitalasset_ods_slick_SqlUtilsTest.scala
bazel test //ledger/sandbox:sandbox-scala-tests_test_suite_src_test_suite_scala_com_digitalasset_platform_sandbox_stores_ledger_sql_JdbcLedgerDaoSpec.scala
```
- Execute a test with a specific name
```
bazel test //ledger/sandbox:sandbox-scala-tests_test_suite_src_test_suite_scala_com_digitalasset_platform_sandbox_stores_ledger_sql_JdbcLedgerDaoSpec.scala --test_arg=-t --test_arg="JDBC Ledger DAO should be able to persist and load contracts without external offset"
```
- Pass an argument to a test case in a Scala test-suite
```
bazel test //ledger-client/ods:tests_test_suite_src_test_scala_com_digitalasset_ods_slick_SqlUtilsTest.scala --test_arg=-z --test_arg="should return true"
```
More broadly, for Scala tests you can pass through any of the args outlined in http://www.scalatest.org/user_guide/using_the_runner, separating into two instances of the --test-arg parameter as shown in the two examples above.
### Running Executables
Expand Down

0 comments on commit 9297555

Please sign in to comment.