# TestPermissions attribute
> Version: _Available or changed with runtime version 1.0._
Specifies a value that can be used to determine which permission sets are used on tests that are run by a test method.
## Applies to
 Method
> NOTE
> The TestPermissions attribute can only be set inside codeunits with the SubType property set to Test.
## Syntax
```al
[TestPermissions(TestPermissions: TestPermissions)]
```
### Arguments
TestPermissions
Type: ../methods-auto/testpermissions/testpermissions-option
Specifies the permission sets used on tests that are run by the test method.
## Remarks
The InheritFromTestCodeunit value applies only to test methods. It makes a test method use the TestPermissions property of its test codeunit. On a test codeunit, this value resolves to Restrictive at runtime.
Apart from InheritFromTestCodeunit, the values don't perform operations by themselves. Add code to a test runner codeunit to define which permission sets each value applies at runtime.
> NOTE
> To specify the permission sets that are used by all the tests run by a test codeunit, use the ../properties/devenv-testpermissions-property.
## Related information
AL Method Reference<../methods-auto/library>
devenv-method-attributes
../properties/devenv-testpermissions-property

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-testpermissions-attribute, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/attributes/devenv-testpermissions-attribute/
