Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Rework Integration Test Setup #209

Open
4 tasks
Nicoretti opened this issue Sep 22, 2022 · 0 comments
Open
4 tasks

🔧 Rework Integration Test Setup #209

Nicoretti opened this issue Sep 22, 2022 · 0 comments
Labels
refactoring Code improvement without behavior change

Comments

@Nicoretti
Copy link
Member

Nicoretti commented Sep 22, 2022

Summary

Rework the integration tests and setup to use exasol libraries (e.g. pyexasol or pytest-exasol) for preparing the DB
and setting up the tests written and maintained by exasol.

Details

Currently either SQLA, pyodbc, turbodbc or any combination of them is used to setup and prepare the test DB and it's
contents. This has at least two major flaws (shortcomings):

  1. Chicken Egg Problem

    While the core functionality of the exasol SQLA dialect is not working properly, it's very hard or impossible
    to execute some or any tests with the appropriate DB and data setup.

  2. It is not possible (without workarounds) to additionaly run integration tests which are not using the sqla test infrastructure.

    ⚠️ Problems ⚠️
    * Test collection works differently (Tests won't get picked up)
    * Test runs always need to provide db settings etc. to the sqla test plugin, otherwise the "pytest cli" will crash.

  3. Eat Your Own Dog-food

    We test and rely on and implicitly test third party libraries, while we could implicitly test and get a feel (feedback) on our own libraries, APIs, ...

  4. All the issues which come with third party libraries

    • dependencies
    • maintenance
    • ...

Background & Context

Having the tests within test/integration/sqlalchemy use SQLA primitives is fine because even our adjusted test cases there
should be looked at as part of SQLA and therefore meet their criteria.

Relying on SQLA tests fixtures and primitives within the test setup of our custom tests (test/integration/exasol) needs to be avoided though.

Examples

Replace/Remove SQLA test fixtures/classes e.g. sqlalchemy.testing.fixtures.TablesTest in test located in test/integration/exasol.

References

Task(s)

  • Add/Use pytest_itde for integration tests
  • Refactor tests
  • Refactor nox targets
    • Add DBAPI target
    • Add regression target
  • Add configuration parameters (pytest) for sqla-exasol project
@Nicoretti Nicoretti added the refactoring Code improvement without behavior change label Sep 22, 2022
@Nicoretti Nicoretti changed the title 🔧 Rework Integration Test & Setup 🔧 Rework Integration Test Setup Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code improvement without behavior change
Projects
None yet
Development

No branches or pull requests

1 participant