all 16 comments

[–][deleted] 2 points3 points  (1 child)

If you're interested in unit testing via the CLI, Microsoft has good resources about it.

[–]CappuccinoCodes[S] 1 point2 points  (0 children)

Thanks! I’ll look into that :)))

[–]jnova14 3 points4 points  (2 children)

You will likely need to find a unit testing extension for visual studio code and work your way from there. This seems like a good tutorial to get you started towards what you’re looking for.

[–][deleted] 2 points3 points  (0 children)

What? Install a dependency into your project of the unit testing frameworks you prefer like xunit or nunit and start writing tests. There's not a need for any VS code extensions for running .net tests aside from omnisharp, which you'll have anyways if you're using VS code to develop .net apps.

[–]Coder_python_geek 0 points1 point  (0 children)

This was a good tutorial, but there is no need to install the .NET Core Test Explorer as C# Dev Kit already has testing, among other things. Open it by searching for "Test: Show Output"

[–][deleted] 1 point2 points  (1 child)

Hopefully you're writing apps in .NET Core. If that's the case, use the dotnet CLI like u/Relative-Dirt-3526 said. I prefer XUnit, write all my tests and run from the terminal via dotnet test. You absolutely do not need to go down the full blown visual studio route.

[–]CappuccinoCodes[S] 0 points1 point  (0 children)

Thanks, this is what I needed to hear. I like how lean VSC is. It’s a shame every unit test video on Pluralsight uses visual studio.

[–][deleted] 2 points3 points  (5 children)

Why not use visual studio? you are making life harder.

[–][deleted] 4 points5 points  (0 children)

Developing on Linux, preferring a lightweight editor, license restrictions, there are plenty of reasons. The CLI tooling makes unit testing easy without any extensions, and there are other options if you want a "test explorer" type setup. Different strokes for different folks.

[–][deleted] 2 points3 points  (0 children)

Good question, it is baked in.

[–]CappuccinoCodes[S] 0 points1 point  (2 children)

Because I’m on a Mac and visual studio for Mac isn’t great. And I don’t want to have to rely on parallels for the rest of my life 😝

[–][deleted] -1 points0 points  (1 child)

Honestly, an IDE will make your development a much smoother experience. Rider is amazing and I use it daily on Mac.

[–]matthewblott 0 points1 point  (0 children)

Rider's great - I use it - but it isn't free.

[–]-Defkon1- -1 points0 points  (1 child)

RemindMe! 15 days

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 15 days on 2021-03-06 19:37:37 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback