前端测试 网站链接测试工具 xenu

王艳峰 · 2017年02月08日 · 最后由 yuanls 回复于 2018年12月27日 · 3248 次阅读

guide

刚学习的一个 web 测试链接的工具,跟大家分享一下😀

xenu 全称 Xenu Link Sleuth,免费

介绍

Xenu Link Sleuth 可以检测到网页中的普通链接、图片、框架、插件、背景、样式表、脚本和 java 程序中的链接。

二话不说,直接上使用说明

添加要测试的 URL

设置

  • 1.并列线程;
  • 2.最大层级;
  • 3.报告内容: 比较关心的中断链接、中断内部链接、统计、有效文字链接;

开始执行

点击 “ok”,观察并列线程和执行百分比:

执行完成后,点击生成报告:

生成一个 html 文件

执行结果分析

  • 1.ok,测试通过;
  • 2.sever error、not found、no object data,死链接;
  • 3.skip external,跳过外部链接测试;

我们要找的就是死链接,然后给开发提供错误的源头

共收到 12 条回复 时间 点赞

帮 testerhome 测试下吧~

哈哈,我年前也做了一个类似的工具,放到 Jenkins 上定时检测用。https://github.com/debugtalk/WebCrawler


WebCrawler

A web crawler for testing website links validation.

Features

  • running in BFS or DFS mode
  • specify concurrent running workers in BFS mode
  • crawl seeds can be set to more than one urls
  • configure hyper links regex, including match type and ignore type
  • group visited urls by HTTP status code
  • flexible configuration in YAML
  • send test result by mail

Usage

$ python main.py -h
usage: main.py [-h] [--seeds SEEDS] [--crawl_mode CRAWL_MODE]
               [--max_depth MAX_DEPTH]
               [--max_concurrent_workers MAX_CONCURRENT_WORKERS]
               [--log_level LOG_LEVEL] [--build_number BUILD_NUMBER]
               [--mail_notification MAIL_NOTIFICATION]
               [--mail_config_file MAIL_CONFIG_FILE]
               [--smtp_host_port SMTP_HOST_PORT]
               [--smtp_auth_account SMTP_AUTH_ACCOUNT]
               [--email_recepients EMAIL_RECEPIENTS]

Store automation test.

optional arguments:
  -h, --help            show this help message and exit
  --seeds SEEDS         Specify crawl seed url(s), several urls can be
                        specified with pipe; if auth needed, seeds can be
                        specified like 'url1,user1:pwd1|url2,user2:pwd2'
  --crawl_mode CRAWL_MODE
                        Specify crawl mode, BFS or DFS.
  --max_depth MAX_DEPTH
                        Specify max crawl depth.
  --max_concurrent_workers MAX_CONCURRENT_WORKERS
                        Specify max concurrent workers number.
  --log_level LOG_LEVEL
                        Specify logging level, default is DEBUG.
  --build_number BUILD_NUMBER
                        Specify jenkins build number.
  --mail_notification MAIL_NOTIFICATION
                        Specify whether to turn on mail notification.
  --mail_config_file MAIL_CONFIG_FILE
                        Specify email configurations with YAML file.
  --smtp_host_port SMTP_HOST_PORT
                        Specify email SMTP host and port.
  --smtp_auth_account SMTP_AUTH_ACCOUNT
                        Specify email SMTP auth account.
  --email_recepients EMAIL_RECEPIENTS
                        Specify email recepients.

Examples

Crawl in BFS mode with 20 concurrent workers, and set maximum depth to 5.

$ python main.py --seeds http://debugtalk.com --crawl_mode bfs --max_depth 5 --max_concurrent_workers 20

Crawl in DFS mode, and set maximum depth to 10.

$ python main.py --seeds http://debugtalk.com --crawl_mode dfs --max_depth 10

Crawl several websites in BFS mode with 20 concurrent workers, and set maximum depth to 10.

$ python main.py --seeds http://debugtalk.com,http://blog.debugtalk.com --crawl_mode bfs --max_depth 10 --max_concurrent_workers 20

👍 可以,改天用用

07 年博客介绍链接测试工具写过它,没想到寿命这么长😀

看这篇时发现网站似乎又升级改版了,赞赞赞那!

#2 楼 @debugtalk 膜拜大神,试试去😆

#1 楼 @Lihuazhang 设置的 100 并发线程

#9 楼 @bajao overload 是啥意思?

用 xenu 工具测试网页,会访问网页的删除链接,删除数据吗?我前两天测试,数据被删除了,开发说是我的工具删的,因为访问了删除链接。这个确实是这样吗?求教

怎么检测需要登录后的链接?

需要 登录 後方可回應,如果你還沒有帳號按這裡 注册