Is your feature request related to a problem? Please describe.
Test classes are failing in our org. Adjusting them is a lot of work, not just with regards to runas, but in this issue I concentrate on that.
Describe the solution you'd like
Currently SurveyTestingUtil, contains a lot of set up for the tests to be run, this class, has the option (using createNewAdminPermissionSetUser) to create a user with the 'Standard' Profile, and the 'Survey_Force_SuperAdmin' permission set.
But another class (SurveyManagerController_Test) creates it own users.
A better solution would be to have the users created in the 'SurveyTestingUtil' class, with a parameter, of which perm set to assign. Or, just have one user without a perm set assigned, and assign/unassign, the required perm set on the fly.
Is your feature request related to a problem? Please describe.
Test classes are failing in our org. Adjusting them is a lot of work, not just with regards to runas, but in this issue I concentrate on that.
Describe the solution you'd like
Currently SurveyTestingUtil, contains a lot of set up for the tests to be run, this class, has the option (using createNewAdminPermissionSetUser) to create a user with the 'Standard' Profile, and the 'Survey_Force_SuperAdmin' permission set.
But another class (SurveyManagerController_Test) creates it own users.
A better solution would be to have the users created in the 'SurveyTestingUtil' class, with a parameter, of which perm set to assign. Or, just have one user without a perm set assigned, and assign/unassign, the required perm set on the fly.