Comments (7)
um, I see your point, if we catch a 'mistaken' file by accident it's going to be hard to understand why this is occurring. On the other hand, the vast majority of the time this is just going to be clutter. I could add a flag to log on request, but feel this isn't going to help people when they are confused either, it will just be another hidden feature they don't know about.
Oddly, araxis has a fairly common type name, so couple of questions
- what happened when the other program opened?
- how long did it take you to figure it out?
- any idea how to avoid the issue happening at all?
btw: I am assuming once you did figure it out you either
a) used the KDiffReporter directly
b) created a Custom Diff Reporter of your own that didn't include the Araxis reporter
from approvaltests.net.
Thanks for your answer. Here's mine :
-
nothing. I just have the Mismatch exception message and no program launch (it was ImageMagick compare.exe)
-
about 1 hour. We browse your code (Reporter, GenericReporter, Approver, ...) to understand its logic. We firstly think that the diff program wasn't found, but you have an exception for that. Then we think of a PATH error and begin to try all your diff reporter in the same order, and found it was the AraxisReporter that reproduce the same output. And I found another compare.exe in my PATH with where.exe
-
since you search for an executable name in the PATH with where.exe, I don't know how to prevent collisions. Maybe add an optional StrictPath boolean setting on the UseReporter attribute to disable the search-in-path feature ? I thought the informative message should be easier to add without changing logic in your code. But I didn't know your project enough to see other impacts of that.
a) I tried the KdiffReporter directly and that's work. But we need to keep DiffReporter since my colleague prefer another diff program. So I removed ImageMagick from my PATH and problem is gone.
b) I didn't create a custom diff reporter.
from approvaltests.net.
Doh, the close button did not do what I thought it would, sorry, I didn't mean to do that.
from approvaltests.net.
So, let me suggest you create a costume Diff reporter.
https://github.com/approvals/ApprovalTests.Net/blob/master/ApprovalTests/Reporters/DiffReporter.cs
Notice it is rather easy to do, you don't need the launch method, but the INSTANCE variable will be used if it is there rather than creating a new one.
I'll grab image magik and take a look, possibly it is returning an error code we can detect and give better feedback.
from approvaltests.net.
You can control your path ordering and that should help you change in case two exes come up in different paths.
from approvaltests.net.
@isidore @staxmanade : thanks for your suggestions. Removing ImageMagick from my PATH was enough, I don't need it.
from approvaltests.net.
Unsure how to solve this now, closing until further problems arise ...
from approvaltests.net.
Related Issues (20)
- These files have different encodings. Left file: Unicode (UTF-8) with signature. Right file: Central European (Windows). You can resolve the difference by saving the right file with the encoding Unicode (UTF-8) with signature. HOT 7
- Set project to not conflict with NCrunch HOT 2
- VisualStudioReporter incorrect comparison order of approved and received? HOT 6
- Upgrade DiffEngine to enable Left/Right diff behavior
- System.Exception : Could not find a diff tool for extension: .txt HOT 1
- VerifyPdfFile failed at the random generated ID HOT 7
- Looking for VS 2022 support HOT 6
- Any documentation how to use ApprovalTests with Specflow? HOT 2
- 404 Errors from dead links in help document HOT 1
- `UseApprovalSubdirectory` does not work on derived classes HOT 1
- Verifying log testing... HOT 1
- The compare appear to be in wrong order HOT 4
- DiffEngine.ProcessCleanup throws System.TypeInitializationException when running failing test HOT 1
- Update to DiffEngine 11
- drop net461 support
- NUNIT TestCase doesn't work HOT 1
- Next version release date? HOT 2
- Verify using xUnit fails HOT 1
- DiffEngine 15.2.0
- EmptyFiles 8.1.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from approvaltests.net.