Skip to content

grazielegrc/marvel-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Behave API Automation Demo

This project has been created in order to testing the Marvel API using Python and Behave framework. To further information on how to use this API and generate the API Key, please visit: https://developer.marvel.com/documentation/getting_started

Pre-requisites

Installation

Creating a virtual environment using python3 location. Remember to retrieve the current python location to ensure the correct version.

virtualenv -p /usr/bin/python3 venv

Activating the new virtual environment:

source venv/bin/activate

Use the package manager pip to install the libs:

pip install -r requirements.txt

Usage

First of all, open the params.py file under utils folder and inform your API keys.

After that, execute the command below to run all tests:

behave

To run with tags:

behave --tags=stories

To generate xml report:

behave --junit

To generate json report:

behave -f json.pretty

To generate Allure report:

First, its necessary to install Allure in your computer, follow here: https://docs.qameta.io/allure-report/#_installing_a_commandline

After installing Allure, run:

behave -f allure_behave.formatter:AllureFormatter -o reports/my_allure

Starting Allure server to see the report. On project root folder, run:

allure serve reports/my_allure

About

This is a sample project to demonstrate API Automation using Behave and Allure report.

Topics

Resources

Stars

Watchers

Forks