I have build a Debian package out of a Python project which depends on a bunch of Debian packages to work. The Python project also contains unit and integration tests (using py.test).
Since my project depends on some Debian packages, I need to have these packages installed inside the test environment and they should verify that my module works correctly together with these packages (I want to make sure that my module does not break on updates of these libs).
I want to put the configuration and execution of these test environments into a Makefile. These tests should be runnable both on a developer workstation and on an Jenkins-powered Integration Server.
My current approach for a complete integrationtest of my package is to:
- Create a pBuilder environment
- Install dependencies from Debian-controlfile into pBuilder env
- Inside this pBuilder-environment launch py.test, also using virtualenv / tox to test different Python interpreter versions
- collect test-results from test environment (py.test can generate nice JUnit-like test output which Jenkins can publish easily)
Unfortunately I could not find any hints how to realize this stuff - especially how to do 3). All documentation I could find was just about building the package, not about running tests.
Can anyone provide me some hints how I can build up such a test setup? Also, I want to know if it makes sense at all to do what I aim to do. How do others test integration of (Python) modules with other Debian packages?