Skip to content

MQE-1755: mftf run:test Test1 Test2 does not run before/after hooks c… #448

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 5 commits into from
Sep 13, 2019

Conversation

soumyau
Copy link
Contributor

@soumyau soumyau commented Sep 10, 2019

…orrectly

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

coveralls commented Sep 10, 2019

Coverage Status

Coverage increased (+1.6%) to 53.582% when pulling 6a5798e on MQE-1755 into 7222259 on 2.5.0-RC.

Copy link
Contributor

@KevinBKozan KevinBKozan left a comment

Choose a reason for hiding this comment

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

Changes seem to be working correctly, just have a small duped code change request.

//for tests in suites, run them as a group to run before and after block
foreach (array_keys($suitesConfig) as $suite) {
$fullCommand = $codeceptionCommand . " -g {$suite}";
$process = new Process($fullCommand);
Copy link
Contributor

Choose a reason for hiding this comment

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

Ln 152 - 158 are duplicates of 126-132. Abstract it out into its own function so that you can just call something like

$subreturnCode = $this->executeTestCommand($fullCommand);
$this->returnCode = max($this->returnCode, $subreturnCode);

Double check for any more duped variable assignments/etc for consolidation as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

created a new function executeTestCommand that runs the codecept command.

@soumyau soumyau merged commit 88030f3 into 2.5.0-RC Sep 13, 2019
@jilu1 jilu1 deleted the MQE-1755 branch February 6, 2020 16:55
magento-devops-reposync-svc pushed a commit that referenced this pull request Feb 26, 2025
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