Running unit tests from currently opened file in IntelliJ IDEA
Accepted answer did not work for me on a MacOS running Android Studio 2.1.13 .
After looking up the "Run Context Configuration" action mentioned by @ShawnFumo's comment, I found Ctrl + Shift + R which ended up working.
Yeah, you can either:
- Right click on the file and go to
Run 'MyTest'
- Use the key binding: if the caret is in a method on that method will be run
- on a Mac: it's Control+Fn+Shift+F10
- elsewhere: it's Alt+Shift+F10