SaaS CMS has officially launched! Learn more now.

Setting up CMS for integration tests

Vote:
 

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? :)

#185646
Nov 28, 2017 16:10
Vote:
 

Tobias,
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?

#185657
Nov 29, 2017 8:51
Vote:
 

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.

#185662
Nov 29, 2017 10:29
Vote:
 

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!

#185752
Nov 30, 2017 20:39
Vote:
 

Post is up now at https://thisisnothing.nystrom.co.nz/2017/12/05/integration-testing-with-episerver/. Hope it helps you with getting your testing going.

#185856
Dec 05, 2017 10:42
Vote:
 

Great! Thanks!

#185902
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.