I myself ran into this problem in order to at least run everything, I copied the java.policy file from <jdk>/jre/lib/security and added the following permissions in the standard grant to get the tests running in IntelliJ IDEA 2016.2:
// To get tests working under IntelliJ 2016.2 permission java.util.PropertyPermission "idea.launcher.bin.path", "read"; permission java.lang.RuntimePermission "loadLibrary.C:\\Program Files (x86)\\JetBrains\\IntelliJ IDEA 2016.2\\bin\\breakgen64.dll"; permission java.util.PropertyPermission "idea.launcher.port", "read"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; permission java.util.PropertyPermission "idea.is.junit5", "read"; permission java.net.SocketPermission "127.0.0.1:*", "connect,resolve"; permission java.util.PropertyPermission "user.home", "read"; permission java.io.FilePermission "C:\\Users\\Mark\\junit.properties", "read"; permission java.lang.RuntimePermission "setIO"; permission java.io.FilePermission "C:\\Users\\Mark\\AppData\\Local\\Temp\\*", "read"; permission java.lang.RuntimePermission "accessDeclaredMembers";
You will need to change some paths to suit your specific user needs. I have not completely done these changes yet: it still seems to me that I do not have some permissions specific to my own code (in particular: reading several property files from my own code).
source share