Synthesizing SVT Data

From PeformIQ Upgrade
Revision as of 10:08, 16 April 2008 by PeterHarding (talk | contribs)
Jump to navigation Jump to search

Overview

Preparing data for performance tests is a very important part of the preparation phase for a load test exercise. The following scripts provide simple examples of approaches to synthesize parameter data for use by the test scripts.

User Login IDs

#!/usr/bin/env python

print 'UserId'

for i in range(200):
   print "svt%03d" % i

Unquoting URL Data

#!/usr/bin/env python

import urllib                                                                                                                                                                       

encoded_data = """
%3CPromptEngineRuntimeContext%20xmlns%3D%22http%3A%2F%2Fwww.crystaldecisions.com%2Freport%22%20xmlns%3Axsi%3D%22http%3A%2F%2F
www.w3.org%2F2001%2FXMLSchema-instance%22%20xmlns%3Axsd%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22%20xsi%3Atype%3D%22
PromptEngineRuntimeContext%22%20version%3D%222%22%3E%3CID%3E{MachineXID}%3C%2FID%3E%3CRenderOption%20xsi%3Atype%3D%22
BOwner%26gt%3B%26lt%3B%2FOwner%26gt%3B%26lt%3BDefinition%20xsi%3Atype%3D%22Parameter%22%20id%3D%225%22%26gt%3B%26lt%3B",                                                                         
"""                                                                                                                                                                                 

data = urllib.unquote(encoded_data)                                                                                                                                                               

print data                           

Other Examples