Skip to content

This project showcases API automation using Robot Framework, a keyword-driven test automation framework.

Notifications You must be signed in to change notification settings

adityadwic/API-Automation-with-RobotFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Automation with Robot Framework

This project showcases API automation using Robot Framework, a keyword-driven test automation framework.

Table of Contents

Introduction

This repository contains Robot Framework test scripts for API automation. It provides a structured and keyword-driven approach to testing RESTful APIs.

Features

  • Demonstrates API automation using Robot Framework.
  • Keywords for common HTTP methods: GET, POST, PUT, PATCH, DELETE.
  • Clear and modular project structure for easy maintenance and extension.

Prerequisites

Before you begin, ensure you have the following installed:

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/API-Automation-with-RobotFramework.git
    cd api-automation-robotframework
  2. Install dependencies:

    pip install -r requirements.txt

Writing Tests

You can find API test scripts in the tests directory. Each test file (*.robot) contains individual test cases demonstrating various HTTP requests.

# Example test file: tests/api_tests.robot
*** Settings ***
Library    RequestsLibrary

*** Test Cases ***
Example GET Request
    ${response}=    Get    https://jsonplaceholder.typicode.com/posts/1
    Should Be Equal As Numbers    ${response.status_code}    200
    # Add more assertions as needed

Running Tests

Execute Robot Framework tests with the following command:

  robot TestCase/

Project Structure

/API-Automation-with-RobotFramework
|-- TestCase/
|   |-- API-Automation.robot
|-- devdata/
|   |-- example.env.json
|-- .gitignore
|-- README.md
  • TestCase/: Contains Robot Framework test files for API automation.
  • devdata/: Contains files that define static data for your tests, such as JSON files.
  • .gitignore: Specifies files and directories to be ignored by Git.

About

This project showcases API automation using Robot Framework, a keyword-driven test automation framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published