junitparser icon indicating copy to clipboard operation
junitparser copied to clipboard

Make TestCase support Properties tags

Open eap opened this issue 5 months ago • 3 comments

pytest and ctest both support adding properites to individual test cases (as noted in the attached issue). This PR updates the properties element parsing so that it now works with both test cases and test suites.

Fixes: https://github.com/weiwei/junitparser/issues/116

eap avatar Aug 24 '25 05:08 eap

@weiwei - I'm interested in your thoughts on this PR. Feedback is welcome, I'd be happy to update it to your preferences.

eap avatar Aug 28 '25 03:08 eap

Hey, sorry for getting back late. pytest compatible schema is added in https://github.com/weiwei/junitparser/blob/master/junitparser/xunit2.py. Could you check if that fits your need, or if not, add the code over there? Thanks!

weiwei avatar Sep 14 '25 02:09 weiwei

@weiwei - Looks like xunit2 didn't have Properties in test cases. I've moved the implementation there updated/extended the README with a short code example.

eap avatar Sep 14 '25 05:09 eap