Support for JUnit 5 M4 in IntelliJ IDEA 2017.2
IntelliJ IDEA provides support for the upcoming JUnit 5 release. JUnit has pretty much been the standard for Java unit testing for years, and the latest version brings the library right up to date, making use of Java 8 features and bringing in ways of testing that are familiar if you've been using other frameworks like Spock. IntelliJ IDEA 2017.2 adds support for some of these features, to make t
Using JUnit 5 in IntelliJ IDEA
One of the new features in IntelliJ IDEA 2016.2 is support for the new JUnit 5 testing framework. Almost all Java developers will have used JUnit at some point, so it's pretty exciting to find the newest version has evolved with the times and provides a number of new features, some of which may be familiar to those who have used other frameworks. IntelliJ IDEA supports the ability to actually
Why Write Automated Tests?
After writing a post for the Upsource blog about evaluating tests during code review, I found myself compelled to write something more general on why we should be writing automated tests. If you already know the value of tests, you might find something here that will help convince your colleagues who are less sold on the idea. Why do we write automated tests? In my first post about code reviews,
New Coverage View in IntelliJ IDEA 11.1
IntelliJ IDEA 11.1 introduces a new way of browsing the gathered coverage information through a dedicated Coverage View. This view aggregates the coverage details over a configured scope in one place. It provides ability to sort data by coverage percentage, what can be used for detection of code which is not enough covered by tests. As always quick navigation, scroll from/to source, flatten pac
Testing Tip: Run Test Method from Abstract Test Class
Sometimes you have an abstract test class with test methods where the inheritors set up different environment. As it is impossible to run an abstract class you had to enumerate inheritors manually, choose corresponding methods and run these methods one by one. Now (since IntelliJ IDEA 11.1) it is possible to run tests right from the abstract base class and simply choose inheritors from the popup
Spring 3.1: Testing with @Configuration classes and profiles
Latest Spring 3.1 features can be easily found in IntelliJ IDEA 11 release. If you've already started testing your applications with @Configuration classes and environment profiles, tell us how it works for you in IntelliJ IDEA.
New in 10.5: Create and open tests for Groovy classes faster
We've added a couple of new productivity features in IntelliJ IDEA 10.5 to make working with Groovy tests two bits more pleasant: 1. Now you can create tests for Groovy classes the same way you do in Java. You just need to invoke Create Test intention on the header of the class. 2. To navigate to an existing test from a class you can invoke Go to Test action (Ctrl+Shift+T by default). Make sure
Android unit-testing support
With IntelliJ IDEA X you can write unit tests for your Android application using Android Testing Framework. Android unit tests are located in a separate test module, so first you need to add it (i.e. named tests) to your project, which must already contain an Android module (or module with Android facet) (i.e. named MyAndroidApp). Then, specify this tested module: IntelliJ IDEA will automatica
Generate dependencies for Spring TestContext Framework
IntelliJ IDEA 10 gives you an easy way of generating bean dependencies for Spring Test Contexts. Simply hit Alt+Insert in your Spring Test to invoke the "Generate…" popup, select the "Bean dependency..." action to run and choose the beans you like. IntelliJ IDEA actually runs a live template inside to complete the code generation. It creates @Autowired field and adds @Qualifier if more than on
Spring testing support in IntelliJ IDEA 10
Please try IntelliJ IDEA X (EAP) with new Spring testing related support. There is a number of things to note: 1. @ContextConfiguration support with completion, navigation, usages search and error highlighting 2. @TransactionConfiguration 3. All Spring related inspections, quick fixes and annotators are supported for corresponding TestContext Framework configurations. Tried IntelliJ IDEA
No More Missing TestNG Tests
I often forget to add newly created tests to the testng.xml, which is used in our TeamCity build, and by the time I realize that they don't run something is surely went wrong. What a bummer! Not any more, fortunately — IntelliJ IDEA makes sure no tests are missing. All it takes is to enable the Undeclared test inspection under TestNG in the Errors section of the Settings dialog.