API Testing Basics for a Software Testing Internship: A Starter Guide for GTU Students

API Testing Basics for a Software Testing Internship: A Starter Guide for GTU Students

Facebook
Twitter
LinkedIn
WhatsApp
Email

API testing means sending requests to a service and checking that the status code, response body, headers and timing match what the specification promises. You can learn the basics in a week with a free public practice API and a client such as Postman or curl. This guide gives GTU students a starter request collection, expected-result tables and a reusable checklist for a software testing internship.

Why API testing matters in a software testing internship

Most apps you use are a screen on top of a set of APIs. When you book a ticket or check a result online, the screen sends a request to a server and shows what comes back. If the API returns the wrong data, the best-looking interface will still show wrong information.

Testing at the API level has practical advantages for a beginner:

  • It is fast. A request takes milliseconds, while a browser test has to load pages and wait for elements.
  • It finds problems earlier. You can test a service before any interface exists.
  • It is precise. You see the exact status code and body, not a vague “the page looks broken”.
  • It needs little setup. A client tool and a public API are enough to practise.

Interns on testing teams are often asked to run existing request collections, log defects clearly and add a few new checks. This guide trains exactly those skills.

API testing practice and GTU internship rules: what to check

GTU is described on its Integrated Training & Placement (I-TAP) site as a state university set up under Gujarat Act No. 20 of 2007. The same page says it has 400+ affiliated colleges across five zones, which points to an affiliating model. In practice, the person who handles your internship paperwork is usually in your own college’s department, so API testing practice is best discussed with your internship coordinator or training and placement officer there.

The I-TAP page also says GTU set up Integrated Training & Placement Cell wings to help affiliated institutes improve student employability. If you are looking for a software testing internship, that cell at your college is a reasonable first contact for leads and for questions on what format the college expects.

For BE students, a GTU Semester VIII Internship/Project course document (code 3180901), hosted on an affiliated college’s site and dated 2022, says the internship is full time for its whole duration and that a student may submit a brief proposal of the work to be carried out. If that applies to your scheme, a short proposal naming API testing tasks (for example, writing test cases and assertions for a REST API) could be a sensible way to describe the work. Rules change between schemes, so check the current version.

For MBA students, a GTU-headed Summer Internship cum Project work (SIP) document, hosted on an affiliated college’s site, says the SIP carries 200 marks and 4 credits and is done in one organization after a semester. A testing-focused SIP would suit only a student whose project is technology-oriented, and the guide’s practice work should be treated as preparation, not as the SIP itself.

This guide is independent self-study. Do not assume it counts toward any subject, credit or evaluation.

Questions to settle before citing API testing work

  • Ask your internship coordinator for the current GTU internship or project guidelines for your branch and scheme, and confirm the semester, duration and credits in writing.
  • Check whether your college wants a proposal, and ask if an API testing task list is acceptable as its content.
  • Confirm whether the internship must be full time, as the 2022 BE document describes, or can run alongside classes.
  • Ask which documents are required, such as an offer letter, a completion certificate and a report format, and who signs them.
  • Ask whether online or remote internships are allowed, and what proof is needed.
  • Check with your college’s training and placement cell for current internship leads and any approval step before you accept an offer.

Free 2-Week CareerSwami Internship

Online, 14 days, with a free offer letter and a free completion certificate once you finish the work. Check with your college that it fits your requirement before you enrol.

Apply for the free internship

Core vocabulary in plain language

Term Meaning Example
Endpoint A URL that exposes one resource or action /posts/1
HTTP method The kind of action requested GET reads, POST creates, PUT replaces, PATCH updates, DELETE removes
Status code A three-digit result summary 200 OK, 201 Created, 404 Not Found
Header Metadata sent with a request or response Content-Type: application/json
Payload / body The data sent or received, usually JSON {"title": "foo"}
Query parameter A filter added to the URL /posts?userId=1
Assertion An automatic check on the response “status equals 200”

Status code families to memorise first

  • 2xx: success (200, 201, 204)
  • 3xx: redirection
  • 4xx: the client made a mistake (400 bad request, 401 unauthorised, 403 forbidden, 404 not found)
  • 5xx: the server failed (500, 502, 503)

Set up your practice environment

You need three things, all free:

  1. A practice API. JSONPlaceholder (https://jsonplaceholder.typicode.com) is a public fake REST API with posts, comments, users, todos and albums. It accepts write requests but does not store them permanently, so you cannot damage anything.
  2. A request client. Postman is the common GUI choice. curl works from any terminal and is useful for quick checks.
  3. A notebook or spreadsheet. Record each request, the expected result and the actual result. This habit matters more than any tool.

Create a Postman collection called “JSONPlaceholder Starter” and a variable named baseUrl set to the address above. Using a variable means you can later point the same collection at a different environment by changing one value.

The starter request collection

The table below is the practical asset for this guide. It lists ten requests in the order a beginner should run them. The expected results reflect how JSONPlaceholder is documented to behave, but you should compare them with what you actually see and note any difference, because public services can change.

ID Request Purpose Expected status Expected body check
R1 GET {{baseUrl}}/posts List all resources 200 Array of 100 objects
R2 GET {{baseUrl}}/posts/1 Fetch one resource 200 Object with id equal to 1 and fields userId, title, body
R3 GET {{baseUrl}}/posts/9999 Missing resource 404 Empty object {}
R4 GET {{baseUrl}}/posts?userId=1 Filtering 200 Every item has userId equal to 1
R5 GET {{baseUrl}}/posts/1/comments Nested resource 200 Every item has postId equal to 1
R6 POST {{baseUrl}}/posts with JSON body Create 201 Echoes your fields and adds an id
R7 PUT {{baseUrl}}/posts/1 with full body Replace 200 Returns the body you sent, with id 1
R8 PATCH {{baseUrl}}/posts/1 with {"title":"updated"} Partial update 200 title equals “updated”; other fields present
R9 DELETE {{baseUrl}}/posts/1 Remove 200 Empty object
R10 GET {{baseUrl}}/users/1 Nested data structure 200 address and company are objects, not strings

Sample body for R6

{
  "title": "Login API test note",
  "body": "Created during practice",
  "userId": 1
}

Set the header Content-Type to application/json. Without it, some servers ignore the body.

The same checks with curl

curl -i https://jsonplaceholder.typicode.com/posts/1

curl -i -X POST https://jsonplaceholder.typicode.com/posts \
  -H "Content-Type: application/json" \
  -d '{"title":"Login API test note","body":"Created during practice","userId":1}'

The -i flag prints the status line and headers along with the body, which is what you want when testing.

Writing assertions in Postman

After each request, open the Tests tab and add checks. These snippets are illustrative templates for you to adapt and run yourself.

pm.test("Status is 200", function () {
  pm.response.to.have.status(200);
});

pm.test("Response is JSON", function () {
  pm.response.to.have.header("Content-Type");
  pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
});

pm.test("Post has required fields", function () {
  const data = pm.response.json();
  pm.expect(data).to.have.property("id", 1);
  pm.expect(data).to.have.property("title");
  pm.expect(data.userId).to.be.a("number");
});

pm.test("Responds within 1000 ms", function () {
  pm.expect(pm.response.responseTime).to.be.below(1000);
});

A time threshold on a public service is only a rough guide, since network conditions vary. Use it to practise the syntax, not to draw performance conclusions.

Worked illustrative example: testing “create a post”

This example is illustrative. It shows how a tester thinks, and the results in the table are what you should expect to look for, not recorded output.

Requirement (written as a tester would receive it): “A client can create a post by sending a title, body and userId. The server returns the created object with a new id.”

Step 1: derive test cases. From one sentence, you can generate positive, negative and boundary cases.

Case Input Expected result Why it matters
TC1 Valid title, body, userId 1 201 and body contains an id Happy path
TC2 Missing title A well-behaved real API returns 400 with a clear message Validation
TC3 userId sent as the text “abc” A real API should reject it with 400 or 422 Data type check
TC4 Empty body {} Real API should reject it Boundary
TC5 Very long title (thousands of characters) Accepted or rejected consistently, never a 500 Size limits
TC6 Wrong Content-Type such as text/plain Real API should return 415 or 400 Header handling

Step 2: run them and compare. JSONPlaceholder is a fake API built for demos, so it is permissive and may return 201 for TC2 to TC5. That is not a bug in your testing. It teaches an important lesson: a test can reveal that a service lacks validation. In a real project, that gap would be logged as a defect against the requirement.

Step 3: write the defect report. Here is a template filled in for the TC2 scenario, assuming a real API accepted a post without a title:

  • Title: POST /posts accepts request without mandatory title
  • Steps: Send POST with body {"body":"x","userId":1} and Content-Type: application/json
  • Expected: 400 with an error message naming the missing field
  • Actual: 201 with a new id
  • Severity: Medium, because invalid records can be saved
  • Evidence: Request, full response and timestamp attached

Expected-result worksheet to reuse

Copy this layout into a spreadsheet for every endpoint you test. The empty actual and verdict columns are where your learning happens.

Test ID Endpoint and method Input Expected status Expected body or header Actual status Actual result Pass or fail Notes
T-001 GET /posts/1 None 200 id equals 1
T-002 GET /posts/9999 None 404 Empty object
T-003 POST /posts Valid JSON 201 id present

API testing checklist

Run through this list for any endpoint you are given. It works for a practice API and for a company service alike.

Functional checks

  • Does the correct method return the correct status code for valid input?
  • Does the body contain every field named in the specification, with the right data types?
  • Does filtering, sorting or pagination return only the expected records?
  • Does a create request actually produce a retrievable resource (on an API that persists data)?
  • Does delete remove the resource, and does a follow-up GET return 404?

Negative checks

  • Missing required fields
  • Wrong data types
  • Resource IDs that do not exist
  • Unsupported methods, such as DELETE on a read-only endpoint
  • Malformed JSON, such as a missing closing brace

Non-functional and safety checks

  • Is authentication required where the specification says so, and is a missing token rejected with 401?
  • Do error messages avoid exposing internal details such as stack traces?
  • Is the Content-Type header correct?
  • Is the response time reasonable on repeated calls?

Reporting checks

  • Is each failure reproducible with exact steps?
  • Is the full request and response saved as evidence?
  • Is the expected result traced to a requirement, not to your own opinion?

Common beginner mistakes

  1. Checking only the status code. A 200 response with the wrong body is still a failure. Assert on content as well.
  2. Testing only the happy path. Negative cases find most real defects.
  3. Hardcoding the base URL in every request. Use a variable so the collection is portable.
  4. Treating a permissive demo API as the standard. Fake APIs accept almost anything. Always test against the specification, not just what the service happens to return.
  5. Sharing credentials. If you later test an API with tokens, keep them in environment variables and never paste them into screenshots or reports.
  6. Writing vague defects. “API not working” cannot be acted on. State method, endpoint, input, expected and actual.

A seven-day practice plan

Day Focus Output
1 Vocabulary and tool setup Postman installed, baseUrl variable created
2 GET requests R1 to R5 Worksheet rows filled with actual results
3 Write requests R6 to R9 Notes on how write responses differ from a persistent API
4 Assertions in the Tests tab At least three assertions per request
5 Negative cases TC2 to TC6 List of places where the service is more permissive than a real one
6 Collection runner and variables One-click run of the full collection
7 Reporting One defect report and a one-page summary of your test approach

Turning practice into an internship portfolio

Employers and faculty reviewers respond to evidence. Keep a small folder with:

  • The exported Postman collection
  • The completed worksheet
  • One well-written defect report
  • A short note explaining your test design: what you tested, why and what you would add next

If you want a structured place to apply these skills, CareerSwami offers a free two-week (14-day) online internship with a free offer letter and a free completion certificate after successful completion, across 26 tracks. Check the track list to see whether a software testing option fits your goals.

Confirm with your college

Institution rules differ by branch, scheme and college, so settle these points in writing before you rely on this work in any academic submission:

  • Syllabus: Ask your department which subjects or electives in your current GTU curriculum scheme cover software testing or web services. Request the exact subject code and unit list from the official syllabus document for your branch and semester.
  • Internship rules: Ask your internship or project coordinator whether an online, self-arranged internship is permitted, how many weeks are required and what proof is accepted.
  • Documents: Ask what format the offer letter, completion certificate and report must follow, and who signs or verifies them.
  • Credit: Ask whether any non-college internship carries credit or is only for your own record. Do not assume it does.
  • Training and placement cell: Ask the cell whether it keeps a list of recognised internship providers and whether it needs to be informed.
  • Evaluation: Ask how your internship or project will be assessed, such as viva, report or presentation, so you can capture the right evidence from day one.

Keep the replies, whether email or a signed notice, with your report.

Frequently Asked Questions

Do I need to know programming to start API testing?

No. You can send requests, read responses and check status codes in Postman without writing code. Basic JavaScript helps when you write assertions, and a little JSON knowledge is enough to begin.

Is JSONPlaceholder safe to practise on?

Yes, it is a public fake API intended for testing and prototyping. Its write operations are simulated, so nothing you send is permanently saved. Never send personal data or real passwords to any public practice service.

What is the difference between PUT and PATCH?

PUT replaces the whole resource, so you send every field. PATCH changes only the fields you send. Testing both with requests R7 and R8 shows the difference quickly.

Why does the practice API return 201 for invalid data?

Demo APIs are deliberately lenient and do not enforce full validation. Use them to learn mechanics, then judge real services against their written specification, where missing validation counts as a defect.

Is Postman or curl better for beginners?

Postman suits beginners because it has a visual interface, saved collections and a Tests tab. curl is lighter and is worth learning for quick checks and for running requests inside scripts.

How many test cases should one endpoint have?

There is no fixed number. A sensible starting set is one positive case, a few negative cases for each input field, and checks for authentication and error format. Derive them from the requirement rather than aiming for a count.

Will this guide count for marks in my GTU course?

That depends on your branch, curriculum scheme and college, and this guide cannot confirm it. Use the verification list above to get a written answer from your department.

What should I learn after these basics?

Move on to authentication (tokens and API keys), data-driven testing with CSV or JSON files, running collections from the command line and reading API documentation written in OpenAPI format.

Related Software Testing guides

Ready to put this into practice?

Join the free two-week CareerSwami online internship in Software Testing. The internship, the offer letter and the completion certificate are free.

Start your free 2-week internship

Web Stories

Scroll to Top