简体   繁体   中英

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
  • Check the http response code is 200
  • Check the JSON response for the string "CACHE_LOADER_OK"
  • Display the response (show)

The errors I'm getting from Fitnese are...

  • setUrl Could not invoke constructor for setUrl[1]
  • check The instance decisionTable_1. does not exist
  • responseContains The instance decisionTable_1. does not exist
  • true The instance decisionTable_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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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