简体   繁体   English

如何使用fitnesse测试Web服务

[英]How to test web service with fitnesse

I have gone through fitnesse user guide. 我已经通过fitnesse用户指南。 But it seems difficult for me to follow since I want to test a web-service. 但是,由于我想测试一个Web服务,因此我似乎很难遵循。

The problem is as below I have a request xml file and response xml file. 问题是如下我有一个请求xml文件和响应xml文件。 In request file I have userid and logon id with values . 在请求文件中,我有userid和logon id的值。 In response xml file I have location with value. 在响应xml文件中,我有值的位置。 I need to test that whether I get expected location value , using fitness. 我需要测试我是否使用健身获得预期的位置值。 How can I do the test with fitnesse. 我怎样才能用fitnesse进行测试。

Out of the box FitNesse does not test anything. 开箱即用FitNesse不测试任何东西。 It is really a framework for collaboratively editing and executing tests. 它实际上是一个协作编辑和执行测试的框架。 To test any sort of software you need to use fixtures. 要测试任何类型的软件,您需要使用灯具。 Often people write their own, but you can also use fixtures written by other people. 通常人们自己写,但你也可以使用其他人写的灯具。

In the case of testing web services, you can possibly use RestFixture . 在测试Web服务的情况下,您可以使用RestFixture It is designed to test REST based Web Services. 它旨在测试基于REST的Web服务。 Back when I had to test a TES interface, I chose to write my own using HttpClient and custom parser due to the way our other test fixtures worked. 当我不得不测试TES界面时,由于我们的其他测试夹具的工作方式,我选择使用HttpClient和自定义解析器编写自己的。

I don't know anything about it, but you can also look at XmlHttpTest . 我对此一无所知,但您也可以查看XmlHttpTest

Ultimately, you with have to find a fixture that works for you, or build one. 最终,您必须找到适合您的灯具,或者构建一个。 This is pretty much true of FitNesse, Cucumber, and most of the similar style tools. FitNesse,Cucumber和大多数类似的样式工具都是如此。

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

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