简体   繁体   English

此Fitnesse测试有什么问题? (未找到决策表)

[英]What's wrong with this Fitnesse test? (decision tables not found)

Cache Load Test

!define testserver {tst1:8080}
!*> Script and Scenario

!|script |
| start | HttpClientFixture |

!|scenario | testCacheLoad 
| setUrl |http://${testserver}/data-service/load/cache |
| check | responseContains | 200 | true |
| check | responseContains | CACHE_LOADER_OK | true |
| show | getResponseBody | | |

*!

Run the scenario test
!| testCacheLoad 

I want the test to proceed as follows: 我希望测试按如下进行:

  • Invoke the URL 调用URL
  • Check the http response code is 200 检查http响应码为200
  • Check the JSON response for the string "CACHE_LOADER_OK" 检查JSON响应中的字符串“ CACHE_LOADER_OK”
  • Display the response (show) 显示响应(显示)

The errors I'm getting from Fitnese are... 我从Fitnese遇到的错误是...

  • setUrl Could not invoke constructor for setUrl[1] setUrl无法调用setUrl [1]的构造函数
  • check The instance decisionTable_1. 检查实例决策表_1。 does not exist 不存在
  • responseContains The instance decisionTable_1. responseContains实例决策表_1。 does not exist 不存在
  • true The instance decisionTable_1. true实例决策表_1。 does not exist 不存在

I don't see the Import table. 我没有看到导入表。

Do you have something like: 你有类似的东西吗?

|import|
|com.path.to. HttpClientFixture|

somewhere in your test? 测试中的某个地方?

That is the most common reason for the missing method type error. 这是缺少方法类型错误的最常见原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM