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
Expected behavior
sqlResource found the file and executed sql script
Actual behavior
sqlResource does'nt see the file even if to set up absolute path to file
java.lang.AssertionError: Before suite failed with errors
at org.citrusframework.Citrus.beforeSuite(Citrus.java:85)
at org.citrusframework.junit.jupiter.CitrusExtension.beforeAll(CitrusExtension.java:96)
at org.citrusframework.junit.jupiter.spring.CitrusSpringExtension.beforeAll(CitrusSpringExtension.java:67)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:395)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:211)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.citrusframework.exceptions.CitrusRuntimeException: org.citrusframework.exceptions.CitrusRuntimeException: Failed to load classpath resource C:\Users\Admin\Desktop\sqlScripts\sqlScript1.sql - does not exist
at org.citrusframework.container.SequenceBeforeSuite.doExecute(SequenceBeforeSuite.java:54)
at org.citrusframework.actions.AbstractTestAction.execute(AbstractTestAction.java:59)
at org.citrusframework.Citrus.beforeSuite(Citrus.java:79)
... 44 more
Caused by: org.citrusframework.exceptions.CitrusRuntimeException: Failed to load classpath resource C:\Users\Admin\Desktop\sqlScripts\sqlScript1.sql - does not exist
Test case sample @bean
public SequenceBeforeSuite sequenceBeforeSuite(){
SequenceBeforeSuite sequenceBeforeSuite = new SequenceBeforeSuite();
TestAction executeSqlScript = sql()
.dataSource(dataSource())
.sqlResource("file:" + "C:\\Users\\Admin\\Desktop\\sqlScripts\\sqlScript1.sql")
.build();
sequenceBeforeSuite.addTestAction(executeSqlScript);
return sequenceBeforeSuite;
}
At Windows explorer file can be found by the path. I've mentioned some anonymized data above just for example.
The text was updated successfully, but these errors were encountered:
ZuikovAV
changed the title
sqlResource does'nt see the file even if to set up absolute path to file
sqlResource does'nt see the file even if to set up absolute path it
May 31, 2024
I've copied file to the project folder from embedded folder to provide a pure test. I've tried to set up the following ways:
1)"file:" + "fileName"
2)"file:" + absolute file path
but the result was the same.
At the same time on version of citrus 2.8.0 it works fine
Citrus Version
4.0.0
Expected behavior
sqlResource found the file and executed sql script
Actual behavior
sqlResource does'nt see the file even if to set up absolute path to file
java.lang.AssertionError: Before suite failed with errors
Caused by: org.citrusframework.exceptions.CitrusRuntimeException: org.citrusframework.exceptions.CitrusRuntimeException: Failed to load classpath resource C:\Users\Admin\Desktop\sqlScripts\sqlScript1.sql - does not exist
at org.citrusframework.container.SequenceBeforeSuite.doExecute(SequenceBeforeSuite.java:54)
at org.citrusframework.actions.AbstractTestAction.execute(AbstractTestAction.java:59)
at org.citrusframework.Citrus.beforeSuite(Citrus.java:79)
... 44 more
Caused by: org.citrusframework.exceptions.CitrusRuntimeException: Failed to load classpath resource C:\Users\Admin\Desktop\sqlScripts\sqlScript1.sql - does not exist
Test case sample
@bean
public SequenceBeforeSuite sequenceBeforeSuite(){
The text was updated successfully, but these errors were encountered: