Skip to content

Jeilson-Dev/golden_diff

Repository files navigation

Golden Diff

Publish Extension

Easily compare golden failures and check the difference. A valuable tool to save you time in Flutter development and automated tests.

Features

This extension looks for images of golden test failures on your project, it makes a list with all the files reached. By clicking on one it's possible to see the difference between the expected image and the image that was generated by the golden toolkit.

Once there are test failures on your project, there will be a slider that reveals the expected image above the failure.



Let's see an example:

Imagine you've made some alterations, and suddenly, the tests begin to fail:

Test fails

image

Locate the failure in list

With the Golden Diff extension, pinpointing errors becomes effortless. Simply navigate to the extension to quickly identify failures, compare expected versus generated outcomes, and save valuable time troubleshooting.

image

Open the failure and see what happens

image

Compare the generated images

Here, you can explore the various types of golden tests available, offering insight into what's happening behind the scenes. Golden Diff consolidates this information, streamlining your workflow and saving you precious time:

Failure vs Expected

The Failure image will have a red shadow and the Expected image will show a green shadow to effort the difference.

image

Isolated image

The isolated mode will present any discrepancies found between the expected image and what was actually detected.

image

Master Image

The master image will showcase both the expected and failure images overlaid, making it effortless to discern the differences.

image

Find the test easily

Tap on the window title to copy the image name and locate using the search vscode resource

image

Some contributions

Thanks bbcBreno for this suggestion of the extension icon. Thank you for your valuable assistance!

RyanHolanda thank you for suggesting the feature of a library golden of images. Thank you for your valuable contribution and for sharing such an insightful idea!

PauloNonaka for their invaluable contributions in enhancing the README and providing the idea for a feature to clear golden failure images. Your efforts and ideas have greatly improved the project.

Release Notes

0.0.1

  • Initial release with basic features

0.0.2

  • Included a wonderful icon

0.0.3

  • added other views to see individual tested master masked and isolated
  • added hover to easy toggle on tested and master image
  • change icon on primary sidebar

1.0.0

  • fix size aspect ratio
  • preparing code to new features

1.0.1

  • added clear function
  • tree view by project

1.0.2

  • projects and itens are sorted
  • fix duplicated itens on tree

1.0.3

  • automatic refresh when detect new failures

1.0.4

  • golden library

1.0.5

  • update tree view

1.0.6

  • refactor code
  • revert update tree view

1.0.7

  • add a title to failures view

1.0.8

  • setup automatic deploy

1.0.9

  • added license

1.1.0

  • find golden image and failures wherever they are

1.1.1

  • fix error to get projects

1.1.2

  • fix error to get projects

2.0.0

  • implement a new visual

2.0.1

  • FIX(GDE-11): When a test fails it’s creating a tree node of project for every tests failed.

2.0.2

  • Feat(GDE-12): Display a badge counter

Golden retriever icons created by Freepik - Flaticon
Clear icons created by LAFS - Flaticon
Dog icons created by Freepik - Flaticon

Enjoy!

About

This is an extension for vscod

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published