-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement
Milestone
Description
Sam Brannen opened SPR-11896 and commented
Status Quo
#12311 introduced support for declarative SQL script execution via the @Sql annotation in the Spring TestContext Framework (TCF). @Sql provides attributes for configuring the syntax of the referenced SQL scripts as well as exception handling and transaction behavior.
Early feedback from developers has shown that although this level of configuration (i.e., at the @Sql annotation level) is useful, it is often times a burden on the developer to declare the exact same configuration for each test method within a test class or test class hierarchy. It would therefore be very beneficial to be able to declare common, shared SQL configuration across a test class hierarchy.
Deliverables
- Introduce a class-level annotation for declaring common SQL script configuration -- for example,
@SqlConfig - Common configuration must be able to be overridden via method-level
@Sqlconfiguration. - Avoid unnecessary duplication of code and documentation by replacing existing configuration attributes in
@Sqlwith a singleconfigattribute of type@SqlConfig. - Furthermore, all attributes of
@SqlConfigmust be either of typeStringor custom enums in order to support overriding. Empty values would therefore imply use of a default or inherited value.
Affects: 4.1 RC1
Issue Links:
- Support declarative SQL script execution in the TestContext framework [SPR-7655] #12311 Support declarative SQL script execution in the TestContext framework ("depends on")
- Document @Sql script support in the reference manual [SPR-11849] #16468 Document
@Sqlscript support in the reference manual ("is depended on by") - Improve transaction management for @Sql [SPR-11911] #16530 Improve transaction management for
@Sql
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement