Skip to content

[p5.js 2.0] Bring back a way to show the results of visual tests visually #7618

Open
@davepagurek

Description

@davepagurek

Increasing access

In 1.x, when I first added visual tests, there was also a page you could go to where you could see what we were expecting and what the results are:

Image

I think this view is really helpful in showing contributors how our testing works, and what is already covered by tests. We don't currently have this in 2.0.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

Feature request details

Our tests are now run in vitest, and within that testing framework, I have not (yet) found a way to do a custom HTML display of test results in order to show pictures. For now, we just output a base64-encoded image URL that you can paste into your browser. This works for failed test cases, but makes it hard to get an overview of the current state of tests.

Is there a way in vitest to make a custom report that could embed the expected and actual visual test results? Or maybe in github actions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions