Forum Discussion

EllaVader's avatar
EllaVader
Occasional Contributor
9 years ago
Solved

Unable to run tests on TeamCity with ready-api-maven-plugin

Using ready-api-maven-plugin for a TeamCity integration. I have some files that the tests reads from. They are located in the project _data folder, but when I run the test in TeamCity it throws a FileNotFound exception.
java.io.FileNotFoundException: C:\Dev\TeamCity\buildAgent\work\7e11401e7ea83165\_data\uat\payments\invalidMatterId.xml

It works when I run it locally but not on TC.

 

Am I missing a setting somewhere?

  • So I wanted to update on this question as I was able to figure out the problem.  The problem was using the backslash in the path.  GroovyUtils doesn't know how to handle the backslash.  So the problem was in my one of my groovy script steps:

     

    def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);

    def xmlNewPath = groovyUtils.projectPath + filePath + tempFileName;

     

    the groovyUtils.projectPath was stopping at the backslash hence my path was getting chopped.

    I had to change my path to forward slashes and that fixed it.

     

    Basically I had to work around a defect in the groovyUtils class.  Hopefully it will be fixed soon so others don't have to deal with this problem.

3 Replies

  • EllaVader's avatar
    EllaVader
    Occasional Contributor

    So I wanted to update on this question as I was able to figure out the problem.  The problem was using the backslash in the path.  GroovyUtils doesn't know how to handle the backslash.  So the problem was in my one of my groovy script steps:

     

    def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);

    def xmlNewPath = groovyUtils.projectPath + filePath + tempFileName;

     

    the groovyUtils.projectPath was stopping at the backslash hence my path was getting chopped.

    I had to change my path to forward slashes and that fixed it.

     

    Basically I had to work around a defect in the groovyUtils class.  Hopefully it will be fixed soon so others don't have to deal with this problem.

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Ellavader,

     

    As far as I see, you are working with our Customer Care Team regarding this question. Please share the solution with us once you find it.