Forum Discussion
PerfTestMike
15 years agoContributor
Update:
So to bypass the SoapUI DataSource function, I've written a simple script that reads in the values from a CSV and iterates to a new record after every run.
So to bypass the SoapUI DataSource function, I've written a simple script that reads in the values from a CSV and iterates to a new record after every run.
def file = new File("C:/[LOCATION OF YOUR CSV FILE]
def values=[]
def username
def password
def lines = file == null ? [] : file.readLines()
for (line in lines) {
propArray = line.split(",")
username = propArray[0]
password= propArray[1]
testRunner.testCase.testSteps["username"].setPropertyValue("username", username)
testRunner.testCase.testSteps["password"].setPropertyValue("password", password)
testRunner.runTestStepByName("[REQUEST NAME DEFINED IN YOUR TEST STEPS]")
}