Does a Permission Set in @TestSetup get removed after Test.stopTest()?

On May 20, 2025, Posted by , In Apex,Lightning web components, By ,, , With Comments Off on Does a Permission Set in @TestSetup get removed after Test.stopTest()?

Question If we create a Permission Set inside a @TestSetup method in an Apex test class, will it be automatically removed after Test.stopTest(), similar to how standard or custom object records are deleted at the end of a test execution? For example, consider the following code: After Test.stopTest(), will this…