Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Automatic TCK coverage generated based on annotations
PostPosted: Fri Nov 24, 2017 2:30 am 
Newbie

Joined: Fri Nov 24, 2017 2:25 am
Posts: 4
Hi All.

Can anyone give me more details, or point me in the right direction, on how you guys did the Annotations in your TCK that points to the part in the spec ?
("[tck-testable]" and "[tck-not-testable]")

I want to do the same for the MVC spec, but could not find any documentation on how to do this.

Any tips / help would be appreciated.

Thanks
Phillip

(Hope this is the right forum to ask this ?)


Top
 Profile  
 
 Post subject: Re: Automatic TCK coverage generated based on annotations
PostPosted: Fri Nov 24, 2017 6:06 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1590
Location: Romania
Better ask the question on the Hibernate mailing list. Thanks.

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


Top
 Profile  
 
 Post subject: Re: Automatic TCK coverage generated based on annotations
PostPosted: Fri Nov 24, 2017 12:50 pm 
Newbie

Joined: Fri Nov 24, 2017 2:25 am
Posts: 4
Ok will do. I am talking about the bean validation spec though ...?


Top
 Profile  
 
 Post subject: Re: Automatic TCK coverage generated based on annotations
PostPosted: Tue Nov 28, 2017 4:18 pm 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi Phillip,

Basically, "tck-testable" et al. (they are described at https://github.com/beanvalidation/beanv ... or-the-tck) are labels/roles which can be applied to a given block of the AsciiDoc spec document.

Then we've got a custom AsciiDoctor extension (https://github.com/beanvalidation/beanv ... or-the-tck) which allows to propagate those labels to the DocBook output (i.e. XML). Using an XSL transformation (see https://github.com/beanvalidation/beanv ... audit-file), finally an XML document containing just the assertions is generated (the "audit file").

This audit file is used to create a coverage report against the tests in the TCK (see http://docs.jboss.org/hibernate/stable/ ... age_report). Tests are linked to assertions from the audit file via the @SpecAssertion annotation. This report tells us how many spec assertions are covered by tests (it doesn't tell anything about the quality of those tests, though. Also an empty test would count, but we're thorough developers of course :).

So the current path is AsciiDoc -(AsciiDoctor)-> DocBook -(XSLT)-> Audit file. That's mainly due to historical reasons, the spec was written in DocBook originally and we already had that XSL transformation for extracting the assertions. So when we migrated from DocBook to AsciiDoc, this was the quickest approach.

A better path would of course be AsciiDoc -(AsciiDoctor)->Audit file, which I think would require a custom AsciiDoc output generator. We didn't find the time to do this, but should you decide to base your TCK on this tooling, it might be something for you to look into?

Happy to discuss any details in more depth. The best is you send any questions to the BV mailing list (http://lists.jboss.org/pipermail/beanvalidation-dev/), I'll usually be quicker with replying there. We also can do a call or Hangout with you, Ivar and Christian if that'd help?

Cheers,

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
 Post subject: Re: Automatic TCK coverage generated based on annotations
PostPosted: Thu Nov 30, 2017 4:56 am 
Newbie

Joined: Fri Nov 24, 2017 2:25 am
Posts: 4
Hi Gunnar
Thanks a lot for your reply. I'll check out the links you provided, and ask any futher questions on BV mailing list.

Cheers
Phillip


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.