AST 2
Apple Service Toolkit
AST 2 is Apple's internal diagnostics platform, Apple Stores, Apple Support, and AASP's have access to this software.
AST on iOS & iPadOS
On Apple's mobile operating systems, an app named "Diagnostics" is in the system files, this app can be launched without AST however, you're not able to run diagnostics and are presented with the following screen:
To open the app, open Safari and type this link: diagnostics://
AST on macOS
On Apple's desktop and notebook operating system, you need to enter Recovery Mode to run diagnostics. On macOS, you can run a diagnostic with or without AST, to start this process, follow this link: https://support.apple.com/en-us/HT202731
AST at Apple
The Apple Store will most likely run an AST test on your device, they do this using an iPad with the AST app installed.