testr command not found

In this troubleshooting guide we learn how to fix testr command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

testr: command not found

or when using sudo you get the following error message

sudo: testr: command not found

Solutions to testr: command not found

How To Fix testr: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu testr is provided by python3-testrepository package.

python3-testrepository is:

Testrepository provides a database of test results and supports easy workflows to be built on top of that database. For instance, running just failing tests or getting the last test run back to examine again (without running the tests again). Testrepository is compatible with any test suite that can output subunit. This includes any TAP test suite and any pyunit compatible test suite.

The python3-testrepository package contains the Python testrepository library for Python 3.x, which can be used for programmatic access to the database.

To fix this problem, we can install more using the command below.

sudo apt-get -y install python3-testrepository

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install python3-testrepository.

sudo apt -y install python3-testrepository

Or if you have aptitude installed you can use the following command.

sudo aptitude install python3-testrepository

Summary

In this tutorial we learn how to fix testr command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.