Why does my kernel test error with "Install profile will be a mandatory parameter in Drupal 9.0."?
Your problem is that your test and/or code is relying on a deprecated feature.

In Drupal 8.3, there was a push to have deprecated featured generate E_USER_DEPRECATED messages, eg in Drupal\Core\Config\ExtensionInstallStorage:

  public function __construct(StorageInterface $config_storage, $directory = self::CONFIG_INSTALL_DIRECTORY, $collection = StorageInterface::DEFAULT_COLLECTION, $include_profile = TRUE, $profile = NULL) {
    parent::__construct($directory, $collection);
    $this-&gt;configStorage = $config_storage;
    $this-&gt;includeProfile = $include_profile;
    if (is_null($profile)) {
      @trigger_error('Install profile will be a mandatory parameter in Drupal 9.0.', E_USER_DEPRECATED);
    }
    $this-&gt;installProfile = $profile ?: \Drupal::installProfile();
  }


This is to provide early warning to developers to update their code.

If the code is hit in a phpunit test (which includes unit tests, kernel tests, and functional tests using BrowserTestBase), anything from trigger_error will generate a fail.

So, you either need to fix your code, or you can cause the test to not fail by using the @expectedDeprecation annotation on the test method until you can fix it.