Skip to content

Commit

Permalink
Merge pull request #195 from magento-gl/3.10-RC
Browse files Browse the repository at this point in the history
3.10.0 RC
  • Loading branch information
jilu1 authored Jun 23, 2022
2 parents f0ebf21 + 400e84b commit 75ed840
Show file tree
Hide file tree
Showing 54 changed files with 1,598 additions and 334 deletions.
3 changes: 1 addition & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ This gives Adobe permission to redistribute your contributions as part of the pr
7. For large features or changes, [open an issue][issue] to discuss first.
This may prevent duplicate or unnecessary effort, and it may gain you some additional contributors.
8. To report a bug, [open an issue][issue], and follow [guidelines about bugfix issues][issue reporting].
9. All automated tests must pass successfully (all builds on [Travis CI] must be green).
9. All automated tests must pass successfully (all builds must be green).

## Fork a repository

Expand Down Expand Up @@ -179,4 +179,3 @@ Label| Description
[Magento Contributor Agreement]: http://www.magento.com/legaldocuments/mca
[MFTF repository]: https://github.com/magento/magento2-functional-testing-framework
[open new issue]: https://github.com/magento/magento2-functional-testing-framework/issues/new
[Travis CI]: https://travis-ci.com/magento/magento2-functional-testing-framework/pull_requests
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
- [ ] Pull request has a meaningful description of its purpose
- [ ] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/verification tests (if applicable)
- [ ] All automated tests passed successfully (all builds on Travis CI are green)
- [ ] All automated tests passed successfully (all builds are green)
- [ ] Changes to Framework doesn't have backward incompatible changes for tests or have related Pull Request with fixes to tests
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
Magento Functional Testing Framework Changelog
================================================

3.10.0
---------

### Enhancements
* Updated symfony/console and symfony/process constraints to support latest Symfony LTS (5.4v)
* Updated Symfony related code to support latest Symfony LTS (5.4v).
* Implement rapid times X clicks on UI element in MFTF
* Log MFTF test dependencies
* Unused entity static check
* Updated docs for new location of password
* Remove any remaining usages of Travis CI from MFTF Repo
* Unit tests for GenerateTestFailedCommandTest and RunTestFailedCommandTest

### Fixes
* Hashicorp Vault PHP lib being instantiated with wrong params

3.9.0
---------

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Magento Functional Testing Framework (MFTF)

[![Build Status](https://travis-ci.org/magento/magento2-functional-testing-framework.svg?branch=develop)](https://travis-ci.org/magento/magento2-functional-testing-framework) [![Coverage Status](https://coveralls.io/repos/github/magento/magento2-functional-testing-framework/badge.svg?branch=develop)](https://coveralls.io/github/magento/magento2-functional-testing-framework)

----

## Installation
Expand Down
9 changes: 5 additions & 4 deletions 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.9.0",
"version": "3.10.0",
"license": "AGPL-3.0",
"keywords": ["magento", "automation", "functional", "testing"],
"config": {
Expand All @@ -12,10 +12,10 @@
"php": ">7.3",
"ext-curl": "*",
"ext-dom": "*",
"ext-iconv": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-openssl": "*",
"ext-iconv": "*",
"allure-framework/allure-codeception": "^1.4",
"aws/aws-sdk-php": "^3.132",
"codeception/codeception": "^4.1",
Expand All @@ -25,17 +25,18 @@
"composer/composer": "^1.9||^2.0",
"csharpru/vault-php": "^4.2.1",
"guzzlehttp/guzzle": "^7.3.0",
"laminas/laminas-diactoros": "^2.8",
"monolog/monolog": "^2.3",
"mustache/mustache": "~2.5",
"nikic/php-parser": "^4.4",
"php-webdriver/webdriver": "^1.9.0",
"spomky-labs/otphp": "^10.0",
"symfony/console": "^4.4",
"symfony/console": "^4.4||^5.4",
"symfony/dotenv": "^5.3",
"symfony/finder": "^5.0",
"symfony/http-foundation": "^5.0",
"symfony/mime": "^5.0",
"symfony/process": "^4.4",
"symfony/process": "^4.4||^5.4",
"weew/helpers-array": "^1.3"
},
"require-dev": {
Expand Down
105 changes: 102 additions & 3 deletions 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 @@ -6,6 +6,8 @@
*/
-->

<!--@Ignore(Unused_Entity_Check)-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="contentSection">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class GenerateTestFailedCommandTest extends BaseGenerateCommandTest
{
public function testSingleTestNoSuite(): void
public function testSingleTestWithNoSuite(): void
{
$testFileReturn = [
"tests/functional/tests/MFTF/_generated/default/SingleTestNoSuiteTest.php:SingleTestNoSuiteTest"
Expand All @@ -38,4 +38,129 @@ public function testSingleTestNoSuite(): void
$configuration = $stub->getFailedTestList("", "");
$this->assertEquals($expectedConfiguration, $configuration);
}

public function testMultipleTestsWithSuites(): void
{
$testFileReturn = [
"tests/functional/tests/MFTF/_generated/SomeSpecificSuite/FirstTestSuiteTest.php:SingleTestSuiteTest",
"tests/functional/tests/MFTF/_generated/SomeSpecificSuite/SecondTestNoSuiteTest.php:SingleTestNoSuiteTest"
];
$expectedConfiguration =
'{"tests":null,"suites":{"SomeSpecificSuite":["SingleTestSuiteTest","SingleTestNoSuiteTest"]}}';

// Create a stub for the SomeClass class.
$stub = $this->getMockBuilder(GenerateTestFailedCommand::class)
->onlyMethods(["readFailedTestFile", "writeFailedTestToFile"])
->getMock();
// Configure the stub.
$stub
->method('readFailedTestFile')
->willReturn($testFileReturn);
$stub
->method('writeFailedTestToFile')
->willReturn(null);

// Run the real code
$configuration = $stub->getFailedTestList("", "");
$this->assertEquals($expectedConfiguration, $configuration);
}

public function testMultipleTestFailureWithNoSuites(): void
{
$testFileReturn = [
"tests/functional/tests/MFTF/_generated/default/SingleTestNoSuiteTest.php:SingleTestNoSuiteTest",
"tests/functional/tests/MFTF/_generated/default/FirstTestSuiteTest.php:SingleTestSuiteTest"
];
$expectedConfiguration = '{"tests":["SingleTestNoSuiteTest","SingleTestSuiteTest"],"suites":null}';

// Create a stub for the SomeClass class.
$stub = $this->getMockBuilder(GenerateTestFailedCommand::class)
->onlyMethods(["readFailedTestFile", "writeFailedTestToFile"])
->getMock();
// Configure the stub.
$stub
->method('readFailedTestFile')
->willReturn($testFileReturn);
$stub
->method('writeFailedTestToFile')
->willReturn(null);

// Run the real code
$configuration = $stub->getFailedTestList("", "");
$this->assertEquals($expectedConfiguration, $configuration);
}

public function testSingleSuiteAndNoTest(): void
{
$testFileReturn = [
"tests/functional/tests/MFTF/_generated/SomeSpecificSuite/",
];
$expectedConfiguration = '{"tests":null,"suites":{"SomeSpecificSuite":[[]]}}';

// Create a stub for the SomeClass class.
$stub = $this->getMockBuilder(GenerateTestFailedCommand::class)
->onlyMethods(["readFailedTestFile", "writeFailedTestToFile"])
->getMock();
// Configure the stub.
$stub
->method('readFailedTestFile')
->willReturn($testFileReturn);
$stub
->method('writeFailedTestToFile')
->willReturn(null);

// Run the real code
$configuration = $stub->getFailedTestList("", "");
$this->assertEquals($expectedConfiguration, $configuration);
}

public function testSingleSuiteWithTest(): void
{
$testFileReturn = [
"tests/functional/tests/MFTF/_generated/SomeSpecificSuite/FirstTestSuiteTest.php:SingleTestSuiteTest",
];
$expectedConfiguration = '{"tests":null,"suites":{"SomeSpecificSuite":["SingleTestSuiteTest"]}}';

// Create a stub for the SomeClass class.
$stub = $this->getMockBuilder(GenerateTestFailedCommand::class)
->onlyMethods(["readFailedTestFile", "writeFailedTestToFile"])
->getMock();
// Configure the stub.
$stub
->method('readFailedTestFile')
->willReturn($testFileReturn);
$stub
->method('writeFailedTestToFile')
->willReturn(null);

// Run the real code
$configuration = $stub->getFailedTestList("", "");
$this->assertEquals($expectedConfiguration, $configuration);
}

public function testMultipleSuitesWithNoTests(): void
{
$testFileReturn = [
"tests/functional/tests/MFTF/_generated/SomeSpecificSuite/",
"tests/functional/tests/MFTF/_generated/SomeSpecificSuite1/",

];
$expectedConfiguration = '{"tests":null,"suites":{"SomeSpecificSuite":[[]],"SomeSpecificSuite1":[[]]}}';

// Create a stub for the SomeClass class.
$stub = $this->getMockBuilder(GenerateTestFailedCommand::class)
->onlyMethods(["readFailedTestFile", "writeFailedTestToFile"])
->getMock();
// Configure the stub.
$stub
->method('readFailedTestFile')
->willReturn($testFileReturn);
$stub
->method('writeFailedTestToFile')
->willReturn(null);

// Run the real code
$configuration = $stub->getFailedTestList("", "");
$this->assertEquals($expectedConfiguration, $configuration);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class GenerateTestsCommandTest extends TestCase
* @param mixed $expected
* @return void
* @dataProvider configParallelOptions
* @throws \ReflectionException
*/
public function testParseConfigParallelOptions($time, $groups, $expected): void
{
Expand Down
Loading

0 comments on commit 75ed840

Please sign in to comment.