Problems with namespaces usage: Test project contains namespace part "WeatherAPI" that is exact name of the class from servicess. And then it does not recognize when you write "= new "WeatherAPI"();" if yoy mean namespace or class. Just avid giving namespaces like class names 😊
@thatokgopa47242 жыл бұрын
Awesome but where are the links to your next videos? continuation on POST, PUT and GET methods?
@QAUnderground2 жыл бұрын
Coming soon!
@azadsaleem-jz5eu2 жыл бұрын
Thanks for this video, If i want to create a RestSharp with NUnit Framework . Is this is the best approach ? Can you let me know please ?
@QAUnderground2 жыл бұрын
Thanks for stopping by the community! Creating a REST API testing framework is a highly customizable process and there are many different ways to accomplish it. While the approach outlined in the video is one option, it is not the only way to set up a testing framework using C#, RestSharp, and NUnit. It's important to evaluate your specific needs and choose a method that works best for your particular project. Additionally, you can also explore other libraries and frameworks that may better suit your needs. It's always good to have multiple options and evaluate which one best fits your project requirements.
@Vibestr2 жыл бұрын
is it necessary to make the Services Project a test project?
@QAUnderground2 жыл бұрын
Hi! It depends on your specific use case and needs. Having a separate test project for your REST API services can be useful for keeping your test code organized and separate from your production code. It also allows you to easily run tests against your services without affecting your production code. Additionally, it can make it easier to maintain and update your tests as your services evolve. However, if you do not plan on doing extensive testing on your services, it may not be necessary to create a separate test project.
@vardhinicatari4 жыл бұрын
Hi, I tried the exact same and getting this error : Message: Expected string length 2 but was 11. Strings differ at index 0. Expected: "OK" But was: "Bad Gateway" -----------^
@QAUnderground2 жыл бұрын
This error message indicates that the API test has failed because the expected HTTP status code for the response is "OK" (200) but the actual status code received is "Bad Gateway" (502). Here are a few things you can try to resolve this issue: 1) Double-check the API endpoint URL and the request data you are sending to make sure that they are correct and that the API endpoint is accessible. 2) Ensure that the API endpoint is up and running, try accessing the endpoint in a web browser or using a tool like Postman to see if you are able to get a successful response. 3) Check the API documentation and see if there are any error codes or messages specific to the error you are receiving, that can help you understand the cause of the issue. 4) Double-check the expected response codes and make sure that you are expecting the correct response for the request you are sending. 5) Ensure that the test case is being handled properly, like checking for proper status code and response message. 6) Look into any recent changes made in the server or dependencies that could have caused the error. 7) Logging the request, the response, and the request header that's being sent in the test case can help you understand what went wrong. It's best to reproduce the error with the browser or postman and check the response. that way you can quickly identify what's going wrong. Hope this helps!