测试 Atom 服务器的最佳方法是什么?
我正在设置一个 Atom 服务器作为后端数据库的 REST 接口。
我想进行一些测试以确保: - 输出符合 Atom 和 AtomPub 标准 - 生成的数据是数据库状态的正确表示
我对在已知状态下设置数据库的概念很满意。 但我不确定最好的测试策略。
看来我可以使用 JUnit 测试,根据 Atom 模式验证结果,但我对更轻量级的策略感兴趣。
我非常喜欢 Selenium,但无法完全“集中精力”以非交互模式设计测试。 请求和操作 Atom feed 与 html 浏览不同。
有任何想法吗?
I'm setting up an Atom server to act as a REST-ful interface to my backend database.
I'd like to put together some tests to ensure:
- the output is Atom and AtomPub compliant
- the data produced is a correct representation of the state of the database
I'm comfortable enough with the concept of setting up the database in a known state. But I'm unsure of the best test strategy.
It would appear I could use JUnit testing, validating the results against Atom schemas, but I'd be interested in a more lightweight strategy.
I quite like Selenium, but can't quite get my 'head around' designing the tests in a non-interactive mode. Requesting and manipulating Atom feeds isn't like html browsing.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除了 Selenium 之外,还有一些工具可以帮助测试 ATOM 服务 - 看看 JMeter<例如 /a>,这对于编码 PUT / POST 请求有很大帮助。
但说实话,对于像 ATOM 这样易于编码的 API,如果直接使用 JUnit,最终可能会同样高效; 除非您只想进行一次性探索性测试,否则您最终将使用任何工具编写代码和/或脚本,并且熟悉新工具只会增加测试开发时间。
There are some tools apart from Selenium that can help with testing an ATOM service - have a look at JMeter for example, which can help a lot with encoding the PUT / POST requests.
To be honest, though, for an easy-to-code API like ATOM you would probably end up being just as efficient if you go directly to JUnit; unless you just want to do throwaway exploratory testing, you'll end up writing code and / or scripts whatever tool you use, and getting familiar with a new tool will just add to the test development time.