Forum Discussion
omatzura
16 years agoSuper Contributor
Hi!
Try the following:
- create the FileWriter in the LoadTest setup script and save it to the context;
context.myWriter = new FileWriter( .. )
- access it from a groovy script in your testcase with
def writer = context.LoadTestContext.myWriter
-> since the LoadTestContext will be null when running the TestCase standalone, you will need to check for this
-> also, you might want to synchronize access to the writer
- close the writer in the LoadTest TearDown script..
hope this helps!
regards,
/Ole
eviware.com
Try the following:
- create the FileWriter in the LoadTest setup script and save it to the context;
context.myWriter = new FileWriter( .. )
- access it from a groovy script in your testcase with
def writer = context.LoadTestContext.myWriter
-> since the LoadTestContext will be null when running the TestCase standalone, you will need to check for this
-> also, you might want to synchronize access to the writer
- close the writer in the LoadTest TearDown script..
hope this helps!
regards,
/Ole
eviware.com
Related Content
- 5 years agoJonathanRoux
- 9 years agosnie1
- 4 years agorobertolo
Recent Discussions
- 6 days agoemoya