Test Metadata with Codeception

Due to the way Codeception writes it’s junit files, an extra step is needed to get the test metadata to work in CircleCi.

In the test: post section of your circle.yml:

    - mkdir -p $CIRCLE_TEST_REPORTS/codeception/
    - find . -name '*.xml' -exec cp {} $CIRCLE_TEST_REPORTS/codeception/ \;
    - find ./ -type f -exec sed -i '' 's/class=/classname=/g' {} \;

You may need to adjust the wp-content part of the command if you are having Codeception save it’s XML files elsewhere.


Codeception outputs an attribute of class when the spec calls for classname as required.

1 Like