260 Aspec Reporter#261
Conversation
… copy of the Specobject exporter. No tests yet.
…ature/aspec_reporter
…verCoveredAttributeTypes within addLinkToItemWithStatus. Removed mthods to update coveredAttributeTypes and overCoveredAttributeTypes from outside. Updated related test. Added getCoveredApprovedAttributeTypes(). Added isCoveredShallowWithApprovedItems(). Added getDeepCoverageStatusOnlyAcceptApprovedItems().
…pport to only considered approved requirement for coverage.
… output for asserts.
…o provide coverred shallow and transient coverage honouring item status.
…atus proposed froviding no coverae.
…testsupport for covering status
…ddLinkToItemWithStatus if they are missing
|
@redcatbear , @kaklakariada please review |
kaklakariada
left a comment
There was a problem hiding this comment.
Looks great, thank you for your changes!
Please still wait for @redcatbear 's review.
redcatbear
left a comment
There was a problem hiding this comment.
First review. Until mid of user_guide.md.
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
|
Kudos, SonarCloud Quality Gate passed! |
…enfasttrace into feature/260-aspec_reporter
…ave a documentation).
| private DeepCoverageStatus adjustDeepCoverageStatusIfApprovedRequired(boolean onlyAcceptApprovedItemStatus, | ||
| DeepCoverageStatus deepCoveredStatus) | ||
| { | ||
| if (onlyAcceptApprovedItemStatus && deepCoveredStatus == DeepCoverageStatus.COVERED && !isApproved()) |
There was a problem hiding this comment.
I like the method as such.
To keep things final, please replace if by return statement using the ? operator. This way the parameters don't need to be modified.
| writer.writeStartDocument( "UTF-8", "1.0" ); | ||
| writer.writeStartElement( "specdocument" ); | ||
|
|
||
| for( final Map.Entry<String, List<LinkedSpecificationItem>> entry : items.entrySet() ) | ||
| { | ||
| final String doctype = entry.getKey(); | ||
| final List<LinkedSpecificationItem> specItems = entry.getValue(); | ||
| writeItems( writer, doctype, specItems ); | ||
| } | ||
|
|
||
| writer.writeEndElement(); | ||
| writer.writeEndDocument(); |
There was a problem hiding this comment.
| writer.writeStartDocument( "UTF-8", "1.0" ); | |
| writer.writeStartElement( "specdocument" ); | |
| for( final Map.Entry<String, List<LinkedSpecificationItem>> entry : items.entrySet() ) | |
| { | |
| final String doctype = entry.getKey(); | |
| final List<LinkedSpecificationItem> specItems = entry.getValue(); | |
| writeItems( writer, doctype, specItems ); | |
| } | |
| writer.writeEndElement(); | |
| writer.writeEndDocument(); | |
| writer.writeStartDocument( "UTF-8", "1.0" ); | |
| writer.writeStartElement( "specdocument" ); | |
| for( final Map.Entry<String, List<LinkedSpecificationItem>> entry : items.entrySet() ) | |
| { | |
| final String doctype = entry.getKey(); | |
| final List<LinkedSpecificationItem> specItems = entry.getValue(); | |
| writeItems( writer, doctype, specItems ); | |
| } | |
| writer.writeEndElement(); | |
| writer.writeEndDocument(); |
There was a problem hiding this comment.
Extract for loop to method.
| final IndentingXMLStreamWriter indentingXmlWriter = new IndentingXMLStreamWriter( xmlWriter ); | ||
| final Map<String, List<LinkedSpecificationItem>> items = groupByDoctype( this.trace.getItems().stream() ); | ||
|
|
||
| LOG.info( "aspec starting" ); |
There was a problem hiding this comment.
On log level INFO you should be a bit more specific. :-)
Remember, this is the default level, so users will always see this.
Otherwise adhere to E. S. Raymond's rule of silence: "If an application has nothing interesting to say, it should say nothing." :-)
There was a problem hiding this comment.
This is a tracing message. Change to fine()
| writer.writeEndElement(); | ||
| } | ||
|
|
||
| private void writeItem( final XMLStreamWriter writer, final LinkedSpecificationItem item ) throws XMLStreamException |
There was a problem hiding this comment.
Please split this method into section by extracting cohesive parts to methods with speaking names.
| if( linkStatus == LinkStatus.COVERED_SHALLOW && deepCoverageStatus == DeepCoverageStatus.COVERED ) | ||
| { | ||
| writeElement( writer, "coveringStatus", CoveringStatus.COVERING.getLabel() ); | ||
| } | ||
| else if( linkStatus == LinkStatus.COVERED_SHALLOW ) | ||
| { | ||
| writeElement( writer, "coveringStatus", CoveringStatus.UNCOVERED.getLabel() ); | ||
| } | ||
| else if( linkStatus == LinkStatus.COVERED_PREDATED || linkStatus == LinkStatus.COVERED_OUTDATED ) | ||
| { | ||
| writeElement( writer, "coveringStatus", CoveringStatus.OUTDATED.getLabel() ); | ||
| } | ||
| else if( linkStatus == LinkStatus.AMBIGUOUS || linkStatus == LinkStatus.COVERED_UNWANTED ) | ||
| { | ||
| writeElement( writer, "coveringStatus", CoveringStatus.UNEXPECTED.getLabel() ); | ||
| } |
redcatbear
left a comment
There was a problem hiding this comment.
Approved with one minor change left.
…SpecificationItem.java Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
|
Kudos, SonarCloud Quality Gate passed! |
The Aspec Report is a new reporter with name "apec" that reports all items and their coverage and linkage as XML file so that that tracing renerated by openfasttrace can be processed by other tools.
Closes #260