-
Notifications
You must be signed in to change notification settings - Fork 2
Integration Tests for SQL #40
Copy link
Copy link
Open
Labels
Area: SQLRelates to the SQL Server database objects; do not use for the repository.Relates to the SQL Server database objects; do not use for the repository.Severity 0: Nice to haveStatus 0: DiscussionNeeds further evaluation of requirements and prioritization.Needs further evaluation of requirements and prioritization.Type: ImprovementImproves the functionality or interface of an existing feature.Improves the functionality or interface of an existing feature.
Metadata
Metadata
Assignees
Labels
Area: SQLRelates to the SQL Server database objects; do not use for the repository.Relates to the SQL Server database objects; do not use for the repository.Severity 0: Nice to haveStatus 0: DiscussionNeeds further evaluation of requirements and prioritization.Needs further evaluation of requirements and prioritization.Type: ImprovementImproves the functionality or interface of an existing feature.Improves the functionality or interface of an existing feature.
Currently, while we have decent unit tests for much of the core functionality, the actual
SqlTopicRepositoryitself 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
TopicRepositorybase class and theSqlDataReaderextension 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).