Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Improve the documentation about how to pass options to casperjs.
Original report
It would be nice to be able to use the --xunit casper option to export the test results to XML with the xunit format to be able to integrate the tests with CI systems.
Comments
Comment #1
David Hernández CreditAttribution: David Hernández as a volunteer commentedHere is a patch for this.
Comment #2
juampynr CreditAttribution: juampynr at Lullabot commentedDavid, you should be able to append CasperJS specific options at the end of the command. See the following lines:
http://cgit.drupalcode.org/casperjs/tree/casperjs.drush.inc?h=7.x-1.x#n126
It is also mentioned at the command description: http://cgit.drupalcode.org/casperjs/tree/casperjs.drush.inc?h=7.x-1.x#n14
And this example uses a CasperJS option at the end http://cgit.drupalcode.org/casperjs/tree/casperjs.drush.inc?h=7.x-1.x#n34
Comment #3
David Hernández CreditAttribution: David Hernández as a volunteer commentedTalked with juampy over IRC about this, as the command already has a way to pass the parameters to casperjs, he suggested to improve the documentation, doing something similar to rsync: https://github.com/drush-ops/drush/blob/master/commands/core/core.drush....
Comment #4
David Hernández CreditAttribution: David Hernández as a volunteer commentedNew patch attached.
Comment #5
juampynr CreditAttribution: juampynr at Lullabot commentedCan you set the option value like in the example below? The ellipsis may create confusion.
Can we reword this to "Any option supported by the native casperjs command. For example..."
The other examples have a protocol in the urls. For consistency, add it here too please. There is also a typo at the --xunit option value. Also, it's "exports", not "exporting"
Comment #6
David Hernández CreditAttribution: David Hernández as a volunteer commentedNew patch attached to solve issues reported at #5
Comment #7
David Hernández CreditAttribution: David Hernández as a volunteer commentedOk, one more patch
Comment #8
juampynr CreditAttribution: juampynr at Lullabot commentedReviewed and merged. Thanks!