public function beforeStep(StepEvent $e) { if (!$this->steps or !$e->getTest() instanceof ScenarioDriven) { return; } $metaStep = $e->getStep()->getMetaStep(); if ($metaStep and $this->metaStep != $metaStep) { $this->message(' ' . $metaStep->getPrefix())->style('bold')->append($metaStep->__toString())->writeln(); } $this->metaStep = $metaStep; $this->printStep($e->getStep()); }
public function beforeStep(StepEvent $e) { if (!$this->steps or !$e->getTest() instanceof ScenarioDriven) { return; } $this->output->writeln("* " . $e->getStep()); }
public function beforeStep(StepEvent $e) { if (!$this->steps or !$e->getTest() instanceof ScenarioDriven) { return; } $metaStep = $e->getStep()->getMetaStep(); if ($metaStep and $this->metaStep != $metaStep) { $this->output->writeln("* {$metaStep}"); } $this->metaStep = $metaStep; $msg = $this->message($e->getStep()->__toString()); $this->metaStep ? $msg->prepend(' ')->style('comment') : $msg->prepend('* '); $msg->writeln(); }
public function stepFail(\Codeception\Event\StepEvent $e) { $name = get_class($e->getTest()); teamcity_console_logger(MessageTemplate::TestFailed($name, 'Step Failed')); }
public function afterStep(StepEvent $e) { foreach (SuiteManager::$modules as $module) { $module->_afterStep($e->getStep(), $e->getTest()); } }
public function afterStep(StepEvent $e) { foreach ($this->modules as $module) { $module->_afterStep($e->getStep(), $e->getTest()); } }
public function beforeStep(StepEvent $e) { if (!$this->steps or !$e->getTest() instanceof ScenarioDriven) { return; } $metaStep = $e->getStep()->getMetaStep(); if ($metaStep and $this->metaStep != $metaStep) { $this->message(' ' . $metaStep->getPrefix())->style('bold')->append($metaStep->__toString())->writeln(); } $this->metaStep = $metaStep; $text = $e->getStep()->__toString(); if ($e->getStep() instanceof Comment and !$text) { return; // don't print empty comments } $msg = $this->message(' '); $msg->append($e->getStep()->getPrefix()); if (!$metaStep) { $msg->style('bold'); } $msg->append($text); if ($metaStep) { $msg->style('info')->prepend(' '); } $msg->writeln(); }
/** * @param StepEvent $stepEvent */ public function stepAfter(StepEvent $stepEvent) { if ($stepEvent->getStep()->hasFailed() && $stepEvent->getStep()->getAction('seeNoDifferenceToReferenceImage')) { /** @var WebDriver $stepWebDriver */ $stepWebDriver = $stepEvent->getTest()->getScenario()->current('modules')['WebDriver']; $identifier = $stepEvent->getStep()->getArguments()[0]; $windowSize = $this->fileSystemUtil->getCurrentWindowSizeString($stepWebDriver); $this->failedIdentifiers[] = array('identifier' => $identifier, 'windowSize' => $windowSize, 'failImage' => base64_encode(file_get_contents($this->fileSystemUtil->getFailImagePath($identifier, $windowSize, 'fail'))), 'diffImage' => base64_encode(file_get_contents($this->fileSystemUtil->getFailImagePath($identifier, $windowSize, 'diff'))), 'referenceImage' => base64_encode(file_get_contents($this->fileSystemUtil->getReferenceImagePath($identifier, $windowSize)))); } }