POS Testing Script

Mar 04

POS Testing Script

This is something I had, no… wanted to write for my job. We’ve had some issues with our point of sale software interfacing properly with our receipt printers and cash drawers over long periods of time, and high sales volumes. I was unsatisfied with the other ways of testing up until this point, most ways of testing weren’t interfacing all of the hardware we had with the actual point of sale software we used, Tomax.

I wrote something that would literally RIFLE through sales at an extremely high rate of speed, completely automated. The only human interaction required was to change the roll of receipt tape when it ran out.

Here’s my README I threw together.


 /===========================================\
|  Halloween City Register Tester with Tomax  |
|        Written by Corey DeGrandchamp        |
|  Written on 03/04/2011  for Halloween City  |
 \===========================================/

To use this, make sure you are logged into the Halloween City register's test image (from 2010) as the REGADMIN user. Start the included executable file, and then launch Tomax via the runpos.bat in the Startup folder.

Once the login window is active, use the following commands to get started

T - Enters training mode. (Only available from initial login window.)

R - Enters regular ringing mode. (Only available from initial login window.)

U - Unlocks a register after it idles and wants employee ID and password.

. - Starts the loop to ring and cash out sales. This has to be run at the screen asking for emails and phone numbers, the one that asks you to press ESC to cancel.

Q - Breaks the loop after it finishes its current/in-progress run.

And the source looks something like this, edited slightly for security reasons.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.::
BreakLoop = 0
Loop {
if (BreakLoop = 1)
     break;
Sleep 300
Send {Esc}
Sleep 100
Send 303
Sleep 300
Send {Enter}
Sleep 300
Send {Tab 11}
Sleep 300
Send {Enter}
Sleep 300
Send {Tab}
Sleep 300
Send {Enter}
Sleep 300
Send 200
Sleep 1000
Send {Enter}
Sleep 4000
}
return
 
q::
BreakLoop = 1
return
 
t::
Send 999
Sleep 100
Send {Tab}
Sleep 100
Send username
Send {Tab}
Sleep 100
Send password
Sleep 100
Send {Enter}
Sleep 3000
Send username
Sleep 100
Send {Tab}
Sleep 100
Send password
Sleep 100
Send {Enter}
return
 
r::
Send {F11}
Sleep 1000
Send {Tab 20}
Sleep 100
Send {Enter}
Sleep 2000
Send username
Sleep 100
Send {Tab}
Send password
Send {Tab}
Sleep 100
Send {Enter}
Sleep 2000
Send username
Sleep 100
Send {Tab}
Send password
Send {Enter}
return
 
u::
Send username
Sleep 100
Send {Tab}
Send password
Send {Enter}
return

That’s about it, its really quite simple, but does exactly what we need it to in the fastest amount of time possible, so it’s extremely efficient at what it does.
Forgive the slightly improper syntax highlighting too, it’s hilighting for AutoIT, but the code is actually AHK, but it wasn’t a highlighting option, I just picked AIT because it’s so close to AHK, in fact AHK was based on an open source AIT, so for this demonstration it’s close enough.

I also can’t post the compiled executable file on this one, because it contains usernames and passwords it types in plain text. It also wouldn’t be of much use to people either.


Leave a Reply