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
Good day! Got stuck with running liquibase-test-harness in our app. All the time we face the same error:
"org.junit.runners.model.InvalidTestClassError: Invalid test class 'liquibase.harness.data.ChangeDataTests':
No runnable methods
at org.junit.runners.ParentRunner.validate(ParentRunner.java:525)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:102)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:84).." - for all three test classes (minding we extend BaseHarnessSuite).
Our related dependencies:
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-test-harness</artifactId>
<version>1.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>2.1-groovy-3.0</version>
<scope>test</scope>
</dependency>
<dependency> <!-- enables mocking of classes (in addition to interfaces) -->
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>3.3.0</version>
<scope>test</scope>
</dependency>
<dependency> <!-- enables mocking of classes without default constructor (together with CGLIB) -->
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>3.2</version>
<scope>test</scope>
</dependency>
I followed README and README.extensions.md trying to configure it.
The text was updated successfully, but these errors were encountered:
Hi @ALekseiMokhov.
One of issues might be that in test-harness we use spock-core version 1.3-groovy-2.5 and major groovy (and spock) versions are not compatible.
Another thing is harness-config.yml with connection details for your DB might be missing in src\test\resources. Or name of the DB doesn't match with folder names where changesets are present by pattern src/test/resources/liquibase/harness/change/changelogs/{DBname}/{testchangeset}.xml.
Those are few on the top of my head. Also i found that IDEs like Eclipse and Intellij IDEA can recognize and run tests right away, but for command line run it may require more complex configuration of surefire and/or failsafe plugins to recognize and run spock tests
"org.junit.runners.model.InvalidTestClassError: Invalid test class 'liquibase.harness.data.ChangeDataTests':
Our related dependencies:
I followed README and README.extensions.md trying to configure it.
The text was updated successfully, but these errors were encountered: