data-sources usage

27 views
Skip to first unread message

ache...@gmail.com

unread,
Jun 24, 2019, 3:26:27 PM6/24/19
to codename-taurus
Hi,
I am trying to test data-sources and would tried the below.

```
---
modules:
  jmeter:
    path: /path/to/apache-jmeter-5.1.1
execution:
- concurrency: 1
  hold-for: 1m
  scenario: sampleScenario   
scenarios:
  sampleScenario:
    data-sources:
    - path: /path/to/file.csv
      delimiter: ','
      quoted: false
      loop: false
      variable-name: sampleId,sampleType
    requests:
    - url: https://domain.com/sample/service/${sampleId}/${sampleType}`
      label: test-data-source
      method: GET
      headers:
        testId: testKey
        testSecret:  ]@33$53dd@
       
file.csv
~~~~~~~~~~~~
1234,type1
2234,type2
665523,type3
444998,type4

```
1. The value from csv never gets updated to the URL. I always get 'Illegal character in the path' error. any issue with the yml ?
2. The header 'testSecret', the value starts with ']' and taurus does not like it . How can I escape that character ? tried both single and double quotes.

Thanks.

Alla

unread,
Jun 25, 2019, 4:55:13 AM6/25/19
to codename-taurus
Hello,

1. The problem is that you should write variable-names. Because of it, parts of the first line in csv file became variable names. sampleId and sampleType weren't even declared. That's why ${sampleId}/${sampleType} was interpreted as it is, and URL can't contain dollar signs.
2. I have tested testSecret: ']@33$53dd@' and it worked for me just fine.

Also you probably have several typos in your yaml config. Please notice, that in both directories you for JMeter and csv file you have standard paths. It means that Taurus would try to extract data from '/path/to/...' and it's probably not your working directory. And please pay attention that you have an extra character after your URL.

BR,
Alla

ache...@gmail.com

unread,
Jun 25, 2019, 12:27:06 PM6/25/19
to codename-taurus
Thanks much.
Works like a charm !
Reply all
Reply to author
Forward
0 new messages