timurstrekalov / saga

Better code coverage tool for JavaScript.
http://timurstrekalov.github.com/saga/
Other
87 stars 25 forks source link

Fails with newer versions of htmlunit #135

Open matstatman opened 8 years ago

matstatman commented 8 years ago

Htmlunit version 2.16 and upwards have removed the FIREFOX_17 field in BrowserVersion, which is used by the class com.github.timurstrekalov.saga.core.cfg.Config. See http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/BrowserVersion.html

Caused by: java.lang.NoSuchFieldError: FIREFOX_17 at com.github.timurstrekalov.saga.core.cfg.Config.(Config.java:24) at com.github.timurstrekalov.saga.core.cfg.InstanceFieldPerPropertyConfig.(InstanceFieldPerPropertyConfig.java:42) at com.github.timurstrekalov.saga.core.DefaultCoverageGenerator.(DefaultCoverageGenerator.java:38) at com.github.timurstrekalov.saga.core.CoverageGeneratorFactory.newInstance(CoverageGeneratorFactory.java:22)

Please load the field dynamicly or upgrade to at least Htmlunit version 2.18. How to reproduce:

....

com.github.timurstrekalov saga-maven-plugin 1.5.5 net.sourceforge.htmlunit htmlunit 2.18 ....

....

spyhunter99 commented 5 years ago

just tried it with v2.33 of htmlunit, same deal.

spyhunter99 commented 5 years ago

This snowballed very quickly. Requires a selenium update, which also requires a jetty update (major api differences), and a bit of pom work. selenium html unit driver also hard codes to firefox 17 and doesn't appear to have been maintained since then. So even if can i fix the saga's jetty update issues, selenium will have to update their project to use the newer versions of htmlunit (and omit the hard coded references to ff 17. Of course i could fork it and publish my own version but who know's what pain that will bring.