Search code examples
citrus-framework

Getting "File not found exception" while running citrus tests during project build


I have a method like this which executes xml files located in a project package

 @Test
    @CitrusXMlTest(packageScan="com.something.xxxx")
    public void citrusTest()
    {
    }

while running normally using testng it was executing fine but while building with maven during test phase tests are failing because of file not found exception. But while mentioning the path relate windows file system the tests were executing fine like this

 @CitrusXMlTest(packageScan="file:D:\\xxx\\xyz")

How to make citrus to execute xml test cases that are in class path. your help is really appreciated.


Solution

  • You have to create the package name mentioned in the package scan under sec/test/resources not in the src/test/java