magento2-functional-testing-framework
magento2-functional-testing-framework copied to clipboard
Support xUnit-compatible Output Format
Preconditions
- Magento 2.3.4-p2
- PHP 7.2
- MFTF 2.5.3
Steps to reproduce
- Run any MFTF test.
Expected result
- xUnit-compatible results are written somewhere.
Actual result
- Only Allure-compatible results are written to
dev/tests/acceptance/tests/_output/allure-results
.
Background
Bitbucket Pipelines only supports xUnit-compatible test reports.
Since Codeception comes with JUnit XML output, this could be "easy" to implement...?
I think this could be easy enough to do. the RunTest command would need to send the flag --xml
(optionally).
Here's a patch for a temporary workaround: https://gist.github.com/navarr/4cfe9fb85e65b19b0b6e0f2a2e58c465 (it always sends the --xml
flag)
When doing this you'll want to define an output path in your codeception.yml's settings:
paths:
output: tests/_xml
In some instances you may also want to use strict jUnit formatting (like with Jenkins). In those cases you'd need to turn the strict_xml
setting on in the codeception.yml file:
settings:
strict_xml: true
@sprankhub @navarr Thank you for reporting and sending a patch for the issue! I sounds like a good enhancement to MFTF. I have created internal ticket https://jira.corp.magento.com/browse/MQE-2233 to track the issue.