在IntelliJ IDEA 14中运行JUnit测试,而无需选择配置类型 [英] Run JUnit test in IntelliJ IDEA 14 without choosing configuration type

查看:254
本文介绍了在IntelliJ IDEA 14中运行JUnit测试,而无需选择配置类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在带有Gradle插件的IntelliJ IDEA 14中,我希望在不询问配置类型的情况下运行JUnit测试.第一次运行测试时出现问题-此运行没有配置.我从不在IDE中使用Gradle运行测试,因此禁用使用Gradle运行测试是可以接受的.如何直接运行JUnit测试?

In IntelliJ IDEA 14 with Gradle plugin I would like to run JUnit test without being asked about configuration type. Problem occurs when I run test for the first time - there is no configuration for this run. I never run tests with Gradle in IDE so it would be acceptable to disable running test with Gradle. How to run JUnit test directly?

推荐答案

您可以通过添加

idea.gradle.prefer.idea_test_runner=true

位于IntelliJ IDEA安装的bin目录中的

至idea.properties文件.然后重新启动IDEA并享受.

to idea.properties file located in the bin directory of the IntelliJ IDEA installation. Then restart IDEA and enjoy.

这篇关于在IntelliJ IDEA 14中运行JUnit测试,而无需选择配置类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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