For the testcase, you can add the query testcase/customAttributes/customAttribute and print testcase/customAttributes/customAttribute/value. If custom attribute name is "myattr", you can add a condition (name == "myattr1") for the element that prints the custom attribute value.