Hi all,
I have below question in JRuby … .even when i was selecting and running
with Ruby the same issue is occuring … Please find below link for
detailed issues
http://www.ruby-forum.com/topic/4410991#new
Issue is that
Jmeter Variable Defined:
InputFilePath=“somevalue”
Jruby Code used :
begin
sprovider_url=$vars.get(“InputFilePath”)
puts " args sprovider_url is #{sprovider_url} \n"
store_Obj=StoreRetrieve.new
rescue Exception =>e
puts " backtrace is #{e.backtrace}"
puts " Exception is #{e.message}"
end
Here InputFilePath is the User Variable defined in Jmeter with
somevalue as stated above…
I ran with 5 threads
Output:
[jmeter] args sprovider_url is /path/filename.txt
[jmeter] backtrace is [“:1:in (root)'"] [jmeter] backtrace is ["<script>:1:n
(root)'”]
[jmeter] Exception is undefined method []' for nil:NilClass [jmeter] Exception is undefined method
[]’ for nil:NilClass
[jmeter] backtrace is [“:1:in (root)'"] [jmeter] Exception is undefined method
[]’ for nil:NilClass
[jmeter] backtrace is [”:1:in (root)'"] [jmeter] Exception is undefined method
[]’ for nil:NilClass
Could you guys please help me here? How to get $vars consistently in
Ruby…if i use any other scripting lanuages …like Javascript , Jexl
i am not getting this failure…