question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable changing only the snapshot filename

See original GitHub issue

Is your feature request related to a problem? Please describe. Using tests with dynamic data (e.g. DataRow, DynamicData, DataSource) I want to control the filename of the snapshots, so they do not end up overwriting each other. But I do not want to hardcode any file path, just modify the filename.

Describe the solution you’d like I would like to use SnapshotId to specify the snapshot filename, but setting snapshotDirectory to null so the default location (_snapshots subdirectory) is used.

Describe alternatives you’ve considered I am currently using child snapshots instead, which is rather tedious because the snapshots themselves are rather large and there are many data rows. There could be a way to specify the folder using path variables or getting the path from the test file, but both are rather tedious and undocumented in Snapper.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
theramiscommented, Aug 25, 2022

Hey @DavidInterad, thanks bringing this up.

The current way of controlling snapshots is definitely a bit tedious. Let me have a think about some ideas and I’ll get back to you in about 2 days and then we can go from there.

0reactions
DavidInteradcommented, Dec 12, 2022

Yes, that does the trick for me. Thank you very much 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modify snapshot initialization options - SQL Server
In the Publisher Properties - <Publisher> dialog box, enter a value for the Default Snapshot Folder property.
Read more >
Can I change the way Windows 10 gives names to ...
This can be accomplished with ReNamer. Open ReNamer; Add an Insert renaming rule with the following configuration: Insert ":File_DateModified:" ...
Read more >
System recovery and snapshot management with Snapper
Using the YaST Snapper module or the snapper command line tool, you can undo the changes made by YaST/Zypper by restoring files from...
Read more >
Change filename created by mate-screenshot
I need a screenshot filename with only alphanumeric characters i.e. no spaces,parens etc. I have found no way to specify filename format. How...
Read more >
Snapshot Testing
Snapshot tests are a very useful tool whenever you want to make sure your UI does not change unexpectedly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found