Skip to content

Commit

Permalink
Merge pull request #259 from magento-gl/4.0.1-RC
Browse files Browse the repository at this point in the history
MFTF 4.0.0 Release checklist
  • Loading branch information
jilu1 authored Jan 5, 2023
2 parents 3403324 + a506a27 commit daa28ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Magento Functional Testing Framework Changelog
================================================

4.0.1
---------
### Fixes

* Fixed HTML files and images not attached to allure report issue

4.0.0
---------
### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/magento2-functional-testing-framework",
"description": "Magento2 Functional Testing Framework",
"type": "library",
"version": "4.0.0",
"version": "4.0.1",
"license": "AGPL-3.0",
"keywords": ["magento", "automation", "functional", "testing"],
"config": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
use Yandex\Allure\Adapter\Support\AttachmentSupport;
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler;
use Yandex\Allure\Adapter\Allure as YandexAllure;
use Yandex\Allure\Adapter\Event\AddAttachmentEvent;

/**
* MagentoWebDriver module provides common Magento web actions through Selenium WebDriver.
Expand Down Expand Up @@ -910,10 +912,10 @@ public function _failed(TestInterface $test, $fail)
if ($this->current_test === null) {
throw new \RuntimeException("Suite condition failure: \n" . $fail->getMessage());
}

$this->addAttachment($this->pngReport, $test->getMetadata()->getName() . '.png', 'image/png');
$this->addAttachment($this->htmlReport, $test->getMetadata()->getName() . '.html', 'text/html');

YandexAllure::lifecycle()
->fire(new AddAttachmentEvent($this->pngReport, $test->getMetadata()->getName() . '.png', 'image/png'));
YandexAllure::lifecycle()
->fire(new AddAttachmentEvent($this->htmlReport, $test->getMetadata()->getName() . '.html', 'text/html'));
$this->debug("Failure due to : {$fail->getMessage()}");
$this->debug("Screenshot saved to {$this->pngReport}");
$this->debug("Html saved to {$this->htmlReport}");
Expand Down

0 comments on commit daa28ec

Please sign in to comment.