tox
is a command-line driven automated testing tool for
Python, based on the use of
virtualenv
. It can be used for both manually-invoked testing from the desktop, or continuous testing within
continuous integration frameworks such as
Jenkins or
Travis CI
Travis CI is a hosted continuous integration service used to build and test software projects hosted on GitHub, Bitbucket, GitLab, Perforce, Apache Subversion and Assembla.
Travis CI was the first CI service that provided services to open-sou ...
. Its use began to become popular in the Python community from around 2015.
tox
acts a wrapper for both
virtual environment
A virtual environment is a networked application that allows a user to interact with both the computing environment and the work of other users. Email, chat, and web-based document sharing
Document and file collaboration are the tools or systems ...
s and
test automation
In software testing, test automation is the use of software separate from the software being tested to control the execution of tests and the comparison of actual outcomes with predicted outcomes. Test automation can automate some repetitive bu ...
tools, to simplify the consistent testing of Python code across a range of environments.
It integrates the use of a virtualisation tool, such as
virtualenv
, with a test script such a
Imprimatur This gives a consistent
container
A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping.
Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
-based testing environment on both desktops and integration servers. It also allows testing in a range of Python environments, such as Python 2 or Python 3 specific contexts.
Tox is configured through a simple
tox.ini
file in
INI format.
Smoke testing
tox
is also convenient as a simple
smoke test on a newly installed, or freshly-updated system. It is also useful before beginning a
refactoring
In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the '' factoring''—without changing its external behavior. Refactoring is intended to improve the design, structu ...
exercise.
References
Continuous integration
Python (programming language) development tools
Python (programming language) software
{{computing-stub