Unibet_Support
13 years agoContributor
File Written twice on executing the Groovy Script
Hi
I am trying to create a Script Assertion which writes into a file
On running the test suite the file is written more than once. I'm not sure why it does this .
here is my script assertion
The same script executed inside a groovy script is writing the file only once. What is the difference in how the script is executed when within a groovy script and within a script assertion.
Thanks and regards
Smitha
I am trying to create a Script Assertion which writes into a file
On running the test suite the file is written more than once. I'm not sure why it does this .
here is my script assertion
def startDate = new Date().format("yyyy_MM_dd_HHmmssSSS")
def filename = "C:/Users/smipan/Desktop/SoapUIPRO/LiveEvents/EventId_"+startDate+"_LiveFeeds.csv"
dataStore = new File( filename )
for (i in 1..8)
{
def current = "Test Line" + i
log.info current
dataStore.append( current)
}
The same script executed inside a groovy script is writing the file only once. What is the difference in how the script is executed when within a groovy script and within a script assertion.
Thanks and regards
Smitha