Skip to main content

integration testing on steroids

Project description

Fixtup

version ci MIT

Fixtup manages environments & data for your tests

Do you have already given up on writing integration tests ?

  • it would have been too complicated to mount several containers to run these tests
  • it would have been necessary to write too much boilerplate to run these tests in a CI
  • it would have taken another developer too many steps to run these tests
  • it would have been difficult to debug them individually in an IDE

With Fixtup, write clear, robust and easy-to-execute 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 throws 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

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

Take 10 minutes to get all the key to start with fixtup in Getting started.

pip install fixtup

Here is an example that shows how fixtup makes it easier to test a function that generate a thumbnail.

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)

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.1.tar.gz (28.5 kB view hashes)

Uploaded Source

Built Distribution

fixtup-0.1.1-py3-none-any.whl (43.0 kB view hashes)

Uploaded Python 3

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