如何在IntelliJ中运行单个量角器测试? [英] How can I run a single protractor test in IntelliJ?

查看:76
本文介绍了如何在IntelliJ中运行单个量角器测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个Angular应用程序并将Protractor用于e2e测试.在Intellij(最终版)中,我为测试创建了运行/调试配置.如果我想运行所有测试,则效果很好.但是如何只运行一个规范文件或一个测试用例?

I develop an Angular application and use Protractor for e2e tests. In Intellij (Ultimate Edition) I created a run/debug configuration for my tests. This works fine if I want to run all the tests. But how can I run only a single spec file or a single test case?

我希望在Java中运行JUnit测试时会出现类似的情况,在其中可以单击测试方法并从上下文菜单中选择以仅执行此单个测试方法.量角器是否有可能做到这一点?

I would expect something like when running JUnit tests in Java where I can click into a test method and select from the context menu to only execute this single test method. Is something like that possible with Protractor?

推荐答案

您可以将describe块重命名为fdescribe,仅运行位于该块中的测试,或者重命名it块到fit,只有此测试将被执行.

You can either rename the describe block to fdescribe, and only the tests residing in that block will be run, or rename an it block to fit, and only this test will get executed.

这篇关于如何在IntelliJ中运行单个量角器测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆