XSpec Schematron + SQF

Are you missing a feature? Request its implementation here.
scottbdr
Posts: 50
Joined: Tue Jul 21, 2009 1:48 am

XSpec Schematron + SQF

Post by scottbdr »

Hi, I just got done implementing additional Schematron/SQF rules to aid my XSpec authoring efforts. I thought I might suggest you add all/some of these rules to the Oxygen framework as they are generic and tremendously helpful in authoring XSpec unit tests. Basically, the things I validate and in most cases provide fixes for include:
- checks x:description@schematron is pointing to a file
- checks that all x:expect-* @id values reference valid @id values from the Schematron file assert/report elements (QF allows selection from those ids)
- check for correct expect type (assert or report) relative to the schematron rule type (QF will update the expect element as required)
- check test coverage for the Schematron rule ids. This lists Schematron @id values not covered by an expect and the same for those not covered by a expect-not.
- warns if x:description@run-as is not set to 'external' (which I have found to cause problems that are difficult to troubleshoot - all I know is having this setting removes problems with tests running - not entirely sure why)

I added these rules to prevent some of the frustrations I've had working with XSpec. It's really easy to get some of things wrong by mistake and it can be really difficult for someone new to (or even experienced with) Xspec to catch them as in some cases you think tests are working but are not - unlike when the Xspec just doesn't run (which can be difficult to troubleshoot as you need to read/understand the stack trace - particularly the @run-as thing).

Unfortunately I cannot provide you my Schematron as it was done on Boeing's dime so is considered proprietary, but if you are interested in adding this to Oxygen they are fairly easy to implement. If you have any questions I'd be happy to discuss.

Thanks, Scott
alex_jitianu
Posts: 1009
Joined: Wed Nov 16, 2005 11:11 am

Re: XSpec Schematron + SQF

Post by alex_jitianu »

Hi Scott,

Thank you for your suggestions! I see how such rules can make your life much easier! I've added an issue to investigate and implements such Schematron rules for a next Oxygen release. Once we have them we will commit them in the GitHub project and perhaps the community will further improve them.

Best regards,
Alex
Post Reply