Skip to content

Commit 19ef276

Browse files
committed
#251: Merged summary requirements.
1 parent 93d09f2 commit 19ef276

6 files changed

Lines changed: 29 additions & 44 deletions

File tree

doc/spec/design.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -541,17 +541,17 @@ Needs: impl, utest
541541
### Plain Text Report
542542

543543
#### Plain Text Report Summary
544-
`dsn~reporting.plain-text.summary~2`
544+
`dsn~reporting.plain-text.summary~3`
545545

546546
The summary in the plain text report includes:
547547

548548
* Result status
549549
* Total number of specification items
550-
* Total number of specification items that are defect (if any)
550+
* Total number of direct and transitive defect specification items (if any)
551551

552552
Covers:
553553

554-
* `req~reporting.plain-text.summary~2`
554+
* `req~reporting.plain-text.summary~3`
555555

556556
Needs: impl, utest
557557

@@ -660,16 +660,6 @@ Covers:
660660

661661
Needs: impl, utest
662662

663-
#### Plain Text Report Summary Line
664-
`dsn~reporting.plain-text.summary-line~1`
665-
666-
The plain text report summary line renders the number of direct and transitive defects.
667-
668-
Covers:
669-
670-
* `req~reporting.plain-text.summary-line~1`
671-
672-
Needs: impl, utest
673663

674664
### HTML Report
675665

@@ -727,14 +717,14 @@ Covers:
727717

728718
Needs: impl, utest
729719

730-
#### HTML Report Summary Line
731-
`dsn~reporting.html.summary-line~1`
720+
#### HTML Report Summary
721+
`dsn~reporting.html.summary~2`
732722

733-
The HTML report summary line renders the number of direct and transitive defects.
723+
The HTML report summary renders the status, the number of total items, a progress bar and the number of direct and transitive defects.
734724

735725
Covers:
736726

737-
* `req~reporting.html.summary-line~1`
727+
* `req~reporting.html.summary~2`
738728

739729
Needs: impl, utest
740730

doc/spec/system_requirements.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ Covers:
639639
Needs: dsn
640640

641641
### Reports
642-
Reports are the main way to find out if a projects requirements are covered properly.
642+
Reports are the main way to find out if a project's requirements are covered properly.
643643

644644
#### Common Report Functions
645645

@@ -666,16 +666,16 @@ Needs: dsn
666666
The plain text report is the most basic report variant. It serves two main purposes:
667667

668668
1. Input in build chains
669-
2. Minimal requirement coverage view with the least dependencies. Any text terminal can display the plain text report.
669+
2. Minimal requirement coverage view with the least dependency. Any text terminal can display the plain text report.
670670

671671
##### Plain Text Report Summary
672-
`req~reporting.plain-text.summary~2`
672+
`req~reporting.plain-text.summary~3`
673673

674-
The summary in the plain text report includes:
674+
The summary in the plain-text report includes:
675675

676676
* Result status
677677
* Total number of specification items
678-
* Total number of defect specification items (if any)
678+
* Total number of direct and transitive defect specification items (if any)
679679

680680
Covers:
681681

@@ -686,7 +686,7 @@ Needs: dsn
686686
##### Plain Text Report Specification Item Overview
687687
`req~reporting.plain-text.specification-item-overview~2`
688688

689-
An item summary consist in the plain text report includes
689+
An item summary in the plain-text report includes
690690

691691
1. Status
692692
2. Number of broken incoming links
@@ -761,16 +761,6 @@ Covers:
761761

762762
Needs: dsn
763763

764-
##### Plain Text Report Summary Line
765-
`req~reporting.plain-text.summary-line~1`
766-
767-
The plain text report summary line distinguishes between direct and transitive defects.
768-
769-
Covers:
770-
771-
* [feat~plain-text-report~1](#plain-text-report)
772-
773-
Needs: dsn
774764

775765
#### HTML Report
776766

@@ -830,10 +820,15 @@ Covers:
830820

831821
Needs: dsn
832822

833-
##### HTML Report Summary Line
834-
`req~reporting.html.summary-line~1`
823+
##### HTML Report Summary
824+
`req~reporting.html.summary~2`
825+
826+
The summary in the HTML report includes:
835827

836-
The HTML report summary line distinguishes between direct and transitive defects.
828+
* Result status
829+
* Total number of specification items
830+
* Completion status as a progress bar
831+
* Total number of direct and transitive defect specification items (if any)
837832

838833
Rationale:
839834

reporter/html/src/main/java/org/itsallcode/openfasttrace/report/html/view/html/HtmlTraceSummary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected void renderCompletionIndicator()
7474
}
7575
}
7676

77-
// [impl->dsn~reporting.html.summary-line~1]
77+
// [impl->dsn~reporting.html.summary~2]
7878
private void renderDefectCount()
7979
{
8080
if (!this.trace.hasNoDefects())

reporter/html/src/test/java/org/itsallcode/openfasttrace/report/html/view/html/TestHtmlTraceSummary.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public void prepareEachTest()
3535
}
3636

3737
@Test
38+
// [utest->dsn~reporting.html.summary~2]
3839
void testRenderSummaryOk()
3940
{
4041
when(this.traceMock.hasNoDefects()).thenReturn(true);
@@ -54,6 +55,7 @@ private void renderTaceSummaryOnIndentationLevel(final int indentationLevel)
5455
@ParameterizedTest
5556
@ValueSource(ints =
5657
{ 0, 1, 50, 99 })
58+
// [utest->dsn~reporting.html.summary~2]
5759
void testRenderPercentagesNotOk(final int value)
5860
{
5961
final int maximum = 100;
@@ -78,7 +80,7 @@ void testRenderPercentagesNotOk(final int value)
7880
}
7981

8082
@Test
81-
// [utest->dsn~reporting.html.summary-line~1]
83+
// [utest->dsn~reporting.html.summary~2]
8284
void testRenderTransitiveDefects()
8385
{
8486
when(this.traceMock.hasNoDefects()).thenReturn(false);

reporter/plaintext/src/main/java/org/itsallcode/openfasttrace/report/plaintext/PlainTextReport.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ private String translateItemStatus(final LinkedSpecificationItem item)
138138
return this.formatter.formatNotOk(NOT_OK);
139139
}
140140

141-
// [impl->dsn~reporting.plain-text.summary~2]
142-
// [impl->dsn~reporting.plain-text.summary-line~1]
141+
// [impl->dsn~reporting.plain-text.summary~3]
143142
private void renderSummary(final PrintStream report)
144143
{
145144
report.print(translateStatus(this.trace.hasNoDefects()));

reporter/plaintext/src/test/java/org/itsallcode/openfasttrace/report/plaintext/TestPlainTextReport.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void testReport_LevelMinimal_NotOk()
106106
}
107107

108108
@Test
109-
// [utest->dsn~reporting.plain-text.summary~2]
109+
// [utest->dsn~reporting.plain-text.summary~3]
110110
void testReport_LevelSummary_OK()
111111
{
112112
when(this.traceMock.hasNoDefects()).thenReturn(true);
@@ -115,8 +115,7 @@ void testReport_LevelSummary_OK()
115115
}
116116

117117
@Test
118-
// [utest->dsn~reporting.plain-text.summary~2]
119-
// [utest->dsn~reporting.plain-text.summary-line~1]
118+
// [utest->dsn~reporting.plain-text.summary~3]
120119
void testReport_LevelSummary_NotOK()
121120
{
122121
when(this.traceMock.hasNoDefects()).thenReturn(true);
@@ -165,7 +164,7 @@ void testReport_LevelFailureSummaries_NotOK()
165164

166165
@Test
167166
// [utest->dsn~reporting.plain-text.transitive-defect~1]
168-
// [utest->dsn~reporting.plain-text.summary-line~1]
167+
// [utest->dsn~reporting.plain-text.summary~3]
169168
void testReport_LevelMinimal_TransitiveDefect()
170169
{
171170
final LinkedSpecificationItem transitiveDefectMock = mock(LinkedSpecificationItem.class);

0 commit comments

Comments
 (0)