code: public function getSessionState(AssessmentTestSession $session) {
          $deliveryExecution = $this->getDeliveryExecution($session);
          return $deliveryExecution->getState()->getUri();
      }
docs: Get delivery execution state
  @param AssessmentTestSession $session
  @return string