寻找创建测试的敏捷方法
我实际上正在测试网络的网络服务。与 Nunit 和 Gallio 等单元测试人员合作。
其实我有一个问题。我想测试一项服务,我必须在 html 中填写大量数据,就像处方集一样。问题是我正在手动编辑 xml 来进行测试......它太费力和繁重,因此,我正在寻找一种敏捷方法来做到这一点。
我的老板告诉我做一个公式集,我可以在其中填写所有字段,例如 html,然后用它创建一个 xml。比手动编辑基本 xml 更有效。
有一个工具可以帮助我吗?
抱歉我的英语不好。
I'm actually testing web service of a web. Working with unit testers like Nunit and Gallio.
Actually, i have a problem. I want to test a service where i have to fill a lot of data in the html, like a formulary. And the problem is that i'm doing that editing an xml manually to do the tests... its too labored and heavy, and because this, i'm searching an agile method to do that.
My boss told me to do a formulary where i can fill all the fields, like the html, and then, create a xml with that. Is more efficient than editing a base xml manually.
There is a tool that can help me?
Sorry about my bad english.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您应该尝试 Selenium 或 健身。
You should try either Selenium or Fitness.
也许测试数据构建器可以为您工作?您可以编写类,以便可以在测试中编写
您还可以实现测试数据生成器,以便它能够实现像
我可能会使用它那样的功能。
Maybe test data builders could work for you? You could write classes so that You can write in Your tests
You can also implement test data builder so that it enables things like
I would probably use it.
我们决定不通过 Web 服务对我们的代码进行单元测试,因为模拟环境和 http 请求需要付出很大的努力。
相反,我们将尽可能多的代码移至“核心”组件中,该组件不依赖于 Web 框架(在我们的示例中为 ASP.NET,因此“核心”不引用诸如此类的程序集)系统.Web)。
依赖于Web框架的代码留在'web'组件中。我们尝试使其尽可能小 - 它通常处理身份验证、授权、转换请求并调用“核心”中的适当功能来处理它。
我们尝试对“核心”的公共接口进行完整的单元测试,但我们不会尝试对“Web”接口进行单元测试。我们计划使用不同类型的自动化测试来测试“网络”。
We decided not to unit test our code through the web service, because of the effort involved in mocking the environment and the http requests.
Instead we move as much of our code as possible into a 'core' component, which has no dependency on the web framework (in our case ASP.NET, so 'core' has no reference to assemblies like System.Web).
The code that is dependant on the web framework is left in the 'web' component. We try to keep this as small as possible - it typically handles authentication, authorization, translates the request and calls the appropriate functionality in 'core' to process it.
We try to unit test the public interface to 'core' completely, but we do not attempt to unit test the 'web' interface. We plan to test 'web' using a different kind of automated test.