denioflavio
12 years agoOccasional Contributor
Organizing Test Scripts
Hi everybody! I would like to receive some tips about how could I do to organize my scripts. What I mean is: I have a lot of test cases. Should I group them into a single...
- 12 years agoI think it's best to consider how you would organize any set of programs. Current thinking is to break up just about anything into reusable packages of around 10 lines, and assemble these into larger script units, building size as you go. The scripts get too long to follow if they are too big. My practical limit is how much code I can see on my screen at a time, so that I see everything that I am working on at once rather than having to rely on my memory. Scripts are organized by subdirectories. One script file can also contain a number of sub scripts. I put a numbered index of what scripts are in a file in a header at the top of the file and number the scripts so I can quickly go down through a file and find what I am looking for.
I also have a MiscFunctions file that has scripts common to all other functions and various specialized MiscFunctions that server related groups of files. The key is to not repeat yourself in coding.