【发布时间】:2016-06-22 03:07:36
【问题描述】:
我有一个包含测试列表的大 json 文件。 Json 文件包含几个文件名,其中包含测试类的名称,其中包含一些设置内容和测试列表。以下是此类 json 文件的示例:
{
"filename1.py": {
"ClassName": [
"setupSection": [
here will be list of sqls which should be performed before tests
],
"listOfTests": {
"test1Name": [
{ here will be query }, {here will be expected result}
],
"test1Name": [
{ here will be query }, {here will be expected result}
]
}
},
"filename2.py": {
"ClassName": [
"setupSection": [
here will be list of sqls which should be performed before tests
],
"listOfTests": {
"test1Name": [
{ here will be query }, {here will be expected result}
],
"test1Name": [
{ here will be query }, {here will be expected result}
]
}
}
}
而且我需要以某种方式使用一些用 Java 或 Scala 编写的类来执行这些测试。所以应该有 1-3 个用 Java 或/和 Scala 编写的类,它们将从 json 文件执行所有测试。有可能吗?
【问题讨论】:
标签: json scala junit scalatest specs2