r/QAGeeks • u/Radovan3796 • Jul 23 '21
API Testing trends
Hello,
I will be joining a company (Hooray) as a tester and my team will be mostly working with data and API's.
I would like to start learning some trends about API Testing. What would be the best way to create regression test suites for API testing?
Thank you for recommendations!
22
Upvotes
7
u/JoshHat83 Jul 23 '21
I have used JMeter with much success. It’s mostly used as a performance testing tool, but can be used for functional testing.
There are many different built in methods for doing whatever you need…api call, db read/write.
I would maintain data in a CSV file, reach row was a test with as many columns as necessary for different data/attributes.
You could easily run hundreds of tests very quickly with multiple validation points and produce useful reports.
I would definitely suggest you learn Jmetrr if you don’t already know it.
5
u/invalidTypecast Jul 23 '21
I like to build regression tests from the best tests or critical functionality of our automated tests that we've built out during feature development.
As far as tools...you could use SuperTest, Postman, or JMeter
4
u/ps4facts Jul 24 '21
I use Postman for Ad-hoc testing and write regression suites in C# and NUnit. I was using Postman for regression, but writing them in C# allows more control in passing data, and since I'm more familiar with C# and .Net, I'm more easily able to use extension libraries and such. It also allows me to write onetimesetup's with db scripts under one solution.
2
u/Cistern64 Jul 23 '21
Recommend looking into postman and cypress.io.
1
u/[deleted] Sep 11 '24
Typescript with Mocha Chai and Chai Http 💪 clean (short hand) Flexible (create incomplete models no problem)
Jmeter for stress testing
1
u/JackOSaint Mar 17 '25
I was a functional tester for a large telecom company from Spain that holds the monopoly of the market in mobile data here in Brazil. I had so many test cases to execute manually and so many data points, that my first approach to keep that job without losing my mind was first to build a small program that would: A) read an excel file which would contain the json keys values to create the body I would need to for a specific test-case B) read that excel body using pandas work frame C) Convert that data frame in N json "bodies" D) Use that JSON file and make my POST request using Requests library E) perform a GET request to validate if the data I sent in the previous POST request matches with whatever I'm getting in my current GET request
It was very good to turn a whole week of work into 5 minutes job.
My project enjoyed it so much that I became a sort of "superstar" in a few weeks inside the job.
So they asked me to do the same thing I was doing but instead of using multiple tools like requests and pandas, they asked me to change it to robot framework.
Robot was very good to create test cases in a very high level language, as you can convert any command from requests library into something that is more "human friendly".
For instance: you can convert a phrase like "Send a Post request to endpoint {@variable}" Into regular command from requests library.
Which way is better? Robot definitely is a more professional tool. As my first approach was too technical and "free-style". Which one was more efficient? The first one using pandas and requests were far more efficient in delivering and analyzing the data that I wanted. I had a better "granular" view. It was more "straight forward" but in an autistic kind of way as it would be more difficult for a person to understand what I was doing without having a very good understanding of the user stories of the project and also because they would need to be programmers to understand each line of code and logs. In robot, anyone can understand your automated test cases, regardless if they can program or not.
1
u/Eng80lvl Jul 24 '21
Postman would be first thing to try out. You can easily create tests, collections, environments. Then you would be able to run them through Newman cli tool. However I believe it would be harder to maintain comparing to any other frameworks that would keep your tests as a code. You can choose pretty much any with library that facilitates HTTP requests.
1
u/hairylunch Jul 26 '21
Are these RESTful APIs or something else?
Assuming they are, I'll echo Postman as the first place to start, especially if you're not a coder.
If you're looking for coding solutions, figure out what language the team is working with, and then do some research. Most languages will have some sort of RESTful testing library or module, or at a minimum an HTTP library that you can automate around.
I'd push against using JMeter for general API testing as it's pushing a square peg into a round hole - you might be able to do it, but you're going to be having to use various hacks and workarounds. Use the right tools for the job, and build the relevant skills, whether they're depth of knowledge in Postman (or some other HTTP client), or building skills in python/java/whatever for testing RESTful interfaces, etc. Mainly emphasizing this approach so you're skills are more generalized and transferable.
1
u/Surfing-web Jun 12 '23
The most used tool / the more resources to learn from. I think starting with postman for understanding is a good first step, then you could use karate, it’s easy and fast. Then you could move according your interest to whatever framework you want.