Skip to content

MQE 1650: Update MFTF configuration to read Test entities from new location #428

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

Closed
wants to merge 10 commits into from

Conversation

jilu1
Copy link
Contributor

@jilu1 jilu1 commented Aug 21, 2019

Description

Fixed Issues (if relevant)

  1. magento/magento2-functional-testing-framework#<issue_number>: Issue title
  2. ...

Contribution checklist

  • 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)
  • Changes to Framework doesn't have backward incompatible changes for tests or have related Pull Request with fixes to tests

@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 54.125% when pulling fec2a5e on MQE-1650 into f9d5fe4 on develop.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 54.125% when pulling fec2a5e on MQE-1650 into f9d5fe4 on develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 54.125% when pulling fec2a5e on MQE-1650 into f9d5fe4 on develop.

@jilu1 jilu1 changed the title Mqe 1650 MQE 1650: Update MFTF configuration to read Test entities from new location Aug 22, 2019
Copy link
Contributor

@tomreece tomreece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable to get a test to generate when placed at this path:

magento2ce/dev/tests/acceptance/tests/functional/Magento/FedexTest

Ji and I looked at this together and discussed and I'm still a bit confused. We will discuss tomorrow morning with @okolesnyk.

}

if ($foundDeprecate) {
$deprecaedPath = ltrim(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor typo in name

// Suppress print during unit testing
if (MftfApplicationConfig::getConfig()->getPhase() !== MftfApplicationConfig::UNIT_TEST_PHASE) {
LoggingUtil::getInstance()->getLogger(ModuleResolver::class)->warning(
"DEPRECATION: $deprecaedPath is deprecated! Please move mftf test modules to $suggestedPath"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to:

"DEPRECATION: Found MFTF test modules in the deprecated path: $deprecaedPath. Move these MFTF test modules to $suggestedPath"

The error is confusing without this

LoggingUtil::getInstance()->getLogger(ModuleResolver::class)->warning(
"DEPRECATION: $deprecaedPath is deprecated! Please move mftf test modules to $suggestedPath"
);
print ("\nDEPRECATION: $deprecaedPath is deprecated! Please move mftf tests to $suggestedPath\n\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turn into a variable and use the same message in both places

also capitalize MFTF in messages to make reading them easier.

/**
* Regex to grab vendor name in vendor
*/
const VENDOR_NAME_REGEX_V = "~.+\\/" . self::VENDOR . "\/(?<" . self::VENDOR . ">[^\/]+)\/.+~";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have 3 different regex constants and they are only used in one function in this class.

Can we instead just have one regex to match all 3? What does that look like?

If we can't do that, then at the very least we should improve these variable names to not include single letter acronyms. "_V", "_A", and "_D" are bad naming.

*
* @var array|null
*/
protected $enabledModulePathsNoFlatten = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does flattened mean? Please add to the description of the variable.

/**
* Return the modules path based on which modules are enabled in the target Magento instance.
*
* @param boolean $flat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a short description about the $flat variable to let me know when to use it and when to not use it.

@tomreece
Copy link
Contributor

tomreece commented Aug 26, 2019

Please ensure the original AC includes every path that SHOULD be valid after this change. We should test them all.

@jilu1
Copy link
Contributor Author

jilu1 commented Sep 5, 2019

Created new PR #445 and will close this one. I will apply some of the comment here into the new PR.

@jilu1
Copy link
Contributor Author

jilu1 commented Sep 9, 2019

I applied relevant comments into the new PR. Close this one.

@jilu1 jilu1 closed this Sep 9, 2019
@tomreece tomreece deleted the MQE-1650 branch July 27, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants