How to add integration tests?

2025/12/11 4:49 PM

Has anyone been able to add some integration tests to their Xperience by Kentico projects? Specifically using the Microsoft.AspNetCore.Mvc.Testing package?

The package works when running through a regular console application, but when I use the same code inside an xunit test, it gets to app.InitKentico() then the test runner just stops unexpectedly without much of an error message.

Tried with the dancing goat sample from a while ago and getting the same thing.

Tags:
.NET ASP.NET Core C#

Answers

2025/12/11 5:14 PM

TLDR; Yes!

End-to-end tests have been part of the Kentico Community Portal project for a couple of years, including tests for membership journeys.

They can be run locally but are almost exclusively run in the GitHub workflow CI pipeline as part of PRs.

.NET 10 support for Xperience by Kentico, available in December's Refresh (releasing 2025/12/11) will enable a simpler orchestration of running these types of UI tests.

You should also be able to use the new Microsoft Test Platform for easier test running and configuration.

To response this discussion, you have to login first.