Start Integration testcase

This starts the IntegrationTestCase class as described in #4371. While it is incomplete, the parts that are done 'work', and I figured a smaller blob of changes would be easier to discuss and find problems with.
I don't think you need to actually use configuration here. Instant imaging a plain session object would be enough