21 votes
Accepted

Testing REST API with SHA1 HMAC authentication

Note that when I wrote this jQuery was built into Postman. Since v4.5.0 it has been replaced by CheerioJS and Lodash, so this solution won't work with v4.5.0+. I successfully got custom HMAC SHA256 ...
user avatar
17 votes

Testing REST API with SHA1 HMAC authentication

I know this is an old thread, but I found it looking to resolve the same problem. The use of JQuery in Postman as suggested in one of the answers is no longer viable, it's been deprecated. But here's ...
user avatar
  • 271
13 votes

API test automation: GUI tool vs programmatic approach?

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 ...
user avatar
  • 5,824
13 votes
Accepted

Test strategy to bring automated tests from UI to lower(API/Unit) layers?

A key strategy for me is to convince the business of what needs to be tested where, otherwise... they'll end up directing testing everything through the UI... So the two key main points I am making ...
user avatar
11 votes
Accepted

Is it a best practice to use loops for a test case to run it multiple times?

Apart from the fact your second piece of code will not even be compiled and also pretty much not representative since you're not showing us how exactly you would use the information of which ...
user avatar
  • 11.4k
10 votes

Does Selenium support web services testing ? How can it achieve through selenium webdriver?

From SeleniumHQ: Selenium automates browsers. That's it! You don't need a browser to automate API testing. There're dozens of tools for almost every popular programming language. If you like ...
user avatar
  • 2,102
10 votes
Accepted

How to test if my application method handles HTTP status 404 of a REST API without actually calling that REST API

Use a mock. Mock 3rd party API using MockServer or WireMock, if you're in the Java world. Your test will call getNumUsers() method which in turn will call mock of your 3rd API and the mock will ...
user avatar
  • 10.2k
9 votes
Accepted

Tests in CI: Are API + Integration Tests the most suitable?

As already mentioned in your TechBeacon article, teams indeed often spend too much at the top of the test automation pyramid. In general, the pyramid is a good rule of thumb, but (as always) it ...
user avatar
  • 2,102
8 votes
Accepted

Soapui or Rest Service Testing? and where I can find good Soapui and rest service testing tutorials?

As for tutorials on SoapUI, sadly the majority of them are sub-par at best and out of date. If you want to learn SoapUI the best option is likely to jump in feet first and hit the ground running. My ...
user avatar
  • 3,192
8 votes
Accepted

How to wait for an api request to return a response?

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 ...
user avatar
  • 10.2k
8 votes
Accepted

How do we as testers best approach API test cases without entering the realm of insanity?

Most of the question (and answer) isn't specific to API testing; combinatorial explosion is a problem whenever you have a function that takes multiple inputs. So, first, you'd need to understand how ...
user avatar
7 votes

Difference between SoapUI and Fiddler testing tools?

The answer is similar to real world examples, both Motor Cycle (2 wheeler) and Car (4 wheeler) provides approximately same speed and can carry a person from one place to another, so why two (or in ...
user avatar
  • 4,510
7 votes

How do you perform API Testing? I had an interview question

In general your answers were valid. But to create a better impression you could communicate the points which show you have deeper understanding of APIs and API testing. You can mention about web ...
user avatar
7 votes

Test strategy to bring automated tests from UI to lower(API/Unit) layers?

Estimate working load, how many test cases are there to be migrated from UI tests? Estimate how much time you can spare in each sprint and discuss with your team leader and your fellow members ...
user avatar
  • 9,640
7 votes
Accepted

Test Plan/Strategy of an application which has API +DB

Given a simple application diagram how would you test it or what will be your test plan or test strategy. The only answer to a question like this is: "There is no such thing as 'go there and ...
user avatar
  • 9,786
6 votes
Accepted

How do you perform API Testing? I had an interview question

Well, an API is such a loaded term. It can be REST, SOAP, RMI, or native C++ library API, etc., so the tooling will depend on that. Particular test scenarios will depend on that as well. For instance, ...
user avatar
  • 10.2k
6 votes
Accepted

Credit Card Testing (Paypal Payflow API)

Do you really need to test money has been deducted? You should trust PayPal tested their end of the payment system. If not get some real credit-cards and test the full flow. PayPal has some guides ...
user avatar
6 votes

Tests in CI: Are API + Integration Tests the most suitable?

Use the test pyramid as mentioned by Peter Masiar. My contribution here is help answer the question of exactly how to decide the 20% and 80% figures that Peter mentions. My approach to this is to ...
user avatar
6 votes

Is it a best practice to use loops for a test case to run it multiple times?

Generally speaking I consider it a bad practice if you are using different data combinations to run UI tests. I refer to this as data combinatorial testing. Generally speaking I look to be sure that ...
user avatar
6 votes
Accepted

Is it okay to use UI automation code in API automation tests?

Creating test data via GUI will have the following impact: test execution time will grow, test will become 'flaky', results will not be trusted, test will be prone to errors due to html changes, if ...
user avatar
  • 1,037
6 votes

How to test if my application method handles HTTP status 404 of a REST API without actually calling that REST API

You don't need to add any additional dependency. Start doing some preparatory refactoring in order to: Program to an interface instead of a concrete object; Break the getNumUsers() into two ...
user avatar
  • 9,786
5 votes
Accepted

Suggest me the best way to automate REST web services with JSON using Java

If you would love to test REST API then I would recommend you to use Rest Assured which is a Java Library. It’s better to create Page Object Model and use Testing Framework like TestNG to write tests....
user avatar
5 votes

Can anyone explain the defect leakage and formula?

Defect leakage formula is defined as - Number of Defects slipped / (Number of Defects raised - Number of Defects withdrawn) Example: In production the customer raises 21 issues, during your ...
user avatar
  • 3,520
5 votes

Data Driven testing in Postman Tool

Update I have tested with a simple CSV file and it indeed alters the iteration count automatically. So my suggestions for you are: update Postman to latest version if not yet done so double-check ...
user avatar
  • 5,824
5 votes

Tests in CI: Are API + Integration Tests the most suitable?

Consider test pyramid. Using Pareto principle (also known as 80/20 rule), you can get 80% of benefits from testing by focusing on unit test with 20% of the effort. And 80% benefit of the remainder if ...
user avatar
5 votes
Accepted

How to utilize Chrome Dev tools for QA(manual or automation)?

Chrome Dev Tools - Aug 2018 (they will keep changing) Customize the tools themselves - "dots" menu on the right Most common use is to change where the tools are "docked" (right, ...
user avatar
5 votes

Is it a good/industry practice to create both UI and API testing projects in one project?

Both approaches have advantages and disadvantages: Separation into multiple projects means better separation of concerns. You can build your framework in a modular fashion like this. Where shared ...
user avatar
  • 589
5 votes
Accepted

How to verify response body as a test in postman

As @Mache says, you search for each value. var jsonData = pm.response.json(); pm.test("Verify Json values", function () { pm.expect(jsonData.data.id).is.to.equal(2); pm.expect(jsonData....
user avatar
  • 232
5 votes

How is test case design different for GUI & API?

Yes, API and GUI are different from a hardware product or command line enterprise software and as such requires specialized approach and techniques. But GUIs and APIs are usually a very thin layer ...
user avatar
  • 6,937
5 votes
Accepted

How is test case design different for GUI & API?

The user interacts with the GUI The GUI interacts with the API The API interacts with the back end In theory the GUI tests should cover all the API tests, right? Well, what about when the GUI ...
user avatar
  • 278

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