On Wed, Jul 5, 2017 at 11:09 AM, Woonsan Ko <[email protected]> wrote: > On Tue, Jul 4, 2017 at 5:47 AM, Daniel Dekany <[email protected]> wrote: >> Tuesday, July 4, 2017, 6:47:29 AM, Woonsan Ko wrote: >> >>> On Sat, Jun 3, 2017 at 9:50 AM, Daniel Dekany <[email protected]> wrote: >>>> I have created two issues for this. For the non-Web-MVC part: >>>> https://issues.apache.org/jira/browse/FREEMARKER-54 >>>> and the Web MVC part that builds on the first: >>>> https://issues.apache.org/jira/browse/FREEMARKER-55 >>> >>> I've just proposed an initial pull request for FREEMARKER-55: >>> https://github.com/apache/incubator-freemarker/pull/25, for your >>> reviews. >>> Please see my last comment in FREEMARKER-55 for details (what was done >>> and what's to be done). >> >> Thanks, and see my answer on >> https://issues.apache.org/jira/browse/FREEMARKER-55! > > Thanks a lot! I'll take a look, make changes on obvious things to > correct and ask again if necessary.
I created one more pull request: - https://github.com/apache/incubator-freemarker/pull/27 While testing it in a simple spring mvc web app at https://github.com/woonsan/spring-mvc-freemarker3-demo, I found out the viewResolver implementation missed the default TLD loading sources (/WEB-INF/lib/*.jar!META-INF/**/*.tld). > >> >>> By the way, I'd like to build a simple spring mvc web application for >>> integration testing as spring-mvc support seems to require that and >>> unit tests might not be sufficient. >> >> Ultimately, you can start the Spring application "embedded" from >> JUnit, and then JUnit can visit the web pages (with the help of >> Selenium and such maybe). I'm not saying that we should do such >> investment right now, but as things mature we probably will have to. Yes, I see RealServletContainertTest (extending WebAppTestCase) start Jetty server, make URL requests and validate the responses. It's using Jetty 7.x at the moment, but as we bumped up the servlet spec to 3.0, I guess we can upgrade Jetty dependency to one of the stable version (9.2 or 9.3) [1]. Perhaps 9.2 because we're still stick with Java 1.7 in build.gradle? Anyway, I'd like to go ahead with adding unit tests using the same technique (running Jetty server and making requests for validations). I can probably add dependency in freemarker-spring tests with 'test' classifier on freemarker-servlet test classes to reuse the Jetty things. Regards, Woonsan [1] http://www.eclipse.org/jetty/documentation/current/what-jetty-version.html > > I see. I remember some people add specific JUnit classes suffixed by > 'IT' for integration testing purpose somewhere. Perhaps we can take a > look at that kind of examples. > >> >>> I can do that in my own github repo, but if there's any better >>> location and if you have any suggestion, please let me know. >> >> Tests and example applications probably has a better place in the >> FreeMarke repo, but we can figure this one out later, depending on >> what comes out of it. > > OK. I'll proceed whichever works now, keeping in mind that we'll merge > everything into integration tests in our repo. > > Regards, > > Woonsan > >> >> >>> Cheers, >>> >>> Woonsan >>> >> >> -- >> Thanks, >> Daniel Dekany >>
