tag:blogger.com,1999:blog-25456655.post3200440943426550894..comments2024-02-09T11:53:32.369-05:00Comments on Diego Torres Milano's blog: monkeyrunner: visual image comparisonDiego Torres Milanohttp://www.blogger.com/profile/12030778501784140349noreply@blogger.comBlogger40125tag:blogger.com,1999:blog-25456655.post-87546353059735587862012-06-04T12:52:53.355-04:002012-06-04T12:52:53.355-04:00@Smitha, the answer was published as a new post: h...@Smitha, the answer was published as a new post: <a href="http://dtmilano.blogspot.ca/2012/06/monkeyrunner-q.html" rel="nofollow">http://dtmilano.blogspot.ca/2012/06/monkeyrunner-q.html</a>.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-28812914312816853822012-06-02T01:43:12.245-04:002012-06-02T01:43:12.245-04:00Thanks Milano. Would be of great help to meThanks Milano. Would be of great help to meSmithahttps://www.blogger.com/profile/17587028646000593538noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-47976302162150806662012-06-02T01:37:51.693-04:002012-06-02T01:37:51.693-04:00@Sathia,
Yes, it's possible and very simple by...@Sathia,<br />Yes, it's possible and very simple by the way. You have to invoke the <b>phone</b> service from monkeyrunner (as ViewClient does with the window server). This probably is a good example for a post by itself. I will be posting it soon.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-19884257487233577302012-05-30T15:10:38.081-04:002012-05-30T15:10:38.081-04:00Hi,
Thanks for the response. To get more specific...Hi,<br /><br />Thanks for the response. To get more specific for what I was looking at is, to use getCallState(),getDataActivity() etc<br />[Reference:http://developer.android.com/reference/android/telephony/TelephonyManager.html] is Monkeyrunner scripts. Please let me know if this is a possible idea,Smithahttps://www.blogger.com/profile/17587028646000593538noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-21926548341839423152012-05-30T13:09:05.966-04:002012-05-30T13:09:05.966-04:00@Smitha,
You question is not very specific so I ca...@Smitha,<br />You question is not very specific so I cannot give you a more detailed answer, but I think what you are looking for is described in <a href="http://dtmilano.blogspot.com/2012/03/monkeyrunner-running-unit-tests.html" rel="nofollow">monkeyrunner: running unit tests</a>.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-44131362531919919642012-05-30T04:40:43.383-04:002012-05-30T04:40:43.383-04:00Hi Milano,
I have read quite a few other topics. ...Hi Milano,<br /><br />I have read quite a few other topics. But unable to get what you are referring to. Could you please point out.<br />Thanks,<br />SmithaSmithahttps://www.blogger.com/profile/17587028646000593538noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-11357277033488042902012-05-25T11:15:07.194-04:002012-05-25T11:15:07.194-04:00There are plenty of alternatives.
Have you read th...There are plenty of alternatives.<br />Have you read the other articles in this blog ?Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-17081392726589830602012-05-25T05:38:55.814-04:002012-05-25T05:38:55.814-04:00Hi Milano,
Thanks for the update.
I wanted to kno...Hi Milano,<br /><br />Thanks for the update.<br />I wanted to know if there is a way to retrieve the state of the android device in order to make a test case complete rather than comparing screen shots.<br />Good to know your view.Smithahttps://www.blogger.com/profile/17587028646000593538noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-77905412406277014512012-05-16T19:18:22.304-04:002012-05-16T19:18:22.304-04:00Great!Great!Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-91997947598520622122012-05-16T18:58:36.679-04:002012-05-16T18:58:36.679-04:00I figured it out! Thank you for all your responses...I figured it out! Thank you for all your responses and support! It's been helpful!Blainehttps://www.blogger.com/profile/00391837648931311590noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-35086850412721776152012-05-16T17:34:33.982-04:002012-05-16T17:34:33.982-04:00I'm confused how you are using ImageMagic in y...I'm confused how you are using ImageMagic in your scripting. <br /><br />Did you use MonkeyRunner to compare images or ImageMagic? <br /><br />If you used imagemagic, how were you able to call it from your script?Blainehttps://www.blogger.com/profile/00391837648931311590noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-7393284905493647382012-05-16T17:21:23.541-04:002012-05-16T17:21:23.541-04:00Do you mean sameAs() ?
It's a MonkeyImage meth...Do you mean sameAs() ?<br />It's a MonkeyImage method.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-47085773077858831182012-05-16T14:04:12.598-04:002012-05-16T14:04:12.598-04:00I'm confused. The script you wrote in your exa...I'm confused. The script you wrote in your example is in Python, isn't it? I'm just curious how you were able to call the compareAs() function.Blainehttps://www.blogger.com/profile/00391837648931311590noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-60177554250640549072012-05-16T13:56:04.411-04:002012-05-16T13:56:04.411-04:00There are python bindings available for ImageMagic...There are python bindings available for ImageMagick that could be used, but I've never tried (see http://www.imagemagick.org/download/python)Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-12205518808426829342012-05-16T12:45:59.924-04:002012-05-16T12:45:59.924-04:00Hi Diego,
I was wondering how to set up imageMagi...Hi Diego,<br /><br />I was wondering how to set up imageMagic to interface with the Python script.<br /><br />Thanks,<br /><br />BlaineBlainehttps://www.blogger.com/profile/00391837648931311590noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-48624826440197422562012-05-03T11:48:49.106-04:002012-05-03T11:48:49.106-04:00Hi Smitha,
ImageMagick convert has also the abilit...Hi Smitha,<br />ImageMagick <a href="http://www.imagemagick.org/script/convert.php" rel="nofollow">convert</a> has also the ability of cropping your image, for example:<br /><br />$ convert input.png -crop 400x200+0+200 output.png<br /><br />will crop a 400x200 area at (0, 200).Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-57721735455470787062012-05-03T05:00:26.748-04:002012-05-03T05:00:26.748-04:00Hi Diego,
Thanks for the information on your blog...Hi Diego, <br />Thanks for the information on your blog.<br />I am working on Monkeyrunner. Screenshot is a very good option for regression testing.<br />Wanted to know if there is any way to crop the images and compare? Since Acceptance value is not always preferred. Thanks for your timeSmithahttps://www.blogger.com/profile/17587028646000593538noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-54336889575671220322011-09-15T02:10:13.146-04:002011-09-15T02:10:13.146-04:00Dear Diego
Thanks. I have checked the usage of Ima...Dear Diego<br />Thanks. I have checked the usage of ImageMagick but it is not what I want.<br />Do you know that there is a way sameAs?<br />I searched that there is a bug about sameAs now. Do you have any comment on it?Romeohttps://www.blogger.com/profile/16756431901039289340noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-47503475403713156892011-09-14T10:29:37.000-04:002011-09-14T10:29:37.000-04:00Hi Romeo,
ImageMagick is a set of stand-alone prog...Hi Romeo,<br />ImageMagick is a set of stand-alone programs that you can run, in your case, from the Windows command prompt. There is no need to install anything in monkeyrunner.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-65651709261136300132011-09-13T21:07:57.853-04:002011-09-13T21:07:57.853-04:00Dear Diego
Thanks for your kindly reply.
I've ...Dear Diego<br />Thanks for your kindly reply.<br />I've searched some information about running it under Windows but still could not help, I just want to know if we could install the package in monkeyrunner. By the way, thank you very much, I will study for it.Romeohttps://www.blogger.com/profile/16756431901039289340noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-90674083397171111222011-09-13T10:26:47.343-04:002011-09-13T10:26:47.343-04:00I should say that I've never tested in on Wind...I should say that I've never tested in on Windows, but I think it should work with no or minor changes only.<br /><br />Take a look at <a href="http://www.imagemagick.org/Usage/windows/" rel="nofollow">imagemagick usage under windows</a>.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-18593183957147633442011-09-13T02:35:43.338-04:002011-09-13T02:35:43.338-04:00Dear Diego
Do you know how to install the ImageMag...Dear Diego<br />Do you know how to install the ImageMagick under the Windows environment and use monkeyrunner to check it?<br />I just downloaded the ImageMagick for Win and installed but I am still confused to use it.Romeohttps://www.blogger.com/profile/16756431901039289340noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-81281681228164829512011-09-09T15:24:47.707-04:002011-09-09T15:24:47.707-04:00Even the most unnoticeable difference (like the ba...Even the most unnoticeable difference (like the battery icon or the clock) could generate very different PNG file sizes.<br /><br />I recommend using Imagemagick's compare to do the visual comparison.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.comtag:blogger.com,1999:blog-25456655.post-9705051791112493052011-09-09T11:55:55.800-04:002011-09-09T11:55:55.800-04:00Thanks Diego,
The odd thing is, is that I am just...Thanks Diego,<br /><br />The odd thing is, is that I am just testing it by taking snapshots about 5 seconds apart. Nothing should have changed, but it is still off by sometimes 100 bytes. I guess its not a good workaround for this issue. I'll be waiting for the fix. <br /><br />I've also heard about this new tool called ChimpChat. I haven't actually seen it, just saw Bill N comment on it at one point not long ago.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-25456655.post-88648272589983575752011-09-09T00:26:18.034-04:002011-09-09T00:26:18.034-04:00It's a known monkeyrunner bug, it should be fi...It's a known monkeyrunner bug, it should be fixed soon.<br /><br />On your second problem, remember that you are comparing PNGs, not bitmaps. If they are not exactly the same their lengths will be different.Diego Torres Milanohttps://www.blogger.com/profile/12030778501784140349noreply@blogger.com