Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Framework setup guide for Gmail API

This is a playground of Gmail API tests

Table of Content

  1. Introduction
  2. Technology Used
  3. How to setup
  4. Preparation of config file
  5. How to execute the tests
  6. Test Report
  7. Test Scope

Introduction

Gmail API provides a set of APIs which are being used by Gmail to perform varoius email operations. This framework has been developed to validate some it's functionalities with some basic use case scenarios.

Technology Used

How to setup

At first clone the framework repository in your local. Run the below command to clone the repostory using Git Bash

$ git clone https://github.com/iamKrishnendu/GmailApi.git

Follow the steps to download and install Node.js into the system

On MacOs
  • Download and installation guide available here
On Windows
  • Download and installation guide available here
Other
  • Installation guide for all supported OS available here

Preparation of config file

  1. A .env file needs to be created first along with the below details
  2. This file needs to be put uder the root project folder before execution
  3. An example file is already provided within the project for reference. For a quickstart, just remove the .example extension by renaming it
USER_ID= <User Id goes here>
BASE_URI=https://gmail.googleapis.com
SERVICE=gmail
VERSION=v1
CLIENT_ID=<Client Id goes here>
CLIENT_SECRET=<Client Secret goes here>
REDIRECT_URI=https://developers.google.com/oauthplayground
REFRESH_TOKEN=<Refresh Token goes here>
TO_EMAIL=<To Email goes here>
FROM_EMAIL=<From email goes here. Usually same as USER_ID>
EAMIL_SUBJECT=<Email Subject goes here>
EMAIL_BODY=<Onliner body of Email goes here>

How to execute the tests

To start the execution, follow the steps below.

  1. Open command prompt or terminal
  2. Navigate to project folder directory
  3. Run npm install to install all required dependencies first
  4. Run npm run test command to start execution and generate test report

Test Report

Once test execution is completed, a nice and clean report will generate automatically by mochawesome and a .html report can be found under ./mochawesome-report. One snapshot is attached for reference.

Capture

Test Scope

Covered

  • Send Email
  • Get email

Not Covered

  • Send email with attachment

About

This is playground of Gmail APIs

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages