SaaS CMS has officially launched! Learn more now.

Setting up CMS for integration tests


I'm trying to find out the best way to execute Integration-tests against the CMS. Not to be confused with Unit-tests for which we could use mocks of the relevant Episerver-related implementations. We would like to have a solution which enables us to have context which we can make operations against like we would in a real Episerver-site. This is the flow I'm imagining in the best of worlds:

  1. Create an Episerver instance on demand using an empty Episerver database-template (in a testproject)
  2. Applying an exportpackage to the instance
  3. Run automated tests against the instance
  4. Pull down the instance and end the tests

I've seen examples that I've tried to replicate but I'm not fully succeeding yet. So my question is if there is anyone out there whos has pulled this (or similar) off and can give any guidance? Is this feasible or just a pipe-dream? :)

Nov 28, 2017 16:10

It's very much feasible to run integration tests using the full CMS stack, especially if you're only looking at running tests against an API rather than testing the whole rendering stack. We have done some improvement in this area in the new CMS 11 release and I was planning on writing a blog post about this very topic. Which version are you currently running?

Nov 29, 2017 8:51

That sounds great! That's exacly what we're looking for since we are only interested in the communication with API's.

Looking forward to the blog post. Are you planning it in the near future? We've just upped our development-branch to CMS 11.

Nov 29, 2017 10:29

It's on it's way, so shouldn't be too long. Great to hear that you are on CMS 11, as it otherwise might be some differences to the process. Stay tuned and thanks for being patient!

Nov 30, 2017 20:39

Post is up now at Hope it helps you with getting your testing going.

Dec 05, 2017 10:42

Great! Thanks!

Dec 06, 2017 10:01
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.