private function generateXML($tmpDir)
 {
     AnnotationRegistry::registerAutoloadNamespace('JMS\\Serializer\\Annotation', __DIR__ . "/../../../../vendor/jms/serializer/src");
     Model\Provider::setOutputDirectory($tmpDir);
     Allure::setDefaultLifecycle();
     $testSuiteStartedEvent = new TestSuiteStartedEvent(TEST_SUITE_NAME);
     $uuid = $testSuiteStartedEvent->getUuid();
     $testSuiteStartedEvent->setTitle(TEST_SUITE_TITLE);
     $testSuiteStartedEvent->setDescription(new Description(DescriptionType::HTML, DESCRIPTION));
     $testSuiteStartedEvent->setLabels([Label::feature(FEATURE_NAME), Label::story(STORY_NAME)]);
     Allure::lifecycle()->fire($testSuiteStartedEvent);
     $testCaseStartedEvent = new TestCaseStartedEvent($uuid, TEST_CASE_NAME);
     $testCaseStartedEvent->setDescription(new Description(DescriptionType::MARKDOWN, DESCRIPTION));
     $testCaseStartedEvent->setLabels([Label::feature(FEATURE_NAME), Label::story(STORY_NAME), Label::severity(SeverityLevel::MINOR)]);
     $testCaseStartedEvent->setTitle(TEST_CASE_TITLE);
     $testCaseStartedEvent->setParameters([new Parameter(PARAMETER_NAME, PARAMETER_VALUE, ParameterKind::SYSTEM_PROPERTY)]);
     Allure::lifecycle()->fire($testCaseStartedEvent);
     $testCaseFailureEvent = new TestCaseFailedEvent();
     $testCaseFailureEvent = $testCaseFailureEvent->withMessage(FAILURE_MESSAGE)->withException(new \Exception());
     Allure::lifecycle()->fire($testCaseFailureEvent);
     $stepStartedEvent = new StepStartedEvent(STEP_NAME);
     $stepStartedEvent = $stepStartedEvent->withTitle(STEP_TITLE);
     Allure::lifecycle()->fire($stepStartedEvent);
     Allure::lifecycle()->fire(new AddAttachmentEvent(STEP_ATTACHMENT_SOURCE, STEP_ATTACHMENT_TITLE, 'text/plain'));
     Allure::lifecycle()->fire(new StepFinishedEvent());
     Allure::lifecycle()->fire(new TestCaseFinishedEvent());
     Allure::lifecycle()->fire(new TestSuiteFinishedEvent($uuid));
     return $uuid;
 }
 public function updateTestCaseEvent(TestCaseStartedEvent $event)
 {
     if ($this->isTitlePresent()) {
         $event->setTitle($this->getTitle());
     }
     if ($this->isDescriptionPresent()) {
         $event->setDescription($this->getDescription());
     }
     if ($this->areLabelsPresent()) {
         $event->setLabels($this->getLabels());
     }
     if ($this->areParametersPresent()) {
         $event->setParameters($this->getParameters());
     }
 }