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

Integration Tests for SQL #40

Open
JeremyCaney opened this issue Mar 7, 2021 · 0 comments
Open

Integration Tests for SQL #40

JeremyCaney opened this issue Mar 7, 2021 · 0 comments
Labels
Area: SQL Relates to the SQL Server database objects; do not use for the repository. Severity 0: Nice to have Status 0: Discussion Needs further evaluation of requirements and prioritization. Type: Improvement Improves the functionality or interface of an existing feature.

Comments

@JeremyCaney
Copy link
Member

Currently, while we have decent unit tests for much of the core functionality, the actual SqlTopicRepository itself is not subjected to testing—and it would be difficult to mitigate that, given the nature of the dependencies. Integration tests offer an alternative.

Priority

The scope of impact for this is comparatively small compared to e.g., #39. Much of the business logic is already tested via the TopicRepository base class and the SqlDataReader extension methods. And the underlying database logic is tested by the SQL unit tests. Given that, the priority of this might be pretty low.

Performance

The biggest concern with this is performance, as well as the dependency on a database server. As with the SQL unit tests, this may be best handled exclusively on the localhost using a local test database which isn’t run during the CI/CD pipeline, and may even be unloaded during normal operation.

Git Repository

With the SqlTopicRepository, database schema, unit tests, and proposed integration tests, we’re looking at four projects that are closely related to one another, but necessarily loosely coupled from the core library. Does it make sense to separate these out into their own git repository? This makes coordinating versioning harder. But it would be especially useful if e.g., we later introduce another core repository implementation (e.g., MongoTopicRepository).

@JeremyCaney JeremyCaney added Area: Repositories Relates to the `ITopicRepository` interface or one of its implementations. Severity 0: Nice to have Type: Improvement Improves the functionality or interface of an existing feature. Status 0: Discussion Needs further evaluation of requirements and prioritization. labels Mar 7, 2021
@JeremyCaney JeremyCaney added Area: SQL Relates to the SQL Server database objects; do not use for the repository. and removed Area: Repositories Relates to the `ITopicRepository` interface or one of its implementations. labels Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: SQL Relates to the SQL Server database objects; do not use for the repository. Severity 0: Nice to have Status 0: Discussion Needs further evaluation of requirements and prioritization. Type: Improvement Improves the functionality or interface of an existing feature.
Projects
None yet
Development

No branches or pull requests

1 participant