Skip to main content

Grinderstone and instrumentation

At least I got my office PC (windows) working now. Script is:
# A simple example using the HTTP plugin that shows the retrieval of a
# single page via HTTP.

from net.grinder.script import Test
from net.grinder.script.Grinder import grinder
from net.grinder.plugin.http import HTTPRequest

test1 = Test(1, "Request resource")
request1 = test1.wrap(HTTPRequest())

class TestRunner:
    def __call__(self):
        result = request1.GET("http://emeafraippqa08:80/")
I used to get failures that had to do with instrumentation. In the end I added a new jdk6 (1.6.0.20) to eclipse, renewed my jython 2.5.1 reference so that it is using these libs, and now got it working. In my console I see the following path:
04.06.10 17:03:42 (agent): The Grinder 3.4
04.06.10 17:03:42 (agent): Worker process command line: java '-javaagent:C:\development\grinder-3.4\lib\grinder-agent.jar' -classpath 'C:\development\jython2.5.1\jython.jar;C:\Dokumente und Einstellungen\jan.kester\workspace\Grinder1/srcC:\development\grinder-3.4\lib\grinder-agent.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\eclipse_3.5.2\plugins\org.python.pydev_1.5.7.2010050621\PySrc\pydev_sitecustomize;C:\Dokumente und Einstellungen\jan.kester\workspace\Grinder1\src;C:\development\grinder-3.4\lib\grinder-agent.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\jython2.5.1\Lib;C:\development\jython2.5.1\Lib\site-packages;C:\Programme\Java\jdk1.6.0_20\jre\lib\resources.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\rt.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\jsse.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\jce.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\charsets.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\ext\dnsns.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\ext\localedata.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\ext\sunjce_provider.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\ext\sunmscapi.jar;C:\Programme\Java\jdk1.6.0_20\jre\lib\ext\sunpkcs11.jar' net.grinder.engine.process.WorkerProcessEntryPoint
04.06.10 17:03:43 (agent): worker emeafralp560-0 started
04.06.10 17:03:45 (process emeafralp560-0): starting threads
04.06.10 17:03:48 (process emeafralp560-0): finished
04.06.10 17:03:49 (agent): finished
My direct grinder output is:
C:\development\grinder-3.4>startAgent_jython251.cmd
C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;.;C:\Programme\Java\jre6\lib\ext\QTJava.zip
6/4/10 2:09:53 PM (agent): The Grinder 3.4
6/4/10 2:09:53 PM (agent): Worker process command line: java '-javaagent:C:\development\grinder-3.4\lib\grinder-agent.jar' '-Dpython.home=C:/development/jython2.5.1' '-Dpython.cachedir=C:\development\grinder-3.4/cachedir' -classpath 'C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:/development/jython2.5.1/jython.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;C:\development\grinder-3.4\lib\grinder.jar;.;C:\Programme\Java\jre6\lib\ext\QTJava.zip' net.grinder.engine.process.WorkerProcessEntryPoint
6/4/10 2:09:54 PM (agent): worker emeafralp560-0 started
04.06.10 14:09:55 (process emeafralp560-0): starting threads
04.06.10 14:09:55 (process emeafralp560-0): finished
6/4/10 2:09:56 PM (agent): finished
Now I need to get my home PC working still ... (Ubuntu)

Comments

Popular posts from this blog

SSL handshake failed: Secure connection truncated

Got this problem on Ubuntu 9.10 and 10.10. svn co --username=xx https:/yy zz “SSL handshake failed: Secure connection truncated” According to this link bug-ubuntu The solution is: sudo apt-get install libneon27 cd /usr/lib/ sudo rm libneon-gnutls.so.27 sudo ln -s /usr/lib/libneon.so.27 libneon-gnutls.so.27

Junit4 running parallel junit classes

To run junit testcases parallel, you can create your own class to run junit with: Add this tag to your class declaration. @RunWith(Parallelized.class) Implementation of this class looks like: package mypackage; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.junit.runners.Parameterized; import org.junit.runners.model.RunnerScheduler; public class Parallelized extends Parameterized {         private static class ThreadPoolScheduler implements RunnerScheduler     {         private ExecutorService executor;                 public ThreadPoolScheduler()         {             String threads = System.getProperty("junit.parallel.threads", "16");    ...

Create a groovy console and bind to selenium

Required groovy files In the previous posting we defined the pom file that we need for our build environment. Now we will setup some groovy files to get selenium and groovy running interactively. ConsoleWaiter.groovy The idea of Groovy Console I found on some other sides. Honour goes for instance too: http://josefbetancourt.wordpress.com/tag/eclipse-2/ I copied some code of this, and put it under src/test/groovy/com/jankester/selenium/test/utils: package com.jankester.selenium.test.utils /** * File: ConsoleWaiter.groovy */ import groovy.lang.Binding; import groovy.ui.Console; /** * Provides a wrapper for the console. * * Based on source by John Green * Adapted from: http://www.oehive.org/files/ConsoleWaiter.groovy * Released under the Eclipse Public License * http://www.eclipse.org/legal/epl-v10.html * * I added methods to allow use from Java. * * The run() method launches the console and causes this thread * to sleep until the console's window is closed....