我正在使用" resultJsonOutputFile"以json格式编写测试结果。最近我已经迁移到Jasmine2.0,但之后,json输出中传递测试的断言结果为空。
问题在于仅通过测试用例的断言。失败的案件完全没问题。在配置中添加Jasmine2作为框架之前,我曾经获得过传递的断言结果。例如:下面
[
{
"description": "test1",
"assertions": [
{
"passed": true
}
],
"duration": 4304
}
]
但是在添加框架:jasmine2之后,resultjsonoutput看起来像这样。
[
{
"description": "test1",
"assertions": [],
"duration": 12251
},
{
"description": "test2",
"assertions": [
{
"passed": false,
"errorMsg": "Failed: No element found using locator: By.cssSelector(\".search-box-desktop1\")",
"stackTrace": "Error: Failed: No element found using locator: By.cssSelector"
}
],
"duration": 14724
}
]
我所做的只是更改配置中的框架更改。所以我现在对输出感到困惑。