自动蜘蛛测试
我希望在我们当前的持续集成设置中添加一个非常简单的自动化集成测试层。 (CI 目前仅检查构建中断)。
是否有一种产品能够:
- 从基本 URL 抓取网站并创建网站? 报告任何 404/500 错误代码?
- 请允许我添加一个登录步骤,以 能够蜘蛛授权 页数?
Bonuses / would-be-nice:
- 报告 JS 错误
- 报告从 CSS 链接的 404s
我快速浏览了一下 SilkTest & Selenium,而且它们似乎并没有采用这种与站点无关的方法。 (登录步骤显然是他们可以做的事情......)
我们只是想剔除最简单/最愚蠢的回归错误,并且我们有绝对最短的时间来实现这样的自动检查 - 因此蜘蛛。理想情况下,该解决方案可以在命令行上运行,并将其结果输出到我可以解析到 TeamCity(持续集成包)中的内容中。
非常感谢。
I'm looking to add a very simple layer of automated integration testing to our current Continuous Integration setup. (CI currently only checks for build breaks).
Is there a product that will:
- From a base URL, spider a site &
report back any 404/500 error codes? - Allow me to add a step to logon, to
be able to spider the authorized
pages?
Bonuses / would-be-nice:
- Report JS errors
- Report 404s linked from CSS
I've had a quick look at SilkTest & Selenium, and they don't seem to feature quite such a site-agnostic approach. (The logon step is obviously something they can do...)
We're simply wanting to cull out the simplest/dumbest of regression errors, and we have an absolute minimum of time to implement such an automated check - hence the spidering. Ideally the solution can be run on the command line, and output its results in something I can parse into TeamCity (continuous integration package).
Much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个实用程序列表供您查看。
Here is a list of utilities to look at.
SilkTest 应该能够处理您的用例,您需要编写一个在页面中导航的脚本,具体取决于页面的复杂性,简单的递归下降可能就足够了。如果它变得更加复杂,您可能需要某种已经访问过的 URL 来避免无限循环。
至于结果,如果您使用 Silk4J 或 Silk4Net,它们都使用 xUnit 运行程序来驱动测试,我假设您应该能够将结果输入到 TeamCity 中。
SilkTest should be able to handle your use case, you'll need to write a script that navigates through your page, depending on the complexity of your page, a simple recursive descent might be sufficient. If it gets more complex, you might need some sort of already visited URLs to avoid infinite loops.
As for the results, if you use either Silk4J or Silk4Net which both use xUnit runners to drive the tests, I assume you should be able to get the results into TeamCity.