Skip to content

Commit 1403380

Browse files
edmondopEdmondo Porcu
andauthored
docs: Running ScalaTest suites from the CLI (#404)
* Adding documentation to run single tests * Removed empty newline * Fixing README and development.md --------- Co-authored-by: Edmondo Porcu <edmondo.porcu@capitalone.com>
1 parent 56f57f4 commit 1403380

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/source/contributor-guide/development.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ After that you can open the project in CLion. The IDE should automatically detec
7373
Like other Maven projects, you can run tests in IntelliJ IDEA by right-clicking on the test class or test method and selecting "Run" or "Debug".
7474
However if the tests is related to the native side. Please make sure to run `make core` or `cd core && cargo build` before running the tests in IDEA.
7575

76+
### Running Tests from command line
77+
78+
It is possible to specify which ScalaTest suites you want to run from the CLI using the `suites`
79+
argument, for example if you only want to execute the test cases that contains *valid*
80+
in their name in `org.apache.comet.CometCastSuite` you can use
81+
82+
```sh
83+
mvn test -Dsuites="org.apache.comet.CometCastSuite valid" -Dskip.surefire.tests=true
84+
```
85+
86+
Other options for selecting specific suites are described in the [ScalaTest Maven Plugin documentation](https://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin)
87+
7688
## Benchmark
7789

7890
There's a `make` command to run micro benchmarks in the repo. For

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ under the License.
729729
<systemPropertyVariables>
730730
<log4j.configurationFile>file:src/test/resources/log4j2.properties</log4j.configurationFile>
731731
</systemPropertyVariables>
732+
<skipTests>${skip.surefire.tests}</skipTests>
732733
</configuration>
733734
</plugin>
734735
<plugin>

0 commit comments

Comments
 (0)