# 在我的 WSL2 系统上运行测试时遇到问题

**URL:** <https://meta.discourse.org/t/having-issues-running-tests-on-my-wsl2-system/358275>\
**Category:** Development\
**Created:** [2025年三月21日 01:35 UTC](https://meta.discourse.org/t/having-issues-running-tests-on-my-wsl2-system/358275 "2025-03-21T01:35:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2025年三月22日 03:37 UTC](https://meta.discourse.org/t/having-issues-running-tests-on-my-wsl2-system/358275/6 "2025-03-22T03:37:56Z")

</div>

> [@sam](#):
>
> 你有没有快速看一下图片，我想知道它们是否能为测试运行器不工作的原因提供线索。

我在测试中加入了一个 `sleep`，并用 `SELENIUM_HEADLESS=0` 启动了 rspec。  
我发现我可以_看到_创建的主题，但_无法访问_它们。  
这解释了为什么我没有看到书签！

这立刻让我想起了我在 TC 中进行测试或运行现有测试时遇到的一个问题：如果有一个没有定义类别的 fab 主题，我在测试中就无法访问它。

所以，如果我这样做：

 ![This image shows edts in a code editor with two functions, and , and the function calls stack variables and to call the function with different topics and parameters, with annotations and an key visible in the editor. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/9/d/9/9d948d78971e046c2494b3b2095dc54f62ab8e25.png)

我看到了书签：

 ![This is a screenshot of the Discourse forum activity page, showing activity from a user named Bruce Wayne with no administrator emails defined, accompanied by two bookmarked posts. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/6/1/2/612ba721fb2c8d3268a8bf003b8e61a61a12bf55.png)

并且测试正在工作：  
 ![image](https://global.discourse-cdn.com/meta/original/4X/5/5/d/55d7166934c67a22e635535d39257352039b74e8.png)

不清楚为什么我的环境中会发生这种情况。  
核心测试中有许多没有指定类别的 fab 主题，而这些测试在 GitHub 上是有效的。有什么区别？

---

_[View the full topic](https://meta.discourse.org/t/having-issues-running-tests-on-my-wsl2-system/358275)._
