But the problem that I see is that you are only verifying the last few steps of the chain. It sounds like the CRM is pretty wonky so if something breaks there it has the potential to bork the whole process, potentially in a way that Casper still passes. You might need some tests of the entire system.
Yeah, totally. I glossed over this in the post, but it's mentioned here:
Run a Drush script that does an initial pass of validating the source data — the idea is that there are some basic validations of the source data that can be done well before we run the content migrations, e.g. checking each file for required fields, unique values, etc.
The script does a sanity check—do we have at least X number of records for a particular data type, are all the required fields there, if the publication data contains a reference to an author ID, does the publication author data contain that ID, etc. This way we can catch potential failures well before CasperJS is in the picture.
I like the idea of a test record for each data type though, and may look at implementing that as an additional safety check.
Thanks for your comments.
Yeah, totally. I glossed over this in the post, but it's mentioned here:
The script does a sanity check—do we have at least X number of records for a particular data type, are all the required fields there, if the publication data contains a reference to an author ID, does the publication author data contain that ID, etc. This way we can catch potential failures well before CasperJS is in the picture.
I like the idea of a test record for each data type though, and may look at implementing that as an additional safety check.