web-api-testing

Can I use swagger test template with non nodejs app?

纵饮孤独 提交于 2019-12-23 22:52:09
问题 I'm working in building out a api test suite for a php application. Right now the app is using swagger annotation and I can easily create a swagger.json. But from looking at the swagger test template, it looks like I have to create a nodejs app first using swagger node? Is there a way I can skip that step and use my php app instead? Edit: I already have the swagger docs up and running using swagger-php. Just wondering if it's possible to use swagger-test-template without using swagger-node.

How to validate SOAP service XML file with given XML using Karate

北城余情 提交于 2019-12-13 08:59:22
问题 I'm learning Karate API for executing our SOAP-based web services. For that, I have created two XML files in which, one is, request information and another one is response data. And then I have created one more file is called webservice.feature file. When I execute this feature file I'm getting the following information in the Console but I don't understand and also I don't know how to validate that. Please give your suggestions. webservice.feature File: Feature: Get Membership Details

Keep getting errors when running JUnit test on my http client

孤街浪徒 提交于 2019-12-13 03:56:01
问题 I am creating a client to send requests to an API, and I am trying to write a Junit test but i keep getting this error. Here is my client code which sends a request: import io.netty.handler.codec.http.HttpResponse; import io.vertx.core.AsyncResult; import io.vertx.core.buffer.Buffer; import io.vertx.core.json.JsonObject; import io.vertx.core.logging.Logger; import io.vertx.core.logging.LoggerFactory; import io.vertx.ext.web.client.HttpRequest; import io.vertx.ext.web.client.WebClient; public

Visual reporting for Karate without Jenkins CI

自作多情 提交于 2019-12-12 16:27:53
问题 I'm trying to get reporting working for Karate DSL, and it's proven a challenge because my team uses Circle CI instead of Jenkins. Cucumber reporting seems to only work for Jenkins. I've had a look at this documentation, here: https://github.com/intuit/karate/tree/master/karate-demo#example-report https://github.com/jenkinsci/cucumber-reports-plugin I was wondering if there is a circle friendly equivalent you could recommend? It'd be even better if the reports could be generated in the

Having a POJO like feature in KarateAPI?

狂风中的少年 提交于 2019-12-12 15:02:27
问题 I have been using Karate and RestAssured for sometime. There are advantages and downside of both tools of course. Right now I have a RestAssured project where I have Request and Response object and POJOs. My requests wraps my endpoint and send my POJOs to those endpoint. I do all my Headers, etc configuration in an abstract layer. In case I need to override them, I override them during the test. If not, Its a two lines of code for me to trigger an endpoint. My way of working with happy path

How to compare values from response of two different requests in SOAP UI using groovy?

牧云@^-^@ 提交于 2019-12-08 08:45:38
问题 I am using SOAP UI Pro for test automation and I am new for that. I am using this tool for Rest API automation. I sent a POST service request and got some response for example : unique id, first name, last name. Now I send another GET request with input parameters as first name, last name from my previous POST request response (using property transfer step) and in response I got another unique id (response of GET). My requirement is to compare these two unique ids from these two different

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

泄露秘密 提交于 2019-12-07 06:40:22
问题 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 回答1: You can pass them as a queryParam .. given() .queryParam("globalDates", "{\"startMs\":1473672973818,\"endMs\":1481448973817,\"period\":90}") .queryParam("startFrom", "0").queryParam("limitTo", "6").queryParam("loadTvData",

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

喜你入骨 提交于 2019-12-07 05:13:40
问题 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) 回答1: You can manually encode parts of the URL within the application. These are the docs from version 6. https://www.getpostman.com/docs

How to compare values from response of two different requests in SOAP UI using groovy?

久未见 提交于 2019-12-06 14:39:00
I am using SOAP UI Pro for test automation and I am new for that. I am using this tool for Rest API automation. I sent a POST service request and got some response for example : unique id, first name, last name. Now I send another GET request with input parameters as first name, last name from my previous POST request response (using property transfer step) and in response I got another unique id (response of GET). My requirement is to compare these two unique ids from these two different responses using groovy and mark test pass or fail based on the outcome. Please help. You can access the

API Testing Using SoapUI vs Postman vs Runscope

依然范特西╮ 提交于 2019-12-05 23:05:14
问题 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