Skip to main content
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 ...
David'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 ...
FDM's user avatar
  • 5,894
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 ...
Michael Durrant's 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 ...
Alexey R.'s user avatar
  • 11.6k
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 ...
beatngu13's user avatar
  • 2,142
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 ...
dzieciou's user avatar
  • 10.5k
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 ...
beatngu13's user avatar
  • 2,142
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 ...
dzieciou's user avatar
  • 10.5k
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 ...
Kevin McKenzie's 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 ...
Yu Zhang's user avatar
  • 9,942
7 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....
Decypher's user avatar
  • 252
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 ...
João Farias's 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 ...
Michael Durrant's 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 ...
Michael Durrant's 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 ...
Moro's user avatar
  • 1,052
6 votes

Printing Response body element in Test results in Postman

Assuming that you want to print a data from the response value var jsonData = pm.response.json(); var testmessage=jsonData._data[0].UserName //Dev_demo_82 pm.test(testmessage, function () { //...
Mohamed Sulaimaan Sheriff's user avatar
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 ...
João Farias's user avatar
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....
Ashwiinn Karaangutkar's 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 ...
demouser123's user avatar
  • 3,532
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 ...
FDM's user avatar
  • 5,894
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 ...
Peter M. - stands for Monica's 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, ...
Michael Durrant's 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 ...
newsn31's user avatar
  • 609
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 ...
Rsf's user avatar
  • 7,099
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 ...
CJ Dennis's user avatar
  • 278
5 votes

How to avoid API tests duplicating Unit tests

The tests serve different purposes. Overlap is good. The 'overlap' of higher order tests (such as API) and Unit tests should be high. In fact 100% would be good. Unit tests mock and stub all ...
Michael Durrant's user avatar
4 votes

Use of Jmeter for api load testing with full workflow

The idea of the load testing is simulating application real usage. Imagine that each JMeter thread is a real user and design your test in this way so each JMeter's virtual user would act like a real ...
Dmitri T's user avatar
  • 13.6k
4 votes

What is the simplest way to rewrite Postman requests to C#

ReSharper is an Visual Studio IDE Plugin 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 ...
beatngu13's user avatar
  • 2,142
4 votes

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

If I would approach to the goal like yours I would: Introduce some proxy between your front-end and back-end that would log the requests to your Back-End Run all your tests for UI Parse the proxy ...
Alexey R.'s user avatar
  • 11.6k
4 votes

How do you test, auto-logout after 60 minutes?

Make the time-out configurable by the tests. In a config-file on the test environment, a setting in a database or passed as a parameter in the API calls. Figure it out, because test-suits should be ...
Niels van Reijmersdal's user avatar

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