HILSTER / Documentation
This page as Markdown

Dashboard

The HILSTER Dashboard is an interactive analytics tool for test results during development.

Fully integrated into QABench, test reports can be sent automatically to the Dashboard upon conclusion of a test run.

Additionally, JUnit-XML compatible reports generated by other testing suites can also be uploaded to allow for a comprehensive overview of the project’s current test status.

It serves users both in managing and developing roles, showing the current project status as well as changes over time.

Project requirements can be supplied to the Dashboard enabling users to see whether requirements are already covered by tests.

You can find more information in the Dashboard documentation.

project view

Dashboard browser overview

Download recording · Download transcript

Dashboard browser overview
==========================

Visual transcript and walkthrough of the silent recording.
Based on reviewed screen captions/interface actions and the associated written example.

Original recording: dashboard_overview.mp4

1. The recording starts with the Dashboard project list and its report counts, test-
   result summaries, requirements coverage, and last-modified column.

2. Opening a project displays test-result and requirements-coverage timelines.

3. Recent-report doughnut charts summarize test outcomes and requirements coverage.
   Pointing at chart segments exposes their values.

4. The project page also lists individual requirements and their coverage status. The
   associated Dashboard documentation explains these views in detail.

Starting the Dashboard

Dashboard requires the use of Docker and Docker Compose to run. It can be installed via your distribution’s repositories. As it is shipped as a Linux-image, you will need to run Linux-images on Docker for Windows or use a Linux-machine to run the Dashboard Demo.

To install Docker and Docker Compose please refer to the Docker documentation and Docker Compose documentation.

You also need Git.

First checkout the Docker Compose files from HILSTER’s GitHub.

git clone https://github.com/hilstertestingsolutions/dashboard-deployment.git
cd dashboard-deployment

Edit docker-compose.yml and fill in your activation-key.

Then run the dashboard

docker-compose up

You will now be able to navigate to http://localhost in your browser to visit an empty dashboard. The default username is root, and the default password is also root.

Importing a Project

First you have to login as root

dashboard login

Enter root as username and password.

Change directory to dashboard

cd dashboard

Create an empty project

dashboard create-project imported_project "Imported Project"

Then upload the exported project data by running

dashboard import-project imported_project project_export.zip

Now visit http://localhost/project/imported_project with your browser. You might need to login with the same credentials used via command line.

Importing a Dashboard project

Download recording · Download transcript

Importing a Dashboard project
=============================

Visual transcript and walkthrough of the silent recording.
Based on reviewed screen captions/interface actions and the associated written example.

Original recording: demo_dashboard_1.mp4

1. Log in to the local demonstration Dashboard with its configured account and change to
   the dashboard example directory.

2. Create the imported_project project using the Dashboard command-line interface.

3. Import the provided project_export.zip data into that project. The terminal displays
   progress while reports and requirements are imported.

4. Log in through the browser, open the imported project, and inspect its populated
   statistics and timelines.

Uploading Reports with HILSTER Testing Framework

Create another empty project

dashboard create-project example "Example Project"

If you reload the browser, you should now see the empty project Example Project (http://localhost/project/example). You might need to login with the same credentials used via command line.

Run test_example.py multiple times. Play around with the code.

htf test_example.py -r http://localhost/project/example
#
# Copyright (c) 2023, HILSTER - https://hilster.io
# All rights reserved.
#

import htf
import htf.assertions as assertions

successes = 1
failures = 1
errors = 1
skipped = 1

all_requirements = [f"REQ-{i}" for i in range(1, 10 + 1)]
current_requirements = all_requirements[:3]
failing_requirements = current_requirements[: len(current_requirements) // 3]
errored_requirements = current_requirements[: -len(current_requirements) // 2]


@htf.data(range(successes))
@htf.requirements(*current_requirements)
def test_success(i: int) -> None:
    pass


@htf.data(range(failures))
@htf.requirements(*failing_requirements)
def test_failure(i: int) -> None:
    assertions.assert_false(True, "This test fails!")


@htf.data(range(errors))
@htf.requirements(*errored_requirements)
def test_error(i: int) -> None:
    raise Exception("This test has an error!")


@htf.data(range(skipped))
def test_skip(i: int) -> None:
    raise htf.SkipTest("This test is skipped!")


if __name__ == "__main__":
    htf.main(report_server="http://localhost/project/example")

Upload requirements to the project

dashboard upload-requirements example requirements_10.csv

Check the project page in the browser. Run the tests again multiple times if you wish.

You can also upload other requirements to see how the project changes.

Uploading reports and requirements

Download recording · Download transcript

Uploading reports and requirements
==================================

Visual transcript and walkthrough of the silent recording.
Based on reviewed screen captions/interface actions and the associated written example.

Original recording: demo_dashboard_2.mp4

1. Create a new empty example project in the local Dashboard.

2. Upload the example requirements to that project.

3. Run test_example.py with the Dashboard project URL as the report target. The
   demonstration includes intentional failed tests so the result categories can be
   inspected.

4. Repeat uploads as desired, then inspect the project's test-result and requirements-
   coverage charts and its latest report.

Requirements Coverage using multiple tools

Assume you have a project which has 20 requirements. The first half is tested with a unit testing framework that generates a JUnit-XML report (unittests.xml).

The other half is tested by integration tests using HILSTER Testing Framework.

You’d like to measure the requirements coverage over the whole project.

This is possible with HILSTER Testing Framework and Dashboard.

Create another project and upload the desired requirements.

dashboard create-project coverage_project "Coverage Measurement"
dashboard upload-requirements coverage_project requirements_20.csv

Create the integration test report

htf -H integrationtests.html integrationtests.py

Use the report-tool to combine both reports and to send them to the Dashboard.

report-tool unittests.xml integrationtests.html -r http://localhost/project/coverage_project

Now navigate to http://localhost/project/coverage_project to check the requirements coverage.

You can vary the scripts to see how the requirements coverage changes.

Combining requirements coverage from multiple tools

Download recording · Download transcript

Combining requirements coverage from multiple tools
===================================================

Visual transcript and walkthrough of the silent recording.
Based on reviewed screen captions/interface actions and the associated written example.

Original recording: demo_dashboard_3.mp4

1. Create the coverage measurement project and upload its requirements.

2. Run the integrationtests.py example to create an htf HTML report.

3. Use report-tool to combine that report with the provided JUnit XML report and send
   the combined result to the Dashboard project.

4. Open the project in the browser and inspect the combined test results and
   requirements coverage.