Forum Discussion

RBoer's avatar
RBoer
New Contributor
14 years ago

Teststep: Datagen and adding a value starting with a space.

Hello all,

In my testsuite I've added a teststep: Datagen. When I add a property and add a value (below in the configuration panel) which starts with a space (for example: zxcvbnm) the last value returned (after evaluating the property), will exclude the space.

Is there a way to include the space to the last value returned?

Your help will be most appreciated.

7 Replies

  • Hi,

    hmm... probably not - what kind of DataGen property is this? List?

    regards,

    /Ole
    SmartBear Software
  • RBoer's avatar
    RBoer
    New Contributor
    Hi Ole,

    Yes, the generated property is of a list-type.
  • Hi,

    ok - and exactly how are you inserting/expanding the property?

    regards,

    /Ole
    SmartBear Software
  • RBoer's avatar
    RBoer
    New Contributor
    Hi Ole,

    well after I've added the values in the list. I added (SOAP) test requests below.

    I'd like the same value (of the 10 values randomized) to be used in all test requests. This works just fine.

    But when I saw the RAW data of the XML (test requests) I noticed that the space in front of the value wasn't added.

    So I basically used the standard functions, instead of a written script.
  • Hi,

    ok - are you using a property-transfer or property-expansion to insert the value into the request?

    /Ole
    SmartBear Software
  • RBoer's avatar
    RBoer
    New Contributor
    Hi,

    I'm using a propertyExpansion. I referring to the teststep "datagen" in the current testcase.

    ${DataGen#value}

    edit: value is the list in the datagen.
  • Hi,

    ok - I've traced this down in the code and now and it is as you have observed, the list values are trimmed before being returned from the list. A possible workaround is to have a list containing script expansions;

    ${=" value with a leading space"}
    ${="value with a trailing space "}

    which will be inserted correctly into the request.

    Hope this helps!

    /Ole
    SmartBear Software