Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test cases #28

Closed
stevegt opened this issue Nov 24, 2020 · 3 comments
Closed

test cases #28

stevegt opened this issue Nov 24, 2020 · 3 comments

Comments

@stevegt
Copy link
Contributor

stevegt commented Nov 24, 2020

We've already done a bunch of test case cleanup while working #24. I'm worried that some of the stuff we've done so far, not to mention the API refactoring we're talking about in #22 and #16, could silently break or subtly alter the output of one of the examples and we might not catch it.

So @koshchei is right now working on a platform-neutral tool in Go that hashes the output files in the examples. We'd run that on a version from a few days ago before all of the current work started, and it would store the hashes in something like examples/*/.sums.

Every test run after that would re-hash after running the example tests and compare the results with the reference hashes. We'll see how this goes, but I think it could work.

We're looking at storing just the hashes rather than the output files themselves due to the fact that, right now, the .dxf, .stl, .svg, and .png output files together total up to over a gigabyte in size already. ;-)

@deadsy
Copy link
Owner

deadsy commented Nov 25, 2020

Testing a hash of the output files is likely to be fragile. For example, I can think of a single number that if changed would alter all stl outputs. Not in a way that would break them- just in a way that would be a bit different. As a base regression it's not a bad idea, but you'd have to be prepared to resync the hashes as needed.

koshchei added a commit to koshchei/sdfx that referenced this issue Dec 3, 2020
- partial fix for deadsy#28
- add README for interpreting md5 results
- add MD5SUM reference files to all example directories
- add md5tool executable to gitignore
- simplify top-level Makefile

Co-authored-by: Steve Traugott <[email protected]>
Co-authored-by: ryan <[email protected]>
@stevegt
Copy link
Contributor Author

stevegt commented Dec 24, 2020

The Hausdorff Distance filter mentioned in #31 should be able to provide diffs with tolerance for sdf objects. An end-to-end test would also include an import and diff of rendered STLs, possibly using https://github.com/hschendel/stl for import. STL import would also address #14.

@deadsy
Copy link
Owner

deadsy commented May 4, 2022

Using the SHA1SUM files for now.

@deadsy deadsy closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants