Code Monkey home page Code Monkey logo

Comments (7)

isidore avatar isidore commented on June 15, 2024

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

  1. what happened when the other program opened?
  2. how long did it take you to figure it out?
  3. 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.

sjousse avatar sjousse commented on June 15, 2024

Thanks for your answer. Here's mine :

  1. nothing. I just have the Mismatch exception message and no program launch (it was ImageMagick compare.exe)

  2. 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

  3. 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.

jamesrcounts avatar jamesrcounts commented on June 15, 2024

Doh, the close button did not do what I thought it would, sorry, I didn't mean to do that.

from approvaltests.net.

isidore avatar isidore commented on June 15, 2024

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.

staxmanade avatar staxmanade commented on June 15, 2024

You can control your path ordering and that should help you change in case two exes come up in different paths.

from approvaltests.net.

sjousse avatar sjousse commented on June 15, 2024

@isidore @staxmanade : thanks for your suggestions. Removing ImageMagick from my PATH was enough, I don't need it.

from approvaltests.net.

isidore avatar isidore commented on June 15, 2024

Unsure how to solve this now, closing until further problems arise ...

from approvaltests.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.