-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create additional tests to METdataio to increase code coverage #318
Comments
The additional tests contribute towards this issue: https://github.com/dtcenter/METplus-Internal/issues/50 |
Thanks for creating this ticket for me @bikegeek I've spent some more time reading through the METdbLoad code and propose the following approach for testing. No datatbase testingInitially I'd like to write true "unit tests". These are tests that don't require a database and just check function behaviour. Since Pros:
Cons:
Testing with a datatbaseIf we decide we want something more robust, we can have the tests operate on a real test database. This would be akin to "integration tests". To do this we'd need MySQL to be running in the test environment, and then write some test fixtures to manage the database state for each test. Pros:
Cons:
The above approaches are not mutually exclusive. We can start with the no database approach and transition to using a database later on. It's likely we could come up with an implementation that can do either approach depending if MySQL is available. For example, the test infrastructure could use a real database when available, otherwise fall back to the mock Let me know if you're happy with this approach, or have any questions? |
* 318: tests and refactor for local_infile * 318: test rhist data and local_infile * small refactor to make "local_infile" configurable from XML load file. * fix apparent bugin run_sql in when load_infile = false * add test that same result loaded when local_infile true/false * add rhist data and test * 318: fix whitespace
To be assigned to John Sharples once he has accepted the invitation to join this repository.
Describe the Task
METdataio, specifically the METdbLoad modules require additional tests to increase the code coverage from its current status. Add appropriate tests, with particular focus on database loading.
Time Estimate
Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.
Sub-Issues
Consider breaking the task down into sub-issues.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
Define the source of funding and account keys here or state NONE.
Define the Metadata
Assignee
Labels
Milestone and Projects
Define Related Issue(s)
Consider the impact to the other METplus components.
Task Checklist
See the METplus Workflow for details.
Branch name:
feature_<Issue Number>_<Description>
Pull request:
feature <Issue Number> <Description>
Select: Reviewer(s) and Development issue
Select: Milestone as the next official version
Select: METdataio-X.Y.Z Development project for development toward the next official release
The text was updated successfully, but these errors were encountered: