Skip to content

MQE-1234 & MQE-659: StepKey in test result output and native XML comments #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c5b651b
MQE-659: [ALLURE] Include the test "stepKey" in the MFTF Allure Report
okolesnyk Jun 5, 2019
eb87ccf
MQE-659: [ALLURE] Include the test "stepKey" in the MFTF Allure Report
okolesnyk Jun 5, 2019
8aee6af
MQE-659: [ALLURE] Include the test "stepKey" in the MFTF Allure Report
okolesnyk Jun 6, 2019
17b8b9d
MQE-659: [ALLURE] Include the test "stepKey" in the MFTF Allure Report
okolesnyk Jun 6, 2019
9c7bf5f
MQE-1234: Allow XML Parser to read XML comment into comment action
okolesnyk Jun 7, 2019
4074560
MQE-659: [ALLURE] Include the test "stepKey" in the MFTF Allure Report
okolesnyk Jun 7, 2019
5a52151
Merge branch 'MQE-659-alex-edition' of github.com:magento/magento2-fu…
okolesnyk Jun 7, 2019
9e19969
MQE-659: [ALLURE] Include the test "stepKey" in the MFTF Allure Report
okolesnyk Jun 7, 2019
45ceeda
Merge branch 'MQE-659-alex-edition' of github.com:magento/magento2-fu…
okolesnyk Jun 7, 2019
b8f7667
MQE-1234: Allow XML Parser to read XML comment into comment action
okolesnyk Jun 7, 2019
839c742
Merge branch 'develop' into MQE-1234-alex-edition
okolesnyk Jun 7, 2019
9e44d05
MQE-1234: Allow XML Parser to read XML comment into comment action
okolesnyk Jun 10, 2019
20ae1d7
Merge branch 'MQE-1234-alex-edition' of github.com:magento/magento2-f…
okolesnyk Jun 10, 2019
f6eb3ab
MQE-1234: Allow XML Parser to read XML comment into comment action
KevinBKozan Jun 11, 2019
daf51e0
MQE-1234: Allow XML Parser to read XML comment into comment action
okolesnyk Jun 12, 2019
c116bdb
Merge branch 'develop' into MQE-1234-alex-edition
KevinBKozan Jun 13, 2019
ced1533
Merge branch 'develop' into MQE-1234-alex-edition
KevinBKozan Jun 14, 2019
bafc0c9
Merge branch 'develop' into MQE-1234-alex-edition
KevinBKozan Jun 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
<page name="MFTFDocPage" url="guides/v2.2/magento-functional-testing-framework/release-2/introduction.html" area="storefront" module="MFTF_DevDocs">
<page name="MFTFDocPage" url="mftf/docs/introduction.html" area="storefront" module="MFTF_DevDocs">
<section name="contentSection" />
</page>
</pages>
3 changes: 3 additions & 0 deletions dev/tests/functional/tests/MFTF/DevDocs/Test/DevDocsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
<test name="DevDocsTest">
<annotations>
<!-- Comment in Annotations for DevDocs Test are not affecting test generation -->
<features value="DevDocs available"/>
<stories value="MFTF DevDocs available"/>
<title value="Magento Functional Testing Framework Documentation is available."/>
Expand All @@ -18,7 +19,9 @@
<group value="mftf"/>
</annotations>

<!-- Open MFTF DevDocs Page -->
<amOnPage stepKey="openMFTFDevDocPage" url="{{MFTFDocPage.url}}" />
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="asdf" />
<see stepKey="verifyPageIntroText" selector="{{contentSection.pageIntro}}" userInput="Introduction to the Magento Functional Testing Framework" />
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class ActionGroupContainsStepKeyInArgTextCest
*/
public function _before(AcceptanceTester $I)
{
$I->comment("Entering Action Group actionGroupContainsStepKeyInArgValue (actionGroup)");
$I->see("arg1", ".selector");
$I->comment("Exiting Action Group actionGroupContainsStepKeyInArgValue (actionGroup)");
$I->comment("Entering Action Group [actionGroup] actionGroupContainsStepKeyInArgValue");
$I->see("arg1", ".selector"); // stepKey: arg1ActionGroup
$I->comment("Exiting Action Group [actionGroup] actionGroupContainsStepKeyInArgValue");
}

/**
Expand All @@ -38,8 +38,8 @@ class ActionGroupContainsStepKeyInArgTextCest
*/
public function ActionGroupContainsStepKeyInArgText(AcceptanceTester $I)
{
$I->comment("Entering Action Group actionGroupContainsStepKeyInArgValue (actionGroup)");
$I->see("arg1", ".selector");
$I->comment("Exiting Action Group actionGroupContainsStepKeyInArgValue (actionGroup)");
$I->comment("Entering Action Group [actionGroup] actionGroupContainsStepKeyInArgValue");
$I->see("arg1", ".selector"); // stepKey: arg1ActionGroup
$I->comment("Exiting Action Group [actionGroup] actionGroupContainsStepKeyInArgValue");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class ActionGroupMergedViaInsertAfterCest
*/
public function ActionGroupMergedViaInsertAfter(AcceptanceTester $I)
{
$I->comment("Entering Action Group FunctionalActionGroupForMassMergeAfter (keyone)");
$I->fillField("#foo", "foo");
$I->fillField("#bar", "bar");
$I->click("#foo2");
$I->click("#bar2");
$I->click("#baz2");
$I->fillField("#baz", "baz");
$I->comment("Exiting Action Group FunctionalActionGroupForMassMergeAfter (keyone)");
$I->comment("Entering Action Group [keyone] FunctionalActionGroupForMassMergeAfter");
$I->fillField("#foo", "foo"); // stepKey: fillField1Keyone
$I->fillField("#bar", "bar"); // stepKey: fillField2Keyone
$I->click("#foo2"); // stepKey: mergeAfterBarKeyone
$I->click("#bar2"); // stepKey: mergeAfterFoo2Keyone
$I->click("#baz2"); // stepKey: mergeAfterBar2Keyone
$I->fillField("#baz", "baz"); // stepKey: fillField3Keyone
$I->comment("Exiting Action Group [keyone] FunctionalActionGroupForMassMergeAfter");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class ActionGroupMergedViaInsertBeforeCest
*/
public function ActionGroupMergedViaInsertBefore(AcceptanceTester $I)
{
$I->comment("Entering Action Group FunctionalActionGroupForMassMergeBefore (keyone)");
$I->fillField("#foo", "foo");
$I->click("#foo2");
$I->click("#bar2");
$I->click("#baz2");
$I->fillField("#bar", "bar");
$I->fillField("#baz", "baz");
$I->comment("Exiting Action Group FunctionalActionGroupForMassMergeBefore (keyone)");
$I->comment("Entering Action Group [keyone] FunctionalActionGroupForMassMergeBefore");
$I->fillField("#foo", "foo"); // stepKey: fillField1Keyone
$I->click("#foo2"); // stepKey: mergeBeforeBarKeyone
$I->click("#bar2"); // stepKey: mergeAfterFoo2Keyone
$I->click("#baz2"); // stepKey: mergeAfterBar2Keyone
$I->fillField("#bar", "bar"); // stepKey: fillField2Keyone
$I->fillField("#baz", "baz"); // stepKey: fillField3Keyone
$I->comment("Exiting Action Group [keyone] FunctionalActionGroupForMassMergeBefore");
}
}
8 changes: 4 additions & 4 deletions dev/tests/verification/Resources/ActionGroupToExtend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class ActionGroupToExtendCest
*/
public function ActionGroupToExtend(AcceptanceTester $I)
{
$I->comment("Entering Action Group ActionGroupToExtend (actionGroup)");
$grabProductsActionGroup = $I->grabMultiple("selector");
$I->assertCount(99, $grabProductsActionGroup);
$I->comment("Exiting Action Group ActionGroupToExtend (actionGroup)");
$I->comment("Entering Action Group [actionGroup] ActionGroupToExtend");
$grabProductsActionGroup = $I->grabMultiple("selector"); // stepKey: grabProductsActionGroup
$I->assertCount(99, $grabProductsActionGroup); // stepKey: assertCountActionGroup
$I->comment("Exiting Action Group [actionGroup] ActionGroupToExtend");
}
}
10 changes: 6 additions & 4 deletions dev/tests/verification/Resources/ActionGroupUsingCreateData.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,26 @@ class ActionGroupUsingCreateDataCest
*/
public function _before(AcceptanceTester $I)
{
$I->comment("Entering Action Group actionGroupWithCreateData (Key1)");
$I->amGoingTo("create entity that has the stepKey: createCategoryKey1");
$I->comment("Entering Action Group [Key1] actionGroupWithCreateData");
$I->comment("[createCategoryKey1] create 'ApiCategory' entity");
PersistedObjectHandler::getInstance()->createEntity(
"createCategoryKey1",
"hook",
"ApiCategory",
[],
null
);
$I->amGoingTo("create entity that has the stepKey: createConfigProductKey1");

$I->comment("[createConfigProductKey1] create 'ApiConfigurableProduct' entity");
PersistedObjectHandler::getInstance()->createEntity(
"createConfigProductKey1",
"hook",
"ApiConfigurableProduct",
["createCategoryKey1"],
null
);
$I->comment("Exiting Action Group actionGroupWithCreateData (Key1)");

$I->comment("Exiting Action Group [Key1] actionGroupWithCreateData");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class ActionGroupUsingNestedArgumentCest
*/
public function ActionGroupUsingNestedArgument(AcceptanceTester $I)
{
$I->comment("Entering Action Group ActionGroupToExtend (actionGroup)");
$grabProductsActionGroup = $I->grabMultiple("selector");
$I->assertCount(99, $grabProductsActionGroup);
$I->comment("Exiting Action Group ActionGroupToExtend (actionGroup)");
$I->comment("Entering Action Group [actionGroup] ActionGroupToExtend");
$grabProductsActionGroup = $I->grabMultiple("selector"); // stepKey: grabProductsActionGroup
$I->assertCount(99, $grabProductsActionGroup); // stepKey: assertCountActionGroup
$I->comment("Exiting Action Group [actionGroup] ActionGroupToExtend");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ class ActionGroupWithDataOverrideTestCest
*/
public function _before(AcceptanceTester $I)
{
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
$I->comment("[createPersonParam] create 'ReplacementPerson' entity");
PersistedObjectHandler::getInstance()->createEntity(
"createPersonParam",
"hook",
"ReplacementPerson",
[],
null
);
$I->comment("Entering Action Group FunctionalActionGroup (beforeGroup)");
$I->fillField("#foo", "myData1");
$I->fillField("#bar", "myData2");
$I->comment("Exiting Action Group FunctionalActionGroup (beforeGroup)");

$I->comment("Entering Action Group [beforeGroup] FunctionalActionGroup");
$I->fillField("#foo", "myData1"); // stepKey: fillField1BeforeGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2BeforeGroup
$I->comment("Exiting Action Group [beforeGroup] FunctionalActionGroup");
}

/**
Expand All @@ -45,10 +46,10 @@ class ActionGroupWithDataOverrideTestCest
*/
public function _after(AcceptanceTester $I)
{
$I->comment("Entering Action Group FunctionalActionGroup (afterGroup)");
$I->fillField("#foo", "myData1");
$I->fillField("#bar", "myData2");
$I->comment("Exiting Action Group FunctionalActionGroup (afterGroup)");
$I->comment("Entering Action Group [afterGroup] FunctionalActionGroup");
$I->fillField("#foo", "myData1"); // stepKey: fillField1AfterGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2AfterGroup
$I->comment("Exiting Action Group [afterGroup] FunctionalActionGroup");
}

/**
Expand All @@ -57,7 +58,7 @@ class ActionGroupWithDataOverrideTestCest
*/
public function _failed(AcceptanceTester $I)
{
$I->saveScreenshot();
$I->saveScreenshot(); // stepKey: saveScreenshot
}

/**
Expand All @@ -71,14 +72,14 @@ class ActionGroupWithDataOverrideTestCest
*/
public function ActionGroupWithDataOverrideTest(AcceptanceTester $I)
{
$I->amOnPage("/someUrl");
$I->comment("Entering Action Group FunctionalActionGroupWithData (actionGroupWithDataOverride1)");
$I->amOnPage("/John/Doe.html");
$I->fillField("#foo", "John");
$I->fillField("#bar", "Doe");
$I->searchAndMultiSelectOption("#foo", ["John", "Doe"]);
$I->see("#element .John");
$I->comment("Exiting Action Group FunctionalActionGroupWithData (actionGroupWithDataOverride1)");
$I->click("loginButton");
$I->amOnPage("/someUrl"); // stepKey: step1
$I->comment("Entering Action Group [actionGroupWithDataOverride1] FunctionalActionGroupWithData");
$I->amOnPage("/John/Doe.html"); // stepKey: amOnPage1ActionGroupWithDataOverride1
$I->fillField("#foo", "John"); // stepKey: fillField1ActionGroupWithDataOverride1
$I->fillField("#bar", "Doe"); // stepKey: fillField2ActionGroupWithDataOverride1
$I->searchAndMultiSelectOption("#foo", ["John", "Doe"]); // stepKey: multi1ActionGroupWithDataOverride1
$I->see("#element .John"); // stepKey: see1ActionGroupWithDataOverride1
$I->comment("Exiting Action Group [actionGroupWithDataOverride1] FunctionalActionGroupWithData");
$I->click("loginButton"); // stepKey: step6
}
}
39 changes: 20 additions & 19 deletions dev/tests/verification/Resources/ActionGroupWithDataTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ class ActionGroupWithDataTestCest
*/
public function _before(AcceptanceTester $I)
{
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
$I->comment("[createPersonParam] create 'ReplacementPerson' entity");
PersistedObjectHandler::getInstance()->createEntity(
"createPersonParam",
"hook",
"ReplacementPerson",
[],
null
);
$I->comment("Entering Action Group FunctionalActionGroup (beforeGroup)");
$I->fillField("#foo", "myData1");
$I->fillField("#bar", "myData2");
$I->comment("Exiting Action Group FunctionalActionGroup (beforeGroup)");

$I->comment("Entering Action Group [beforeGroup] FunctionalActionGroup");
$I->fillField("#foo", "myData1"); // stepKey: fillField1BeforeGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2BeforeGroup
$I->comment("Exiting Action Group [beforeGroup] FunctionalActionGroup");
}

/**
Expand All @@ -45,10 +46,10 @@ class ActionGroupWithDataTestCest
*/
public function _after(AcceptanceTester $I)
{
$I->comment("Entering Action Group FunctionalActionGroup (afterGroup)");
$I->fillField("#foo", "myData1");
$I->fillField("#bar", "myData2");
$I->comment("Exiting Action Group FunctionalActionGroup (afterGroup)");
$I->comment("Entering Action Group [afterGroup] FunctionalActionGroup");
$I->fillField("#foo", "myData1"); // stepKey: fillField1AfterGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2AfterGroup
$I->comment("Exiting Action Group [afterGroup] FunctionalActionGroup");
}

/**
Expand All @@ -57,7 +58,7 @@ class ActionGroupWithDataTestCest
*/
public function _failed(AcceptanceTester $I)
{
$I->saveScreenshot();
$I->saveScreenshot(); // stepKey: saveScreenshot
}

/**
Expand All @@ -71,14 +72,14 @@ class ActionGroupWithDataTestCest
*/
public function ActionGroupWithDataTest(AcceptanceTester $I)
{
$I->amOnPage("/someUrl");
$I->comment("Entering Action Group FunctionalActionGroupWithData (actionGroupWithData1)");
$I->amOnPage("/Jane/Dane.html");
$I->fillField("#foo", "Jane");
$I->fillField("#bar", "Dane");
$I->searchAndMultiSelectOption("#foo", ["Jane", "Dane"]);
$I->see("#element .Jane");
$I->comment("Exiting Action Group FunctionalActionGroupWithData (actionGroupWithData1)");
$I->click("loginButton");
$I->amOnPage("/someUrl"); // stepKey: step1
$I->comment("Entering Action Group [actionGroupWithData1] FunctionalActionGroupWithData");
$I->amOnPage("/Jane/Dane.html"); // stepKey: amOnPage1ActionGroupWithData1
$I->fillField("#foo", "Jane"); // stepKey: fillField1ActionGroupWithData1
$I->fillField("#bar", "Dane"); // stepKey: fillField2ActionGroupWithData1
$I->searchAndMultiSelectOption("#foo", ["Jane", "Dane"]); // stepKey: multi1ActionGroupWithData1
$I->see("#element .Jane"); // stepKey: see1ActionGroupWithData1
$I->comment("Exiting Action Group [actionGroupWithData1] FunctionalActionGroupWithData");
$I->click("loginButton"); // stepKey: step6
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ class ActionGroupWithDefaultArgumentAndStringSelectorParamCest
*/
public function ActionGroupWithDefaultArgumentAndStringSelectorParam(AcceptanceTester $I)
{
$I->comment("Entering Action Group actionGroupWithDefaultArgumentAndStringSelectorParam (actionGroup)");
$I->see("John", "#element .test1");
$I->comment("Exiting Action Group actionGroupWithDefaultArgumentAndStringSelectorParam (actionGroup)");
$I->comment("Entering Action Group [actionGroup] actionGroupWithDefaultArgumentAndStringSelectorParam");
$I->comment("< > & \$abc \" abc ' <click stepKey=\"click\" userInput=\"\$\$createDataHook.firstname\$\$\" selector=\"#id\">/");
$I->see("John", "#element .test1"); // stepKey: seeFirstNameActionGroup
$I->comment("Exiting Action Group [actionGroup] actionGroupWithDefaultArgumentAndStringSelectorParam");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class ActionGroupWithMultipleParameterSelectorsFromDefaultArgumentCest
*/
public function ActionGroupWithMultipleParameterSelectorsFromDefaultArgument(AcceptanceTester $I)
{
$I->comment("Entering Action Group actionGroupWithMultipleParameterSelectorsFromArgument (actionGroup)");
$I->see("Doe", "#John-Doe .test");
$I->comment("Exiting Action Group actionGroupWithMultipleParameterSelectorsFromArgument (actionGroup)");
$I->comment("Entering Action Group [actionGroup] actionGroupWithMultipleParameterSelectorsFromArgument");
$I->see("Doe", "#John-Doe .test"); // stepKey: seeLastNameActionGroup
$I->comment("Exiting Action Group [actionGroup] actionGroupWithMultipleParameterSelectorsFromArgument");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class ActionGroupWithNoArgumentsCest
*/
public function ActionGroupWithNoArguments(AcceptanceTester $I)
{
$I->comment("Entering Action Group actionGroupWithoutArguments (actionGroup)");
$I->wait(1);
$I->comment("Exiting Action Group actionGroupWithoutArguments (actionGroup)");
$I->comment("Entering Action Group [actionGroup] actionGroupWithoutArguments");
$I->wait(1); // stepKey: waitForNothingActionGroup
$I->comment("Exiting Action Group [actionGroup] actionGroupWithoutArguments");
}
}
Loading