During setup(), drupalPost calls refreshVariables() which tries to read variables which are not yet there because the child Drupal is not yet installed.
Overrides WebTestBase::refreshVariables
protected function refreshVariables() {
if (!empty($this->setup)) {
parent::refreshVariables();
}
}