TouK on WGK 2011 – update

I National Conference on Computer Games Development in Gdańsk is officially over. Three days with polish game dev, technical lectures and challenging 8 hour game programming contest. TouK as one of the lecturers presented comparison between two worlds: “Developing business web applications and producing rich browser based games”. Both, media presentation and technical paper are available below (polish version only) WGK 2011 was also first spot where gamers and developers could check out “Project Ark” – rich space MMO browser web game project, based on open Java solutions (GWT, Spring, Hibernate) and common web standards (HTML/CSS/javascript). Project is developed in spare time by small team of coworkers of TouK. We will try to add some media presentation soon.

Technical paper

[Media presentation

]

2 Technical paper summary:

> Development process comparison between business web application and advanced browser based games. Presentation will touch many aspects of development process starting from analysis and technical design, through implementation, testing and final deployment, with attention to project management and business model. Very important part of presentation will discuss Open Source solutions and consequences of their use. Web game development process will be presented on example of ongoing Project Ark. It is rich space MMO browser web game project, based on open Java solutions and common web standards (HTML/CSS/javascript). It is developed in spare time by small team of coworkers of TouK IT company (www.touk.pl). >

You May Also Like

Grails with Spock unit test + IntelliJ IDEA = No thread-bound request found

During my work with Grails project using Spock test in IntelliJ IDEA I've encountered this error:

java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131)
at org.codehaus.groovy.grails.plugins.web.api.CommonWebApi.currentRequestAttributes(CommonWebApi.java:205)
at org.codehaus.groovy.grails.plugins.web.api.CommonWebApi.getParams(CommonWebApi.java:65)
... // and few more lines of stacktrace ;)

It occurred when I tried to debug one of test from IDEA level. What is interesting, this error does not happen when I'm running all test using grails test-app for instance.

So what was the issue? With little of reading and tip from Tomek Kalkosiński (http://refaktor.blogspot.com/) it turned out that our test was missing @TestFor annotation and adding it solved all problems.

This annotation, according to Grails docs (link), indicates Spock what class is being tested and implicitly creates field with given type in test class. It is somehow strange as problematic test had explicitly and "manually" created field with proper controller type. Maybe there is a problem with mocking servlet requests?