ReadyAPI - 如何在 TestRunListener.afterStep 事件处理程序目标中按 testStep 名称进行过滤

ReadyAPI - How to filter by testStep name in TestRunListener.afterStep event handler Target

我正在尝试为 TestRunListener.afterSetp 事件处理程序添加过滤器。我想按当前的 testStep 名称过滤它。比方说,testStep.Name.contains("XXX").

如何在目标列中获取当前的测试步骤名称?

context.getCurrentStep().getLabel() 不起作用

来自official documentation

Enter RegexRequest.* so that the event is applied only to test items that start with RegexRequest.

所以在你的情况下你可以使用 .*XXX.*.