Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Automation and randomness

Help
jnojr
2006-06-26
2013-04-25
  • jnojr
    jnojr
    2006-06-26

    Can hammerhead be fed a random value from a list of values, like a text file?

    Here's what I want to accomplish... I would like to get the same URL (a .php script) over and over, but with a different query each time.  It seems kind of silly to use a bash script to echo thousands upon thousands of stanzas into the scenario file to accomplish this :-)

     
    • patti beadles
      patti beadles
      2006-06-26

      I do not believe it has this ability.

      Basically every hammerhead scenario that I've ever written has been script-generated rather than hand-generated, so this just seems like a no-brainer to me.

      You probably could hack something into hammerhead, but I'm sure it would be more work than it's worth.

       
    • jnojr
      jnojr
      2006-06-26

      This seems like a huge barrier to hammerhead being really useful.  GETting the same file(s) over and over again might be a useful test for a tiny little server that only has static content, but doesn't seem to be at all useful for any dynamic site.

      And if I read the man page right, you have to specify an IP address and not a hostname, which eliminates VirtualHosts from being tested.

      Is there another tool out there that will work the way I need it to?

       
      • patti beadles
        patti beadles
        2006-06-26

        The IP thing easy to work around.  Use HTTP/1.1, and specify an extra header.  I believe:

        HHost: virtualhost.example.net

        will work just fine, though you might have to doublecheck the syntax.

        Though I'm no longer with the company, I built a very large set of hammerhead tests for a complex, extremely dynamic website that was almost 100% user-generated content.  It worked pretty well for our purposes.  I had two scripts:  the first sucked all the relevant data that I needed (user IDs, content IDs, etc.) out of the database and built files of URLs.  The second script read in these URLs, pulled some stuff out of config files, and generated the scenario files, conf files, etc.