Test Metadata with Codeception

codeception
how-to

#1

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:

test:
  post:
    - 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.

Details:

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


Test Metadata API call returning empty
#2