xUnit Test Method Naming & Parameterization In .Net

Опубликовано: 23 Февраль 2024
на канале: PRP Coding
545
34

Hello Everyone! Welcome to PRP Coding YouTube channel. I am Praveen Raveendran Pillai.

In this session I shall explain about

1. What is the importance of Unit Test method naming?
2. How to parameterize xUnit test methods?

In the getting started with xUnit testing session we learned
- What is unit testing
- Importance of unit testing
- How to unit test a .net class library project using xUnit?
- The order of execution of tests in xUnit
- How to perform the test setup & clean up in xUnit?

If you have not watched getting started with xUnit testing session, then please watch my video -    • Introduction To xUnit Testing In .NET  

In this session I shall explain about
- Unit test method naming
- How to parameterize xUnit test methods ?

Naming standards are important because they explicitly express the intent of the test. A good test case name should be clear and concise, conveying the main objective and scope of the test.

Just by looking at the suite of unit tests, you should be able to infer the behavior of your code without even looking at the code itself.

Additionally, when tests fail, you can see exactly which scenarios don't meet your expectations.

The name of your test should consist of three parts:
- The name of the method being tested.
- The scenario under which it's being tested.
- The expected behaviour when the scenario is invoked.

Follow me on LinkedIn -   / praveen-raveendran-pillai  


#dotnet #programming #testautomation #testing #test #unittest #xunit #csharp #csharpdotnet #csharpprogramming


Смотрите видео xUnit Test Method Naming & Parameterization In .Net онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь PRP Coding 23 Февраль 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 54 раз и оно понравилось 3 людям.