The action API should allow extensions to expose flags that control API tests via an appropriate hook. The intent is to allow tests to decide whether they need to be skipped based on the flags set by extensions. For instance, the ConfirmEdit extension could set a "captcha" flag, and any test relying on anonymous edits could mark itself as skipped based on that.
In addition, the action API should expose a single flag that is required by the API test framework. This flag would be based on a config variable, set in DevelopmentSettings.php. If this flag is absent, API integration tests should refuse to run. The intention is to protect production wikis from accidental pollution with test data.