1

I have got some jmeter scripts which have used BSF preprocessor. I don't what type of programming it is.

sample code:

Random=Parameters;
var DayOfLogs ="";
if (Random == 1)
{
    DayOfLogs = "019A01A601B2016D012B0144011F0120011E013A0121013F0133004E0186019D018201750196019D019501AD01BD018701660198017B0195019B01AA01B201D101C501CB01BB018F01BC020802410232020001C901B001C701AA019501CA01DE01E601C701AB01A301500156015001A401B001AF0192018D019B01480170015901CC01A1017B0196018C016501340145013A01A301B20213020801D601F201B0019101C301DC01F1020702A20328029D027B02AC02C702C202B502D002D802C702B20278028C02DA02EB0308031402D902DC02D30285028C027B02A502CF02D402DE028902680225023B0245027C01CF01BC019401A901C00196016A01C0020701FE02070202021001FC01F001A701BE01F6022201EC020301DA01F301C901A5018F01D401D401D301CC01EA01E2020301DD01B401B001D301E90214020E0273026F01D2019E0189019401C501F5018701E101CE01C701D90181016E01BA01B601C701CA01B901D201C801D301F501AC019D0210028401D101B20209028301F70207020B01EE01C701D901930177019A018601990187019F01C001C801CE017A019001860191019A0193019C01770172019601BB01AD0190018301C501A001AA0199019901A1019701BF01DA01B901C601BD01BD01B601BB0142017701BE01B8019801BC01BB01AD01E10252020501970171018D017401A8019101AA01DE0214020401E40214021D01D9021C023C022A020D01FF01B80208020601E501B501AE01E201DA01B80168017C0195019501970197018A017B0177018C0163015B0195";
}

2 Answers 2

3

Out of box JMeter provides the following scripting languages for BSF:

Given var statement it looks like JavaScript is being used.

By the way, the language needs to be selected in the "Language" dropdown, otherwise BSF PreProcessor will fail with the "unsupported language" exception, take a look there.

BSF PreProcessor

In general it is recommended to use JSR223 Test Elements (sampler, pre/post processors, assertion, timer) for any JMeter scripting as other languages have known performance problems and can ruin your test in case of more or less severe load. See JSR223 Elements section of JMeter Best Practices for explanation and Beanshell vs JSR223 vs Java JMeter Scripting: The Performance-Off You've Been Waiting For! article for details of installation groovy scripting engine into JMeter, groovy scripting best practices and different scripting approaches benchmarks.

0

I don't what type of programming it is.

Looks like JavaScript to me.

2
  • The capitals actually make me think it would be C#. I'm thinking that we don't have enough information here to determine language based on inspection, and should base the answer on research.
    – corsiKa
    Jul 16, 2015 at 20:38
  • Oh, yeah you can use var in C#. Been a while. Good addition, corsiKa!
    – kirbycope
    Jul 16, 2015 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.