You are on page 1of 12

API TESTING

Presented by:-
Prem Krishna
Chettri
API TESTING
 Introduction

 Testing Category

 Mytest Testing Tool


Introduction
API Testing:-

Methodology to assure functionality


of a
module by testing interfaces (APIs)
exposed by that application to other
applications.
Testing Category
Functional / Scenario
 Testing Basic Functionality Of The Module


Example:mod_init () //Initialization
mod_setup () //Setting Up
mod_do_func ()//Main Function
Boundary Value
 Check whether the module operates adequately at the
boundary value Of parameter .
 If input conditions specify a number of values N
 Generally Boundary Values Will be:
(N-1),0,N,(N+1)

Example: For Index of range 0-10 Digit


Boundary Value will be -1,0,10,>10
Negative Condition
 Check For Error/Exception Handling
Mechanism.
API Should work for an unexpected input
value.i.e. For Wrong Input Value/incorrectly
calling etc. It should Confirms failure rather
then crashing.

Example:-Null Value as a Parameter.


Reading an Unopened File.etc.
Parameter Selection & Return
Values
 Validation Of Input and Output
Parameters
 Returned Values:-
1>Specific inputs can be defined and results
can be
validated against expected return value.

2>Returning void can be tested by the


checking the
behavior of the API after calling it.
Purpose & Methodology
 Test the API’s Functionality which acts as Interface to
the application of Middleware And Engine.

 Test Script Should be Base On:-


1>Return Value On Some Input
2>Trigger some other API/event/interrupt
3>Update data structure
4>Modify certain resources

 Test Script Should Be compatible with MyTest API And


should
support both ARM and Simulator Architecture.
Mytest
 XOcean Testing Tool

Installation

#mkdir -p /opt //Installing Directory As /opt

#tar zxf mytest-xocean-1.1.0.tar.gz -C /opt


Mytest Test Command
 #mytest new Project // Creates A Project Named
Project

 #mytest ls Or #mytest ls>Myfile


//List All Test Cases Under Your Project
Directory

 #mytest run Myfile // Run The Test Cases Within


Myfile

 #mytest report Myfile.test/ //Creates A HTML Output


File
THANK YOU

You might also like