8

I have had exactly the same assignment earlier this year, for APIs written in C#. Options I have (tried to) build a PoC for were: SoapUI Postman Own framework built in C# using either RestSharp or HttpClient. In agreement with the test lead and architecture team, we have decide to use our own C# API testing framework for the following reasons: Ease of ...


8

HTTP is a synchronous protocol* so active polling is not an option. You need to wait until client receives response or request times out. There are two ways to constrain synchronous behaviour with timeout. One is to set a timeout for receiving a response. REST-Assured uses Apache HTTP Client for which you can set http.socket.timeout and http.connection....


5

GitHub is really useful for lists of resources and I came across one yesterday that is a collection of free APIs for use in web development. <- I think you'd be good to test most any of these APIs for practice as well. The List is fairly descriptive mentioning which APIs have auth or not and then you can click to the API's, read the documentation and ...


4

REST-Assured is one good option. I have used it with Java. It's a really good option and gives you the flexibility to do a lot when it comes to API testing. Refer to the below link for further details related to using Rest-Assured. using REST-Assured


4

Kerberos authentication can be really, really narky. What I found to solve the "run test as user x in .net" problem I needed to perform a two step process. Step 1: Fire up the process I want to test as the alternate user. Step 2: Use impersonation on the call to allow my test harness to access the process from the other user. This was done for IE in WatiN, ...


4

You need to provide token generated create Token API here in header under cookie field. and URL used in not as mentioned in API https://restful-booker.herokuapp.com/booking/{bookingID} Please check the screenshot here.


4

A few thoughts: Automation code should be reviewed, so I don't think that's a con Not sure why failing test cases would keep your build from compiling. Even if the test code lives in the same repo as the application code, your build scripts should ignore the test code when compiling deliverable code. There might be a failure further down your build chain ...


3

If you are looking to verify JSON response, there is a library called postman-bdd for Postman, which lets you write BDD styled test, using the chai-mocha syntax (but can also be used to write jasmine styled syntax). I have used this library for almost 2 months now and it's pretty handy. Taken directly from the library's npm page - Postman's built-in test ...


3

Let's take a step back and start by asking what are you trying to achieve. Rest API is an API like any other API, hiding behind it a lot or a little. I suppose that in our case there is a whole system behind the API, a system that you want to test. For me, this answers your last questions you need proper tests at different levels for you backend as well as ...


3

As with any project, it depends :). That said, (1) and (2) require close coordination with development team. Depending on the team structure it may be a good thing or a bad thing :). I also suspect in both cases some code will have same development (unit) tests as your tests. For example, a DTO might have a bug which may not be caught by both the teams. (3) ...


2

Retrofit OkHttp curl command line tool


2

Short answer is yes. It is really okay to use bdd tools to automate testing of a Rest API UI testing involves HTML, JavaScript and a DOM. The BDD should describe behavior. Given, When, Then statements that describe actions like click a button miss the point of BDD. What behavior are you trying to test? The application could change the actions that ...


2

In a similar case, we went with writing our own very light weight framework. Reasons are: We were not using many of the features of Soap UI, so just to make Restful calls, Soap UI is an overkill The paid version was costly for our need; extending the free version needed Groovy skills - Groovy was not a language our team was familiar with Soap UI projects ...


2

Check out Test Fragments and Module Controller test elements. You can define your so called "Thread Groups" as Test Fragments and refer them via Module Controllers orchestrating the test flow and workload as per your requirements by using either iterations on Thread Group level or coming from Loop Controller. See JMeter: Using the Module Controller for ...


2

I would recommend switching to JSR223 Assertion and Groovy language as: Since JMeter 3.1 it is recommended to use JSR223 Test Elements and Groovy for scripting Groovy has built-in JSON support so you will be able to parse responses without using any extra test elements or libraries Groovy performs much better than Beanshell So if use the following Groovy ...


2

I worked on a reasonably similar stack and I would be looking at starting at the ‘lowest’ layer possible and work my way up to testing A. So, in this case, I would be aiming to test B, C and D. Granted you’re doing some testing of another groups API, but if you’re not responsible for B, C and D, just devise tests to give you sufficient assurance that it ...


2

You can, however that would be quite a tricky thing, since you will have to take care of forming request body (envelopes) and parse the responses in order to make your requests comply with SOAP protocol. But initially RESTAssured is not intended to work with web-services. If you use Java I would recommend you to use one of the following ways to generate ...


2

How can I using java and something like rest-assured test this API? can I some how mock it to test or do I need to write my automation code in c# in order to do this? The same way you would with a Java application except it wouldn't be during deploy. The underlying language of the application shouldn't make a difference. Should I deploy the API on to a ...


2

You need to apply the below areas to your framework: The body for the POST call should be coming from a model file. Use a java serialization/de-serialization library like jackson or Gson to achieve this, although RestAssured has this feature. Creating complex json becomes easier. Create a RequestSpecBuilder to create the POST call, so that you can reuse ...


2

Use public registries of REST APIs like ProgrammableWeb. Many APIs listed there are either free, or free for certain traffic load per month, or they provide test accounts.


2

While integration testing is an approach wherein separate units are integrated and tested. End to end testing is testing in real scenarios that comprises testing with all integrated hardware/software,database, network and other interfaces simulating real User behaviour. That said, these definitions are context dependent and even if the developers are writing ...


2

To be honest I am not following what the exact problem you are asking about is. You can call tests using any name you like, and anyone can develop the test or execute it, obviously as long as they do a good job. Since you are not planning any revolutions (*) in the team here's what I suggest Setup a meeting with the relevant testers and developers, make ...


2

First off, welcome to SQA! I just want to understand how is standard approach and process which is followed across organizations. To be blunt, there is no standard for this. Organizations/companies define the process as they go. When something doesn't work or isn't streamlined well-enough, you try something new. REST URI's with expected inputs ...


1

Extract this error value into a JMeter Variable using JSON Extractor configured like: Variable Names: anything meaningful, i.e. error JSON Path Expressions: $.error Add If Controller after the first sampler and use "${error}" == "200" as the "Condition" Put your "next" requests under the If Controller Assuming everything goes well the requests which are ...


1

Have a look at Karate, a REST testing framework on top of Cucumber.


1

You can try postman. It allows for header manipulation and reading from data sources like excel. It can also send multiple types of payloads including JSON, XML and text. There is a shared team workspace which you can use to share collections amongst the team. It's good up until you need to do data validation against a database.


1

We have a similar set-up, and your A is what we call a Gateway API. It calls other APIs and might (or might not) add some additional logic. If the underlying APIs are not your team's responsibility, and you are finding defects in there, then basically you have impediments due to dependencies on a third party (in the broadest sense). As for storing ...


1

You will need to specify the object/objects you are sending with all the of the required fields. You can then use libraries like Gson or Jackson to build the json from those objects. Implement classes and mark them with Jackson annotations to specify how they should be serialized to json. For example, something like this (not 100% how to mark your nested ...


1

ReSharper is just an IDE for C# by JetBrains. This won't help you much unless you want to write everything from scratch. Postman has the ability to generate code snippets for various languages and frameworks, including C# (using RestSharp as REST/HTTP client). Consequently, you should be able to simply "convert" your requests to C#. (Haven't tried this ...


1

Unit tests are the responsibility of dev-team, not QA one. They normally run on service build phase and require a lot of special knowledge (real objects mocking for example) What QA usually does is use the public interface to ensure the service provides the functionality it declares. The most known tool for testing REST is SOAP UI, however since REST is ...


Only top voted, non community-wiki answers of a minimum length are eligible