ALL >> General >> View Article
Unit Testing Kentico Xperience 13 With Xunit
I don't write much and I do not definitely do blogs. But I do write code. And I write tests for code. So when .Net Core became a development model for Kentico Xperience 13, it became a perfect time to have start full unit tests on our code.
I also decided that I will create a series of articles on unit testing Kentico Xperience projects as most of the articles I have looked at covered mostly the basics not an in-depth look of how to fully cover a project with tests.
I reached out to Kentico and shared with them my plan to do the unit testing article series using the MedioClinic Sample Site . The sample project is featured in the Kentico Xperience Training modules. Fortunately, they concurred and here we are.
What to expect from this series? Well, I will be starting with simple unit tests, all the way to having at least 80% code coverage for the whole project. Of course, I will also share the tools used and full source code.
Let's start with the tools first.
Azure DevOps - Project management, source control and CI/CD:
Visual Studio 2022 - IDE
SonarCloud - Static Code Analysis, ...
... Code Coverage
xUnit - Testing framework/platform instead of NUnit used and supported by the Kentico Xperience Test Libraries.
AutoFac.AutoMock - Auto mocking library to automatically create mock dependencies for both concrete and mock abstract instances in unit tests
AutoFixture - for automatically creating test fixtures without hand-coding variables
Also listing below some of the articles specific to unit testing in Kentico
Kentico Documentation - writing automated tests reference
Kentico 12: Design Patterns Part 1 - Writing Testable Code - a great article and an awesome series of articles by Kentico MVP Sean Wright
Unit Testing Kentico EMS with xUnit - another great article by Marnix van Valen. He also discussed why xUnit was used instead of NUnit.
Add Comment
General Articles
1. Dubai Vs Abu Dhabi Real Estate Roi: Best City For Property InvestmentAuthor: luxury Spaces
2. Understanding Your Rights When A Debt Collector Calls
Author: jeff wood
3. Different Kinds Of Automobile Braking System
Author: Chaitanya Kumari
4. Insurance Outsource Services: A Smarter Way For U.s. Insurance Agencies To Work
Author: Ravi Shekhar
5. What Are The 5 Important Concepts Of Seo?
Author: QC Digital
6. Post-surgery Recovery Tips After Lipoma Removal
Author: Dr. Daniel Serralta
7. What Is The Future Of The Hospital Acquired Infection Treatment Market? Growth Forecasts & Insights To 2032
Author: siddhesh
8. Why Expert Signage Installation Matters: Benefits For Branding & Visibility
Author: Brandola
9. The Ultimate Guide To Hire Artificial Intelligence Developer Teams For Faster Innovation
Author: david
10. Medical Alert Systems Market To Reach Usd 14.70 Billion By 2031 | Key Trends, Growth Forecasts & Industry Outlook
Author: siddhesh
11. Creatine Monohydrate Market To Reach Usd 383 Million By 2031 | Growth Trends, Key Players & Future Outlook
Author: siddhesh
12. Birthday Decoration In Delhi Ncr
Author: Yash
13. What Is The Future Of The Moxifloxacin Hcl Market? Global Forecasts & Key Insights To 2031
Author: siddhesh
14. From Chaos To Conversions: How Solar Crm + Automation Streamlines Your Sales
Author: Sambhav Pro
15. Man Made Vascular Graft Market Size To Reach Usd 5.5 Billion By 2031 | Key Trends & Global Forecasts
Author: siddhesh






