Questions tagged [beanshell]

Lightweight scripting for Java

From the official site:

BeanShell is a small, free, embeddable Java source interpreter with object scripting language features, written in Java. BeanShell dynamically executes standard Java syntax and extends it with common scripting conveniences such as loose types, commands, and method closures like those in Perl and JavaScript

943 questions
0
votes
2 answers

Getting typed variable declaration error in a JMeter bean shell script

I have this short script in a Bean Shell Post Processor. It uses the GSON library to parse JSON into a Bean. I'm now trying to convert back to JSON using the toJson method but receive this error: Typed variable declaration : Method Invocation…
Ilyas Patel
  • 400
  • 2
  • 11
  • 27
0
votes
1 answer

Parse beanshell script

In beanshell script executed from java code: How can I parse (only check syntaxis) a beanshell script without evaluate it? There is a page in manual about it but I don't understand how to make a method to only parse a string with script:…
iberck
  • 2,372
  • 5
  • 31
  • 41
0
votes
1 answer

log stack trace when HTTP request return error in Jmeter

I want to log all error message for failed HTTP request. I am going to run the thread group for 1B users and I don't want to use the View Result Tree because it logs everything and log file will bloat. Currently I am using Beanshell Assertion as…
Rakesh
  • 3,987
  • 10
  • 43
  • 68
0
votes
1 answer

Advice for embedding a Java scripting language for debugging/remote admin

I have a fairly sophisticated server-side application which frequently requires me to see what is going on with its internals to debug and fix problems. I've therefore embedded a Beanshell instance, which I can telnet into (normally over a ssh…
sanity
  • 35,347
  • 40
  • 135
  • 226
0
votes
1 answer

Want to publish 1500 events in 10 mins duration in Jmeter

I have a Jmeter script in which I want to publish 1500 events in 10 mins duration. Is it possible to configure this using "Ultimate Thread Group" or "Throughput Shaping Timer"? If yes, then how? I tried using the default thread group in which I used…
AdiBoy
  • 145
  • 7
  • 20
0
votes
1 answer

beanshell script does not recognize a set of objects as a java.util.Collection

I am using the following script to select an object from a set of input objects using an index. It does not recognize that the input argument is a set of three values. I assume I am doing something wrong in the line: if(setOfObjects instanceof…
0
votes
1 answer

Beanshell error message with

I've been trying to use a the following regular expression extractor Reference Name: FMSFlightPlan Regular Expression: (?s)(.*?) Template: $1$ Match No. 1 to match the string between the two FMSFlightPlan tags in the…
jmdeamer
  • 337
  • 2
  • 16
0
votes
2 answers

How to obtain a String between nested Tags

Within a project we try to replace a Text within tags. We try to get a string with beanshell out of an html file. var testString = "Here is our keyword which should be replaced
patricks
  • 155
  • 1
  • 9
0
votes
1 answer

Android tests using robotium launched with BeanShell

I have a problem with beanshell.I want to create a BeanShell script that allows me to automate a Robotium test. I have a shell script that works and lets me do whatever I want, but I'm looking Beanshell equivalent: #!/bin/bash echo "on lance…
Marie K.
  • 1
  • 2
0
votes
1 answer

running a jar file from command prompt

so i have stored my jar file in C:\Java\jdk1.6.0_26-32\jre\lib\ext is the following command correct: Java -cp C:\Java\jdk1.6.0_26-32\jre\lib\ext\bsh-2.0b4.jar It does not seem to run the jar file PS: please provide helpful notes instead of simply…
gabybaby
  • 45
  • 1
  • 7
0
votes
1 answer

Exception in "Main Thread" error while setting up beanshell

got tasked to learn beanshell. so here i am trying to set up my first example using this tutorial I downloaded the jar file from here like suggested, and placed it in my C:\lib folder, because it is the closest to the C:\libs that the tutorial…
gabybaby
  • 45
  • 1
  • 7
0
votes
2 answers

Executing script inside method with BeanShell

I'm not really sure how I can explain this, but here goes: I want to be able to "insert" some commands into parts of my code which will be loaded from external files. To parse and execute these commands, I presumably have to use some scripting like…
pg-robban
  • 1,395
  • 4
  • 21
  • 42
0
votes
2 answers

How to dynamically use data structure from CVS-File in Rhino – Class

I would like to fulfill the following task. I am not sure if it is possible to do so the way I planed but therefore my question: I’d like to write a Java program to allow users to load XML or CSV files and to manipulate and use their content in some…
Stephanie
  • 101
  • 1
  • 6
0
votes
1 answer

beanshell script to call a web service

I am new to Beanshell scripts, and i want to call a web service that retruns JSON representing images, i am currently doing the call using the following javaScript:-