Description
After #625 was implemented methods that try to run some unsafe code now generates into tests like this:
@Disabled("Disabled due to sandbox")
publicvoidtestPropertyWithBlankString() {
SecurityChecksecurityCheck = newSecurityCheck();
/* This test fails because method [com.company.security.SecurityCheck.property] produces [java.security.AccessControlException: access denied ("java.util.PropertyPermission" " " "read")] java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) java.security.AccessController.checkPermission(AccessController.java:886) java.lang.SecurityManager.checkPermission(SecurityManager.java:549) java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294) java.lang.System.getProperty(System.java:719) com.company.security.SecurityCheck.property(SecurityCheck.java:32) */
}We have several problems with this view:
- User have no information how to change settings of security manager
- TestNG has no
@Disabled annotation - Is it good idea to print stacktrace?
Expected behavior
Generated test should be improved. We can add little doc or even hyperlink to add permissions into correct file.
Description
After #625 was implemented methods that try to run some unsafe code now generates into tests like this:
We have several problems with this view:
@DisabledannotationExpected behavior
Generated test should be improved. We can add little doc or even hyperlink to add permissions into correct file.