Yes, it's possible to store multiple values in a single property using a delimiter and then retrieve those values individually in SoapUI (even in the free version). You can achieve this by using Groovy scripting to split the values stored in the property and access them as needed.
Here's how you can do it:
### **1. Store the Values in a Property:**
First, store your values as a single string separated by a delimiter (like `|`) in a property, for example, in the `TestSuite` properties:
- **Property Name:** `array`
- **Property Value:** `1|2|3`
### **2. Access the Values Using Groovy Script:**
Since you want to retrieve the values individually, you can use a Groovy script to split the values and access them by index.
Here’s a Groovy script that you can use in a **Groovy Script TestStep**:
```groovy
// Get the property value
def arrayString = context.testCase.testSuite.getPropertyValue("array")
// Split the string into an array
def array = arrayString.split("\\|")
// Access individual elements
def firstElement = array[0]
def secondElement = array[1]
def thirdElement = array[2]
// Log the values (for testing purposes)
log.info("First element: " + firstElement)
log.info("Second element: " + secondElement)
log.info("Third element: " + thirdElement)
// You can also store them in context or variables for later use in your TestCase
context.setProperty("firstElement", firstElement)
context.setProperty("secondElement", secondElement)
context.setProperty("thirdElement", thirdElement)
```
### **3. Using the Values in Other Test Steps:**
You can then access these individual values using `${#TestCase#firstElement}`, `${#TestCase#secondElement}`, and `${#TestCase#thirdElement}` in your requests or other test steps.
### **Explanation:**
- The script splits the `array` string into an array using the `split("\\|")` method, where `\\|` is the regular expression to match the pipe `|` delimiter.
- You can access each element by index (e.g., `array[0]` for the first element).
- The `context.setProperty` method stores the elements in the TestCase context, allowing you to reference them later. You can explore more on fort worth menu.
### **Alternatives:**
If you prefer not to use Groovy scripts, you could store each value in separate properties and access them directly. However, the Groovy script method is more flexible and scales better for larger arrays or more complex logic.
This approach gives you the flexibility to store and retrieve multiple values from a single property, even without the pro version of SoapUI.