Thursday, October 31, 2013

Executing Linux commands from Windows Command Prompt using Putty/Plink



Download PUTTY : http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.63-installer.exe

  1. Install PuTTY
  2. Set the environment variables path for PuTTY: {install dir}/PuTTY
    • My Computer --> Right Click --> Properties --> Advanced System Settings --> Environment Variables
  3. Auto login command:
    • plink.exe -ssh <username>@<ip address> -pw <password>
    • plink.exe -ssh root@xxx.xxx.xx.xx -pw password
  4. Auto login and invoke a terminal command: 
    • plink.exe -ssh <username>@<ip address> -pw <password> "<terminal command>"
    • plink.exe -ssh root@xxx.xxx.xx.xx -pw password "nmon -f -s10 -c 360"


Thursday, October 24, 2013

JMeter - Creating date time string using javaScript & Beanshell


For MM/DD/YYYY date string use the below functions

1. using javaScript function:
${__javaScript(var d=new Date(); var date=d.getDate(); var
month=d.getMonth()+1; $DATE=(month<10?"0"+month:month) + "/" +
(date<10?"0"+date:date) + "/" + d.getFullYear();,DATE)}

Thus __javaScript() allows multiple lines of code as long as they are
separated by ";"

2. or using BeanShell
${__BeanShell(new java.text.SimpleDateFormat("MM/dd/yyyy").format(new
Date()))}



For MM/DD/YYYY date time string use the below functions

1. or using BeanShell
${__BeanShell(new java.text.SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(new
Date()))}

Reference:http://osdir.com/ml/jakarta.jmeter.user/2004-11/msg00024.html

Monday, June 10, 2013

JMeter Random String [A-Z,a-z,0-9]


Random String


Generate a random string using [A-Z,a-z,0-9]



For generating a random string length of 5 then use the below function


Name: randomstr5

${__RandomString(5,ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789,)}

For generating a random string length of 10 then use the below function


Name: randomstr10

${__RandomString(10,ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789,)}

BeanShell script for Date Time format yyyyMMdd HH:mm:ss.SSS



Add the below code in User Parameters to generate the date time format like 


yyyyMMdd HH:mm:ss.SSS



Name: DateTime

Variable: ${__BeanShell(new java.text.SimpleDateFormat("yyyyMMdd HH:mm:ss.SSS").format(new Date()))}

Wednesday, May 1, 2013

How many Virtual Users can a NeoLoad Load Generator generate?


How many Virtual Users can a Load Generator generate?
This will depend on the application tested, the scenario and its parameters, particularly the think time between pages: a Load Generator can generate approximately twice as heavy a load with a think time of two seconds than with a think time of one second.

Likewise, generating a load using HTTPS (SSL) and using modules such as Flex, GWT, Oracle Forms, Java Serialization, RTMP and Siebel use up more machine resources than with HTTP.

As an example, a Pentium IV 2.4GHz can generate up to 1500 Hits/sec. A Load Generator typically can generate between 500 and 1500 users on a standard application.

It should be noted that the NeoLoad Controller can use as many Load Generators as is required to generate the number of users specified in the license, at no additional cost.


Reference:
http://www.neotys.com/documents/doc/neoload/latest/en/html/index.html#2837.htm

Sunday, July 29, 2012

java.io.IOException: Exceeeded maximum number of redirects: 5

java.io.IOException: Exceeeded maximum number of redirects: 5

at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPS
amplerBase.java:1326)

at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTP
SamplerBase.java:1373)

at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:5
28)

at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBas
e.java:1021)

at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBas
e.java:1007)

at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:290)

at java.lang.Thread.run(Unknown Source)

-----
Look at the request closely on view results tree listener on why is it redirecting that many times. There is a parameter in jmeter.properties called httpsampler.max_redirects which could be changed to increase the limit. However it wouldn't be recommended. The adequate redirect limit can be set to 20 (Firefox)

or

Try disabling follow redirects, and see what the first page says in the tree view listener.