Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Install Bats Using a Package

Patrick Hobusch edited this page Mar 14, 2017 · 8 revisions

Purpose

You may be able to find Bats pre-packaged for your operating system. If available, such a package may offer a convenient alternative to cloning the Github repository:

  • The installation is usually shared by all users on the system.
  • The bats command will typically be available without configuration of any kind.
  • Updates and bugfixes may be provided via the regular stream of package updates for your system.

Ubuntu

sudo add-apt-repository ppa:duggan/bats
sudo apt-get update
sudo apt-get install bats

Fedora

sudo dnf install bats

openSUSE

Bats is available for openSUSE Tumbleweed, as well as for openSUSE Leap 42.1 and later releases:

zypper install bats

For older releases, take a look at the development project on OBS (Open Build Service). You may find a repository containing a package for your target release, or build your own package using the sources found there.

Arch Linux

Bats is available for Arch Linux. You can install the latest release from the community repository.

sudo pacman -Sy bash-bats

The development version can be installed from AUR using your favourite AUR helper.

pacaur -Sa bats-git

Mac OSX

Bats is available for Mac OSX using brew. If you don’t have brew already, discover it and install it here.

brew install bats

Installation with bpkg

$ bpkg install -g sstephenson/bats
Clone this wiki locally