Thursday, November 8, 2007

Manual Testing - Unit and API Testing

Unit Testing and API Testing:

  • Unit testing is almost always an activity that is owned by the development team; developers are expected to build unit tests for each of their code modules (these are typically classes, functions, stored procedures, or some other ‘atomic’ unit of code), and to ensure that each module passes its unit tests before the code is included in a build.
  • API testing, is typically an activity owned by the QA team, a team other than the author of the code. API tests are often run after the build has been created, and it is common that the team of the tests do not have access to the source code; they are essentially creating black box tests against an API rather than the traditional GUI.
    An API (Application Programming Interface) is a collection of functions and procedures, called API calls that can be executed by other software applications.

Key difference between Unit and Testing

  • Unit tests are typically designed by the developers to verify the functionality of each unit. The scope of unit testing often does not consider the system-level interactions of the various units; the developers simply verify that each unit in isolation performs as it should.
  • API testing, like other activities owned by the QA team, must consider the ‘full’ functionality of the system, as it will be used by the end user (in this case, another program). This means that API tests must be far more extensive than unit tests, and take into consideration the sorts of ‘scenarios’ that the API will be used for, which typically involve interactions between several different modules within the application.

How to approach the API testing task?

  • API testing is a testing activity that happens to require some coding, and is usually beyond the scope of what developers should be expected to do. (We need to own this activity)
  • Traditional testing techniques such as equivalence classes and boundary analysis are also applicable to API testing, so even if we are not too comfortable with coding,we can still design good API tests.
  • We will not be able to test all possible scenarios that are possible to use with your API. Rather we can focus on various flavours of data type and forced error testing

    Main Challenges of API Testing can be divided into following categories:

    • Parameter Selection
    • Parameter combination
    • Call sequencing

1 comment:

Unknown said...


Hello,
The Article on Manual Testing Unit and API Testing is nice give detail information about it.Thanks for Sharing the information about Manual testing API Testing . Software Testing Services