Disable tests compilation in Intellij
Yes there is.
Got to Settings -> Build,Ex.. -> Compiler -> Excludes
and press the +
button:
select the path you want to exclude. In your case it's the test folder:
Check the recursive
checkbox on the right side and you should see that your test folder has no a little x
on the folder to mark it as excluded:
BTW: Remeber these little x
, because Intellij IDEA provides an intention to exclude certain package from compilation.
Executing that intention by accident could lead to a long journey of searching and asking in order to understand why certain packages aren't build anymore.
IntelliJ IDEA 14: How to skip tests while deploying project into Tomcat
In case you are using Maven
, on the View
> Tool Windows
> Maven Projects
click on the button shown below ( called Skip Tests Mode
). Essentially it is taking the test
phase out of the lifecycle when you say run package
.
Run all tests except for a JUnit Category in IntelliJ
Some time has passed since I asked this question, and in that time the Gradle test runner has become the default (at least for me). So though the built-in runner may not have this functionality, you can easily create a gradle task that excludes categories or tags:
test {
useJUnitPlatform {
excludeTags 'integrationTest'
excludeTags 'endToEndTest'
excludeTags 'testDriver'
}
options {
exclude '**/*Integration*'
exclude 'integrationTest'
exclude 'endToEndTest'
exclude 'testDriver'
}
}
Intellij : Find usages , but exclude test files from results
Intellij Ultimate 11 version has an option to search in "Project production files".
Just press Alt+F7 on a usage and look on Scope.
Related Topics
Typecasting an Object from Parent Class to Child
Spring Boot Application Shutdown Immediate After Starting
Spring Boot Required Request Part 'File' Is Not Present
How to Write Unit Test for a Setter Method Which Does Not Have a Getter Method
Deserialization With @Jsonsubtypes for No Value - Missing Property Error
How to Do Name Validation Allowing Alphabet, Spaces and Dot in Android
Automatically Convert Style Sheets to Inline Style
Changing Scene When a Button Is Pressed Fxml
Default Value in Lombok. How to Init Default With Both Constructor and Builder
Spring Data JPA Problem With Updating Multiple Entities
Post and Get for the Same Url - Controller - Spring
Read Huge Excel File(500K Rows) in Java
Kafka: Failed to Update Metadata After 60000 Ms
How to Increment a Variable to the Next or Previous Letter in the Alphabet
Password Encrypt and Decrypt Using Spring-Security
Spring JPA - Why Is My Findall Returning Null When There Is Data in My Database