Skip to main content

integration testing on steroids

Project description

Fixtup

Test your python application beyond your code !

version ci MIT

Fixtup manages disposable environments & data for your tests

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

More information into CONTRIBUTING.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fixtup-0.1.4.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

fixtup-0.1.4-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

Details for the file fixtup-0.1.4.tar.gz.

File metadata

  • Download URL: fixtup-0.1.4.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for fixtup-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6354ea5eafc4355ffc51f9ef7319a9f1456ab4773507b31dd7e00b8457326caa
MD5 6637325dcfad6c9711de0fab5552fbff
BLAKE2b-256 9417ffefd1c485d81e59026ef2811087ebbc4f332829ad3fc68a23ba00a32ad3

See more details on using hashes here.

File details

Details for the file fixtup-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: fixtup-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for fixtup-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9620d4bcc4009f993ee17cbffca13c35c6b1f29be7a74811d0276ff3ddc5b561
MD5 e85480ba9b273d409343dbb53d99793d
BLAKE2b-256 70275a4acdf3dc71f23c5b4192ad78456d9aefeb134bd0649dc341acd7f8e0da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page