[SOLVED]ThreadIndex in DataSink file name
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2009
11:52 AM
10-14-2009
11:52 AM
[SOLVED]ThreadIndex in DataSink file name
I am running a load test with a test case that has a DataSink that writes to an Excel file. I want to use the ThreadIndex to create unique filenames, but I keep getting 0 for all threads.
Here is the Out File value:
and a resulting filename:
What am I doing wrong?
I am using build 3.0-pro-daily-build-2009-09-28-[1]
Thanks.
Here is the Out File value:
${projectDir}/results/${#TestCase#datasinkFile} - ${=String.format('%tY%<tm%<td-%<tH%<tM%<tS', new GregorianCalendar())} - ${ThreadIndex}.xls
and a resulting filename:
Test Results - 20091014-144643 - 0.xls
What am I doing wrong?
I am using build 3.0-pro-daily-build-2009-09-28-[1]
Thanks.
"Ignorance more frequently begets confidence than does knowledge"
9 REPLIES 9
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
01:02 AM
10-15-2009
01:02 AM
Which load test strategy are you using?
/Nenad
http://eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
/Nenad
http://eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
05:39 AM
10-15-2009
05:39 AM
Simple.
"Ignorance more frequently begets confidence than does knowledge"
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
06:56 AM
10-15-2009
06:56 AM
Hmmm... I still cannot reproduce it on my side. Can you please check if the DataSink is shared? (It should not be)
/Nenad
http://eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
/Nenad
http://eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
07:35 AM
10-15-2009
07:35 AM
It is not (in fact I tried it both ways.)
"Ignorance more frequently begets confidence than does knowledge"
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
08:05 AM
10-15-2009
08:05 AM
I have isolated the problem. The test case I am running uses the Run TestCase step to run another test case which contains the DataSink step.
I have created and attached a simple project to demonstrate this. Running the load test in TestCase 2 will create files in the project directory with a ThreadIndex of 0 in all filenames.
I have created and attached a simple project to demonstrate this. Running the load test in TestCase 2 will create files in the project directory with a ThreadIndex of 0 in all filenames.
"Ignorance more frequently begets confidence than does knowledge"
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
11:08 AM
10-15-2009
11:08 AM
It would be nice if this worked as-is, but I have a workaround now. I created a parameter "threadIndex" in the called test case and I pass in ${ThreadIndex} in the Run TestCase step; then I use ${#TestCase#threadIndex} in the Out File field.
"Ignorance more frequently begets confidence than does knowledge"
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2009
01:22 PM
10-15-2009
01:22 PM
Hi!
Thanks for your detective work! The upcoming nightly build propagates the ThreadIndex and any other context variables to the called TestCase, hopefully that fixes this issue.
regards!
/Ole
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Thanks for your detective work! The upcoming nightly build propagates the ThreadIndex and any other context variables to the called TestCase, hopefully that fixes this issue.
regards!
/Ole
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2009
01:01 AM
10-16-2009
01:01 AM
Hi!
Actually, there is now a new option in the RunTestCase options dialog that allows you to promote LoadTest related properties to the target testcase, try selecting that when running your loadtest.
let us know!
regards,
/Ole
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Actually, there is now a new option in the RunTestCase options dialog that allows you to promote LoadTest related properties to the target testcase, try selecting that when running your loadtest.
let us know!
regards,
/Ole
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2009
06:21 AM
10-16-2009
06:21 AM
Looks good so far.
Thanks!
Thanks!
"Ignorance more frequently begets confidence than does knowledge"
