integration testing on steroids
Project description
Fixtup
Test your python application beyond your code !
write clear, robust and easy-to-execute system integration tests with your favorite test framwork like pytest
, unittest
or event BDD framework as robot framework
or behave
.
- it starts the services needed to run your test
- it mount the longest fixtures only once whether you play a test or 100
- it cleans files and data between each test
- it runs on a developer's workstation without configuration
- it can be debugged step by step in your favorite IDE
Benefits
- You can get up and running with Fixtup in minutes, even on legacy project, no matter what your test framework is.
- You will stop wasting your time on boilerplate code
- Fixtup provides an easy way to run tests in debug in your favorite IDE like pycharm and vscode.
- Fixtup is cross-platform which makes it easy to use it on Linux, Mac and Windows.
Getting started
write clear, robust and easy-to-execute system integration tests in 5 minutes.
$ poetry init
$ poety add --dev fixtup
$ poetry run fixtup init
$ poetry run fixtup new
Choose a fixture identifier : thumbnail_context
Mount environment variables on this fixture (y/n) [n]
Mount docker container on this fixture (y/n) [n]
We will use this fixture to mount a directory with existing picture file.png
and test
our thumbnail
function is working well.
def test_thumbnail_should_generate_thumbnail(self):
# Magic happens with the instruction fixtup.up
with fixtup.up('thumbnail_context') as f:
# Given
wd = os.getcwd()
original_file = os.directory.join(wd, 'file.png')
expected_thumbnail_file = os.directory.join(wd, 'file_t.png')
# Then
thumbnail(original_file, expected_thumbnail_file)
# Then
self.assertTrue(os.directory.isfile(expected_thumbnail_file)
Fixtup mount the fixture thumbnail_context
in temporary directory. At the end of the test, it clean up everything for you
Want more ? Fixtup even mount your containers, take a try.
The complete example is available in the repo
Contributing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fixtup-0.1.5.tar.gz
.
File metadata
- Download URL: fixtup-0.1.5.tar.gz
- Upload date:
- Size: 29.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5e32cb330aa2f17eb60833ab8783ae5287076f4bd6b7a517caef4134ddeb41b |
|
MD5 | b209acea48f672f29388198095532ea9 |
|
BLAKE2b-256 | f68ea7a061bab67a26d4621f13d6d03d22ffc838c4a2b468b314e2c68572b33c |
File details
Details for the file fixtup-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: fixtup-0.1.5-py3-none-any.whl
- Upload date:
- Size: 44.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d330d7e7b654b1b3fa870ed9cc03be7c9c53c8e36a53c270a7f2da17b99e0efd |
|
MD5 | ca1cdab656b53a78477eafbe3a50b299 |
|
BLAKE2b-256 | 2bf1b2866049859dadc52b48a1464d87de104a0f8d375ad36056c8f4b1d85bb4 |