xUnit Test Method Naming & Parameterization In .Net

Published: 23 February 2024
on channel: 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


Watch video xUnit Test Method Naming & Parameterization In .Net online without registration, duration hours minute second in high quality. This video was added by user PRP Coding 23 February 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 54 once and liked it 3 people.