Skip to content

Commit c0c3380

Browse files
authored
Merge pull request #202 from magento-gl/3.10.1-RC
3.10.1 rc
2 parents 75ed840 + 9f8abc2 commit c0c3380

File tree

7 files changed

+101
-9
lines changed

7 files changed

+101
-9
lines changed

Diff for: CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Magento Functional Testing Framework Changelog
22
================================================
33

4+
3.10.1
5+
---------
6+
7+
### Fixes
8+
9+
* Fixed allure reports not generating for composer builds.
10+
* Fixed all MFTF scheduled build not generating allure report.
11+
412
3.10.0
513
---------
614

Diff for: composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "3.10.0",
5+
"version": "3.10.1",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {
@@ -22,7 +22,7 @@
2222
"codeception/module-asserts": "^1.1",
2323
"codeception/module-sequence": "^1.0",
2424
"codeception/module-webdriver": "^1.0",
25-
"composer/composer": "^1.9||^2.0",
25+
"composer/composer": "^1.9 || ^2.0, !=2.2.16",
2626
"csharpru/vault-php": "^4.2.1",
2727
"guzzlehttp/guzzle": "^7.3.0",
2828
"laminas/laminas-diactoros": "^2.8",

Diff for: composer.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
namespace Magento\AcceptanceTest\_default\Backend;
3+
4+
use Magento\FunctionalTestingFramework\AcceptanceTester;
5+
use \Codeception\Util\Locator;
6+
use Yandex\Allure\Adapter\Annotation\Features;
7+
use Yandex\Allure\Adapter\Annotation\Stories;
8+
use Yandex\Allure\Adapter\Annotation\Title;
9+
use Yandex\Allure\Adapter\Annotation\Description;
10+
use Yandex\Allure\Adapter\Annotation\Parameter;
11+
use Yandex\Allure\Adapter\Annotation\Severity;
12+
use Yandex\Allure\Adapter\Model\SeverityLevel;
13+
use Yandex\Allure\Adapter\Annotation\TestCaseId;
14+
15+
/**
16+
* @Title("[NO TESTCASEID]: skippedTest")
17+
* @Description("<h3>Test files</h3>verification/TestModule/Test/SkippedTest/SkippedTestWithIssueMustGetSkippedWithoutErrorExitCode.xml<br>")
18+
*/
19+
class SkippedTestWithIssueMustGetSkippedWithoutErrorExitCodeCest
20+
{
21+
/**
22+
* @var bool
23+
*/
24+
private $isSuccess = false;
25+
26+
/**
27+
* @Stories({"skipped"})
28+
* @Severity(level = SeverityLevel::MINOR)
29+
* @Features({"TestModule"})
30+
* @param AcceptanceTester $I
31+
* @return void
32+
* @throws \Exception
33+
*/
34+
public function SkippedTestWithIssueMustGetSkippedWithoutErrorExitCode(AcceptanceTester $I, \Codeception\Scenario $scenario)
35+
{
36+
unlink(__FILE__);
37+
$scenario->skip("This test is skipped due to the following issues:\nSkippedValue");
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="SkippedTestWithIssueMustGetSkippedWithoutErrorExitCode">
11+
<annotations>
12+
<stories value="skipped"/>
13+
<title value="skippedTest"/>
14+
<description value=""/>
15+
<severity value="AVERAGE"/>
16+
<skip>
17+
<issueId value="SkippedValue"/>
18+
</skip>
19+
</annotations>
20+
<before>
21+
<createData entity="ReplacementPerson" stepKey="createPersonParam"/>
22+
<actionGroup ref="FunctionalActionGroup" stepKey="beforeGroup"/>
23+
</before>
24+
<createData entity="DefaultPerson" stepKey="createPerson"/>
25+
<actionGroup ref="FunctionalActionGroupWithData" stepKey="actionGroupWithPersistedData1">
26+
<argument name="person" value="$createPerson$"/>
27+
</actionGroup>
28+
<after>
29+
<actionGroup ref="FunctionalActionGroup" stepKey="afterGroup" after ="notFound"/>
30+
</after>
31+
</test>
32+
</tests>

Diff for: dev/tests/verification/Tests/SkippedGenerationTest.php

+11
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,15 @@ public function testMultipleSkippedIssuesGeneration()
4141
{
4242
$this->generateAndCompareTest('SkippedTestTwoIssues');
4343
}
44+
45+
/**
46+
* Tests skipped test doesnt fail to generate when there is issue in test
47+
*
48+
* @throws \Exception
49+
* @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
50+
*/
51+
public function testSkippedTestMustNotFailToGenerateWithErrorWhenThereIsIssueWithAnyOfTheStepsAsTheTestIsSkipped()
52+
{
53+
$this->generateAndCompareTest('SkippedTestWithIssueMustGetSkippedWithoutErrorExitCode');
54+
}
4455
}

Diff for: src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -564,11 +564,13 @@ public function requiredCredentials($testObject)
564564
private function generateClassAnnotations($annotationType, $annotationName, $testObject)
565565
{
566566
$annotationToAppend = null;
567-
$requiredCredentialsMessage = $this->requiredCredentials($testObject);
568-
$credMsg = "\n\n"."This test uses the following credentials:"."\n";
569-
if (!empty($requiredCredentialsMessage) && !empty($annotationName['main'])) {
570-
$annotationName = ['main'=>$annotationName['main'].', '.$credMsg.''.$requiredCredentialsMessage,
571-
'test_files'=> "\n".$annotationName['test_files'], 'deprecated'=>$annotationName['deprecated']];
567+
if (!$testObject->isSkipped() && !empty($annotationName['main'])) {
568+
$requiredCredentialsMessage = $this->requiredCredentials($testObject);
569+
$credMsg = "\n\n"."This test uses the following credentials:"."\n";
570+
$annotationName = (!empty($requiredCredentialsMessage)) ?
571+
['main'=>$annotationName['main'].', '.$credMsg.''.$requiredCredentialsMessage,
572+
'test_files'=> "\n".$annotationName['test_files'], 'deprecated'=>$annotationName['deprecated']]
573+
: $annotationName;
572574
}
573575
switch ($annotationType) {
574576
case "title":

0 commit comments

Comments
 (0)