Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for How to Test APIs on Mobile using API Tester
c a
c a

Posted on

     

How to Test APIs on Mobile using API Tester

Imagine testing APIs using your mobile device, either iPhone or Android. All APIs, including REST, GraphQL, WebSocket, SOAP, JSON RPC, XML, HTTP and HTTPS.

This article will show how we can test APIs on mobile devices usingAPI TESTER.

API Tester Application

Prerequisites

  1. API TESTER Mobile Application
  2. Ready to Use API endpoints

The API TESTER application is freely available for the following devices:

This article will use demo API endpoints from JSONPlaceholder, which offers free fake REST API.

https://jsonplaceholder.typicode.com/

We will use two endpoints:

https://jsonplaceholder.typicode.com/postshttps://jsonplaceholder.typicode.com/todos
Enter fullscreen modeExit fullscreen mode

On a mobile device, open up the API Tester application:

Openning the API Tester Application

To get started, click on theCreate new request

The next screen provides various options, from selecting the type of request, GET, POST, PUT, PATCH, DELETE, to importing APIs from external platforms like Postman.

create a new get request

GET Request

Create a newGET request by tapping on the GET button:

get reqest

Give the request a name and paste in any of the API endpoints:

https://jsonplaceholder.typicode.com/postshttps://jsonplaceholder.typicode.com/todos
Enter fullscreen modeExit fullscreen mode

Getting All Todos:

Paste in the endpoint:https://jsonplaceholder.typicode.com/todos and tap the blue play button on the top right.


results

The response:

response

When testing APIs, we usually test for all Request methods. Next, we’ll look at how to test for Sending a POST request.

POST Request

To send a post request from API Tester mobile application, go to create a new request (+ icon) and select aPOST. We will use the same endpoint asGET request:

https://jsonplaceholder.typicode.com/todos

To make a POST request, we will need to add a few options:

The first step is to update theBody of the request. We will post data in JSON format, so tap on the Raw tab under the body section.

Ensure theContent-Type is set toapplication/json.

content type

The next step is to update the headers:

Content-Type application/json; charset=UTF-8
Enter fullscreen modeExit fullscreen mode

json

To add the data to send, we head up to theBody section under the Raw tab and tap on post data

alt

Paste in the JSON data:

{"userId": 1,"title": "a big one","body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"}
Enter fullscreen modeExit fullscreen mode

data format

Once that is done, tap on the blue play button on the top right of the application.
If everything is properly done, the app returns a response with status code 201 (Created), and a new id created with the new object posted

gig

aha

Conclusion

This article has explained the processes of using the API Tester mobile applications to test for APIs usingGET andPOST methods using a free test API endpoint.

Resources

API Tester Guides

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Python(Django). JS. Software Eng
  • Location
    Kenya
  • Education
    Software Engineering
  • Work
    Software Eng Lead
  • Joined

More fromc a

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp