在测试套件中运行特定测试 - Selenium Side Runner (IDE)

dsj*_*dsj 6 testing selenium selenium-ide

是否可以在我的 selenium side runner 测试套件中运行特定测试?例如,在测试套件中,我的第一个测试将我登录到网站,然后其他测试则测试网站的特定区域。这些测试中的每一个都首先继承登录测试,以在运行测试时对“用户”进行身份验证。但是当我运行该套件时,它会按顺序运行测试,因此它将首先运行登录测试,然后在其他测试中重新运行登录测试。希望这是有道理的。所以本质上我希望能够指定在我的测试套件中运行哪些测试。提前致谢

小智 0

您可以使用过滤器来运行具有通用名称的测试:

Filter tests
You also have the option to run a targeted subset of your tests with the --filter 
target command flag (where target is a regular expression value). Test names that 
contain the given search criteria will be the only ones run.

[example] selenium-side-runner --filter smoke
Run Code Online (Sandbox Code Playgroud)

  • 目前 --filter 选项适用于套件级别,因此它可以过滤套件,但不能过滤测试。是的,这里的文档很混乱。 (2认同)