web-api-testing

How to pass Query String Parameters in GET url using Rest Assured?

旧街凉风 提交于 2019-12-05 11:26:45
How to pass Query String Parameters in GET url using Rest Assured? URL is: http://example.com/building My Query Strings are : globalDates:{"startMs":1473672973818,"endMs":1481448973817,"period":90} limitTo:6 loadTvData:true startFrom:0 userId:5834fb36981baacb6a876427 You can pass them as a queryParam .. given() .queryParam("globalDates", "{\"startMs\":1473672973818,\"endMs\":1481448973817,\"period\":90}") .queryParam("startFrom", "0").queryParam("limitTo", "6").queryParam("loadTvData", true) .queryParam("startFrom", "0").queryParam("userId", "5834fb36981baacb6a876427") .when().get("http:/

How to handle URL with special characters present in password in Postman?

时光怂恿深爱的人放手 提交于 2019-12-05 10:54:05
I have the following format in URL. http://username:password@test.nabin.com/some/url Here password is something like qDTA*$X)ME/74 . When I directly use this password in URL, then the postman does not respond. How should I proceed testing this url? (In the image the response container is plain white without any error. This indicates, the API was never hit) You can manually encode parts of the URL within the application. These are the docs from version 6. https://www.getpostman.com/docs/v6/postman/sending_api_requests/requests Under the URL section: “Note: Parameters you enter in the URL bar or

Using BDD in API automation testing is a good aproach?

不羁的心 提交于 2019-12-05 02:06:23
问题 I'm writing a framework for RESTful API test automation, I already decided to go with REST Assured, I'm not 100% sure about add a layer to allow define tests using a domain specific language like Gherkin, therefore adding a BDD framework like Cucumber. What is your opinion? Is a good approach to use BDD in API automation testing? 回答1: I am currently using BDD for RestAPI Testing. Here is pros and cons for BDD RestAPI Automation framework. Technology We used: Cucumber,Java,Rest-Assured and

API Testing Using SoapUI vs Postman vs Runscope

怎甘沉沦 提交于 2019-12-04 04:17:10
I'm new to using applications to test backend APIs. I've always just manually tested using the front-end applications. What I would like to do is to use an app that is designed specifically for backend API testing. So far, I've been directed to SoapUI, Postman, and Runscope. But I'm at a loss as I am more of a test analyst than I am a programmer, despite having experience automated testing in Selenium with JavaScript, Python and Ruby. Any suggestions? Thoughts? Warnings? (I posted this to the QA page, too, so sorry for the duplicate question) SoapUI is not a paid tool. It has a Open Source

Using BDD in API automation testing is a good aproach?

拟墨画扇 提交于 2019-12-03 17:25:37
I'm writing a framework for RESTful API test automation, I already decided to go with REST Assured, I'm not 100% sure about add a layer to allow define tests using a domain specific language like Gherkin, therefore adding a BDD framework like Cucumber. What is your opinion? Is a good approach to use BDD in API automation testing? I am currently using BDD for RestAPI Testing. Here is pros and cons for BDD RestAPI Automation framework. Technology We used: Cucumber,Java,Rest-Assured and junit Following pros and cons are my own comment or personal view. It is based on my experience. Pros: Easy to

How can I solve error on then(). in Rest API

ぐ巨炮叔叔 提交于 2019-12-02 08:12:12
lease review below Code: package API_Testing; import io.restassured.RestAssured; import static io.restassured.RestAssured.given; public class FirstAPIClass { public static void main(String[] args) { RestAssured.baseURI="http://localhost:5100"; given(). header("tenantId","Augusta-PT"). when(). get("/WorkExperience"); then().assertThat().statusCode(200); } } Error on then statement: The method then() is undefined for the type FirstAPIClass Also, Can i write the code without then, If i dont have to check anything just get response. A very small mistake in your code. It is supposed to be get("

REST API Testing: How to get response using Google Chrome developer tools?

妖精的绣舞 提交于 2019-12-01 21:29:03
问题 I'm very new to API testing. I'm trying to make use of Google Chrome's developer tools to understand and explore this subject. Question 1: Is it possible to get the response (possibly in JSON format) of a simple GET request using chrome developer tools? What I'm currently doing is: Open chrome developer tools Go to Network tab Clear existing logs Send a post request simply by hitting a URL. e.g. https://stackoverflow.com/questions/ask Check the corresponding docs loaded Question 2: What are

REST API Testing: How to get response using Google Chrome developer tools?

不问归期 提交于 2019-12-01 20:41:40
I'm very new to API testing. I'm trying to make use of Google Chrome's developer tools to understand and explore this subject. Question 1: Is it possible to get the response (possibly in JSON format) of a simple GET request using chrome developer tools? What I'm currently doing is: Open chrome developer tools Go to Network tab Clear existing logs Send a post request simply by hitting a URL. e.g. https://stackoverflow.com/questions/ask Check the corresponding docs loaded Question 2: What are the relevance "Reponse Headers" shown on the image above? I mean, am I correct to think that this is the

How to add authorization header in POSTMAN environment?

眉间皱痕 提交于 2019-11-29 02:56:42
I'm testing bunch of API calls using POSTMAN. Instead of adding authorization header to each request, can I make it as a part of POSTMAN environment? So, I don't have to pass it with every request. Yes, you can do this through Postman by assigning your header as an environment variable, let's say authorization , as follow: then set you environment variable with its value as follow: postman usually remembers your key-value pairs you send in header. So there is no need to add headers each request. Anyway you can configure a "Preset" with your auth token. In contemporary releases of Postman, you

How to read input data from an excel spreadsheet and pass it JSON payload in karate framework?

不想你离开。 提交于 2019-11-28 12:36:29
I need to create data driven unit tests for different APIs in karate framework. The various elements to be passed in the JSON payload should be taken as input from an excel file. A few points: I recommend you look at Karate's built-in data-table capabilities, it is far more readable, integrates into your test-script and you won't need to depend on other software. Refer these examples: call-table.feature and dynamic-params.feature Next I would recommend using JSON instead of an Excel or CSV file, it is natively supported by Karate: call-json-array.feature Finally, if you really wanted to, you