My common shortcuts on IntellJ for TDD

Hi everyone! On previous post I wrote about What we need to write fast using TDD. This post is about one section of it. Shortcuts on my IDE. Currently I use IntellJ and I show you the shortcuts which I use for improving my work.

List of shortcuts

  • Ctrl + Shift + T - Go to Test/Go to Test Subject - I use it for quick switch between test and production code. Using it, I don't need use mouse to click a package and I don't lose my time for finding a class.
  • In test class Alt + Insert and next Enter - Create test method - a faster way to write a method of test.
  • Ctrl + E - List of recent files. I use it for quick switch between used files. I try not to use a mouse when I write the code.
  • Double shift - next shortcut to switch between all classes.
  • In test class Ctrl + Shift + F10 - running test
  • In tested class Shift + F10 - run previous action - my previous action is almost always test for current written code.
  • F2 - go to next warning or error - this is the best way to generate methods and field, when we have don't compile code. F2 and Ctrl + Enter and we very fast create construction for real code.
  • F6 - move class/method - I use it for refactoring.
  • Shift + F6 - rename - as above.
  • Ctrl + Shift + V or M or C or P - withdraw V -> variable M -> method C -> constant P -> parameter - as above.
  • Ctrl + P - show parameter - it is good for existing code for quick check what kind of parameter we need to pass.
  • Ctrl + Alt + Left/Right - go to previous/next your point of track - this is for quick go back when you debug or switch.
  • Ctrl + Shift + A - find and execute action - when I forget a shortcut then I use it for running action and read what shortcut is.

Summary

These aren't all of shortcut, but I think it is common for TDD. Maybe You know shortcut which We can use for improve our work with TDD? Put it in comment below. If I learn new nice shortcut I will update this post.

Comments

Popular posts from this blog

Why TDD is bad practice?

How correctly imitate dependencies?

Software development using Angular 5 with Spring Boot