Forum Discussion

Sperk's avatar
Sperk
Occasional Contributor
7 years ago
Solved

Error writing to a file using Groovy

I'm trying to write Json assert results to an external file, I can create and write to the file, however when I try to append values to the file it throws an error.   In this code block when it jus...
  • groovyguy's avatar
    7 years ago

    The first thing I see is that you appear to be getting a file name stored as a property, but you aren't treating it as a file.

     

    Try this line below? If that doesn't help I can try to dig in more later.

     

    resultsFile = new File (testRunner.testCase.getPropertyValue("externalResultsFile"))