Step by Step N-Unit Test Project in VS Code with Selenium Web Driver and C#

preview_player
Показать описание
If you have been thinking about writing your unit tests in the N-Unit test project while using the powerful Visual Studio Code development environment along with Selenium Web Driver, then this video is for you.

Learn the step-by-step guide about setting up the workflow in using N-Unit, VS Code, Selenium Web Driver and C# to unit test your code and user interface.

Download and Install VS Code from here:

Download and Install Dot Net Core SDK from here:

Download and Install Git Bash from here:

Download and Install Chrome Driver from here:

Have questions? Feel free to use the comments area.

Please place a like and subscribe to this channel if you like this video and want to be the first to receive news about new updates.
Рекомендации по теме
Комментарии
Автор

PLEASE READ: Error message with invalid input value does not mean that test case has failed. It actually means that test case should have been passed. The code example in this video wrongly assumes the opposite.
Ideally ExpectedResult argument should have been used. For example: TestCase(5, ExpectedResult=true).
So please watch this video to learn how to use the technologies and please ignore the test cases ;)

CodeRadiance
Автор

When did you get the "bin" folder? I didn't see it at the beginning of the video.

rayqui
Автор

Nice Explanation ! Your videos are very useful.

Could you please start series of C# automation

Thanks

ChiragPatel-lkvl
Автор

Am not able to run the program
Am following all the steps

It's showing localhost.
Help me sir

soumyasekhat
Автор

Finally, I resolved the errors...

Can you make a video to test network interception for a submit post request using Selenium?

TarekFaham
Автор

Hi! Thanks for sharing.

I have an issue. I'm using VS code + .Net Test Explorer, as you. When i Run my tests with "Assert.Fail();" only for test, like you did, This Tests disappear from .Net test Explorer. I can't understand what is going on... I've already tried to configurate the "Test Project Path" like you did, but nothing changes... Thanks a lot anyway.

FreeToPlayStation
Автор

I followed the same steps but since .NET 6 is the latest now, I used it and I found out that in need to use omnisharp also which I did. Now when I add the Selenium WebDriver, I get the error "NU1100: Unable to resolve 'Selenium.WebDriver (>= 4.1.0)' for 'net6.0'." Can you help me please? The project won't build now.

TarekFaham
Автор

After setting up the .NET Core Test Explorer, I try to run the test, I get this error "Could not find test (no symbols found)". Please help me to resolve this error.

TarekFaham
Автор

Will VSCode work with dot net framework. Is dot net core SDK 3 or 5 version mandatory. Pls let me know sir

AkAk-bwie
Автор

Hi,
I am getting error "Waiting for debugger to attach" . I have installed C# for Visual Studio Code (powered by OmniSharp)

zoebpatrawala
Автор

I am unable to run my tests (after successful build) with the following error. Can you please help me out?

OneTimeSetUp: : Could not load file or assembly 'netstandard2.0assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

myntrauser
Автор

Nice Explanation! I am completely satisfied

How do I change properties of a File like Copy to Output Directory to Copy Always on VS Code Editor?

saibhargavkondeti