You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using TestTemplate, JUnit will perform executions grouped by the test method. For example, if I have a test class that defines 2 test methods (m1, m2) as TestTemplate and provide 2 invocation contexts (c1, c2) - JUnit will perform this in the following order:
* m1:c1
* m1:c2
* m2:c1
* m2:c2
But what I really need is:
* m1:c1
* m2:c1
* m1:c2
* m2:c2
My use case is that the invocation context describes a particular database schema layout. So c1 and c2 define the same schema, but slightly differently (one adds extra columns to a given table and defoines others). Given that JUnit wants to group these invocations by method (iterating the context within that) we are forced to recreate that schema before each invocation. Effectively this becomes:
* create schema1 (c1)
* run m1
* drop schema1
* create schema2 (c2)
* run m2
* drop schema2
* create schema1 (c1)
* run m1
* drop schema1
* create schema2 (c2)
* run m2
* drop schema2
Obviously that works a lot better as:
* create schema1 (c1)
* run m1
* run m2
* drop schema1
* create schema2 (c2)
* run m1
* run m2
* drop schema2
The text was updated successfully, but these errors were encountered:
When using TestTemplate, JUnit will perform executions grouped by the test method. For example, if I have a test class that defines 2 test methods (m1, m2) as TestTemplate and provide 2 invocation contexts (c1, c2) - JUnit will perform this in the following order:
But what I really need is:
My use case is that the invocation context describes a particular database schema layout. So c1 and c2 define the same schema, but slightly differently (one adds extra columns to a given table and defoines others). Given that JUnit wants to group these invocations by method (iterating the context within that) we are forced to recreate that schema before each invocation. Effectively this becomes:
Obviously that works a lot better as:
The text was updated successfully, but these errors were encountered: