Skip to content

MQE-1260: Create RERUN_COUNT field in Jenkins MFTF Parameters section same as MTF parameters section #251

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 9 commits into from
Oct 29, 2018

Conversation

aljcalandra
Copy link
Contributor

Adding a run:failed command to run the tests that failed on the last build

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

… same as MTF parameters section

- Adding run:failed command
… same as MTF parameters section

- Changing Suite Test Information to an array
… same as MTF parameters section

- Added rerun file generation
- Cleaned up test generation
… same as MTF parameters section

- Removing unused use statement
@coveralls
Copy link

coveralls commented Oct 11, 2018

Coverage Status

Coverage decreased (-0.008%) to 57.432% when pulling 7543050 on MQE-1260 into 59524a1 on develop.

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 work very well for test execution, but Allure implementation needs a fix:

  • On build, suites are run by run functional -g suiteName first
  • Then, tests are retried via mftf run:failed, which regenerates and runs tests via run functional with no -g specified

This is affecting allure paths to each tests thus:

  • First Run: Magento\FunctionalTestingFramework.functional\functionalSuite1.FailTest1
  • Second Run: Magento\FunctionalTestingFramework.functional.FailTest1
  • Third+ Run: Magento\FunctionalTestingFramework.functional.FailTest1

Above causes tests to be grouped incorrectly, where the first instance is not grouped with its retries.

… same as MTF parameters section

- Restructured Codeception command to grab suite names properly
… same as MTF parameters section

- Updated to prevent write correct tests to file after a rerun with multiple failures
);
$this->failedList = array_merge(
$this->failedList,
$this->readFailedTestFile(self::TESTS_FAILED_FILE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Found while testing, if your last codecept run statement contains no failures, it actually deletes the failed file, so if a flaky test passes on the second try, $this->readFailedTestfile will actually fail to open the stream to the file (which was deleted).

… same as MTF parameters section

- Prevented after from failing in the case of a passed test on rerun
$output->write($buffer);
}
);
if (realpath(self::TESTS_FAILED_FILE)) {
Copy link
Contributor

@KevinBKozan KevinBKozan Oct 16, 2018

Choose a reason for hiding this comment

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

Change this to file_exists, realpath gives a false positive here depending on timing (somehow)

… same as MTF parameters section

- Used shorter method for preventing test failure
KevinBKozan
KevinBKozan previously approved these changes Oct 16, 2018
@KevinBKozan
Copy link
Contributor

KevinBKozan commented Oct 16, 2018

@aljcalandra Rerun looks good to go from a local perspective. If you end up needing to make more changes to this due to jenkins implementation, I will happily re-review.

… same as MTF parameters section

- Protecting on missing testname and filepath
@KevinBKozan KevinBKozan merged commit 1fddfb6 into develop Oct 29, 2018
@magento-engcom-team magento-engcom-team deleted the MQE-1260 branch November 9, 2018 11:28
magento-devops-reposync-svc pushed a commit that referenced this pull request Jan 9, 2023
ACQE-2302:  Unable to connect to selenium server message display
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