Share this
API testing for beginners Start Smart with API testing
by Seven Peaks on Dec 9, 2020 11:33:00 AM
Unleashing your QA
QA as a first class citizen allows the creation of better tests, better quality which will be more functional as well as resulting in a system that is maintainable and runs well. There are different QA types/interests such as UI/UX, technical, security, business, automation, DevOps. Let’s dive right into our API testing for beginners guide below.
Our process at Seven Peaks Software
API Testing and Benefits
API testing is a software testing type that validates Application Programming Interface (APIs) which will be done in the business layer from the 3 layers; Presentation Layer, Business Layer and Database Layer in any application.
The purpose of API testing is to check the functionality of the programming interfaces. Seemingly, API tests are different from GUI Tests, also it won’t concentrate on the look and feel of an application.
Faster Time Resolution: API Testing consumes less time than functional and validation testing which save 3 hours of time on average.
Effective and Testing Cost Reduction: API testing requires less code tham GUI testing giving better test results and cost coverage which the faster the test results means a reduction in cost coverage.
Postman/Newman for API testing for beginners
Get the most out of testing with Postman/Newman
Postman is useful if you don’t have basic knowledge of coding and want to try API Testing. It is a collaboration platform for API development used to create better APIs. It can also be integrated with CLI using Newman.
Newman is a command line Collection Runner for Postman. It allows you to run and test a Postman to automate our API tests. You can install it for free on any operating system such as Linux, Windows and MacOS.
- Easily create test suites
- Store information for running tests in different environments
- Store data for other tests usage
- Easily move tests and environments to code repositories
Integrated with build systems, such as Jenkins using the Newman command line tool
It is possible to schedule your regression tests daily/weekly/monthly when the backend deliver a update in Jenkins. It is possible to generate an HTML report and export it later. Test script will be stored in Bitbucket.
Run collections using Newman
Actions:
- Have Node.JS installed in your operating system
- Install Newman from npm globally on your system, which allows you to run it from anywhere.
- $ npm install -g newman
Reports
Actions:
As we have the aggregated report of the collection, it is still possible to generate html reports and export it later for collections in HTML format.
- Install HTML reporter use command npm install -g newman-reporter-html
- Command to generate reports after the reporter installed
- $ newman run
https://www.getpostman.com/collections /my_api_documentation -e –reporters=cli,html
Postman monitors
What are Postman Monitors?
Postman monitors are collection monitors that are set up and executed as per configure frequency which is used to run collection at a particular frequency. The results are required to be monitored and failures will be notified through Email or Slack.
What’s the use of Workspaces in Postman?
Postman workspaces are collaboration areas or spaces for colleagues or team to work on the same collection or set of collections.
Requests which get executed through the Postman application, are available for reference in the history section. Therefore, if any request was not saved to a collection before it was executed, you can go to the history section to get the executed request and save it to the collection.
Fiddler for API testing for beginners
Fiddler is basically a data monitoring tool that allows you to easily see incoming and outgoing HTTPs traffic. Log and suspect all traffic between your computer and the internet and can also mock requests/responses. It is now available in all operating systems.
Quick setup flow
- Download the Fiddler installer from its website here
- Configure the Fiddler Server which will take not more than 30 minutes
- Lastly, Configure the Fiddler Client
Features & Benefits
- Easily observe traffic from any applications that uses proxy and decrypt HTTPs web sessions used to check the API, endpoints and error codes .
- Tamper client requests and server responses use to mock test data if there are any troubles.
- Can be used for Debugging web traffic which we can inspect the trafficking of what we are sending to the server or the encrypted that we are receiving.
- Can be used for security testing.
Is fiddler available to Mac OS?
Yes! in their latest version this year 2020, they now support Mac OS and aside from Mac OS Fiddler also supports Linux and Windows.
Can we see the traffic from Mobile only or PC only?
Both. As long as the device is connected to a proxy and has successfully set up the certificate, we will be able to see and play around the request and response from the (client web or mobile).
For API testing, which one do you prefer: Postman or Fiddler?
Fiddler is quite a good tool for testing, especially for API testing for beginners, since there are a lot of things we can do with it like seeing API and modifying request and response. But focusing on just API testing, Postman will still be the best tool to use. But if testing revolves around traffic checking, modifying traffic (ingoing and outgoing), Traffic checking from mobile devices, bandwidth throttling, etc. Fiddler is the right tool.
Share this
- FinTech (13)
- Career (12)
- Expert Spotlight (11)
- Thought Leadership (10)
- Product Growth (9)
- Software Development (9)
- Product Design (7)
- Data and Analytics (5)
- Design Thinking (5)
- InsurTech (5)
- QA (5)
- Agile (4)
- Cloud (4)
- Company (4)
- Digital Transformation (4)
- Financial Inclusion (4)
- JavaScript (4)
- Seven Peaks Insights (4)
- Trend (4)
- UX Design (4)
- .NET (3)
- Android Developer (3)
- Android Development (3)
- Azure (3)
- Banking (3)
- CSR (3)
- DevOps (3)
- IoT (3)
- Product-Centric Mindset (3)
- CDP (2)
- Cloud Development (2)
- Customer Data Platform (2)
- Data (2)
- Digital Product (2)
- E-wallet (2)
- Expat (2)
- Hybrid App (2)
- Kotlin (2)
- Product Owner (2)
- Software Tester (2)
- SwiftUI (2)
- UI (2)
- UX (2)
- UX Research (2)
- UX Writing (2)
- Visual Design (2)
- iOS Development (2)
- .NET 8 (1)
- 2023 (1)
- 4IR (1)
- 5G (1)
- AI (1)
- API (1)
- Agritech (1)
- AndroidX Biometric (1)
- App Development (1)
- Azure OpenAI Service (1)
- Backend (1)
- Brand Loyalty (1)
- CI/CD (1)
- Conversions (1)
- Cross-Platform Application (1)
- Dashboard (1)
- Digital (1)
- Digital Healthcare (1)
- Digital ID (1)
- Digital Landscape (1)
- Engineer (1)
- Expert Interview (1)
- Fiddler (1)
- Figma (1)
- Financial Times (1)
- GraphQL (1)
- Hilt (1)
- IT outsourcing (1)
- KYC (1)
- MVP (1)
- MVVM (1)
- Metaverse (1)
- Morphosis (1)
- Native App (1)
- New C# (1)
- Newsletter (1)
- Node.js (1)
- Payment (1)
- Platform Engineer (1)
- Platform Engineering Jobs (1)
- Platform Engineering Services (1)
- Project Manager (1)
- Rabbit MQ (1)
- React (1)
- ReactJS (1)
- Stripe (1)
- Super App (1)
- Turnkey (1)
- UIkit (1)
- UX Strategy (1)
- Web 3.0 (1)
- Web-Debugging Tool (1)
- September 2024 (4)
- August 2024 (3)
- July 2024 (6)
- April 2024 (1)
- March 2024 (7)
- February 2024 (14)
- January 2024 (14)
- December 2023 (9)
- November 2023 (9)
- October 2023 (2)
- September 2023 (6)
- August 2023 (6)
- June 2023 (4)
- May 2023 (4)
- April 2023 (1)
- March 2023 (1)
- November 2022 (1)
- August 2022 (4)
- July 2022 (1)
- June 2022 (6)
- April 2022 (6)
- March 2022 (4)
- February 2022 (8)
- January 2022 (4)
- December 2021 (1)
- November 2021 (2)
- October 2021 (2)
- September 2021 (1)
- August 2021 (3)
- July 2021 (1)
- June 2021 (2)
- May 2021 (1)
- March 2021 (4)
- February 2021 (5)
- December 2020 (4)
- November 2020 (1)
- June 2020 (1)
- April 2020 (1)