0% found this document useful (0 votes)
9 views3 pages

API

The document outlines key concepts in software development, including the differences between APIs and web services, error codes like 404 and 502, and components of HTTP requests. It also covers Agile methodologies such as Epics, Sprint Reviews, and Definitions of Done, along with testing practices like unit testing, verification vs. validation, and negative test cases. Additionally, it discusses object-oriented programming concepts like abstract classes, interfaces, and constructor inheritance.

Uploaded by

enjamlaluprasad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

API

The document outlines key concepts in software development, including the differences between APIs and web services, error codes like 404 and 502, and components of HTTP requests. It also covers Agile methodologies such as Epics, Sprint Reviews, and Definitions of Done, along with testing practices like unit testing, verification vs. validation, and negative test cases. Additionally, it discusses object-oriented programming concepts like abstract classes, interfaces, and constructor inheritance.

Uploaded by

enjamlaluprasad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

Difference between API and Web Services

An API (Application Programming Interface) is a broader concept — it’s a set of rules that allows
software applications to communicate with each other. APIs can be local, library-based, or remote. A
Web Service is a specific type of API that uses web protocols (HTTP, SOAP, REST) to enable
communication between applications over the internet. So, all web services are APIs, but not all APIs
are web services.

 This is a web service because it uses HTTP protocol to allow communication between two
applications (your e-commerce app and the currency provider).

 It is also an API, but specifically a web-based AP

2. What is 404?

A 404 error is an status code that means the requested resource could not be found on the server. It
usually occurs when the URL is incorrect or the resource has been deleted.

3. What is 502?

A 502 Bad Gateway error means that one server acting as a gateway or proxy received an invalid
response from the upstream server. It often indicates server overload, misconfiguration, or
temporary downtime.

4. Components of an HTTP Request

An HTTP request has four main components:

 Request Line (method, URL, HTTP version)

 Headers (metadata like content type, authorization)

 Body (optional, contains data like JSON or form input)

 Cookies (optional, for session management)

5. What is an Epic?

In Agile, an Epic is a large body of work that can be broken down into smaller user stories. It
represents a high-level requirement or feature that can take multiple sprints.

6. Sprint Review and Sprint Planning

 Sprint Review: Conducted at the end of a sprint to showcase completed work to


stakeholders and gather feedback.

 Sprint Planning: Conducted at the start of a sprint to define the sprint goal, select backlog
items, and plan the work.

7. What is DoD (Definition of Done)?

DoD is a shared understanding of what it means for a user story or feature to be considered
complete. It includes criteria like code review done, unit tests passed, documentation updated, and
deployed successfully.

8. Difference between Verification and Validation


 Verification: Ensures the product is built correctly according to specifications (e.g., reviews,
inspections).

 Validation: Ensures the right product is built — it meets user needs and requirements (e.g.,
functional testing).

9. Difference between Retesting and Regression

 Retesting: Testing a specific defect after it has been fixed to confirm the fix works.

 Regression Testing: Testing existing functionality to ensure new changes haven’t broken
anything.

10. Which testing will you do first?

When a project starts, the first testing is Smoke Testing. It checks whether the basic functionality of
the application is working and if the build is stable enough for further testing.

11. Unit Testing – Developer or Tester?

Unit testing is primarily done by developers since it involves testing individual code units or
functions. Testers usually focus on higher-level functional and integration tests.

12. Difference between Bug and Error

 Error: A mistake in the code or logic made by a developer.

 Bug: A bug is a flaw or defect in software that causes it to behave in an unintended or


incorrect way. It usually arises from mistakes in coding, design, or requirements, and is
discovered when the application doesn’t perform as expected during testing or in
production.

13. Five Negative Test Cases for Add to Cart Functionality

1. Add to cart with invalid product ID.

2. Add to cart with quantity = 0.

3. Add to cart with negative quantity.

4. Add to cart without being logged in (if login is required).

5. Add to cart when the product is out of stock.

14. Three Negative Scenarios for a Protocol (example: HTTP)

1. Sending a request with an unsupported HTTP method.

2. Sending malformed headers or body.

3. Exceeding maximum request size limits.

15. Difference between Abstract Class and Interface

 Abstract Class: Can have both abstract and concrete methods, supports inheritance, and can
maintain state (fields).
 Interface: Only defines contracts (methods without implementation), supports multiple
inheritance, and cannot maintain state.

16. Are Constructors Inherited?

No, constructors are not inherited in object-oriented programming. Each class defines its own
constructors, though a subclass can call a parent constructor using super().

17. Testing Code Only (Unit Testing Scenario)

Yes, if the project requires unit testing, I would focus on testing the code directly using frameworks
like JUnit, NUnit, or PyTest. I wouldn’t write English test cases but instead create automated unit
tests that validate the logic.

18. Writing Test Cases in Programming Language

Yes, I am comfortable writing test cases in a programming language. For example, using Java with
JUnit or Python with PyTest, I can write automated test scripts that validate each module’s
functionality instead of documenting them in plain English.

You might also like