
dfe2e 是一个端到端测试仓库,旨在通过自动化测试验证 Doofinder 相关项目的功能正确性。目前包含 6 个项目测试:doofapi、doomanager、doophoenix、doophoenix_v6、livelayer 和 livelayer-mobile。该镜像基于 Cypress 和 Docker 构建,支持本地和远程测试执行,通过静态 HTML 文件和预配置的搜索引擎验证各类功能场景。
e2e_testing@doofinder.com 账号下的专用搜索引擎和商店,确保测试环境一致性DOOPHOENIX、ZONE)灵活配置测试参数doofinder/dfe2e,支持与 GitHub Actions 等工具集成本地测试
bash# 首次运行需为每个商店强制处理所有索引到 e2e_testing@doofinder.com 用户 $ ./bin/local.sh project_name # project_name 为测试项目名称(如 doophoenix、livelayer)
远程测试
bash$ ./bin/remote.sh project_name
webserver/html/,测试脚本位于 e2e/project_name/cypress/integratione2e-testing.doofinder.com:静态 Web 服务器,提供 webserver/html 目录下的文件e2e:基于 cypress/included:7.7.0 镜像,提供 Cypress 执行环境和 GUI 界面搜索引擎
所有测试使用 e2e_testing@doofinder.com 账号下的"测试专用"搜索引擎(位于"Default Store"),每个引擎配置不同测试场景:
| 搜索引擎名称 | 哈希ID | 特性说明 |
|---|---|---|
| doofinder e2e testing 1 | 7f74a4ff3165fe9882f460d03a40c5d9 | 硬编码加载脚本 |
| doofinder e2e testing 2 | 3dce6e7fb6dc40041ef003acfdb09e8a | 动态加载脚本 |
| doofinder e2e testing 3 | *** | 带自定义 CSS 的动态加载脚本 |
| doofinder e2e testing 4 | 041a812bde0613978d9e2f9d9c8323d8 | - |
| doofinder e2e testing 5 | 7c4dc04b621f90a51c23cc9b55e68a34 | - |
| doofinder e2e testing 6 | d9a488511916331027e4626d8f28c467 | 已停用(生产测试未使用) |
| doofinder e2e testing 7 | bbf8055bcbbdbfa44f085c1ccd52aad9 | - |
| doofinder e2e testing 8 | 7a3adf59b007c8a570ec6bb0e66e9d83 | 分组项目,截断频率设为 0.0000000000001 |
注意:EU 和 US 区域的搜索引擎配置完全一致,哈希ID相同。
多区域搜索引擎创建方法
如需在 US 区域创建与 EU 相同的搜索引擎,可在 US1 ipython 控制台执行:
pyconIn [1]: from helpck.users.models import DoofinderUser In [2]: from helpck.search_engines.models import SearchEngine In [3]: from helpck.search_engines.usecases.users import send_user_events In [4]: user = DoofinderUser.objects.get(email='e2e_testing@doofinder.com') In [5]: a = user.account In [6]: se = SearchEngine.objects.create( site_url='http://e2e-testing.doofinder.com/doophoenix/index.html', account=a, hashid='7f74a4ff3165fe9882f460d03a40c5d9' # 替换为目标哈希ID ) In [7]: send_user_events(se) # 必须执行,确保事件同步
测试商店
除"Default Store"外,e2e_testing@doofinder.com 账号下包含多个专用测试商店,用于验证不同 live layer 场景:
| 商店名称 | 商店ID | 测试场景 |
|---|---|---|
| e2e testing - livelayer TYPE_A | bb7ea73d-aa96-4993-a2cb-532fc8e6a7a3 | 全屏和移动层 |
| e2e testing - livelayer TYPE_C | 018ed9fa-203e-40b9-9ff9-dbf7c3d39016 | 浮动层 |
| e2e testing - livelayer TYPE_E | a5acfe75-5aa8-4ab8-aca5-96a9f1e31370 | 嵌入式层 |
| e2e-testing - livelayer TYPE_A shopper assistant | b6b2037f-4b8c-4195-821c-12f2a9530693 | 全屏层购物助手 |
| ...(完整列表参见原始文档) | ... | ... |
索引处理命令
bash# 索引所有 e2e 数据源,运行建议并生成 fakes3 单行 JS 文件 docker exec doomanager-doomanager-1 mix process_indices_suggestions_and_store_configs 2e333961bf48540a1c9a34a55151b6
本地测试命令
bash# 使用旧本地脚本运行 ./bin/local.sh livelayer # 使用本地唯一脚本运行 ./bin/local.sh livelayer loader2-local # 使用 staging 环境唯一脚本运行 ./bin/local.sh livelayer loader2-staging # 使用生产环境唯一脚本运行 ./bin/local.sh livelayer loader2-production # 使用指定 URL 的脚本运行 ./bin/local.sh livelayer loader2-https://whatever.com/loader.js
doophoenix 参数
http://doophoenix:4000 作为搜索服务器DOOPHOENIX,未设置时默认使用 eu1-search.doofinder.combash# 示例:设置 US 区域搜索服务器 export DOOPHOENIX="https://us1-search.doofinder.com"
区域切换
通过 ZONE 环境变量切换测试区域:
bash# US 区域运行 livelayer 测试 $ ZONE=us1 ./bin/remote.sh livelayer
通过 https://github.com/doofinder/live-layer/actions/workflows/e2e_tests_1_15.yml 执行:
bash# 针对 staging 环境运行 livelayer 测试 $ ENVIRONMENT=staging ./bin/remote.sh livelayer # 针对 staging 环境运行 livelayer-mobile 测试 $ ENVIRONMENT=staging ./bin/remote.sh livelayer-mobile
基本命令
bash$ ./bin/remote.sh project_name # 自动同步 s3 仓库并生成测试视频
跨区域测试
bash# US 区域运行 doophoenix 测试 $ DOOPHOENIX=https://us1-search.doofinder.com ./bin/remote.sh doophoenix # US 区域运行 livelayer 测试 $ ZONE=us1 ./bin/remote.sh livelayer
测试结果查看
远程测试视频保存在 dfe2e/e2e/project_name/cypress/videos/ 目录。
私有镜像 doofinder/dfe2e 包含完整测试环境,master 分支提交后由 Docker Hub 自动更新。
bash# 运行生产测试 docker run --rm doofinder/dfe2e --project project_name # 带环境变量运行 docker run --rm -e ZONE=us1 doofinder/dfe2e --project livelayer
修改 docker-compose.yml,将 "run" 替换为 "open" 并移除 --headed 参数:
yaml# 原配置 command: ["run", "--headed", ...] # 修改后 command: ["open", ...] # 移除 "--headed"
连接拒绝错误(ERRORCONNECTIONREFUSED)
bash# 导出 doophoenix 主机 export DOOPHOENIX="[***]" # 如 hosts 文件未包含 doophoenix,添加映射 sudo echo "127.0.0.1 doophoenix" >> /etc/hosts
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务