PerlClip was born when I was showing James Bach how I use a single line of Perl code to generate many different types of test data that I can then copy and paste into the application I''m testing. He asked me if Perl could place data directly onto the clipboard so it didn''t have to be copied manually. After a bit of research, I found out that it could. Later, James implemented this initial concept as a tool with several useful features and thus deserves the credit for making it a reality.
References:
James Bach introduced counterstrings in his blog at http://blackbox.cs.fit.edu/blog/james/archives/000170.html.
Alan Richardson has a VBA implementation of a counterstring generator that runs in Microsoft Excel. It can write data onto the clipboard or to a file. See http://www.compendiumdev.co.uk/excel/ for more details.
“A Lesson in Scripting,” Danny R. Faught, STQE magazine, Mar/Apr 2002. Here I wrote about the Perl one-liner, which is an earlier incarnation of what PerlClip does, minus counterstrings and the clipboard.
System Requirements:
You can download PerlClip from http://www.satisfice.com/tools.shtml.
PerlClip is an open source tool, licensed under the GNU Public License. PerlClip currently runs on Windows and Mac OS X. It is available both as a Windows binary and as a script. If you run the perlclip.exe binary file on Windows, you don''t need to have the Perl interpreter installed, so you can just install the one file on your test system and then you''re ready to go. If you''re using Mac OS X, use the perlclip.pl script. A suitable Perl interpreter was already available as part of every Mac OS X installation I''ve tried. At a terminal prompt, type “perl perlclip.pl” to start PerlClip.
If you''re a Perl programmer, you can modify the perlclip.pl program. To run it on Windows, you''ll need to install the Perl interpreter and the Win32::Clipboard module. ActiveState.com is the most popular place to get Perl for Windows. Use ActiveState''s “ppm” tool to install modules after you have Perl installed.