我的组织正在致力于在JBoss应用服务器上构建RESTful working服务。到目前为止,QA团队习惯于使用SoapUI测试SOAP far服务。SoapUI有一个具有REST功能的新版本。我们正在考虑使用它。
发布于 2009-06-24 09:52:03
soapUI也可以完成这项工作,请查看this blog post开始。
发布于 2008-10-15 10:42:07
请尝试Firefox addon Poster,它简单易用,让您快速上手并运行
发布于 2008-10-15 03:09:11
您可以使用相当简单的Python代码来练习web服务。根据您的安全性,您可以简单地使用Python的urllib或urllib2来执行您的REST请求并检查您的答案。
此外,您可能希望使用Python unittest来控制REST服务的Python测试的执行。
class TestSomeREST( unittest.TestCase ):
def setUp(self):
REALM = "blah@blah.com"
self.client= RESTClient( "localhost", 18000, "tester", "tester", REALM )
def test_1_get(self):
response = self.client.get('/this/that/other/2/')
self.failUnlessEqual(200, response.status_code)
j1= JSONDecoder().decode(response.content)
self.assertEquals(2, j1[0]['pk'] )
entity= j1[0]['fields']
self.assertEquals('Some Other Group', entity['name'])
self.assertEquals('E1G2', entity['customer_id'])RESTClient类使用urllib2传递每个请求的摘要身份验证。这是相当复杂的,但我可以分享它的本质,如果它是感兴趣的。
https://stackoverflow.com/questions/203495
复制相似问题