This tutorial has been tested with the v0 branch of PhantomCSS. The master branch is not actively maintained and may not be stable and compatible with the latest version of PhantomJS.
As of 2019, CasperJS seems to be no longer maintained.
First, please ensure your Tests are clearly identified in the "pass" and "fail" callbacks. This can be done by editing the phantomcss.js source file or by defining the callbacks during the PhantomCSS initialization.
After running the tests and generating the JUnit XML report (e.g., vlog.xml), it can be imported to Xray (either by the REST API or through the Import Execution Results action within the Test Execution).
JUnit's Test Case is mapped to a Generic Test in Jira, and the Generic Test Definition field contains the base name of the source file concatenated with the name of file being validated.
The Execution Details of the Generic Test contains information about the Test Suite, which in this case corresponds to "Coffee machine visual tests".