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

implement pytest testing #1

Open
jacobmartinez3d opened this issue Sep 24, 2020 · 3 comments · Fixed by #7
Open

implement pytest testing #1

jacobmartinez3d opened this issue Sep 24, 2020 · 3 comments · Fixed by #7
Assignees
Labels
enhancement New feature or request

Comments

@jacobmartinez3d
Copy link
Member

At this stage preparing full test coverage is not only necessary for deployment but is also going to help consolidate all the remaining todos and fixes left before initial alpha release.

@jacobmartinez3d jacobmartinez3d added the enhancement New feature or request label Sep 24, 2020
@jacobmartinez3d jacobmartinez3d self-assigned this Sep 24, 2020
@jacobmartinez3d
Copy link
Member Author

jacobmartinez3d commented Sep 25, 2020

1-implement-pytest-module

Figuring out how to handle dummy DB interactions with startup/teardown methods. Need to organize further into testsuites so I can loop over each entity-type while still having individual test-cases per-entity.

@jacobmartinez3d
Copy link
Member Author

Noticing some really bad traceback barf when MaglaTest encounters bad seed data. Make sure to include good error handling for PR.

@jacobmartinez3d
Copy link
Member Author

jacobmartinez3d commented Oct 2, 2020

The test module will be merged in 3 stages:

Phase 1 (unit)

  • test direct CRUD operations with SQLAlchemy session object.
  • isolate and test individual sub-entities as far as possible without requiring other magla entities or modules(magla.utils is ok).
  • make sure to always compare backend data with seed data used initially.

Methods available from within a sub-classed MaglaEntityTestFixture test:

# reset the seed object to match seed data
self.reset(seed_object)

# retrieve all seed data-tuples for given entity-type
self.get_seed_data("<entity name>")

# retrieve the seed data for a given entity and seed-index
self.get_seed_data("<entity name>", 1)

Phase 2 (critical integration)

  • Complete the remaining test-coverage from phase 1 still using the same seed data from file.
  • perform filesystem manipulation during this phase.

Phase 3 (expensive integration)

  • Test all magla CRUD operations and remaining edge case tests.

@jacobmartinez3d jacobmartinez3d linked a pull request Oct 3, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant