-
Notifications
You must be signed in to change notification settings - Fork 132
Deliver changes from Contribution Day #63
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
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
7a89255
Make possible to create and run MFTF test in framework to verify Fram…
okolesnyk 45962be
Make possible to create and run MFTF test in framework to verify Fram…
okolesnyk c96c88a
Make possible to create and run MFTF test in framework to verify Fram…
okolesnyk 08c089a
Make possible to create and run MFTF test in framework to verify Fram…
okolesnyk 778a626
magento/magento2-functional-testing-framework#56: Add "block" type to…
sdzhepa 9763062
Added exception throwing on test generation if project is not built #61
vasylmalanka fcb3090
magento/magento2-functional-testing-framework#58: Allow browser type …
StasKozar 8c8a771
magento/magento2-functional-testing-framework#57: Debug flag exists i…
StasKozar 44ced3f
magento/magento2-functional-testing-framework#58: Allow browser type …
StasKozar 91ef188
magento/magento2-functional-testing-framework#57: Debug flag exists i…
StasKozar 5f3438c
magento/magento2-functional-testing-framework#57: Debug flag exists i…
StasKozar af460ab
magento/magento2-functional-testing-framework#60: Build interactive c…
lenaorobei bdd366d
Make possible to create and run MFTF test in framework
okolesnyk e05e5e7
Merge branch 'develop' of github.com:magento/magento2-functional-test…
okolesnyk 467fe43
Merge branch 'CD-develop' into mftf#56
okolesnyk ff2bce5
Merge branch 'CD-develop' into issue60
okolesnyk c06af5f
Merge branch 'CD-develop' into MFTF-58
okolesnyk 8e7d4d8
Merge pull request #64 from sdzhepa/mftf#56
okolesnyk 8703e00
Merge pull request #69 from lenaorobei/issue60
okolesnyk 04fec9e
Merge pull request #66 from vasylmalanka/issue-61
okolesnyk e01f07e
Merge pull request #67 from StasKozar/MFTF-58
okolesnyk 12ca5e4
MQE-904: Deliver changes from Magento Contribution Day
okolesnyk d1a7feb
Merge branch 'CD-develop' of github.com:magento/magento2-functional-t…
okolesnyk fd0e889
Merge pull request #70 from StasKozar/MFTF-57
okolesnyk 9fff8f2
Merge branch 'develop' into CD-develop
okolesnyk 3ef39ba
Merge branch 'develop' of github.com:magento/magento2-functional-test…
okolesnyk a34cbd1
MQE-904: Deliver changes from Contribution day
okolesnyk 2109b0d
MQE-904: Deliver changes from Contribution day
okolesnyk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#Copyright © Magento, Inc. All rights reserved. | ||
#See COPYING.txt for license details. | ||
|
||
#*** Set the base URL for your Magento instance ***# | ||
MAGENTO_BASE_URL=http://devdocs.magento.com/ | ||
|
||
#*** Set the Admin Username and Password for your Magento instance ***# | ||
MAGENTO_BACKEND_NAME= | ||
MAGENTO_ADMIN_USERNAME= | ||
MAGENTO_ADMIN_PASSWORD= | ||
|
||
#*** Path to CLI entry point and command parameter name. Uncomment and change if folder structure differs from standard Magento installation | ||
#MAGENTO_CLI_COMMAND_PATH=dev/tests/acceptance/utils/command.php | ||
#MAGENTO_CLI_COMMAND_PARAMETER=command | ||
|
||
#*** Selenium Server Protocol, Host, Port, and Path, with local defaults. Uncomment and change if not running Selenium locally. | ||
#SELENIUM_HOST=127.0.0.1 | ||
#SELENIUM_PORT=4444 | ||
#SELENIUM_PROTOCOL=http | ||
#SELENIUM_PATH=/wd/hub | ||
|
||
#*** Uncomment and set host & port if your dev environment needs different value other than MAGENTO_BASE_URL for Rest API Requests ***# | ||
#MAGENTO_RESTAPI_SERVER_HOST= | ||
#MAGENTO_RESTAPI_SERVER_PORT= | ||
|
||
#*** Uncomment these properties to set up a dev environment with symlinked projects ***# | ||
#TESTS_BP= | ||
#FW_BP= | ||
#TESTS_MODULE_PATH= | ||
|
||
#*** These properties impact the modules loaded into MFTF, you can point to your own full path, or a custom set of modules located with the core set | ||
MODULE_WHITELIST=Magento_Framework,Magento_ConfigurableProductWishlist,Magento_ConfigurableProductCatalogSearch | ||
#CUSTOM_MODULE_PATHS= | ||
|
||
#*** Bool property which allows the user to toggle debug output during test execution | ||
#MFTF_DEBUG= | ||
#*** End of .env ***# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
/** This is project's console commands configuration for Robo task runner. | ||
* | ||
* @codingStandardsIgnoreStart | ||
* @see http://robo.li/ | ||
*/ | ||
class RoboFile extends \Robo\Tasks | ||
{ | ||
use Robo\Task\Base\loadShortcuts; | ||
|
||
/** | ||
* Duplicate the Example configuration files used to customize the Project for customization. | ||
* | ||
* @return void | ||
*/ | ||
function cloneFiles() | ||
{ | ||
$this->_exec('cp -vn .env.example .env'); | ||
$this->_exec('cp -vf codeception.dist.yml codeception.yml'); | ||
$this->_exec('cp -vf dev' . DIRECTORY_SEPARATOR . 'tests'. DIRECTORY_SEPARATOR . 'functional' . DIRECTORY_SEPARATOR .'MFTF.suite.dist.yml dev' . DIRECTORY_SEPARATOR . 'tests'. DIRECTORY_SEPARATOR . 'functional' . DIRECTORY_SEPARATOR .'MFTF.suite.yml'); | ||
} | ||
|
||
/** | ||
* Duplicate the Example configuration files for the Project. | ||
* Build the Codeception project. | ||
* | ||
* @return void | ||
*/ | ||
function buildProject() | ||
{ | ||
$this->cloneFiles(); | ||
$this->_exec('vendor'. DIRECTORY_SEPARATOR .'bin'. DIRECTORY_SEPARATOR .'codecept build'); | ||
} | ||
|
||
/** | ||
* Generate all Tests in PHP. | ||
* | ||
* @param array $opts | ||
* @return void | ||
*/ | ||
function generateTests($opts = ['config' => null, 'force' => true, 'nodes' => null]) | ||
{ | ||
$GLOBALS['GENERATE_TESTS'] = true; | ||
|
||
if ($opts['force']) | ||
{ | ||
$GLOBALS['FORCE_PHP_GENERATE'] = true; | ||
} | ||
|
||
require 'dev' . DIRECTORY_SEPARATOR . 'tests'. DIRECTORY_SEPARATOR . 'functional' . DIRECTORY_SEPARATOR . '_bootstrap.php'; | ||
\Magento\FunctionalTestingFramework\Util\TestGenerator::getInstance()->createAllTestFiles($opts['config'], $opts['nodes']); | ||
$this->say("Generate Tests Command Run"); | ||
} | ||
|
||
/** | ||
* Generate a suite based on name(s) passed in as args. | ||
* | ||
* @param array $args | ||
* @throws Exception | ||
* @return void | ||
*/ | ||
function generateSuite(array $args) | ||
{ | ||
if (empty($args)) { | ||
throw new Exception("Please provide suite name(s) after generate:suite command"); | ||
} | ||
|
||
require 'dev' . DIRECTORY_SEPARATOR . 'tests'. DIRECTORY_SEPARATOR . 'functional' . DIRECTORY_SEPARATOR . '_bootstrap.php'; | ||
$sg = \Magento\FunctionalTestingFramework\Suite\SuiteGenerator::getInstance(); | ||
|
||
foreach ($args as $arg) { | ||
$sg->generateSuite($arg); | ||
} | ||
} | ||
|
||
/** | ||
* Run all Functional tests. | ||
* | ||
* @return void | ||
*/ | ||
function functional() | ||
{ | ||
$this->_exec('.' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'codecept run functional --skip-group skip'); | ||
} | ||
|
||
/** | ||
* Run all Tests with the specified @group tag, excluding @group 'skip'. | ||
* | ||
* @param string $args | ||
* @return void | ||
*/ | ||
function group($args = '') | ||
{ | ||
$this->taskExec('.' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'codecept run --verbose --steps --skip-group skip --group')->args($args)->run(); | ||
} | ||
|
||
/** | ||
* Run all Functional tests located under the Directory Path provided. | ||
* | ||
* @param string $args | ||
* @return void | ||
*/ | ||
function folder($args = '') | ||
{ | ||
$this->taskExec('.' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'codecept run ')->args($args)->run(); | ||
} | ||
|
||
/** | ||
* Run all Tests marked with the @group tag 'example'. | ||
* | ||
* @return void | ||
*/ | ||
function example() | ||
{ | ||
$this->_exec('.' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'codecept run --group example --skip-group skip'); | ||
} | ||
|
||
/** | ||
* Generate the HTML for the Allure report based on the Test XML output - Allure v1.4.X | ||
* | ||
* @return \Robo\Result | ||
*/ | ||
function allure1Generate() | ||
{ | ||
return $this->_exec('allure generate tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-results'. DIRECTORY_SEPARATOR .' -o tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-report'. DIRECTORY_SEPARATOR .''); | ||
} | ||
|
||
/** | ||
* Generate the HTML for the Allure report based on the Test XML output - Allure v2.3.X | ||
* | ||
* @return \Robo\Result | ||
*/ | ||
function allure2Generate() | ||
{ | ||
return $this->_exec('allure generate tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-results'. DIRECTORY_SEPARATOR .' --output tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-report'. DIRECTORY_SEPARATOR .' --clean'); | ||
} | ||
|
||
/** | ||
* Open the HTML Allure report - Allure v1.4.X | ||
* | ||
* @return void | ||
*/ | ||
function allure1Open() | ||
{ | ||
$this->_exec('allure report open --report-dir tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-report'. DIRECTORY_SEPARATOR .''); | ||
} | ||
|
||
/** | ||
* Open the HTML Allure report - Allure v2.3.X | ||
* | ||
* @return void | ||
*/ | ||
function allure2Open() | ||
{ | ||
$this->_exec('allure open --port 0 tests'. DIRECTORY_SEPARATOR .'_output'. DIRECTORY_SEPARATOR .'allure-report'. DIRECTORY_SEPARATOR .''); | ||
} | ||
|
||
/** | ||
* Generate and open the HTML Allure report - Allure v1.4.X | ||
* | ||
* @return void | ||
*/ | ||
function allure1Report() | ||
{ | ||
$result1 = $this->allure1Generate(); | ||
|
||
if ($result1->wasSuccessful()) { | ||
$this->allure1Open(); | ||
} | ||
} | ||
|
||
/** | ||
* Generate and open the HTML Allure report - Allure v2.3.X | ||
* | ||
* @return void | ||
*/ | ||
function allure2Report() | ||
{ | ||
$result1 = $this->allure2Generate(); | ||
|
||
if ($result1->wasSuccessful()) { | ||
$this->allure2Open(); | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright © Magento, Inc. All rights reserved. | ||
# See COPYING.txt for license details. | ||
actor: Tester | ||
paths: | ||
tests: dev/tests/functional | ||
log: dev/tests/functional/_output | ||
data: dev/tests/functional/_data | ||
support: src/Magento/FunctionalTestingFramework | ||
envs: etc/_envs | ||
settings: | ||
bootstrap: _bootstrap.php | ||
colors: true | ||
memory_limit: 1024M | ||
extensions: | ||
enabled: | ||
- Codeception\Extension\RunFailed | ||
- Yandex\Allure\Adapter\AllureAdapter | ||
config: | ||
Yandex\Allure\Adapter\AllureAdapter: | ||
deletePreviousResults: true | ||
outputDirectory: allure-results | ||
ignoredAnnotations: | ||
- env | ||
- zephyrId | ||
- useCaseId | ||
params: | ||
- .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This robo command did not work as expected.