Forum Discussion
Hi Alex,
I don't think that this could help me. Let me explain to you what I need :
The return value of Compare() says me if there is a difference or not.
But I need to know if the Compare() method has been executed or not.
Indeed, I need to distinguish false-positive and false-negative issues for this kind of test.
Regards,
Mehdi
Hi Mehdi,
Not sure that I understood what you need:
> I need to know if the Compare() method has been executed or not.
As the method returns some result, this means that it was executed.
As the method performs binary comparison (i.e. it does not support regular expressions, callback functions, etc.), this means that the files are physically different if the method returns False.
If under 'false negative' you understand that two files may be different physically but equal logically, then you must create your own comparison function as this function must implement the business rules that define whether or not compared files are logically equal.
- m_essaid11 years agoValued Contributor
Alex,
Firstable thank you for trying helping me,
When I say "false negative" it's a bad translation from french.
I was talking about Type I and Type II errors, especialy the one when you think that an event hasn't occured while it has occured in reality.
Thus, when I test the return value of the Compare() method, which is a boolean, there is no third state for this boolean (obviously) to say that the method has execute itself.
So I really need to build a test that compares files beeing sure that 1) the comparison has been done and 2) the result is the boolean value returned by Compare().
Regards,
Mehdi
- AlexKaras11 years agoCommunity Hero
Hi Mehdi,
-- Can you mention a scenario when the .Compare method is called but the comparison is not done?
-- Doesn't the context of the extended info log panel provide you with the information of why .Compare() call failed?
- m_essaid11 years agoValued Contributor
Hi Alex,
For example :
- I don't check "stop on error" parameter
- When the .Compare() result is true, the test succeed, when it's false it failed
- But... the boolean variable used to store this result is obviously false or true (I prefer "false")
- At the end of the whole tests, I write an email in which the variable is used to say "test ok" or not.
- As you can see, a false value for this boolean could say both "the tests has failed" or "an error has occured"
-------
I didn't understood you last question...
Thank you,
Mehdi