C
C#2y ago
saiss.

❔ Testing API's in .NET

Hey! I just got a new job and there backend API for licenses, systems, users etc is built using the .NET framework but they haven't done any testing what so ever for there entire system.. I have some basic understanding of unit testing but I'm kinda lost where I would start off doing/testing in this scenario! Any tips or useful links would be highly appreciated for testing.
5 Replies
Angius
Angius2y ago
Id say integration testing would be a better idea. Although no clue how you'd do it with the old Framework
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
sunnyp410
sunnyp4102y ago
So I would start off with the basics by looking at the unit testing strategies that your new job desires. Meaning do they do TDD when writing unit tests? What unit test naming strategies they use? Once you got that info I would start doing some TDD on your feature work or pair with someone to get an idea. Then I would move onto Integration testing which test a certain component or example calling another API or databases etc. Should be simple and straight forward to write. Again pair programming is key :). Finally Service Tests (E2E) which should check all of your code within an environment. This can be done using WAF or postman api scripts Acceptance Tests - This is just a bonus I would not recommend this as your E2E test should cover this. In a nutshell its BDD. Performance Test is a bonus this can be run within a seperate pipeline which can be within another container. Have a look into these two :- * https://k6.io/ * https://nbomber.com/docs/overview/
Load testing for engineering teams | Grafana k6
k6 is an open-source tool and cloud service that makes load testing easy for developers and QA engineers.
Overview | NBomber
Welcome to NBomber! This tutorial will explore the basics of using NBomber and help you get familiar with it at a high level.
Anton
Anton2y ago
for unit tests you need to be able to mock individual dependencies that aren't being tested, best way to achieve this is to extract interfaces everywhere and then mock them through a framework
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server