A stress test example

 

When developing our development tools product, we have consider the stress DSCN1338.JPGtesting scenarios. Since our product might be used in server scenarios which means it should be stable, reliable.

 

We try hard to make sure the function still works after calling thousands of times. So we design a bunch of stress test cases for our products.

Here is a simple testing case for our PDF split and merge product. It is an ActiveX component that supports easy pdf split and merge.  

Private Sub Command1_Click()
For I = 1 To 100  ‘Change this number if you want more
DoMerge
Next I

End Sub

Private Sub DoMerge()
Dim pdf
Set pdf = CreateObject(“PDFSplitMerge.PDFSplitMerge.1″)

pdf.Split “..1.pdf”, “1;1;1″, “..sp1-%d.pdf”
pdf.Split “..1.pdf”, “1;2;3;4;1-2,3-4;1″, “..sp%d.pdf”

pdf.Merge “..sp0.pdf|..sp1.pdf”, “..m1.pdf”
pdf.Merge “..1.pdf?1-2|..sp1.pdf”, “..m2.pdf”
pdf.Merge “..1.pdf?1-2|..sp1.pdf?2″, “..m3.pdf”

Set pdf = Nothing
End Sub