A tangible non-transitory computer readable storage media impressed with computer program instructions that, when executed, causes efficient testing by selective UI interaction, through test script sections including setup, execution and verification, applied to an application under test (AUT) that operates in both an application programming interface (API) mode and a user interface (UI) mode, including:
- providing a test environment that, when testing the UI mode of the AUT, defaults to ignoring the UI mode during setup and to supplying setup values stored in a file directly to an API without rendering or interacting with UI elements in the setup section of the test script;
- encountering an override directive in the setup section of the test script, which mandates interaction with a specified UI element in the setup section;
- and
- responsive to the override directive, overriding of the default of ignoring the specified UI element in the setup section, rendering the specified UI element, and applying a bot to interact with and supply setup values from the file to the specified UI element.