Skip to content

Commit

Permalink
Merge pull request #138 from magento-commerce/develop
Browse files Browse the repository at this point in the history
Preps for MFTF 3.7.2 release
  • Loading branch information
okolesnyk authored Dec 7, 2021
2 parents e0d2190 + 929296d commit 4488b62
Show file tree
Hide file tree
Showing 78 changed files with 1,097 additions and 140 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Magento Functional Testing Framework Changelog
================================================
3.7.2
---------

### Bug fix:
* Failed tests weren't logged correctly to `failed` file which caused a failure during run:failed command execution


3.7.1
---------

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": "3.7.1",
"version": "3.7.2",
"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 @@ -17,6 +17,11 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupContainsStepKeyInArgTextCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
Expand All @@ -28,6 +33,17 @@ class ActionGroupContainsStepKeyInArgTextCest
$I->comment("Exiting Action Group [actionGroup] actionGroupContainsStepKeyInArgValue");
}

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _after(AcceptanceTester $I)
{
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
Expand All @@ -44,7 +60,7 @@ class ActionGroupContainsStepKeyInArgTextCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupMergedViaInsertAfterCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _after(AcceptanceTester $I)
{
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
Expand All @@ -38,7 +54,7 @@ class ActionGroupMergedViaInsertAfterCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupMergedViaInsertBeforeCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _after(AcceptanceTester $I)
{
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
Expand All @@ -38,7 +54,7 @@ class ActionGroupMergedViaInsertBeforeCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
12 changes: 10 additions & 2 deletions dev/tests/verification/Resources/ActionGroupReturningValueTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupReturningValueTestCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
Expand All @@ -41,6 +46,9 @@ class ActionGroupReturningValueTestCest
$I->fillField("#foo", "myData1"); // stepKey: fillField1AfterGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2AfterGroup
$I->comment("Exiting Action Group [afterGroup] FunctionalActionGroup");
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
Expand Down Expand Up @@ -75,7 +83,7 @@ class ActionGroupReturningValueTestCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
20 changes: 18 additions & 2 deletions dev/tests/verification/Resources/ActionGroupToExtend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupToExtendCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _after(AcceptanceTester $I)
{
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
Expand All @@ -34,7 +50,7 @@ class ActionGroupToExtendCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
20 changes: 18 additions & 2 deletions dev/tests/verification/Resources/ActionGroupUsingCreateData.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupUsingCreateDataCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
Expand All @@ -29,6 +34,17 @@ class ActionGroupUsingCreateDataCest
$I->comment("Exiting Action Group [Key1] actionGroupWithCreateData");
}

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _after(AcceptanceTester $I)
{
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
Expand All @@ -42,7 +58,7 @@ class ActionGroupUsingCreateDataCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupUsingNestedArgumentCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _after(AcceptanceTester $I)
{
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
Expand All @@ -34,7 +50,7 @@ class ActionGroupUsingNestedArgumentCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupWithDataOverrideTestCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
Expand All @@ -41,6 +46,9 @@ class ActionGroupWithDataOverrideTestCest
$I->fillField("#foo", "myData1"); // stepKey: fillField1AfterGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2AfterGroup
$I->comment("Exiting Action Group [afterGroup] FunctionalActionGroup");
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
Expand Down Expand Up @@ -76,7 +84,7 @@ class ActionGroupWithDataOverrideTestCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
12 changes: 10 additions & 2 deletions dev/tests/verification/Resources/ActionGroupWithDataTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupWithDataTestCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
Expand All @@ -41,6 +46,9 @@ class ActionGroupWithDataTestCest
$I->fillField("#foo", "myData1"); // stepKey: fillField1AfterGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2AfterGroup
$I->comment("Exiting Action Group [afterGroup] FunctionalActionGroup");
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
Expand Down Expand Up @@ -76,7 +84,7 @@ class ActionGroupWithDataTestCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
*/
class ActionGroupWithDefaultArgumentAndStringSelectorParamCest
{
/**
* @var bool
*/
private $isSuccess = false;

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _after(AcceptanceTester $I)
{
if ($this->isSuccess) {
unlink(__FILE__);
}
}

/**
* @Severity(level = SeverityLevel::BLOCKER)
* @Features({"TestModule"})
Expand All @@ -35,7 +51,7 @@ class ActionGroupWithDefaultArgumentAndStringSelectorParamCest

public function _passed(AcceptanceTester $I)
{
// Deleting itself so that we can rerun only failed tests.
unlink(__FILE__);
// Test passed successfully.
$this->isSuccess = true;
}
}
Loading

0 comments on commit 4488b62

Please sign in to comment.