One Click Creation Of Load Test Project Folders

This simple script is something I use to create initial folders for my load testing projects. It save a little bit of time and ensures I always create the same folder structure. You need VBScript (vbs) files to be allowed to execute or it may not work properly for you. Install Windows Scripting Host if you do not already have the ability to do it on your machine. I have tested it on X pand Windows 7 and it seems to run fine. Paste this into a text file and then rename it to a .vbs extension. Then execute it. There should be a prompt to input the directory. I use this to name the root level folder based on the project name. Feel free to modify this script to add/modify/delete the names of all the folders you want to create depending on how you organize your load testing projects.

Be aware that vbs files are also the kind of files that have those nasty virii in them when sent and executed via e-mail. Always know what the vbs file is doing before you execute it. This may be restricted from running by your company depending on their security policies.

Dim fso, s, o
s = InputBox( _
  "Type the full path name of the new directory you want to create.", _
  "New folder", "c:\" )
If s <> "" Then
  Set o = CreateObject("Scripting.FileSystemObject")
  If Not o.FolderExists( s ) Then
    o.CreateFolder s
    o.CreateFolder s & "\scripts"
    o.CreateFolder s & "\scenarios"
    o.CreateFolder s & "\analysis"
    o.CreateFolder s & "\results"
    o.CreateFolder s & "\html"
    o.CreateFolder s & "\data"
    o.CreateFolder s & "\documentation"
    o.CreateFolder s & "\templates"
  End If
  Set o = Nothing
End If

What's Next?

Did you enjoy this article? Help spread the word by sharing:

Join the Northway Navigator Club today and get access to restricted content including our best tips and tricks. Membership is free! You will also receive free email updates by registering.

Engage in the conversation and leave a comment:

Scott Moore

About Scott Moore (153 articles)

With over 20 years of IT experience with various platforms and technologies, Scott has tested some of the largest applications and infrastructures in the world. He is a Certified Instructor and Certified Product Consultant in HP’s LoadRunner and Performance Center products. He currently holds HP certifications for ASE, ASC, and CI. A thought leader in the APM space, he speaks regularly at IT conferences and events

  • speedmaster

    That was handy, thanks! :-)

  • Mark Tomlinson

    Hey – what if we built this as an add-in to the new VUgen? I recall we were going to add it to TweakLR!? :)

    • Scott Moore

      The move to the SharpDevelop framework made TweakLR irrelevant. But I think adding something like this on the new platform should be easy and would be a handy add-in.

  • QAInsights

    Very useful snippet. Thanks!