In a previous article I described how to load test data that your ScalaTest Play Framework functional tests might need using Play Framework’s Evolutions. This made use of the [crayon-5ed76a55b6d5a422332544-i/] class and defining evolutions in the test setup code. Recently I wanted to also load some test data from a file and so turned to the [crayon-5ed76a55b6d63430912123-i/] class which loads resources from the class path. The trouble was I wanted to apply the schema from […]
Have you ever noticed misspelled HTTP response headers? [crayon-5ed76a55b7c40108188971/] That ‘Cteonnt-Length’ sure looks weird! According to this StackOverflow answer, the jumbled header contains the uncompressed size of the response and, sure enough, it does seem to be the case. But why? It seems like this is a trick employed by hardware appliances (eg Citrix NetScaler) to ‘remove’ a header without affecting the check-sum value.
It is common when working with git to use lots of branches. Occasionally you might accidentally commit to the wrong branch but thankfully git makes it easy to put these commits in the right place. It’s worth noting that the fixes described here are only for when you haven’t pushed anything to a remote branch otherwise you will be changing history that someone else might have already pulled.You don’t want to do that. There are […]
The ScalaTest + Play library provides a couple of useful traits for when your ScalaTest Play Framework functional tests need a running application for context. The [crayon-5ed76a55b92c5329138564-i/] trait will share the same [crayon-5ed76a55b92c7438368129-i/] instance across all tests in a class whereas the [crayon-5ed76a55b92c8254787811-i/] trait gives each test its own [crayon-5ed76a55b92c9635867829-i/] instance. These traits will ensure you have a running application for your tests but if you want to test code that operates on a database […]