How To Install python3-gabbi on Ubuntu
Posted on April 1, 2023  (Last modified on May 20, 2023 )
3 minutes • 534 words
Introduction
In this tutorial we learn how to install python3-gabbi
on Ubuntu.
What is python3-gabbi
python3-gabbi is:
Gabbi is a tool for running HTTP tests where requests and responses are represented in a declarative form.
Gabbi works to bridge the gap between human readable YAML files that represent HTTP requests and expected responses and the obscured realm of Python-based, object-oriented unit tests in the style of the unittest module and its derivatives.
Each YAML file represents an ordered list of HTTP requests along with the expected responses. This allows a single file to represent a process in the API being tested. For example:
- Create a resource.
- Retrieve a resource.
- Delete a resource.
- Retrieve a resource again to confirm it is gone.
At the same time it is still possible to ask gabbi to run just one request. If it is in a sequence of tests, those tests prior to it in the YAML file will be run (in order). In any single process any test will only be run once. Concurrency is handled such that one file runs in one process.
These features mean that it is possible to create tests that are useful for both humans (as tools for improving and developing APIs) and automated CI systems.
This package contains the Python 3.x module.
There are three methods to install python3-gabbi
on Ubuntu. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install python3-gabbi Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install python3-gabbi
using apt-get
by running the following command:
sudo apt-get -y install python3-gabbi
Install python3-gabbi Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install python3-gabbi
using apt
by running the following command:
sudo apt -y install python3-gabbi
Install python3-gabbi Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install python3-gabbi
using aptitude
by running the following command:
sudo aptitude -y install python3-gabbi
How To Uninstall python3-gabbi on Ubuntu
To uninstall only the python3-gabbi
package we can use the following command:
sudo apt-get remove python3-gabbi
Uninstall python3-gabbi And Its Dependencies
To uninstall python3-gabbi
and its dependencies that are no longer needed by Ubuntu, we can use the command below:
sudo apt-get -y autoremove python3-gabbi
Remove python3-gabbi Configurations and Data
To remove python3-gabbi
configuration and data from Ubuntu we can use the following command:
sudo apt-get -y purge python3-gabbi
Remove python3-gabbi configuration, data, and all of its dependencies
We can use the following command to remove python3-gabbi
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge python3-gabbi
Dependencies
python3-gabbi have the following dependencies:
- python3-colorama
- python3-httplib2
- python3-jsonpath-rw
- python3-pbr
- python3-six
- python3-testtools
- python3-wsgi-intercept
- python3-yaml
- python3-certifi
- python3-jsonpath-rw-ext
- python3-pytest
- python3-urllib3
- python3
References
Summary
In this tutorial we learn how to install python3-gabbi
package on Ubuntu using different package management tools: apt, apt-get and aptitude.