在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):maiflai/gradle-scalatest开源软件地址(OpenSource Url):https://github.com/maiflai/gradle-scalatest开源编程语言(OpenSource Language):Groovy 96.2%开源软件介绍(OpenSource Introduction):gradle-scalatestA plugin to enable the use of scalatest in a gradle Scala project. Getting startedhttp://plugins.gradle.org/plugin/com.github.maiflai.scalatest This replaces the existing test task actions with a scalatest implementation (see Other Frameworks below). In addition to your dependencies {
testCompile 'org.scalatest:scalatest_2.13:3.2.0'
testRuntime 'com.vladsch.flexmark:flexmark-all:0.35.10'
// note that older versions of scalatest have a testRuntime dependency on pegdown to produce HTML reports.
} CompatibilityThis plugin aims to be compatible with the current version of Gradle. The table below indicates the minimum required version.
Parallel TestingThe default behaviour is to use as many parallel threads as you have available processors.
To disable this, you should configure your test tasks accordingly. test {
maxParallelForks = 1
} TagsScalatest provides support for filtering tests by tagging. We cannot use the We therefore provide an extension named test {
tags {
exclude 'org.scalatest.tags.Slow'
}
}
task slowTest(type: Test) {
tags {
include 'org.scalatest.tags.Slow'
}
} SuitesSuites are supported with another extension to the task userStories(type: Test) {
suite 'com.example.UserStories'
// suites 'a.Spec', 'b.Spec', 'etc'
} FilteringScalatest provides a simplified wildcard syntax for selecting tests. We directly map Gradle test filters to this form. test {
filter {
includeTestsMatching 'MyTest'
}
} This can also be supplied on the command line:
ConfigMapAdditional configuration can be passed to Scalatest using the config map test {
config 'db.name', 'testdb'
} test {
configMap([
'db.name': 'testdb'
'server': '192.168.1.188'
])
} Custom Reporterstest {
reporter 'my.Reporter'
} Other FrameworksThe default behaviour is to replace all This may not be appropriate if you are migrating an existing project to scalatest. The
It's probably easiest to set this in a gradle.properties file at the root of your project.
If you then want to use scalatest to run other
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论