Bill Smith | 4 Mar 23:25 2013
Picon

interaction between console and agent's property file

I am using The Grinder 3.11.  I specify a property file when I start my agent.  The property file specifies the following settings:

grinder.processes=15
grinder.threads=10
grinder.threadStartIndex=0
grinder.initialProcess=1
grinder.processIncrement=1
grinder.processIncrementInterval=60000
grinder.useConsole=true

With these settings, after I tell the console to start the agents, my agent runs exactly one process with one thread.

In contrast, if I use grinder.useConsole=false, my agent behaves as I expected, i.e. one initial worker with 10 threads, then an additional worker with 10 threads once per minute until I max out at 15 workers.

Thanks,
Bill Smith
Austin, TX


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
vijetha kulal | 4 Mar 14:27 2013
Picon

Data recording doesn't stop after worker processes stop

Hi,

I use Grinder 3.11. I ran a test using "console service" with following grinder 

properties:
grinder.processes=1
grinder.threads=1
grinder.runs=0
grinder.duration=120000

I used the following commands:
start console:
java -classpath %CLASSPATH% net.grinder.Console -headless
start agent:
java -classpath %CLASSPATH% net.grinder.Grinder %GRINDERPROPERTIES%
start worker-process:

After 120,000 ms the worker process stopped but recording of data did not stop. I had 

run the command (after completion of the test duration) to stop recording.

Is there any way in which the collection/recording of data could stop automatically 

after completion of test duration/runs?

In grinder.properties file, it's mentioned that "the worker processes will terminate if 

either the duration time or the number of runs is exceeded."
But, in the following URL it's mentioned that "if grinder.runs is to 0 then the workers 

don't stop until instructed to do so":

Thanks
Vij
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
vijetha kulal | 1 Mar 23:42 2013
Picon

All the test result in having same linear graph in Grinder Analyzer report

Hi, 

I use Grinder 3.11. I installed the Grinder Alnalyser "GrinderAnalyzer.V2.b19" to view the final report of the test run. I ran the following test for 20 iterations: 

from net.grinder.script.Grinder import grinder 
from net.grinder.script import Test 
from net.grinder.plugin.http import HTTPRequest 
from java.lang import System 

class TestRunner: 
        def __init__(self): 
                grinder.statistics.delayReports=True 
        def __call__(self): 
                Google() 

request = HTTPRequest() 
Test(1, "Google").record(request) 

def Google(): 
        currentTime = System.currentTimeMillis() 
        result = request.GET("http://www.google.com") 
        timeTaken = System.currentTimeMillis() 
        googlet = timeTaken - currentTime 
        grinder.logger.info(" vij google time " + str(googlet)) 
        grinder.statistics.forLastTest.success = True 


After running the test, Transaction per second graph was a linear graph (improper graph with just one value recorded).

The TPS graph is the same for any test I run. What could be the cause of this? Why are the response times not recorded for all the iterations? 
Attached is the graph from the report.

Thanks, 
Vij

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Sean Tiley | 28 Feb 21:48 2013
Picon

Patameterization of parameters

Hello,
i am using the Grinder 3.11 and have recorder a number tests with the TCPProxy.
The last thing I need to do is to parametrize a script that simulates user registration.
 
I have the script recorded and when i manually update values between runs, it is working as expected.
 
I would now like to read in a file that contains 100 lines, each line contains the info required to register one account (comma seperated).
Each line in the file can only be used once.
 
I am having great difficulty in doing this .  partly because i do not understand where to put this code in my PY file.  
 
I think I should be able to read that file in once then set up a method that each thread could call to get a unique row from.
 
I have reviewed several posts
 
But I am struggling.
 
In java I would simply read in the file and store the contents in a data structure then access that data structure.
I just do not know how to translate that to python and where it goes.
 
Any help or insight would be greatly appreciated.
 
 
 
============Script (snipped) ===============
# The Grinder 3.11
# HTTP script recorded by TCPProxy at 28-Feb-2013 12:01:48 PM
from net.grinder.script import Test
from net.grinder.script.Grinder import grinder
from net.grinder.plugin.http import HTTPPluginControl, HTTPRequest
from HTTPClient import NVPair

connectionDefaults = HTTPPluginControl.getConnectionDefaults()
httpUtilities = HTTPPluginControl.getHTTPUtilities()
errlog = grinder.logger.error
infolog = grinder.logger.info
debug=True

# To use a proxy server, uncomment the next line and set the host and port.
# connectionDefaults.setProxyServer("localhost", 8001)
def createRequest(test, url, headers=None):
    """Create an instrumented HTTPRequest."""
    request = HTTPRequest(url=url)
    if headers: request.headers=headers
    test.record(request, HTTPRequest.getHttpMethodFilter())
    return request
# These definitions at the top level of the file are evaluated once,
# when the worker process is started.
headers0= \
  [ NVPair('Accept', 'application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*'),
    NVPair('User-Agent', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)'),
    NVPair('Accept-Language', 'en-CA'), ]
request101 = createRequest(Test(101, 'GET FINSeCustomer_enu'), url0)
request102 = createRequest(Test(102, 'GET /'), url0)
request201 = createRequest(Test(201, 'GET start.swe'), url0)
request202 = createRequest(Test(202, 'GET rtcEditor.js'), url0)
request203 = createRequest(Test(203, 'GET swecommon_top.js'), url0)
request204 = createRequest(Test(204, 'GET navctrl.js'), url0)
request205 = createRequest(Test(205, 'GET swemessages_enu.js'), url0)
request206 = createRequest(Test(206, 'GET sweutil_keyboard.js'), url0)
request207 = createRequest(Test(207, 'GET swecommon.js'), url0)
 
 
class TestRunner:
  """A TestRunner instance is created for each worker thread."""
  # A method for each recorded page.
  def page1(self):
    """GET FINSeCustomer_enu (requests 101-102)."""
   
    # Expecting 301 'Moved Permanently'
    result = request101.GET('/FINSeCustomer_enu')
    grinder.sleep(13)
    request102.GET('/FINSeCustomer_enu/')
    saveHtmlToFile("Registration - page1",result,101)
    return result
  def page2(self):
    """GET start.swe (requests 201-207)."""
    self.token_SWECmd = \
      'Start'
    self.token_SWEHo = \
      'zzzz-dev.zzzz.com'
    result = request201.GET('/FINSeCustomer_enu/start.swe' +
      '?SWECmd=' +
      self.token_SWECmd +
      '&SWEHo=' +
      self.token_SWEHo)
    grinder.sleep(57)
    request202.GET('/FINSeCustomer_enu/21229/scripts/rtcEditor.js')
    request203.GET('/FINSeCustomer_enu/21229/scripts/swecommon_top.js')
    request204.GET('/FINSeCustomer_enu/21229/scripts/navctrl.js')
    request205.GET('/FINSeCustomer_enu/21229/scripts/swemessages_enu.js')
    request206.GET('/FINSeCustomer_enu/21229/scripts/sweutil_keyboard.js')
    grinder.sleep(16)
    request207.GET('/FINSeCustomer_enu/21229/scripts/swecommon.js')
    saveHtmlToFile("Registration - page2",result,201)
    return result

  def __call__(self):
    """Called for every run performed by the worker thread."""
    self.page1()      # GET FINSeCustomer_enu (requests 101-102)
    grinder.sleep(20)
    self.page2()      # GET start.swe (requests 201-207)
 
# Instrument page methods.
Test(100, 'Page 1').record(TestRunner.page1)
Test(200, 'Page 2').record(TestRunner.page2)
 
def saveHtmlToFile (prefix,response,testId):
    filename = ""
    if debug == True:
  inputStream = response.getInputStream()
  filename = "%s--%s-%d-page-%d.html" % (prefix,grinder.processName,testId,grinder.runNumber)
  file = open(filename, "w")
  i = 1
  cc = inputStream.available()
  while (i <= cc):
    c = inputStream.read()
    file.write("%c" % c)
    i += 1
  inputStream.close()
  file.close()
    return filename
 
def validateResponse (prefix, response,testId,stringToValidateExistence):
 checkResponseForError(prefix, response,testId)
 if not stringToValidateExistence in response.getText():
  grinder.statistics.forLastTest.setSuccess(0)
  fail= "%s-%d-%d - String validation failure. Expected %s but it was not found" % (grinder.processName,testId,grinder.runNumber,stringToValidateExistence)
  errlog(fail)
  saveHtmlToFile(prefix, response,testId)
 else:
  success = "%s-%d-%d - String validation Success. Expected and found %s in response" % (grinder.processName,testId,grinder.runNumber,stringToValidateExistence)
  infolog(success)
 return response
 
def checkResponseForError (prefix,response,testId):
 if "SBL-" in response.getText():
  grinder.statistics.forLastTest.setSuccess(0)
  fail= "%s-%d-%d ERROR SBL- Found in response, this indicates an error" % (grinder.processName,testId,grinder.runNumber)
  errlog(fail)
 return response
 
Sean
 
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Sean Tiley | 27 Feb 21:26 2013
Picon

Saving console stats periodically

Hi there,
Is it possible to save the stats from the console automatically after a given amount of time or test iterations?
 
It would be nice to have a really long running test and have snapshots of the stats throughout the life of that time period?
 
Any thoughts or Ideas are appreciated
 
Sean



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Ravi Joshi | 26 Feb 10:35 2013
Picon

Selective run of Grinder Agents

I want to run selective Grinder Agents from the list of agents which are up and in listening state.


Can I disable/enable agents from console? Can I select which all agents I want to run?


-Ravi Joshi
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Shankar Ramanathan | 25 Feb 17:07 2013

Issue with Marking scenario/test failed

Hi,


I'm trying mark one of my Test as failed so that it appears in BOLD RED (in Console under Error) whenever the response i'm expecting is not returned. I'm attaching script file & log file. I tried referring to script gallery example & post <at>  http://permalink.gmane.org/gmane.comp.java.grinder.user/6082 without much help

Below is the code snippet

def GetTouchPointID1(self):
   
    """GET / (request 401).Negative testcase"""
    grinder.statistics.delayReports = 1
    
    self.token_touchPointId = \
      'tamp'
    result = request.GET('/ibms/provisioning/v1/touchpoint/' +
      '?touchPointId=' + self.token_touchPointId, None, )
    
    print "JSON: " + result.getText()
    
    if ( 200 != result.getStatusCode() ):
    grinder.statistics.forLastTest.success = 0                <== For reasons beyond me the Jython is throwing error as mentioned below for 404 Returned
    print " \n GET on TouchPoint Id FAILED \n"
    #return False
    else:
    print " \n GET On TouchPoint Id Successfull \n"    
         
    return result


ERROR

2013-02-25 19:28:49,775 INFO  shankar-HP-ProBook-6450b-31 thread-0 [ run-0, test-200 ]: http://172.17.158.26/ibms/provisioning/v1/touchpoint/?touchPointId= <at> -> 404 NOT FOUND, 5295 bytes
2013-02-25 19:28:49,796 ERROR shankar-HP-ProBook-6450b-31 thread-0 [ run-0 ]: aborted run - Java exception calling TestRunner
net.grinder.scriptengine.jython.JythonScriptExecutionException: Java exception calling TestRunner
        grinder.statistics.forLastTest.success = 0
        File "/home/shankar/./shankar-HP-ProBook-6450b-file-store/current/Demo1.py", line 123, in GetTouchPointID1
        self.GetTouchPointID1()      # GET (requests 201)
        File "/home/shankar/./shankar-HP-ProBook-6450b-file-store/current/Demo1.py", line 237, in __call__
net.grinder.script.InvalidContextException: Statistics for test invocation have been reported and cannot be updated. Perhaps you should have called setDelayReports(true)?
        at net.grinder.engine.process.StatisticsForTestImplementation.getStatisticsChecked(StatisticsForTestImplementation.java:80) ~[lib/:na]
        at net.grinder.engine.process.StatisticsForTestImplementation.setSuccess(StatisticsForTestImplementation.java:135) ~[lib/:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_38]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_38]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_38]
        at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_38]
        at org.python.core.PyBeanProperty._doset(PyBeanProperty.java:66) ~[jython-standalone-2.5.3.jar:na]

THANKS IN ADVANCE FOR YOUR REPLY & SUGGESTIONS

Cheers,
Shankar
Attachment (scripts.zip): application/zip, 7314 bytes
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Tan | 20 Feb 16:27 2013
Picon

grinder.sleep()

In the logs does the mean time count the grinder.sleep() amounts as well?  

ie If I have a script that takes 5ms to run and in the middle I put in a
sleep for 20ms will the total time be 5ms or 25ms.

Thanks

Tan

--
View this message in context: http://grinder.996249.n3.nabble.com/grinder-sleep-tp8316.html
Sent from the Grinder - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
Ravi Joshi | 18 Feb 20:53 2013
Picon

Questions about The Grinder 3.11 REST services

Hi,

Currently I am using The Grinder 3.10. I have two questions about The Grinder 3.11 REST services-

(1) Can I start agents (don't be confused with the workers please) from these services? As POST /agents/start-workers sends a start signal to the agents to start worker processes, so it can't start agent. Agent must be up and waiting for signals.

(2) After finishing the execution of agents, can i get any invocation message or any information automatically? Or do i need to query periodically the GET /agents/status service?

Thank you.
Ravi
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
anil_jacob | 16 Feb 02:01 2013
Picon
Picon

Doc correction - Console Port

I think the default ConsolePort is 6373. However documentation for the properties or grinder properties file mentions the default as being 6372.

Need to correct it else can be confusing to users.

Anil
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use
Bradley, Lukas (ETW | 15 Feb 19:37 2013

Grinder - TCPProxy - Not Logging 302s?

 

I’m using TCPProxy as a full-log of sorts, so I can debug ALL flow of traffic between my workers and the server.  However, I seem to be missing 302 redirects, the subsequent GET request, and its content.

 

While my grinder workers are set to follow redirects, the proxy is a completely different process.  As a proxy, it would seem to me it would log EVERYTHING flowing through. 

 

I’m using both the default ECHO filter for input and output.

 

Am I missing something?  Is this intended behavior?

 

Any and all help appreciated.

 

Lukas

 

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use

Gmane