Run all tests in class with a single shortcut

Answered

Hey guys, 

Is it possible to have a shortcut to run all tests in a class? I know that I can run if I move to the top of the class and press shift + cmd + R. But what I'm trying is to have a shortcut assigned to run all tests in the current class.

This is particularly important for me since as I move around between test classes and test methods it would allow me to easily run all the tests without the need to move to the top of the class.

Thanks for your help.

1
5 comments
Avatar
Permanently deleted user

Hello Hugo,

You can toggle between test class and implementation class using CMD + SHIFT + T on MacOS and ALT + SHIFT + T on Windows. Furthermore, you can create a JUnit Configuration on the top right menu in Intellij. Then it is possible to run the JUnit test while you are in implementation class.

Third option is infinitest. But it seems to be end of life: https://plugins.jetbrains.com/plugin/3146-infinitest 

Regards

0

Hello Hugo,

You may also use the ctrl+shif+R shortcut to run the context configuration from editor.

0
Avatar
Permanently deleted user

I agree, I find myself often scrolling out of a test method just so I can run all the tests, it feels it could be so easy to have another shortcut to run all tests.

0

i have the same problem

So looking thru the commands i see only

- "run context configuration" which will run a single tests if u are inside it's AST segment, for me ctrl+shift+f10

- "rerun tests"   - alt+shift+R

PS @all: name the command and not the shortcut, as these differ between the schemas.

0

Hello,

Please feel free to create a feature request for this case in YouTrack:

https://youtrack.jetbrains.com/issues/IDEA

 

Thank you  

0

Please sign in to leave a comment.