allure-framework / allure-framework/allure3

Enchance trend lines for diff visuals

Open
#428 0 comments 0 reactions 1 assignee Claimed by @vdvukhzhilov View on GitHub
Dominant language
HTML
Stars
401
Forks
58
Avg merge
2d 20h
Merged PRs (30d)
34

Description

We have two diff visuals:

- status change dynamic
- test base growth dynamic

Currently, the trend lines they display are a little bit off:

- They only account for non-zero values.
- They show the trend for the diff of the value, which is useful, but not what was intended originally.

The original intent was to give users a simple clue about the value being diffed:

- Are the tests diverging (more fails) or converging (more passes)?
- Is the test base growing or shrinking?

The current trend lines, if we fix them to account for zero values as well, give the following:

- Is the convergence/divergence accelerating/decelerating?
- Is the test base growth/shrinkage accelerating/decelerating?

We should definitely add the originally intended trend lines. We may also display the current trend lines. In such a case, they need to be fixed to account for zeroes. We're also gonna need proper tooltips/documentation that explains the difference between the two.

### Formulas

#### Sum trend lines

Let's call the originally intended trend lines the sum trend lines.

First, for each historic point, calculate the running total of the diff:

- For status change dynamics, the diff is calculated as `Diff = - - `.
- For test base growth synamics, the diff is `Diff = - `.

The running total is the sum of `Diff` values across historical points up to and including the current one.

Since the trend line must fit the visual without expanding the Y-axis range, we should normalize the running total by dividing it by the total number of historical points.

Next, the linear regression is calculated, and the resulting line is displayed. We should probably hide the line points, as these may confuse users due to normalization.

#### Diff trend lines

These lines are calculated similarly to the sum trend lines, except we use the diff values directly (including zeroes) rather than calculating their running total.

#### Examples (prototype)

Example 1: growing but decelerating

Image

Example 2: growing and accelerating

Image

Example 3: shrinking and decelerating (negative acceleration)

Image

Example 4: shrinking and accelerating (shrinkage is slowing down, leaning to growth)

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.