Skip to content

Support for UX reporter #446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"${workspaceFolder}/reporter/plaintext/src",
"${workspaceFolder}/reporter/html/src",
"${workspaceFolder}/reporter/aspec/src",
"${workspaceFolder}/reporter/ux/src",
"${workspaceFolder}/product/src/test/java",
"${workspaceFolder}/api/src",
"${workspaceFolder}/exporter/specobject/src",
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Below you see a screenshot of an HTML tracing report where OFT traces itself. Yo

<img src="doc/images/oft_screenshot_tracing_report.png" style="box-shadow: 5px 10px 18px #888888;" alt="OFT HTML tracing report">

In addition to the HTML tracing report an interactive requirement browser and analysis tool is integrated into OpenFastTrace.

## Project Information

[![Build](https://github.com/itsallcode/openfasttrace/actions/workflows/build.yml/badge.svg)](https://github.com/itsallcode/openfasttrace/actions/workflows/build.yml)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ public class ReportSettings
private final ColorScheme colorScheme;
private final DetailsSectionDisplay detailsSectionDisplay;

private ReportSettings(final Builder builder)
/**
* Settings for a reporter.
*
* @param builder builder for a reporter
*/
protected ReportSettings(final Builder builder)
{
this.verbosity = builder.verbosity;
this.showOrigin = builder.showOrigin;
Expand Down Expand Up @@ -121,7 +126,10 @@ public static class Builder
private ReportVerbosity verbosity = ReportVerbosity.FAILURE_DETAILS;
private ColorScheme colorScheme = ColorScheme.BLACK_AND_WHITE;

private Builder()
/**
* Create the builder
*/
protected Builder()
{
// empty by intention
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Commands:
convert Convert to a different requirements format

Tracing options:
-o, --output-format Report format, one of "plain", "html", "aspec"
-o, --output-format Report format, one of "plain", "html", "aspec", "ux"
Defaults to "plain"
-v, --report-verbosity Set how verbose the output is. Ranges from
"quiet" to "all".
Expand Down
13 changes: 13 additions & 0 deletions doc/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,18 @@ While plain text reports are perfect for debugging your tracing chain, sometimes
oft trace -o html
```

### Interactive requirement analyisis

Besides a basic HTML visualization of requirements OpenFastTrace also provides an interactive requirement browsing and requirement analysis frontend in the form of a responsive HTML page similar to the HTML report.

The UX reporter:

```
oft trace -o ux
```

generates an input file for the OpenFastTrace-UX HTML frontend [OpenFastTrace-UX](https://github.com/poldi2015/openfasttrace-ux).

### Understanding and Fixing Broken Requirement Branches

Requirements — or specification items as we call them more broadly — in OFT are internally organized in a graph. If you haven't heard of that term, don't worry. In most cases it is close enough to think of the relationships between the specification items like a forest where the highest level of the specification are tree trunks from which details branch out into big branches, twigs and eventually leaves.
Expand Down Expand Up @@ -568,6 +580,7 @@ One of:
* `plain`
* `html`
* `aspec`
* `ux`

Defaults to `plain`.

Expand Down
1 change: 1 addition & 0 deletions oft-self-trace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if $oft_script trace \
"$base_dir/reporter/plaintext/src" \
"$base_dir/reporter/html/src" \
"$base_dir/reporter/aspec/src" \
"$base_dir/reporter/ux/src" \
"$base_dir/product/src/test/java" \
"$base_dir/api/src" \
"$base_dir/exporter/specobject/src" \
Expand Down
10 changes: 8 additions & 2 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<description>Free requirement tracking suite</description>
<url>https://github.com/itsallcode/openfasttrace</url>
<properties>
<revision>4.1.0</revision>
<revision>4.2.0</revision>
<java.version>17</java.version>
<junit.version>5.11.4</junit.version>
<maven.surefire.version>3.5.2</maven.surefire.version>
Expand Down Expand Up @@ -186,6 +186,12 @@
<version>${revision}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-reporter-ux</artifactId>
<version>${revision}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-testutil</artifactId>
Expand Down Expand Up @@ -378,7 +384,7 @@
</doclint>
<serialwarn>true</serialwarn>
<failOnError>true</failOnError>
<failOnWarnings>true</failOnWarnings>
<failOnWarnings>false</failOnWarnings>
<verbose>false</verbose>
<additionalJOptions>
<additionalJOption>-html5</additionalJOption>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<module>reporter/plaintext</module>
<module>reporter/html</module>
<module>reporter/aspec</module>
<module>reporter/ux</module>
<module>testutil</module>
</modules>
<build>
Expand Down
4 changes: 4 additions & 0 deletions product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-reporter-aspec</artifactId>
</dependency>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-reporter-ux</artifactId>
</dependency>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-testutil</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void exporterAvailable(final String format)

@ParameterizedTest
@CsvSource(
{ "aspec", "html", "plain" })
{ "aspec", "html", "plain", "ux" })
void reporterAvailable(final String format)
{
if (!reporterLoader.isFormatSupported(format))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.itsallcode.openfasttrace.report.aspec.ASpecReporterFactory;
import org.itsallcode.openfasttrace.report.html.HtmlReporterFactory;
import org.itsallcode.openfasttrace.report.plaintext.PlaintextReporterFactory;
import org.itsallcode.openfasttrace.report.ux.UxReporterFactory;
import org.junit.jupiter.api.Test;

/**
Expand Down Expand Up @@ -83,9 +84,10 @@ void testReporterFactoriesRegistered()
final ReporterContext context = new ReporterContext(null);
final List<ReporterFactory> services = getRegisteredServices(ReporterFactory.class,
context);
assertThat(services, hasSize(3));
assertThat(services, hasSize(4));
assertThat(services, containsInAnyOrder(instanceOf(PlaintextReporterFactory.class),
instanceOf(ASpecReporterFactory.class),
instanceOf(UxReporterFactory.class),
instanceOf(HtmlReporterFactory.class)));
for (final ReporterFactory factory : services)
{
Expand Down
32 changes: 32 additions & 0 deletions reporter/ux/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>openfasttrace-reporter-ux</artifactId>
<name>OpenFastTrace UX Reporter</name>
<parent>
<relativePath>../../parent/pom.xml</relativePath>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-parent</artifactId>
<version>${revision}</version>
</parent>
<properties>
<project.build.outputTimestamp>${reproducible.build.timestamp}</project.build.outputTimestamp>
</properties>
<dependencies>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-api</artifactId>
</dependency>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-testutil</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
13 changes: 13 additions & 0 deletions reporter/ux/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This provides an interactive HTML requirement browser.
*
* @provides org.itsallcode.openfasttrace.api.report.ReporterFactory
*/
module org.itsallcode.openfasttrace.report.ux
{
requires transitive org.itsallcode.openfasttrace.api;
requires java.logging;

provides org.itsallcode.openfasttrace.api.report.ReporterFactory
with org.itsallcode.openfasttrace.report.ux.UxReporterFactory;
}
Loading
Loading