Hi Grégory,
The only way to test image is to use XPath, you're right. Someone else ping me about the need of assertImagePresent() method, so I will try to add it ASAP.
Concerning the point "validate the urls actually point to valid images", I'm not sure it is the purpose of jWebUnit. Some users asked us to add a possibility to validate pages before testing (by using tools like JTidy I think). You could write a new framework that test dead links, and final users can freely choose to use jWebUnit, you tools, or both. But if it is a very small addition (only for image links), why not. You could write a method named assertImageExists(String url) for example. Perhaps other guys could express their opinion on that point.
Concerning the point "image recognition techniques", it is definitly too much for jWebUnit. A totally separated project should be a better place.
Concerning 2.x (trunk), it is currently a simple fork of 1.x, with a new plugin for Selenium-RC. Here is what I said in a recent mail on dev ml :
>For 2.x, here is a part of my TODO list (not in priority order):
> - continue to clean and refactor API (tables assertions, javadoc, ...)
> - improve selenium plugin
> - remove JUnit dependency (move WebTestCase in another optionnal module ?)
> - use JDK 1.5
> - refactor way of locating objects
> - add a way to handle _javascript_ alert, confirm, ...
> - add a real exception mechanism to allow user to know precisly why test failed (remove all RuntimeException)
> - allow localisation of messages (move them in a property file ?)
> - ...
Any new idea and help is welcome.
++
Julien
The only way to test image is to use XPath, you're right. Someone else ping me about the need of assertImagePresent() method, so I will try to add it ASAP.
Concerning the point "validate the urls actually point to valid images", I'm not sure it is the purpose of jWebUnit. Some users asked us to add a possibility to validate pages before testing (by using tools like JTidy I think). You could write a new framework that test dead links, and final users can freely choose to use jWebUnit, you tools, or both. But if it is a very small addition (only for image links), why not. You could write a method named assertImageExists(String url) for example. Perhaps other guys could express their opinion on that point.
Concerning the point "image recognition techniques", it is definitly too much for jWebUnit. A totally separated project should be a better place.
Concerning 2.x (trunk), it is currently a simple fork of 1.x, with a new plugin for Selenium-RC. Here is what I said in a recent mail on dev ml :
>For 2.x, here is a part of my TODO list (not in priority order):
> - continue to clean and refactor API (tables assertions, javadoc, ...)
> - improve selenium plugin
> - remove JUnit dependency (move WebTestCase in another optionnal module ?)
> - use JDK 1.5
> - refactor way of locating objects
> - add a way to handle _javascript_ alert, confirm, ...
> - add a real exception mechanism to allow user to know precisly why test failed (remove all RuntimeException)
> - allow localisation of messages (move them in a property file ?)
> - ...
Any new idea and help is welcome.
++
Julien
----- Message d'origine ----
De : Grégory Joseph <[EMAIL PROTECTED]>
À : jwebunit-users@lists.sourceforge.net
Envoyé le : Lundi, 31 Juillet 2006, 1h33mn 33s
Objet : [Jwebunit-users] Image "testing"
Hi list,
I would like to be able to "test" images on pages with jwebunit. As far as I can tell, there is no support for this (at least in the 1.x branch), nor is there anything existing in htmlunit (which is the plugin we use).
What I need to do is
* validate some images are on the page (we can already do that using xpath expressions)
* validate the urls actually point to valid images
* I'd like and go as far as comparing the images to existing ones (I'm also fantasizing about image recognition techniques here ;))
At first, I naively tried to build a java.net.URL and get the contents from there. That just works, as long as there is no authentication system on your app.
Is there any interest in this? If so, I might be able to put together a small patch against the 1.x branch.
By the way, is there any doc/wiki about the trunk? I understand it is a rewrite of jwebunit; if so, I'd like to have an idea of what's in store for the future :)
Cheers,
greg
De : Grégory Joseph <[EMAIL PROTECTED]>
À : jwebunit-users@lists.sourceforge.net
Envoyé le : Lundi, 31 Juillet 2006, 1h33mn 33s
Objet : [Jwebunit-users] Image "testing"
Hi list,
I would like to be able to "test" images on pages with jwebunit. As far as I can tell, there is no support for this (at least in the 1.x branch), nor is there anything existing in htmlunit (which is the plugin we use).
What I need to do is
* validate some images are on the page (we can already do that using xpath expressions)
* validate the urls actually point to valid images
* I'd like and go as far as comparing the images to existing ones (I'm also fantasizing about image recognition techniques here ;))
At first, I naively tried to build a java.net.URL and get the contents from there. That just works, as long as there is no authentication system on your app.
Is there any interest in this? If so, I might be able to put together a small patch against the 1.x branch.
By the way, is there any doc/wiki about the trunk? I understand it is a rewrite of jwebunit; if so, I'd like to have an idea of what's in store for the future :)
Cheers,
greg
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-users mailing list
Jwebunit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users
Jwebunit-users mailing list
Jwebunit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Jwebunit-users mailing list Jwebunit-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jwebunit-users